@atlaskit/editor-core 191.0.8 → 191.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/afm-cc/tsconfig.json +3 -3
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +19 -6
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +6 -3
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +38 -6
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +6 -3
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +19 -6
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/types/editor-props.d.ts +1 -1
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +2 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/Comment/Toolbar.d.ts +2 -1
- package/package.json +6 -10
- package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +0 -166
- package/dist/cjs/plugins/find-replace/actions.js +0 -19
- package/dist/cjs/plugins/find-replace/commands-with-analytics.js +0 -101
- package/dist/cjs/plugins/find-replace/commands.js +0 -255
- package/dist/cjs/plugins/find-replace/index.js +0 -94
- package/dist/cjs/plugins/find-replace/keymap.js +0 -24
- package/dist/cjs/plugins/find-replace/plugin-key.js +0 -8
- package/dist/cjs/plugins/find-replace/plugin.js +0 -138
- package/dist/cjs/plugins/find-replace/reducer.js +0 -61
- package/dist/cjs/plugins/find-replace/styles.js +0 -16
- package/dist/cjs/plugins/find-replace/types.js +0 -5
- package/dist/cjs/plugins/find-replace/ui/Find.js +0 -308
- package/dist/cjs/plugins/find-replace/ui/FindReplace.js +0 -103
- package/dist/cjs/plugins/find-replace/ui/FindReplaceToolbarButton.js +0 -132
- package/dist/cjs/plugins/find-replace/ui/FindReplaceTooltipButton.js +0 -76
- package/dist/cjs/plugins/find-replace/ui/Replace.js +0 -174
- package/dist/cjs/plugins/find-replace/ui/styles.js +0 -44
- package/dist/cjs/plugins/find-replace/utils/batch-decorations.js +0 -310
- package/dist/cjs/plugins/find-replace/utils/commands.js +0 -16
- package/dist/cjs/plugins/find-replace/utils/index.js +0 -290
- package/dist/cjs/utils/array.js +0 -13
- package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +0 -153
- package/dist/es2019/plugins/find-replace/actions.js +0 -13
- package/dist/es2019/plugins/find-replace/commands-with-analytics.js +0 -72
- package/dist/es2019/plugins/find-replace/commands.js +0 -240
- package/dist/es2019/plugins/find-replace/index.js +0 -89
- package/dist/es2019/plugins/find-replace/keymap.js +0 -16
- package/dist/es2019/plugins/find-replace/plugin-key.js +0 -2
- package/dist/es2019/plugins/find-replace/plugin.js +0 -117
- package/dist/es2019/plugins/find-replace/reducer.js +0 -56
- package/dist/es2019/plugins/find-replace/styles.js +0 -17
- package/dist/es2019/plugins/find-replace/types.js +0 -1
- package/dist/es2019/plugins/find-replace/ui/Find.js +0 -284
- package/dist/es2019/plugins/find-replace/ui/FindReplace.js +0 -78
- package/dist/es2019/plugins/find-replace/ui/FindReplaceToolbarButton.js +0 -122
- package/dist/es2019/plugins/find-replace/ui/FindReplaceTooltipButton.js +0 -50
- package/dist/es2019/plugins/find-replace/ui/Replace.js +0 -152
- package/dist/es2019/plugins/find-replace/ui/styles.js +0 -48
- package/dist/es2019/plugins/find-replace/utils/batch-decorations.js +0 -189
- package/dist/es2019/plugins/find-replace/utils/commands.js +0 -6
- package/dist/es2019/plugins/find-replace/utils/index.js +0 -249
- package/dist/es2019/utils/array.js +0 -3
- package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +0 -157
- package/dist/esm/plugins/find-replace/actions.js +0 -13
- package/dist/esm/plugins/find-replace/commands-with-analytics.js +0 -95
- package/dist/esm/plugins/find-replace/commands.js +0 -248
- package/dist/esm/plugins/find-replace/index.js +0 -87
- package/dist/esm/plugins/find-replace/keymap.js +0 -18
- package/dist/esm/plugins/find-replace/plugin-key.js +0 -2
- package/dist/esm/plugins/find-replace/plugin.js +0 -133
- package/dist/esm/plugins/find-replace/reducer.js +0 -54
- package/dist/esm/plugins/find-replace/styles.js +0 -10
- package/dist/esm/plugins/find-replace/types.js +0 -1
- package/dist/esm/plugins/find-replace/ui/Find.js +0 -302
- package/dist/esm/plugins/find-replace/ui/FindReplace.js +0 -97
- package/dist/esm/plugins/find-replace/ui/FindReplaceToolbarButton.js +0 -126
- package/dist/esm/plugins/find-replace/ui/FindReplaceTooltipButton.js +0 -69
- package/dist/esm/plugins/find-replace/ui/Replace.js +0 -168
- package/dist/esm/plugins/find-replace/ui/styles.js +0 -37
- package/dist/esm/plugins/find-replace/utils/batch-decorations.js +0 -304
- package/dist/esm/plugins/find-replace/utils/commands.js +0 -10
- package/dist/esm/plugins/find-replace/utils/index.js +0 -280
- package/dist/esm/utils/array.js +0 -7
- package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +0 -4
- package/dist/types/plugins/find-replace/actions.d.ts +0 -64
- package/dist/types/plugins/find-replace/commands-with-analytics.d.ts +0 -27
- package/dist/types/plugins/find-replace/commands.d.ts +0 -12
- package/dist/types/plugins/find-replace/index.d.ts +0 -3
- package/dist/types/plugins/find-replace/keymap.d.ts +0 -4
- package/dist/types/plugins/find-replace/plugin-key.d.ts +0 -3
- package/dist/types/plugins/find-replace/plugin.d.ts +0 -6
- package/dist/types/plugins/find-replace/reducer.d.ts +0 -4
- package/dist/types/plugins/find-replace/styles.d.ts +0 -3
- package/dist/types/plugins/find-replace/types.d.ts +0 -79
- package/dist/types/plugins/find-replace/ui/Find.d.ts +0 -71
- package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +0 -43
- package/dist/types/plugins/find-replace/ui/FindReplaceToolbarButton.d.ts +0 -21
- package/dist/types/plugins/find-replace/ui/FindReplaceTooltipButton.d.ts +0 -18
- package/dist/types/plugins/find-replace/ui/Replace.d.ts +0 -27
- package/dist/types/plugins/find-replace/ui/styles.d.ts +0 -6
- package/dist/types/plugins/find-replace/utils/batch-decorations.d.ts +0 -36
- package/dist/types/plugins/find-replace/utils/commands.d.ts +0 -2
- package/dist/types/plugins/find-replace/utils/index.d.ts +0 -49
- package/dist/types/utils/array.d.ts +0 -1
- package/dist/types-ts4.5/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +0 -4
- package/dist/types-ts4.5/plugins/find-replace/actions.d.ts +0 -64
- package/dist/types-ts4.5/plugins/find-replace/commands-with-analytics.d.ts +0 -27
- package/dist/types-ts4.5/plugins/find-replace/commands.d.ts +0 -12
- package/dist/types-ts4.5/plugins/find-replace/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/find-replace/keymap.d.ts +0 -4
- package/dist/types-ts4.5/plugins/find-replace/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/find-replace/plugin.d.ts +0 -6
- package/dist/types-ts4.5/plugins/find-replace/reducer.d.ts +0 -4
- package/dist/types-ts4.5/plugins/find-replace/styles.d.ts +0 -3
- package/dist/types-ts4.5/plugins/find-replace/types.d.ts +0 -79
- package/dist/types-ts4.5/plugins/find-replace/ui/Find.d.ts +0 -71
- package/dist/types-ts4.5/plugins/find-replace/ui/FindReplace.d.ts +0 -43
- package/dist/types-ts4.5/plugins/find-replace/ui/FindReplaceToolbarButton.d.ts +0 -21
- package/dist/types-ts4.5/plugins/find-replace/ui/FindReplaceTooltipButton.d.ts +0 -18
- package/dist/types-ts4.5/plugins/find-replace/ui/Replace.d.ts +0 -27
- package/dist/types-ts4.5/plugins/find-replace/ui/styles.d.ts +0 -6
- package/dist/types-ts4.5/plugins/find-replace/utils/batch-decorations.d.ts +0 -36
- package/dist/types-ts4.5/plugins/find-replace/utils/commands.d.ts +0 -2
- package/dist/types-ts4.5/plugins/find-replace/utils/index.d.ts +0 -49
- package/dist/types-ts4.5/utils/array.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 191.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#64683](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/64683) [`79c9857b9edb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/79c9857b9edb) - [ux] [EDF-73] - Added ability for products to toggle on two-line toolbar for comment editors
|
|
8
|
+
|
|
9
|
+
## 191.0.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#66388](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66388) [`1698d83da05f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1698d83da05f) - ED-21743: Extract find replace plugin from editor-core
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 191.0.8
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -133,6 +133,9 @@
|
|
|
133
133
|
{
|
|
134
134
|
"path": "../../editor-plugin-feedback-dialog/afm-cc/tsconfig.json"
|
|
135
135
|
},
|
|
136
|
+
{
|
|
137
|
+
"path": "../../editor-plugin-find-replace/afm-cc/tsconfig.json"
|
|
138
|
+
},
|
|
136
139
|
{
|
|
137
140
|
"path": "../../editor-plugin-floating-toolbar/afm-cc/tsconfig.json"
|
|
138
141
|
},
|
|
@@ -277,9 +280,6 @@
|
|
|
277
280
|
{
|
|
278
281
|
"path": "../../../elements/task-decision/afm-cc/tsconfig.json"
|
|
279
282
|
},
|
|
280
|
-
{
|
|
281
|
-
"path": "../../../design-system/textfield/afm-cc/tsconfig.json"
|
|
282
|
-
},
|
|
283
283
|
{
|
|
284
284
|
"path": "../../../design-system/theme/afm-cc/tsconfig.json"
|
|
285
285
|
},
|
|
@@ -10,12 +10,6 @@ Object.defineProperty(exports, "avatarGroupPlugin", {
|
|
|
10
10
|
return _avatarGroup.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
Object.defineProperty(exports, "findReplacePlugin", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _findReplace.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
13
|
Object.defineProperty(exports, "jiraIssuePlugin", {
|
|
20
14
|
enumerable: true,
|
|
21
15
|
get: function get() {
|
|
@@ -23,5 +17,4 @@ Object.defineProperty(exports, "jiraIssuePlugin", {
|
|
|
23
17
|
}
|
|
24
18
|
});
|
|
25
19
|
var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
|
|
26
|
-
var _findReplace = _interopRequireDefault(require("./find-replace"));
|
|
27
20
|
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
@@ -53,6 +53,7 @@ var _plugins = require("../plugins");
|
|
|
53
53
|
var _editorPluginExtension = require("@atlaskit/editor-plugin-extension");
|
|
54
54
|
var _editorPluginBeforePrimaryToolbar = require("@atlaskit/editor-plugin-before-primary-toolbar");
|
|
55
55
|
var _editorPluginFeedbackDialog = require("@atlaskit/editor-plugin-feedback-dialog");
|
|
56
|
+
var _editorPluginFindReplace = require("@atlaskit/editor-plugin-find-replace");
|
|
56
57
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
57
58
|
var _isFullPage = require("../utils/is-full-page");
|
|
58
59
|
var _default = require("./default");
|
|
@@ -397,7 +398,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
397
398
|
}]);
|
|
398
399
|
}
|
|
399
400
|
return builder;
|
|
400
|
-
}).maybeAdd(
|
|
401
|
+
}).maybeAdd(_editorPluginFindReplace.findReplacePlugin, function (plugin, builder) {
|
|
401
402
|
if (props.allowFindReplace) {
|
|
402
403
|
return builder.add([plugin, {
|
|
403
404
|
takeFullWidth: !props.hideAvatarGroup && !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
@@ -103,6 +103,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
103
103
|
//Alt + F9 to reach first element in this main toolbar
|
|
104
104
|
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
105
105
|
};
|
|
106
|
+
var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents && !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.twoLineEditorToolbar);
|
|
106
107
|
var handleEscape = function handleEscape(event) {
|
|
107
108
|
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
108
109
|
editorView === null || editorView === void 0 || editorView.focus();
|
|
@@ -117,7 +118,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
117
118
|
className: "akEditor",
|
|
118
119
|
ref: _this.wrapperElementRef
|
|
119
120
|
}, (0, _react2.jsx)(_Toolbar2.MainToolbar, {
|
|
120
|
-
useStickyToolbar: useStickyToolbar
|
|
121
|
+
useStickyToolbar: useStickyToolbar,
|
|
122
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
121
123
|
}, (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
122
124
|
editorView: editorView,
|
|
123
125
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -138,9 +140,10 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
138
140
|
popupsScrollableElement: popupsScrollableElement,
|
|
139
141
|
disabled: !!disabled,
|
|
140
142
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
141
|
-
containerElement: _this.containerElement
|
|
143
|
+
containerElement: _this.containerElement,
|
|
144
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
142
145
|
}), (0, _react2.jsx)("div", {
|
|
143
|
-
css: _Toolbar2.mainToolbarCustomComponentsSlotStyle
|
|
146
|
+
css: (0, _Toolbar2.mainToolbarCustomComponentsSlotStyle)(isTwoLineToolbarEnabled)
|
|
144
147
|
}, customPrimaryToolbarComponents))), (0, _react2.jsx)(_Addon.ClickAreaBlock, {
|
|
145
148
|
editorView: editorView,
|
|
146
149
|
editorDisabled: disabled
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.mainToolbarCustomComponentsSlotStyle = exports.TableControlsPadding = exports.MainToolbar = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
10
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
@@ -18,7 +19,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
18
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
21
|
var TableControlsPadding = exports.TableControlsPadding = 20;
|
|
21
|
-
var
|
|
22
|
+
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
23
|
+
var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
|
|
24
|
+
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
25
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", ";\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n ", "\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
|
|
26
|
+
};
|
|
22
27
|
var stickyToolbarWrapperStyle = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", ";\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorMenuZIndex, _editorSharedStyles.akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(_colors.N30, ")"));
|
|
23
28
|
var StickyToolbar = function StickyToolbar(props) {
|
|
24
29
|
var _useState = (0, _react.useState)(0),
|
|
@@ -38,14 +43,14 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
38
43
|
}
|
|
39
44
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
40
45
|
return (0, _react2.jsx)("div", {
|
|
41
|
-
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n top: ", "px;\n "])), top)],
|
|
46
|
+
css: [mainToolbarWrapperStyle(props.twoLineEditorToolbar), stickyToolbarWrapperStyle, (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n top: ", "px;\n "])), top)],
|
|
42
47
|
"data-testid": "ak-editor-main-toolbar",
|
|
43
48
|
className: 'show-keyline'
|
|
44
49
|
}, props.children);
|
|
45
50
|
};
|
|
46
51
|
var FixedToolbar = function FixedToolbar(props) {
|
|
47
52
|
return (0, _react2.jsx)("div", {
|
|
48
|
-
css: mainToolbarWrapperStyle,
|
|
53
|
+
css: mainToolbarWrapperStyle(props.twoLineEditorToolbar),
|
|
49
54
|
"data-testid": "ak-editor-main-toolbar"
|
|
50
55
|
}, props.children);
|
|
51
56
|
};
|
|
@@ -79,10 +84,18 @@ var getStickyParameters = function getStickyParameters(configuration) {
|
|
|
79
84
|
};
|
|
80
85
|
var MainToolbar = exports.MainToolbar = function MainToolbar(_ref) {
|
|
81
86
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
87
|
+
twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
82
88
|
children = _ref.children;
|
|
83
89
|
if (useStickyToolbar) {
|
|
84
|
-
return (0, _react2.jsx)(StickyToolbar, getStickyParameters(useStickyToolbar),
|
|
90
|
+
return (0, _react2.jsx)(StickyToolbar, (0, _extends2.default)({}, getStickyParameters(useStickyToolbar), {
|
|
91
|
+
twoLineEditorToolbar: twoLineEditorToolbar
|
|
92
|
+
}), children);
|
|
85
93
|
}
|
|
86
|
-
return (0, _react2.jsx)(FixedToolbar,
|
|
94
|
+
return (0, _react2.jsx)(FixedToolbar, {
|
|
95
|
+
twoLineEditorToolbar: twoLineEditorToolbar
|
|
96
|
+
}, children);
|
|
87
97
|
};
|
|
88
|
-
var mainToolbarCustomComponentsSlotStyle = exports.mainToolbarCustomComponentsSlotStyle =
|
|
98
|
+
var mainToolbarCustomComponentsSlotStyle = exports.mainToolbarCustomComponentsSlotStyle = function mainToolbarCustomComponentsSlotStyle() {
|
|
99
|
+
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
100
|
+
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n ", "\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n {\n padding-right: 0;\n }\n }\n "));
|
|
101
|
+
};
|
|
@@ -70,7 +70,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
70
70
|
featureFlags: props.featureFlags || {},
|
|
71
71
|
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions,
|
|
72
72
|
editorAPI: editorAPI
|
|
73
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.
|
|
73
|
+
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
74
74
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
75
75
|
popupsMountPoint: props.popupsMountPoint,
|
|
76
76
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -23,7 +23,7 @@ var _panel = require("./panel");
|
|
|
23
23
|
var _styles4 = require("@atlaskit/editor-plugin-placeholder-text/styles");
|
|
24
24
|
var _extension = require("./extension");
|
|
25
25
|
var _expand = require("./expand");
|
|
26
|
-
var _styles5 = require("
|
|
26
|
+
var _styles5 = require("@atlaskit/editor-plugin-find-replace/styles");
|
|
27
27
|
var _tasksAndDecisions = require("./tasks-and-decisions");
|
|
28
28
|
var _status = require("./status");
|
|
29
29
|
var _date = require("./date");
|
|
@@ -39,10 +39,11 @@ import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
|
39
39
|
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
40
40
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
41
41
|
import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
42
|
-
import { avatarGroupPlugin,
|
|
42
|
+
import { avatarGroupPlugin, jiraIssuePlugin } from '../plugins';
|
|
43
43
|
import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
44
44
|
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
|
|
45
45
|
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
46
|
+
import { findReplacePlugin } from '@atlaskit/editor-plugin-find-replace';
|
|
46
47
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
47
48
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
48
49
|
import { createDefaultPreset } from './default';
|
|
@@ -128,6 +128,7 @@ class Editor extends React.Component {
|
|
|
128
128
|
//Alt + F9 to reach first element in this main toolbar
|
|
129
129
|
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
130
130
|
};
|
|
131
|
+
const isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents && !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.twoLineEditorToolbar);
|
|
131
132
|
const handleEscape = event => {
|
|
132
133
|
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
133
134
|
editorView === null || editorView === void 0 ? void 0 : editorView.focus();
|
|
@@ -144,7 +145,8 @@ class Editor extends React.Component {
|
|
|
144
145
|
className: "akEditor",
|
|
145
146
|
ref: this.wrapperElementRef
|
|
146
147
|
}, jsx(MainToolbar, {
|
|
147
|
-
useStickyToolbar: useStickyToolbar
|
|
148
|
+
useStickyToolbar: useStickyToolbar,
|
|
149
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
148
150
|
}, jsx(ToolbarArrowKeyNavigationProvider, {
|
|
149
151
|
editorView: editorView,
|
|
150
152
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -165,9 +167,10 @@ class Editor extends React.Component {
|
|
|
165
167
|
popupsScrollableElement: popupsScrollableElement,
|
|
166
168
|
disabled: !!disabled,
|
|
167
169
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
168
|
-
containerElement: this.containerElement
|
|
170
|
+
containerElement: this.containerElement,
|
|
171
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
169
172
|
}), jsx("div", {
|
|
170
|
-
css: mainToolbarCustomComponentsSlotStyle
|
|
173
|
+
css: mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
171
174
|
}, customPrimaryToolbarComponents))), jsx(ClickAreaBlock, {
|
|
172
175
|
editorView: editorView,
|
|
173
176
|
editorDisabled: disabled
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/** @jsx jsx */
|
|
2
3
|
|
|
3
4
|
import React, { useEffect, useState } from 'react';
|
|
@@ -5,7 +6,8 @@ import { css, jsx } from '@emotion/react';
|
|
|
5
6
|
import { N30 } from '@atlaskit/theme/colors';
|
|
6
7
|
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
7
8
|
export const TableControlsPadding = 20;
|
|
8
|
-
const
|
|
9
|
+
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
10
|
+
const mainToolbarWrapperStyle = (isTwoLineEditorToolbar = false) => css`
|
|
9
11
|
position: relative;
|
|
10
12
|
align-items: center;
|
|
11
13
|
padding: ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"} 0;
|
|
@@ -20,6 +22,24 @@ const mainToolbarWrapperStyle = css`
|
|
|
20
22
|
> style:first-child + * {
|
|
21
23
|
margin-left: 0;
|
|
22
24
|
}
|
|
25
|
+
${isTwoLineEditorToolbar && `
|
|
26
|
+
@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px) {
|
|
27
|
+
flex-direction: column-reverse;
|
|
28
|
+
align-items: end;
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: flex-end;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//make this more explicit for a toolbar
|
|
34
|
+
> *:nth-child(1) {
|
|
35
|
+
@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px) {
|
|
36
|
+
> div:nth-child(2) {
|
|
37
|
+
justify-content: flex-end;
|
|
38
|
+
display: flex;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`}
|
|
23
43
|
}
|
|
24
44
|
|
|
25
45
|
.block-type-btn {
|
|
@@ -54,7 +74,7 @@ const StickyToolbar = props => {
|
|
|
54
74
|
}
|
|
55
75
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
56
76
|
return jsx("div", {
|
|
57
|
-
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, css`
|
|
77
|
+
css: [mainToolbarWrapperStyle(props.twoLineEditorToolbar), stickyToolbarWrapperStyle, css`
|
|
58
78
|
top: ${top}px;
|
|
59
79
|
`],
|
|
60
80
|
"data-testid": "ak-editor-main-toolbar",
|
|
@@ -62,7 +82,7 @@ const StickyToolbar = props => {
|
|
|
62
82
|
}, props.children);
|
|
63
83
|
};
|
|
64
84
|
const FixedToolbar = props => jsx("div", {
|
|
65
|
-
css: mainToolbarWrapperStyle,
|
|
85
|
+
css: mainToolbarWrapperStyle(props.twoLineEditorToolbar),
|
|
66
86
|
"data-testid": "ak-editor-main-toolbar"
|
|
67
87
|
}, props.children);
|
|
68
88
|
|
|
@@ -95,19 +115,31 @@ const getStickyParameters = configuration => {
|
|
|
95
115
|
};
|
|
96
116
|
export const MainToolbar = ({
|
|
97
117
|
useStickyToolbar,
|
|
118
|
+
twoLineEditorToolbar,
|
|
98
119
|
children
|
|
99
120
|
}) => {
|
|
100
121
|
if (useStickyToolbar) {
|
|
101
|
-
return jsx(StickyToolbar, getStickyParameters(useStickyToolbar),
|
|
122
|
+
return jsx(StickyToolbar, _extends({}, getStickyParameters(useStickyToolbar), {
|
|
123
|
+
twoLineEditorToolbar: twoLineEditorToolbar
|
|
124
|
+
}), children);
|
|
102
125
|
}
|
|
103
|
-
return jsx(FixedToolbar,
|
|
126
|
+
return jsx(FixedToolbar, {
|
|
127
|
+
twoLineEditorToolbar: twoLineEditorToolbar
|
|
128
|
+
}, children);
|
|
104
129
|
};
|
|
105
|
-
export const mainToolbarCustomComponentsSlotStyle = css`
|
|
130
|
+
export const mainToolbarCustomComponentsSlotStyle = (isTwoLineEditorToolbar = false) => css`
|
|
106
131
|
display: flex;
|
|
107
132
|
justify-content: flex-end;
|
|
108
133
|
align-items: center;
|
|
109
134
|
flex-grow: 1;
|
|
110
135
|
padding-right: ${"var(--ds-space-250, 20px)"};
|
|
136
|
+
${isTwoLineEditorToolbar && `
|
|
137
|
+
@media (max-width: ${MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT}px) {
|
|
138
|
+
{
|
|
139
|
+
padding-right: 0;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
`}
|
|
111
143
|
> div {
|
|
112
144
|
display: flex;
|
|
113
145
|
flex-shrink: 0;
|
|
@@ -56,7 +56,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
56
56
|
featureFlags: props.featureFlags || {},
|
|
57
57
|
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions,
|
|
58
58
|
editorAPI: editorAPI
|
|
59
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.
|
|
59
|
+
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
60
60
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
61
61
|
popupsMountPoint: props.popupsMountPoint,
|
|
62
62
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -16,7 +16,7 @@ import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/
|
|
|
16
16
|
import { extensionStyles } from './extension';
|
|
17
17
|
import { expandStyles } from './expand';
|
|
18
18
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
19
|
-
import { findReplaceStyles } from '
|
|
19
|
+
import { findReplaceStyles } from '@atlaskit/editor-plugin-find-replace/styles';
|
|
20
20
|
import { taskDecisionStyles } from './tasks-and-decisions';
|
|
21
21
|
import { statusStyles } from './status';
|
|
22
22
|
import { dateStyles } from './date';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "191.0
|
|
2
|
+
export const version = "191.1.0";
|
|
@@ -43,10 +43,11 @@ import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
|
43
43
|
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
44
44
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
45
45
|
import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
46
|
-
import { avatarGroupPlugin,
|
|
46
|
+
import { avatarGroupPlugin, jiraIssuePlugin } from '../plugins';
|
|
47
47
|
import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
48
48
|
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
|
|
49
49
|
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
50
|
+
import { findReplacePlugin } from '@atlaskit/editor-plugin-find-replace';
|
|
50
51
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
51
52
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
52
53
|
import { createDefaultPreset } from './default';
|
|
@@ -93,6 +93,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
93
93
|
//Alt + F9 to reach first element in this main toolbar
|
|
94
94
|
return event.altKey && (event.key === 'F9' || event.keyCode === 120);
|
|
95
95
|
};
|
|
96
|
+
var isTwoLineToolbarEnabled = !!customPrimaryToolbarComponents && !!(featureFlags !== null && featureFlags !== void 0 && featureFlags.twoLineEditorToolbar);
|
|
96
97
|
var handleEscape = function handleEscape(event) {
|
|
97
98
|
if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
|
|
98
99
|
editorView === null || editorView === void 0 || editorView.focus();
|
|
@@ -107,7 +108,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
107
108
|
className: "akEditor",
|
|
108
109
|
ref: _this.wrapperElementRef
|
|
109
110
|
}, jsx(MainToolbar, {
|
|
110
|
-
useStickyToolbar: useStickyToolbar
|
|
111
|
+
useStickyToolbar: useStickyToolbar,
|
|
112
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
111
113
|
}, jsx(ToolbarArrowKeyNavigationProvider, {
|
|
112
114
|
editorView: editorView,
|
|
113
115
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -128,9 +130,10 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
128
130
|
popupsScrollableElement: popupsScrollableElement,
|
|
129
131
|
disabled: !!disabled,
|
|
130
132
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
131
|
-
containerElement: _this.containerElement
|
|
133
|
+
containerElement: _this.containerElement,
|
|
134
|
+
twoLineEditorToolbar: isTwoLineToolbarEnabled
|
|
132
135
|
}), jsx("div", {
|
|
133
|
-
css: mainToolbarCustomComponentsSlotStyle
|
|
136
|
+
css: mainToolbarCustomComponentsSlotStyle(isTwoLineToolbarEnabled)
|
|
134
137
|
}, customPrimaryToolbarComponents))), jsx(ClickAreaBlock, {
|
|
135
138
|
editorView: editorView,
|
|
136
139
|
editorDisabled: disabled
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
@@ -9,7 +10,11 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
10
|
import { N30 } from '@atlaskit/theme/colors';
|
|
10
11
|
import { akEditorToolbarKeylineHeight, akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
11
12
|
export var TableControlsPadding = 20;
|
|
12
|
-
var
|
|
13
|
+
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
14
|
+
var mainToolbarWrapperStyle = function mainToolbarWrapperStyle() {
|
|
15
|
+
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
16
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n padding: ", " ", " 0;\n display: flex;\n height: auto;\n background-color: ", ";\n box-shadow: none;\n padding-left: ", ";\n\n & > div {\n > :first-child:not(style),\n > style:first-child + * {\n margin-left: 0;\n }\n ", "\n }\n\n .block-type-btn {\n padding-left: 0;\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-surface, white)", "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n flex-direction: column-reverse;\n align-items: end;\n display: flex;\n justify-content: flex-end;\n }\n\n //make this more explicit for a toolbar\n > *:nth-child(1) {\n @media (max-width: ").concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n > div:nth-child(2) {\n justify-content: flex-end;\n display: flex;\n }\n }\n }\n "));
|
|
17
|
+
};
|
|
13
18
|
var stickyToolbarWrapperStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n /* stylelint-disable declaration-block-no-duplicate-properties */\n position: relative;\n position: sticky;\n /* stylelint-enable declaration-block-no-duplicate-properties */\n padding-bottom: ", ";\n z-index: ", ";\n transition: box-shadow ease-in-out 0.2s;\n &.show-keyline {\n box-shadow: 0 ", "px 0 0\n ", ";\n }\n"])), "var(--ds-space-100, 8px)", akEditorMenuZIndex, akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(N30, ")"));
|
|
14
19
|
var StickyToolbar = function StickyToolbar(props) {
|
|
15
20
|
var _useState = useState(0),
|
|
@@ -29,14 +34,14 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
29
34
|
}
|
|
30
35
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
31
36
|
return jsx("div", {
|
|
32
|
-
css: [mainToolbarWrapperStyle, stickyToolbarWrapperStyle, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n top: ", "px;\n "])), top)],
|
|
37
|
+
css: [mainToolbarWrapperStyle(props.twoLineEditorToolbar), stickyToolbarWrapperStyle, css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n top: ", "px;\n "])), top)],
|
|
33
38
|
"data-testid": "ak-editor-main-toolbar",
|
|
34
39
|
className: 'show-keyline'
|
|
35
40
|
}, props.children);
|
|
36
41
|
};
|
|
37
42
|
var FixedToolbar = function FixedToolbar(props) {
|
|
38
43
|
return jsx("div", {
|
|
39
|
-
css: mainToolbarWrapperStyle,
|
|
44
|
+
css: mainToolbarWrapperStyle(props.twoLineEditorToolbar),
|
|
40
45
|
"data-testid": "ak-editor-main-toolbar"
|
|
41
46
|
}, props.children);
|
|
42
47
|
};
|
|
@@ -70,10 +75,18 @@ var getStickyParameters = function getStickyParameters(configuration) {
|
|
|
70
75
|
};
|
|
71
76
|
export var MainToolbar = function MainToolbar(_ref) {
|
|
72
77
|
var useStickyToolbar = _ref.useStickyToolbar,
|
|
78
|
+
twoLineEditorToolbar = _ref.twoLineEditorToolbar,
|
|
73
79
|
children = _ref.children;
|
|
74
80
|
if (useStickyToolbar) {
|
|
75
|
-
return jsx(StickyToolbar, getStickyParameters(useStickyToolbar),
|
|
81
|
+
return jsx(StickyToolbar, _extends({}, getStickyParameters(useStickyToolbar), {
|
|
82
|
+
twoLineEditorToolbar: twoLineEditorToolbar
|
|
83
|
+
}), children);
|
|
76
84
|
}
|
|
77
|
-
return jsx(FixedToolbar,
|
|
85
|
+
return jsx(FixedToolbar, {
|
|
86
|
+
twoLineEditorToolbar: twoLineEditorToolbar
|
|
87
|
+
}, children);
|
|
78
88
|
};
|
|
79
|
-
export var mainToolbarCustomComponentsSlotStyle =
|
|
89
|
+
export var mainToolbarCustomComponentsSlotStyle = function mainToolbarCustomComponentsSlotStyle() {
|
|
90
|
+
var isTwoLineEditorToolbar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
91
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n padding-right: ", ";\n ", "\n > div {\n display: flex;\n flex-shrink: 0;\n }\n"])), "var(--ds-space-250, 20px)", isTwoLineEditorToolbar && "\n @media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px) {\n {\n padding-right: 0;\n }\n }\n "));
|
|
92
|
+
};
|
|
@@ -60,7 +60,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
60
60
|
featureFlags: props.featureFlags || {},
|
|
61
61
|
editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 || (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions,
|
|
62
62
|
editorAPI: editorAPI
|
|
63
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.
|
|
63
|
+
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
64
64
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
65
65
|
popupsMountPoint: props.popupsMountPoint,
|
|
66
66
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -18,7 +18,7 @@ import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/
|
|
|
18
18
|
import { extensionStyles } from './extension';
|
|
19
19
|
import { expandStyles } from './expand';
|
|
20
20
|
import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
21
|
-
import { findReplaceStyles } from '
|
|
21
|
+
import { findReplaceStyles } from '@atlaskit/editor-plugin-find-replace/styles';
|
|
22
22
|
import { taskDecisionStyles } from './tasks-and-decisions';
|
|
23
23
|
import { statusStyles } from './status';
|
|
24
24
|
import { dateStyles } from './date';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "191.0
|
|
2
|
+
export var version = "191.1.0";
|
|
@@ -17,7 +17,7 @@ import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type'
|
|
|
17
17
|
import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
|
|
18
18
|
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
19
19
|
import type { DatePluginConfig } from '@atlaskit/editor-plugin-date';
|
|
20
|
-
import type { FindReplaceOptions } from '
|
|
20
|
+
import type { FindReplaceOptions } from '@atlaskit/editor-plugin-find-replace';
|
|
21
21
|
import type { LayoutPluginOptions } from '@atlaskit/editor-plugin-layout';
|
|
22
22
|
import type { MediaOptions, MediaState } from '@atlaskit/editor-plugin-media/types';
|
|
23
23
|
import type { MentionPluginConfig } from '@atlaskit/editor-plugin-mentions';
|
|
@@ -3,7 +3,8 @@ import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
|
3
3
|
export declare const TableControlsPadding = 20;
|
|
4
4
|
type MainToolbarProps = {
|
|
5
5
|
useStickyToolbar?: UseStickyToolbarType;
|
|
6
|
+
twoLineEditorToolbar?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const MainToolbar: React.FC<MainToolbarProps>;
|
|
8
|
-
export declare const mainToolbarCustomComponentsSlotStyle: import("@emotion/react").SerializedStyles;
|
|
9
|
+
export declare const mainToolbarCustomComponentsSlotStyle: (isTwoLineEditorToolbar?: boolean) => import("@emotion/react").SerializedStyles;
|
|
9
10
|
export {};
|
|
@@ -17,7 +17,7 @@ import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type'
|
|
|
17
17
|
import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
|
|
18
18
|
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
19
19
|
import type { DatePluginConfig } from '@atlaskit/editor-plugin-date';
|
|
20
|
-
import type { FindReplaceOptions } from '
|
|
20
|
+
import type { FindReplaceOptions } from '@atlaskit/editor-plugin-find-replace';
|
|
21
21
|
import type { LayoutPluginOptions } from '@atlaskit/editor-plugin-layout';
|
|
22
22
|
import type { MediaOptions, MediaState } from '@atlaskit/editor-plugin-media/types';
|
|
23
23
|
import type { MentionPluginConfig } from '@atlaskit/editor-plugin-mentions';
|
|
@@ -3,7 +3,8 @@ import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
|
3
3
|
export declare const TableControlsPadding = 20;
|
|
4
4
|
type MainToolbarProps = {
|
|
5
5
|
useStickyToolbar?: UseStickyToolbarType;
|
|
6
|
+
twoLineEditorToolbar?: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const MainToolbar: React.FC<MainToolbarProps>;
|
|
8
|
-
export declare const mainToolbarCustomComponentsSlotStyle: import("@emotion/react").SerializedStyles;
|
|
9
|
+
export declare const mainToolbarCustomComponentsSlotStyle: (isTwoLineEditorToolbar?: boolean) => import("@emotion/react").SerializedStyles;
|
|
9
10
|
export {};
|