@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.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/create-editor/ReactEditorView.js +66 -9
- package/dist/cjs/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
- package/dist/cjs/ui/Appearance/Comment/Comment-compiled.js +275 -0
- package/dist/cjs/ui/Appearance/Comment/Comment-emotion.js +357 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -344
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +96 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-compiled.js +190 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea-emotion.js +413 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +10 -402
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +6 -5
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +6 -4
- package/dist/cjs/ui/EditorContentContainer/styles/backgroundColorStyles.js +17 -6
- package/dist/cjs/ui/EditorContentContainer/styles/expandStyles.js +2 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +60 -9
- package/dist/es2019/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
- package/dist/es2019/ui/Appearance/Comment/Comment-compiled.js +262 -0
- package/dist/es2019/ui/Appearance/Comment/Comment-emotion.js +344 -0
- package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -337
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +96 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-compiled.js +179 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea-emotion.js +405 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +8 -400
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +6 -5
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +8 -6
- package/dist/es2019/ui/EditorContentContainer/styles/backgroundColorStyles.js +16 -5
- package/dist/es2019/ui/EditorContentContainer/styles/expandStyles.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +66 -9
- package/dist/esm/ui/Appearance/Comment/Comment-compiled.compiled.css +30 -0
- package/dist/esm/ui/Appearance/Comment/Comment-compiled.js +268 -0
- package/dist/esm/ui/Appearance/Comment/Comment-emotion.js +346 -0
- package/dist/esm/ui/Appearance/Comment/Comment.js +6 -339
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.compiled.css +96 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-compiled.js +183 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea-emotion.js +403 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +10 -398
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +6 -5
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +8 -6
- package/dist/esm/ui/EditorContentContainer/styles/backgroundColorStyles.js +16 -5
- package/dist/esm/ui/EditorContentContainer/styles/expandStyles.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Appearance/Comment/Comment-compiled.d.ts +30 -0
- package/dist/types/ui/Appearance/Comment/Comment-emotion.d.ts +20 -0
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +2 -20
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea-compiled.d.ts +56 -0
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea-emotion.d.ts +56 -0
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +6 -54
- package/dist/types/ui/EditorContentContainer/styles/backgroundColorStyles.d.ts +7 -0
- package/dist/types/ui/EditorContentContainer/styles/expandStyles.d.ts +1 -1
- package/package.json +8 -8
|
@@ -1,351 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.CommentEditorWithIntl = void 0;
|
|
9
|
-
var
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _reactIntl = require("react-intl");
|
|
15
|
-
var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
|
|
16
|
-
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
17
|
-
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
18
|
-
var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages"));
|
|
19
|
-
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
|
-
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
21
|
-
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
7
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
22
8
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _getPrimaryToolbarComponents = require("../../Toolbar/getPrimaryToolbarComponents");
|
|
29
|
-
var _ToolbarWithSizeDetector = require("../../Toolbar/ToolbarWithSizeDetector");
|
|
30
|
-
var _WithFlash = _interopRequireDefault(require("../../WithFlash"));
|
|
31
|
-
var _CommentToolbar = require("./CommentToolbar");
|
|
32
|
-
var _Toolbar = require("./Toolbar");
|
|
33
|
-
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); }
|
|
34
|
-
/**
|
|
35
|
-
* @jsxRuntime classic
|
|
36
|
-
* @jsx jsx
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
// 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
|
|
40
|
-
|
|
41
|
-
// Ignored via go/ees005
|
|
42
|
-
// eslint-disable-next-line import/no-named-as-default
|
|
43
|
-
|
|
44
|
-
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
45
|
-
|
|
46
|
-
// Remove when platform_editor_comment_editor_border_radius is cleaned up
|
|
47
|
-
var commentEditorStylesOld = (0, _react2.css)({
|
|
48
|
-
display: 'flex',
|
|
49
|
-
flexDirection: 'column',
|
|
50
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
|
-
'.less-margin > .ProseMirror': {
|
|
52
|
-
margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
|
|
53
|
-
},
|
|
54
|
-
minWidth: '272px',
|
|
55
|
-
height: 'auto',
|
|
56
|
-
backgroundColor: "var(--ds-background-input, #FFFFFF)",
|
|
57
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8C8F97)"),
|
|
58
|
-
boxSizing: 'border-box',
|
|
59
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
60
|
-
borderRadius: "var(--ds-radius-small, 3px)",
|
|
61
|
-
maxWidth: 'inherit',
|
|
62
|
-
wordWrap: 'break-word'
|
|
63
|
-
});
|
|
64
|
-
var commentEditorStyles = (0, _react2.css)({
|
|
65
|
-
display: 'flex',
|
|
66
|
-
flexDirection: 'column',
|
|
67
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
68
|
-
'.less-margin > .ProseMirror': {
|
|
69
|
-
margin: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)")
|
|
70
|
-
},
|
|
71
|
-
minWidth: '272px',
|
|
72
|
-
height: 'auto',
|
|
73
|
-
backgroundColor: "var(--ds-background-input, #FFFFFF)",
|
|
74
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-input, #8C8F97)"),
|
|
75
|
-
boxSizing: 'border-box',
|
|
76
|
-
borderRadius: "var(--ds-radius-medium, 6px)",
|
|
77
|
-
maxWidth: 'inherit',
|
|
78
|
-
wordWrap: 'break-word'
|
|
79
|
-
});
|
|
80
|
-
var modernisedEditorStyles = (0, _react2.css)({
|
|
81
|
-
borderRadius: "var(--ds-radius-xlarge, 12px)"
|
|
82
|
-
});
|
|
83
|
-
var secondaryToolbarStyles = (0, _react2.css)({
|
|
84
|
-
boxSizing: 'border-box',
|
|
85
|
-
justifyContent: 'flex-end',
|
|
86
|
-
alignItems: 'center',
|
|
87
|
-
display: 'flex',
|
|
88
|
-
padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
89
|
-
});
|
|
90
|
-
var mainToolbarCustomComponentsSlotStyleNew = (0, _react2.css)({
|
|
91
|
-
display: 'flex',
|
|
92
|
-
justifyContent: 'flex-end',
|
|
93
|
-
alignItems: 'center',
|
|
94
|
-
flexGrow: 1,
|
|
95
|
-
paddingRight: "var(--ds-space-250, 20px)",
|
|
96
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
97
|
-
'> div': {
|
|
98
|
-
display: 'flex',
|
|
99
|
-
flexShrink: 0
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
var mainToolbarCustomComponentsSlotStylePaddingOverride = (0, _react2.css)({
|
|
103
|
-
paddingRight: 0
|
|
104
|
-
});
|
|
105
|
-
var mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
106
|
-
paddingRight: 0
|
|
107
|
-
}));
|
|
108
|
-
var appearance = 'comment';
|
|
109
|
-
var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
110
|
-
var _editorAPI$blockMenu$, _editorAPI$blockMenu;
|
|
111
|
-
var editorAPI = props.editorAPI;
|
|
112
|
-
|
|
113
|
-
// Get useStandardNodeWidth from block menu plugin shared state
|
|
114
|
-
// Only access editorAPI when the experiment is enabled to avoid performance impact
|
|
115
|
-
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);
|
|
116
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
|
|
117
|
-
var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
|
|
118
|
-
return {
|
|
119
|
-
maxContentSizeReached: !!((_states$maxContentSiz = states.maxContentSizeState) !== null && _states$maxContentSiz !== void 0 && _states$maxContentSiz.maxContentSizeReached),
|
|
120
|
-
primaryToolbarComponentsState: (_states$primaryToolba = states.primaryToolbarState) === null || _states$primaryToolba === void 0 ? void 0 : _states$primaryToolba.components,
|
|
121
|
-
editorViewMode: (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode
|
|
122
|
-
};
|
|
123
|
-
}),
|
|
124
|
-
editorViewMode = _useSharedPluginState.editorViewMode,
|
|
125
|
-
primaryToolbarComponentsState = _useSharedPluginState.primaryToolbarComponentsState,
|
|
126
|
-
maxContentSizeReached = _useSharedPluginState.maxContentSizeReached;
|
|
127
|
-
var primaryToolbarState = (0, _getPrimaryToolbarComponents.getPrimaryToolbarComponents)(editorAPI, primaryToolbarComponentsState);
|
|
128
|
-
var _useSharedPluginState2 = (0, _hooks.useSharedPluginState)(editorAPI, ['media']),
|
|
129
|
-
mediaState = _useSharedPluginState2.mediaState;
|
|
130
|
-
var intl = (0, _reactIntl.useIntl)();
|
|
131
|
-
var editorDOMElement = props.editorDOMElement,
|
|
132
|
-
editorView = props.editorView,
|
|
133
|
-
editorActions = props.editorActions,
|
|
134
|
-
eventDispatcher = props.eventDispatcher,
|
|
135
|
-
providerFactory = props.providerFactory,
|
|
136
|
-
contentComponents = props.contentComponents,
|
|
137
|
-
customContentComponents = props.customContentComponents,
|
|
138
|
-
customPrimaryToolbarComponents = props.customPrimaryToolbarComponents,
|
|
139
|
-
primaryToolbarComponentsProp = props.primaryToolbarComponents,
|
|
140
|
-
customSecondaryToolbarComponents = props.customSecondaryToolbarComponents,
|
|
141
|
-
popupsMountPoint = props.popupsMountPoint,
|
|
142
|
-
popupsBoundariesElement = props.popupsBoundariesElement,
|
|
143
|
-
popupsScrollableElement = props.popupsScrollableElement,
|
|
144
|
-
maxHeight = props.maxHeight,
|
|
145
|
-
_props$minHeight = props.minHeight,
|
|
146
|
-
minHeight = _props$minHeight === void 0 ? 150 : _props$minHeight,
|
|
147
|
-
onSave = props.onSave,
|
|
148
|
-
onCancel = props.onCancel,
|
|
149
|
-
disabled = props.disabled,
|
|
150
|
-
dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
|
|
151
|
-
useStickyToolbar = props.useStickyToolbar,
|
|
152
|
-
pluginHooks = props.pluginHooks,
|
|
153
|
-
featureFlags = props.featureFlags,
|
|
154
|
-
innerRef = props.innerRef,
|
|
155
|
-
isEditorModernisationEnabled = props.isEditorModernisationEnabled;
|
|
156
|
-
var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
|
|
157
|
-
var containerElement = _react.default.useRef(null);
|
|
158
|
-
|
|
159
|
-
// Wrapper container for toolbar and content area
|
|
160
|
-
var wrapperElementRef = (0, _react.useMemo)(function () {
|
|
161
|
-
return innerRef || /*#__PURE__*/_react.default.createRef();
|
|
162
|
-
}, [innerRef]);
|
|
163
|
-
var _useState = (0, _react.useState)(false),
|
|
164
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
165
|
-
saveButtonDisabled = _useState2[0],
|
|
166
|
-
setSaveButtonDisabled = _useState2[1];
|
|
167
|
-
(0, _react.useEffect)(function () {
|
|
168
|
-
if (mediaState) {
|
|
169
|
-
mediaState.subscribeToUploadInProgressState(setSaveButtonDisabled);
|
|
170
|
-
}
|
|
171
|
-
return function () {
|
|
172
|
-
return mediaState === null || mediaState === void 0 ? void 0 : mediaState.unsubscribeFromUploadInProgressState(setSaveButtonDisabled);
|
|
173
|
-
};
|
|
174
|
-
}, [mediaState]);
|
|
175
|
-
var handleSave = (0, _react.useCallback)(function () {
|
|
176
|
-
if (editorView && onSave) {
|
|
177
|
-
onSave(editorView);
|
|
178
|
-
}
|
|
179
|
-
}, [editorView, onSave]);
|
|
180
|
-
var handleCancel = (0, _react.useCallback)(function () {
|
|
181
|
-
if (editorView && onCancel) {
|
|
182
|
-
onCancel(editorView);
|
|
183
|
-
}
|
|
184
|
-
}, [editorView, onCancel]);
|
|
185
|
-
var isShortcutToFocusToolbar = (0, _react.useCallback)(function (event) {
|
|
186
|
-
//Alt + F9 to reach first element in this main toolbar
|
|
187
|
-
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
188
|
-
}, []);
|
|
189
|
-
|
|
190
|
-
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
191
|
-
var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents;
|
|
192
|
-
var handleEscape = (0, _react.useCallback)(function (event) {
|
|
193
|
-
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
194
|
-
editorView === null || editorView === void 0 || editorView.focus();
|
|
195
|
-
}
|
|
196
|
-
event.preventDefault();
|
|
197
|
-
event.stopPropagation();
|
|
198
|
-
}, [editorView]);
|
|
199
|
-
var primaryToolbarComponents = primaryToolbarComponentsProp;
|
|
200
|
-
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
201
|
-
primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
|
|
202
|
-
}
|
|
203
|
-
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
|
|
204
|
-
var memoizedContentAreaStyles = (0, _react.useMemo)(function () {
|
|
205
|
-
return [maxHeight ?
|
|
206
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
207
|
-
(0, _react2.css)({
|
|
208
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
209
|
-
maxHeight: "".concat(maxHeight, "px"),
|
|
210
|
-
// When maxHeight is set, content area should have overflow-y explicitly set as auto
|
|
211
|
-
// 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.
|
|
212
|
-
// This will cause the content area to have content overflowing the container
|
|
213
|
-
// so need to set overflow-y as auto to make sure the content area is scrollable
|
|
214
|
-
overflowY: 'auto'
|
|
215
|
-
}) : null];
|
|
216
|
-
}, [maxHeight]);
|
|
217
|
-
var contentAreaStyles = (0, _expValEquals.expValEquals)('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? memoizedContentAreaStyles : [maxHeight ?
|
|
218
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
219
|
-
(0, _react2.css)({
|
|
220
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
221
|
-
maxHeight: "".concat(maxHeight, "px"),
|
|
222
|
-
// When maxHeight is set, content area should have overflow-y explicitly set as auto
|
|
223
|
-
// 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.
|
|
224
|
-
// This will cause the content area to have content overflowing the container
|
|
225
|
-
// so need to set overflow-y as auto to make sure the content area is scrollable
|
|
226
|
-
overflowY: 'auto'
|
|
227
|
-
}) : null];
|
|
228
|
-
var customToolbarSlot = (0, _react2.jsx)("div", {
|
|
229
|
-
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew, isToolbarAIFCEnabled && mainToolbarCustomComponentsSlotStylePaddingOverride]
|
|
230
|
-
}, customPrimaryToolbarComponents);
|
|
231
|
-
return (0, _react2.jsx)(_WithFlash.default, {
|
|
232
|
-
animate: maxContentSizeReached
|
|
233
|
-
}, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
|
|
234
|
-
css: [(0, _expValEquals.expValEquals)('platform_editor_comment_editor_border_radius', 'isEnabled', true) ? commentEditorStyles : commentEditorStylesOld, isEditorModernisationEnabled && modernisedEditorStyles,
|
|
235
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
236
|
-
(0, _react2.css)({
|
|
237
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
238
|
-
minHeight: "".concat(minHeight, "px")
|
|
239
|
-
})]
|
|
240
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
241
|
-
,
|
|
242
|
-
className: "akEditor",
|
|
243
|
-
ref: wrapperElementRef
|
|
244
|
-
}, (0, _react2.jsx)(_Toolbar.MainToolbar, {
|
|
245
|
-
isEditorModernisationEnabled: isEditorModernisationEnabled,
|
|
246
|
-
useStickyToolbar: useStickyToolbar,
|
|
247
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled,
|
|
248
|
-
isNewToolbarEnabled: isToolbarAIFCEnabled
|
|
249
|
-
}, isToolbarAIFCEnabled ? (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
250
|
-
editorView: editorView,
|
|
251
|
-
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
252
|
-
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
253
|
-
handleEscape: handleEscape,
|
|
254
|
-
editorAppearance: appearance,
|
|
255
|
-
useStickyToolbar: useStickyToolbar,
|
|
256
|
-
intl: intl
|
|
257
|
-
}, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
|
|
258
|
-
editorAPI: editorAPI,
|
|
259
|
-
editorView: editorView,
|
|
260
|
-
editorAppearance: appearance,
|
|
261
|
-
disabled: !!disabled,
|
|
262
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
263
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
264
|
-
popupsMountPoint: popupsMountPoint
|
|
265
|
-
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
266
|
-
editorView: editorView,
|
|
267
|
-
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
268
|
-
isShortcutToFocusToolbar: isShortcutToFocusToolbar,
|
|
269
|
-
handleEscape: handleEscape,
|
|
270
|
-
editorAppearance: appearance,
|
|
271
|
-
useStickyToolbar: useStickyToolbar,
|
|
272
|
-
intl: intl
|
|
273
|
-
}, (0, _react2.jsx)(_ToolbarWithSizeDetector.ToolbarWithSizeDetector
|
|
274
|
-
// Ignored via go/ees005
|
|
275
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
276
|
-
, {
|
|
277
|
-
editorView: editorView,
|
|
278
|
-
editorActions: editorActions
|
|
279
|
-
// Ignored via go/ees005
|
|
280
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
281
|
-
,
|
|
282
|
-
eventDispatcher: eventDispatcher
|
|
283
|
-
// Ignored via go/ees005
|
|
284
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
285
|
-
,
|
|
286
|
-
providerFactory: providerFactory,
|
|
287
|
-
appearance: appearance,
|
|
288
|
-
items: primaryToolbarComponents,
|
|
289
|
-
popupsMountPoint: popupsMountPoint,
|
|
290
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
291
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
292
|
-
disabled: !!disabled,
|
|
293
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
294
|
-
containerElement: containerElement.current,
|
|
295
|
-
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
296
|
-
}), customToolbarSlot)), (0, _react2.jsx)(_ClickAreaBlock.default, {
|
|
297
|
-
editorView: editorView,
|
|
298
|
-
editorDisabled: disabled
|
|
299
|
-
}, (0, _react2.jsx)(_ui.WidthConsumer, null, function (_ref) {
|
|
300
|
-
var width = _ref.width;
|
|
301
|
-
return (0, _react2.jsx)(_EditorContentContainer.default, {
|
|
302
|
-
ref: containerElement,
|
|
303
|
-
css: contentAreaStyles,
|
|
304
|
-
isScrollable: maxHeight ? true : undefined
|
|
305
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
306
|
-
,
|
|
307
|
-
className: (0, _classnames.default)('ak-editor-content-area', {
|
|
308
|
-
'less-margin': width < _editorSharedStyles.akEditorMobileBreakoutPoint
|
|
309
|
-
}),
|
|
310
|
-
featureFlags: featureFlags,
|
|
311
|
-
viewMode: editorViewMode,
|
|
312
|
-
appearance: appearance,
|
|
313
|
-
useStandardNodeWidth: useStandardNodeWidth
|
|
314
|
-
}, customContentComponents && 'before' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.before) : (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents), (0, _react2.jsx)(_PluginSlot.default, {
|
|
315
|
-
editorView: editorView,
|
|
316
|
-
editorActions: editorActions,
|
|
317
|
-
eventDispatcher: eventDispatcher,
|
|
318
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
319
|
-
providerFactory: providerFactory,
|
|
320
|
-
appearance: appearance,
|
|
321
|
-
items: contentComponents,
|
|
322
|
-
popupsMountPoint: popupsMountPoint,
|
|
323
|
-
popupsBoundariesElement: popupsBoundariesElement,
|
|
324
|
-
popupsScrollableElement: popupsScrollableElement,
|
|
325
|
-
containerElement: containerElement.current,
|
|
326
|
-
disabled: !!disabled,
|
|
327
|
-
wrapperElement: wrapperElementRef.current,
|
|
328
|
-
pluginHooks: pluginHooks
|
|
329
|
-
}), editorDOMElement, customContentComponents && 'after' in customContentComponents ? (0, _contentComponentWrapper.contentComponentClickWrapper)(customContentComponents.after) : null);
|
|
330
|
-
}))), showSecondaryToolbar && (0, _react2.jsx)("div", {
|
|
331
|
-
css: secondaryToolbarStyles,
|
|
332
|
-
"data-testid": "ak-editor-secondary-toolbar"
|
|
333
|
-
}, (0, _react2.jsx)(_buttonGroup.default, null, !!onSave && (0, _react2.jsx)(_new.default, {
|
|
334
|
-
appearance: "primary",
|
|
335
|
-
onClick: handleSave,
|
|
336
|
-
testId: "comment-save-button",
|
|
337
|
-
isDisabled: disabled || saveButtonDisabled,
|
|
338
|
-
interactionName: "editor-comment-save-button"
|
|
339
|
-
}, intl.formatMessage(_messages.default.saveButton)), !!onCancel && (0, _react2.jsx)(_new.default, {
|
|
340
|
-
appearance: "subtle",
|
|
341
|
-
onClick: handleCancel,
|
|
342
|
-
testId: "comment-cancel-button",
|
|
343
|
-
isDisabled: disabled,
|
|
344
|
-
interactionName: "editor-comment-cancel-button"
|
|
345
|
-
}, intl.formatMessage(_messages.default.cancelButton))), (0, _react2.jsx)("span", {
|
|
346
|
-
style: {
|
|
347
|
-
flexGrow: 1
|
|
348
|
-
}
|
|
349
|
-
}), customSecondaryToolbarComponents)));
|
|
350
|
-
};
|
|
351
|
-
CommentEditorWithIntl.displayName = 'CommentEditorAppearance';
|
|
9
|
+
var _CommentCompiled = require("./Comment-compiled");
|
|
10
|
+
var _CommentEmotion = require("./Comment-emotion");
|
|
11
|
+
var CommentEditorWithIntl = exports.CommentEditorWithIntl = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
12
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
13
|
+
}, _CommentCompiled.CommentEditorWithIntlCompiled, _CommentEmotion.CommentEditorWithIntlEmotion);
|
|
@@ -170,7 +170,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
170
170
|
(0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)(isToolbarAIFCEnabled)
|
|
171
171
|
}
|
|
172
172
|
}, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? /*#__PURE__*/_react.default.createElement(_FullPageToolbarNext.FullPageToolbarNext, {
|
|
173
|
-
disabled: !!props.disabled || !hasHadInteraction && (0, _expValEquals.expValEquals)('platform_editor_default_toolbar_state', 'isEnabled', true),
|
|
173
|
+
disabled: (0, _expValEquals.expValEquals)('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) ? !hasHadInteraction ? false : !!props.disabled : !!props.disabled || !hasHadInteraction && (0, _expValEquals.expValEquals)('platform_editor_default_toolbar_state', 'isEnabled', true),
|
|
174
174
|
disabledWithoutInteractionLogic: !!props.disabled,
|
|
175
175
|
toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
|
|
176
176
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
|
|
2
|
+
._v5641fxv{transition:max-width .5s cubic-bezier(.15,1,.3,1)}
|
|
3
|
+
._v5642kub{transition:padding 0ms cubic-bezier(.15,1,.3,1)}._11bl1txw >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{display:flex}
|
|
4
|
+
._12glglyw[data-markdown-mode-hide-prosemirror=true]>.ak-editor-content-area>.ProseMirror{display:none}
|
|
5
|
+
._13jk1txw >.ak-editor-content-area{display:flex}
|
|
6
|
+
._13svglyw .ProseMirror>ol:not([data-node-type=actionList]):not([data-node-type=decisionList]){clear:none}
|
|
7
|
+
._13t61wug >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{flex-basis:auto}
|
|
8
|
+
._142emslj .fabric-editor--full-width-mode .code-block{max-width:calc(100% - 4px)}
|
|
9
|
+
._1593idpf >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{min-height:0}
|
|
10
|
+
._16jlkb7n{flex-grow:1}
|
|
11
|
+
._17q71osq .fabric-editor--full-width-mode .extension-container.inline{max-width:100%}
|
|
12
|
+
._18q6usvi .ProseMirror{box-sizing:border-box}
|
|
13
|
+
._18u01wug{margin-left:auto}
|
|
14
|
+
._18u0idpf{margin-left:0}
|
|
15
|
+
._19bv1ex1{padding-left:52px}
|
|
16
|
+
._19bvidpf{padding-left:0}
|
|
17
|
+
._19bvt9kd{padding-left:72px}
|
|
18
|
+
._19pk1wug{margin-top:auto}
|
|
19
|
+
._19pkidpf{margin-top:0}
|
|
20
|
+
._19pknm9q{margin-top:calc(var(--ds-space-500, 40px) + 1px)}
|
|
21
|
+
._1a1d1osq >.ak-editor-content-area{height:100%}
|
|
22
|
+
._1b7c1kw7 .fabric-editor--full-width-mode td .extension-container.inline{max-width:inherit}
|
|
23
|
+
._1bsb1osq{width:100%}
|
|
24
|
+
._1e0c1txw{display:flex}
|
|
25
|
+
._1e0cglyw{display:none}
|
|
26
|
+
._1e8kkb7n >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{flex-grow:1}
|
|
27
|
+
._1f38dez1{container-name:editor-area}
|
|
28
|
+
._1gl01ejb .ProseMirror>p:last-child{margin-bottom:var(--ds-space-300,24px)}
|
|
29
|
+
._1k8i1osq .ProseMirror .pm-table-wrapper>table{width:100%}
|
|
30
|
+
._1n5qidpf >.ak-editor-content-area{padding-left:0}
|
|
31
|
+
._1nw4glyw .ProseMirror>h1{clear:none}
|
|
32
|
+
._1qzyglyw .ProseMirror>h3{clear:none}
|
|
33
|
+
._1rnyglyw .ProseMirror>h5{clear:none}
|
|
34
|
+
._1tb2idpf .ProseMirror .pm-table-wrapper>table{margin-left:0}
|
|
35
|
+
._1ul9idpf{min-width:0}
|
|
36
|
+
._1vbxidpf >.ak-editor-content-area{min-height:0}
|
|
37
|
+
._1wpzesu3{align-self:flex-end}
|
|
38
|
+
._1wrrusvi >.ak-editor-content-area{box-sizing:border-box}
|
|
39
|
+
._1wxymslj .fabric-editor--full-width-mode .extension-container{max-width:calc(100% - 4px)}
|
|
40
|
+
._1xouidpf >.ak-editor-content-area{min-width:0}
|
|
41
|
+
._2hwx1wug{margin-right:auto}
|
|
42
|
+
._2hwxidpf{margin-right:0}
|
|
43
|
+
._2lx21bp4{flex-direction:column}
|
|
44
|
+
._2lx2vrvc{flex-direction:row}
|
|
45
|
+
._4t3i1ap5{height:calc(100% - 105px)}
|
|
46
|
+
._4t3i1osq{height:100%}
|
|
47
|
+
._4t3ibhu0{height:calc(100% - var(--ak-editor-fullpage-toolbar-height))}
|
|
48
|
+
._4tbp1osq >.ak-editor-content-area{width:100%}
|
|
49
|
+
._71ybidpf >.ak-editor-content-area{padding-right:0}
|
|
50
|
+
._7cca15wb{container-type:inline-size}
|
|
51
|
+
._7uc0glyw .ProseMirror>ul{clear:none}
|
|
52
|
+
._8j6w1lxk.ak-editor-content-area-no-toolbar{height:calc(100% + 1px)}
|
|
53
|
+
._8vye1n1a .ProseMirror .pm-table-wrapper>table{margin-right:-1px}
|
|
54
|
+
._9dtbmslj .fabric-editor--full-width-mode .multiBodiedExtension--container{max-width:calc(100% - 4px)}
|
|
55
|
+
._amwgglyw[data-markdown-mode-hide-scroll-gutter=true]>.ak-editor-content-area>[data-vc=scroll-gutter]{display:none}
|
|
56
|
+
._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
|
|
57
|
+
._boivkb7n >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{flex-shrink:1}
|
|
58
|
+
._ca0qidpf{padding-top:0}
|
|
59
|
+
._ca0qoahv{padding-top:var(--ds-space-600,3pc)}
|
|
60
|
+
._ca0qxy5q{padding-top:var(--ds-space-400,2pc)}
|
|
61
|
+
._evz0idpf >.ak-editor-content-area{padding-bottom:0}
|
|
62
|
+
._fh67idpf >.ak-editor-content-area{padding-top:0}
|
|
63
|
+
._i92uagmp .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .fabric-editor-breakout-mark{transform:none!important}
|
|
64
|
+
._j9k7kb7n .ProseMirror{flex-grow:1}
|
|
65
|
+
._l4a11hrf .ProseMirror>*{clear:both}
|
|
66
|
+
._li931osq >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{width:100%}
|
|
67
|
+
._n3tdidpf{padding-bottom:0}
|
|
68
|
+
._n3tdoahv{padding-bottom:var(--ds-space-600,3pc)}
|
|
69
|
+
._njlp131u{contain:layout style inline-size}
|
|
70
|
+
._ongaglyw .ProseMirror>h4{clear:none}
|
|
71
|
+
._otyr1wug{margin-bottom:auto}
|
|
72
|
+
._otyridpf{margin-bottom:0}
|
|
73
|
+
._p12f5kin{max-width:var(--ak-editor-content-area-max-width)}
|
|
74
|
+
._p12fglyw{max-width:none}
|
|
75
|
+
._pnffaq80 .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .fabric-editor-breakout-mark{width:100%!important}
|
|
76
|
+
._q0l01bp4 >.ak-editor-content-area{flex-direction:column}
|
|
77
|
+
._qgzyidpf >.ak-editor-content-area>[data-testid=plugins-components-wrapper]{min-width:0}
|
|
78
|
+
._qkfz261p .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .fabric-editor-breakout-mark{margin-left:unset!important}
|
|
79
|
+
._t2fzglyw .ProseMirror>p{clear:none}
|
|
80
|
+
._tynl4diq .fabric-editor--full-width-mode [data-layout-section]{max-width:calc(100% + 40px)}
|
|
81
|
+
._tynlfknx .fabric-editor--full-width-mode [data-layout-section]{max-width:calc(100% + 24px)}
|
|
82
|
+
._u5f31ex1{padding-right:52px}
|
|
83
|
+
._u5f3idpf{padding-right:0}
|
|
84
|
+
._u5f3t9kd{padding-right:72px}
|
|
85
|
+
._vchhusvi{box-sizing:border-box}
|
|
86
|
+
._vtulglyw .ProseMirror>h6{clear:none}
|
|
87
|
+
._vwz41tcg{line-height:24px}
|
|
88
|
+
._xpemaq80 .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .extension-container.block{width:100%!important}
|
|
89
|
+
._yq1qglyw .ProseMirror>h2{clear:none}
|
|
90
|
+
._zr7faq80 .fabric-editor--full-width-mode:not(:has(#chromeless-editor)) .pm-table-container{width:100%!important}
|
|
91
|
+
.ak-editor-content-area-no-toolbar ._1uizkqmb{padding-top:calc(var(--ds-space-600, 3pc) + var(--ak-editor-fullpage-toolbar-height) + 1px)}
|
|
92
|
+
.extension-editable-area ._13hh1y6m{align-self:flex-start}
|
|
93
|
+
.extension-editable-area ._1hgw1wug{height:auto}
|
|
94
|
+
.extension-editable-area ._1t1q1if8{position:sticky}
|
|
95
|
+
.extension-editable-area ._uj9widpf{top:0}
|
|
96
|
+
@container editor-area (max-width: 600px){._1d7gidpf{padding-top:0}._n2nw1tcg{padding-right:24px}._d329idpf{padding-bottom:0}._105p1tcg{padding-left:24px}}
|