@atlaskit/editor-core 214.1.2 → 214.1.4
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 +16 -0
- package/dist/cjs/ui/Appearance/Comment/Comment.js +4 -1
- package/dist/cjs/ui/Appearance/Comment/CommentToolbar.js +4 -2
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +7 -1
- package/dist/cjs/ui/Toolbar/Toolbar.js +3 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -1
- package/dist/es2019/ui/Appearance/Comment/CommentToolbar.js +4 -2
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +7 -1
- package/dist/es2019/ui/Toolbar/Toolbar.js +3 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +4 -1
- package/dist/esm/ui/Appearance/Comment/CommentToolbar.js +4 -2
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +7 -1
- package/dist/esm/ui/Toolbar/Toolbar.js +3 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +4 -1
- package/dist/types/presets/universal.d.ts +4 -1
- package/dist/types/presets/useUniversalPreset.d.ts +4 -1
- package/dist/types/ui/Appearance/Comment/CommentToolbar.d.ts +2 -1
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +5 -1
- package/dist/types-ts4.5/presets/universal.d.ts +5 -1
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +5 -1
- package/dist/types-ts4.5/ui/Appearance/Comment/CommentToolbar.d.ts +2 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 214.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1de31390178ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1de31390178ab) -
|
|
8
|
+
[ux] [ED-29189] fix padding css for comment toolbar
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 214.1.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`6331abb3b4a0e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6331abb3b4a0e) -
|
|
16
|
+
ED-29470 Fix toolbar disabled state for offline mode
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 214.1.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -19,6 +19,7 @@ var _messages = _interopRequireDefault(require("@atlaskit/editor-common/messages
|
|
|
19
19
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
20
20
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
21
21
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
23
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
23
24
|
var _ClickAreaBlock = _interopRequireDefault(require("../../Addon/ClickAreaBlock"));
|
|
24
25
|
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
@@ -173,6 +174,7 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
173
174
|
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew]
|
|
174
175
|
}, customPrimaryToolbarComponents);
|
|
175
176
|
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true);
|
|
177
|
+
var patch6Enabled = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
176
178
|
return (0, _react2.jsx)(_WithFlash.default, {
|
|
177
179
|
animate: maxContentSizeReached
|
|
178
180
|
}, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
|
|
@@ -193,7 +195,8 @@ var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEdit
|
|
|
193
195
|
}, isToolbarAIFCEnabled ? (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_CommentToolbar.CommentToolbar, {
|
|
194
196
|
editorAPI: editorAPI,
|
|
195
197
|
editorView: editorView,
|
|
196
|
-
editorAppearance: appearance
|
|
198
|
+
editorAppearance: appearance,
|
|
199
|
+
disabled: patch6Enabled ? !!disabled : undefined
|
|
197
200
|
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
198
201
|
editorView: editorView,
|
|
199
202
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -16,7 +16,8 @@ var CommentToolbar = exports.CommentToolbar = function CommentToolbar(_ref) {
|
|
|
16
16
|
var _editorAPI$toolbar;
|
|
17
17
|
var editorAPI = _ref.editorAPI,
|
|
18
18
|
editorView = _ref.editorView,
|
|
19
|
-
editorAppearance = _ref.editorAppearance
|
|
19
|
+
editorAppearance = _ref.editorAppearance,
|
|
20
|
+
disabled = _ref.disabled;
|
|
20
21
|
var components = editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
|
|
21
22
|
var toolbar = components === null || components === void 0 ? void 0 : components.find(function (component) {
|
|
22
23
|
return component.key === _toolbar.TOOLBARS.PRIMARY_TOOLBAR;
|
|
@@ -29,6 +30,7 @@ var CommentToolbar = exports.CommentToolbar = function CommentToolbar(_ref) {
|
|
|
29
30
|
components: components,
|
|
30
31
|
editorView: editorView,
|
|
31
32
|
editorAPI: editorAPI,
|
|
32
|
-
editorAppearance: editorAppearance
|
|
33
|
+
editorAppearance: editorAppearance,
|
|
34
|
+
isDisabled: disabled
|
|
33
35
|
});
|
|
34
36
|
};
|
|
@@ -13,6 +13,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
16
18
|
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" != _typeof3(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); }
|
|
17
19
|
/**
|
|
18
20
|
* @jsxRuntime classic
|
|
@@ -45,11 +47,15 @@ var mainToolbarWrapperStyleNew = (0, _react2.css)({
|
|
|
45
47
|
paddingLeft: 0
|
|
46
48
|
}
|
|
47
49
|
});
|
|
50
|
+
var isToolbarAIFCEnabled = (0, _experiments.editorExperiment)('platform_editor_toolbar_aifc', true) && (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
48
51
|
|
|
49
52
|
/** keep default padding for entire toolbar */
|
|
50
53
|
var mainToolbarWithoutLeftPadding = (0, _react2.css)({
|
|
51
54
|
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)", " 0")
|
|
52
55
|
});
|
|
56
|
+
var mainToolbarWithPadding = (0, _react2.css)({
|
|
57
|
+
padding: "var(--ds-space-100, 8px)"
|
|
58
|
+
});
|
|
53
59
|
var mainToolbarTwoLineStylesNew = (0, _react2.css)({
|
|
54
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
55
61
|
'& > div': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
@@ -101,7 +107,7 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
101
107
|
return (
|
|
102
108
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
103
109
|
(0, _react2.jsx)("div", {
|
|
104
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding]
|
|
110
|
+
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && !isToolbarAIFCEnabled && mainToolbarWithoutLeftPadding, props.isNewToolbarEnabled && isToolbarAIFCEnabled && mainToolbarWithPadding]
|
|
105
111
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
106
112
|
,
|
|
107
113
|
style: {
|
|
@@ -78,7 +78,9 @@ var ToolbarNext = exports.ToolbarNext = function ToolbarNext(_ref) {
|
|
|
78
78
|
connectivityStateMode = _usePluginState.connectivityStateMode,
|
|
79
79
|
editorViewMode = _usePluginState.editorViewMode,
|
|
80
80
|
editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference;
|
|
81
|
+
// remove offline check when patch6Enabled is cleaned up
|
|
81
82
|
var isOffline = connectivityStateMode === 'offline';
|
|
83
|
+
var patch6Enabled = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
82
84
|
return /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarProvider, {
|
|
83
85
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null,
|
|
84
86
|
editorAppearance: editorAppearance,
|
|
@@ -86,7 +88,7 @@ var ToolbarNext = exports.ToolbarNext = function ToolbarNext(_ref) {
|
|
|
86
88
|
editorToolbarDockingPreference: editorToolbarDockingPreference
|
|
87
89
|
}, /*#__PURE__*/_react.default.createElement(_toolbar.EditorToolbarUIProvider, {
|
|
88
90
|
api: editorAPI,
|
|
89
|
-
isDisabled: isOffline || isDisabled,
|
|
91
|
+
isDisabled: patch6Enabled ? isDisabled : isOffline || isDisabled,
|
|
90
92
|
popupsMountPoint: popupsMountPoint,
|
|
91
93
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
92
94
|
popupsScrollableElement: popupsScrollableElement
|
|
@@ -15,6 +15,7 @@ import messages from '@atlaskit/editor-common/messages';
|
|
|
15
15
|
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
16
16
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
17
17
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
18
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
19
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
19
20
|
// Ignored via go/ees005
|
|
20
21
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -161,6 +162,7 @@ export const CommentEditorWithIntl = props => {
|
|
|
161
162
|
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew]
|
|
162
163
|
}, customPrimaryToolbarComponents);
|
|
163
164
|
const isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true);
|
|
165
|
+
const patch6Enabled = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
164
166
|
return jsx(WithFlash, {
|
|
165
167
|
animate: maxContentSizeReached
|
|
166
168
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
@@ -181,7 +183,8 @@ export const CommentEditorWithIntl = props => {
|
|
|
181
183
|
}, isToolbarAIFCEnabled ? jsx(React.Fragment, null, jsx(CommentToolbar, {
|
|
182
184
|
editorAPI: editorAPI,
|
|
183
185
|
editorView: editorView,
|
|
184
|
-
editorAppearance: appearance
|
|
186
|
+
editorAppearance: appearance,
|
|
187
|
+
disabled: patch6Enabled ? !!disabled : undefined
|
|
185
188
|
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : jsx(ToolbarArrowKeyNavigationProvider, {
|
|
186
189
|
editorView: editorView,
|
|
187
190
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -8,7 +8,8 @@ import { ToolbarNext } from '../../Toolbar/Toolbar';
|
|
|
8
8
|
export const CommentToolbar = ({
|
|
9
9
|
editorAPI,
|
|
10
10
|
editorView,
|
|
11
|
-
editorAppearance
|
|
11
|
+
editorAppearance,
|
|
12
|
+
disabled
|
|
12
13
|
}) => {
|
|
13
14
|
var _editorAPI$toolbar;
|
|
14
15
|
const components = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
|
|
@@ -21,6 +22,7 @@ export const CommentToolbar = ({
|
|
|
21
22
|
components: components,
|
|
22
23
|
editorView: editorView,
|
|
23
24
|
editorAPI: editorAPI,
|
|
24
|
-
editorAppearance: editorAppearance
|
|
25
|
+
editorAppearance: editorAppearance,
|
|
26
|
+
isDisabled: disabled
|
|
25
27
|
});
|
|
26
28
|
};
|
|
@@ -9,6 +9,8 @@ import React, { useEffect, useState } from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
14
|
const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
13
15
|
const akEditorMenuZIndex = 500;
|
|
14
16
|
const akEditorToolbarKeylineHeight = 2;
|
|
@@ -33,11 +35,15 @@ const mainToolbarWrapperStyleNew = css({
|
|
|
33
35
|
paddingLeft: 0
|
|
34
36
|
}
|
|
35
37
|
});
|
|
38
|
+
const isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true) && expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
36
39
|
|
|
37
40
|
/** keep default padding for entire toolbar */
|
|
38
41
|
const mainToolbarWithoutLeftPadding = css({
|
|
39
42
|
padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-100, 8px)"} 0`
|
|
40
43
|
});
|
|
44
|
+
const mainToolbarWithPadding = css({
|
|
45
|
+
padding: `${"var(--ds-space-100, 8px)"}`
|
|
46
|
+
});
|
|
41
47
|
const mainToolbarTwoLineStylesNew = css({
|
|
42
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
43
49
|
'& > div': {
|
|
@@ -95,7 +101,7 @@ const StickyToolbar = props => {
|
|
|
95
101
|
return (
|
|
96
102
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
97
103
|
jsx("div", {
|
|
98
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding]
|
|
104
|
+
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && !isToolbarAIFCEnabled && mainToolbarWithoutLeftPadding, props.isNewToolbarEnabled && isToolbarAIFCEnabled && mainToolbarWithPadding]
|
|
99
105
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
100
106
|
,
|
|
101
107
|
style: {
|
|
@@ -72,7 +72,9 @@ export const ToolbarNext = ({
|
|
|
72
72
|
editorViewMode,
|
|
73
73
|
editorToolbarDockingPreference
|
|
74
74
|
} = usePluginState(editorAPI);
|
|
75
|
+
// remove offline check when patch6Enabled is cleaned up
|
|
75
76
|
const isOffline = connectivityStateMode === 'offline';
|
|
77
|
+
const patch6Enabled = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
76
78
|
return /*#__PURE__*/React.createElement(EditorToolbarProvider, {
|
|
77
79
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null,
|
|
78
80
|
editorAppearance: editorAppearance,
|
|
@@ -80,7 +82,7 @@ export const ToolbarNext = ({
|
|
|
80
82
|
editorToolbarDockingPreference: editorToolbarDockingPreference
|
|
81
83
|
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
82
84
|
api: editorAPI,
|
|
83
|
-
isDisabled: isOffline || isDisabled,
|
|
85
|
+
isDisabled: patch6Enabled ? isDisabled : isOffline || isDisabled,
|
|
84
86
|
popupsMountPoint: popupsMountPoint,
|
|
85
87
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
86
88
|
popupsScrollableElement: popupsScrollableElement
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "214.1.
|
|
2
|
+
export const version = "214.1.3";
|
|
@@ -17,6 +17,7 @@ import messages from '@atlaskit/editor-common/messages';
|
|
|
17
17
|
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
18
18
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
19
19
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
20
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
21
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
21
22
|
// Ignored via go/ees005
|
|
22
23
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -162,6 +163,7 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
162
163
|
css: [mainToolbarCustomComponentsSlotStyleNew, isTwoLineToolbarEnabled && mainToolbarCustomComponentsSlotStyleTwoLineToolbarNew]
|
|
163
164
|
}, customPrimaryToolbarComponents);
|
|
164
165
|
var isToolbarAIFCEnabled = Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar) && editorExperiment('platform_editor_toolbar_aifc', true);
|
|
166
|
+
var patch6Enabled = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
165
167
|
return jsx(WithFlash, {
|
|
166
168
|
animate: maxContentSizeReached
|
|
167
169
|
}, jsx(WidthProvider, null, jsx("div", {
|
|
@@ -182,7 +184,8 @@ export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
|
182
184
|
}, isToolbarAIFCEnabled ? jsx(React.Fragment, null, jsx(CommentToolbar, {
|
|
183
185
|
editorAPI: editorAPI,
|
|
184
186
|
editorView: editorView,
|
|
185
|
-
editorAppearance: appearance
|
|
187
|
+
editorAppearance: appearance,
|
|
188
|
+
disabled: patch6Enabled ? !!disabled : undefined
|
|
186
189
|
}), customPrimaryToolbarComponents ? customToolbarSlot : null) : jsx(ToolbarArrowKeyNavigationProvider, {
|
|
187
190
|
editorView: editorView,
|
|
188
191
|
childComponentSelector: "[data-testid='ak-editor-main-toolbar']",
|
|
@@ -9,7 +9,8 @@ export var CommentToolbar = function CommentToolbar(_ref) {
|
|
|
9
9
|
var _editorAPI$toolbar;
|
|
10
10
|
var editorAPI = _ref.editorAPI,
|
|
11
11
|
editorView = _ref.editorView,
|
|
12
|
-
editorAppearance = _ref.editorAppearance
|
|
12
|
+
editorAppearance = _ref.editorAppearance,
|
|
13
|
+
disabled = _ref.disabled;
|
|
13
14
|
var components = editorAPI === null || editorAPI === void 0 || (_editorAPI$toolbar = editorAPI.toolbar) === null || _editorAPI$toolbar === void 0 ? void 0 : _editorAPI$toolbar.actions.getComponents();
|
|
14
15
|
var toolbar = components === null || components === void 0 ? void 0 : components.find(function (component) {
|
|
15
16
|
return component.key === TOOLBARS.PRIMARY_TOOLBAR;
|
|
@@ -22,6 +23,7 @@ export var CommentToolbar = function CommentToolbar(_ref) {
|
|
|
22
23
|
components: components,
|
|
23
24
|
editorView: editorView,
|
|
24
25
|
editorAPI: editorAPI,
|
|
25
|
-
editorAppearance: editorAppearance
|
|
26
|
+
editorAppearance: editorAppearance,
|
|
27
|
+
isDisabled: disabled
|
|
26
28
|
});
|
|
27
29
|
};
|
|
@@ -12,6 +12,8 @@ import React, { useEffect, useState } from 'react';
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
17
|
var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 490;
|
|
16
18
|
var akEditorMenuZIndex = 500;
|
|
17
19
|
var akEditorToolbarKeylineHeight = 2;
|
|
@@ -36,11 +38,15 @@ var mainToolbarWrapperStyleNew = css({
|
|
|
36
38
|
paddingLeft: 0
|
|
37
39
|
}
|
|
38
40
|
});
|
|
41
|
+
var isToolbarAIFCEnabled = editorExperiment('platform_editor_toolbar_aifc', true) && expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
39
42
|
|
|
40
43
|
/** keep default padding for entire toolbar */
|
|
41
44
|
var mainToolbarWithoutLeftPadding = css({
|
|
42
45
|
padding: "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-100, 8px)", " 0")
|
|
43
46
|
});
|
|
47
|
+
var mainToolbarWithPadding = css({
|
|
48
|
+
padding: "var(--ds-space-100, 8px)"
|
|
49
|
+
});
|
|
44
50
|
var mainToolbarTwoLineStylesNew = css({
|
|
45
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
46
52
|
'& > div': _defineProperty(_defineProperty({}, "@media (max-width: ".concat(MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, "px)"), {
|
|
@@ -92,7 +98,7 @@ var StickyToolbar = function StickyToolbar(props) {
|
|
|
92
98
|
return (
|
|
93
99
|
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
94
100
|
jsx("div", {
|
|
95
|
-
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && mainToolbarWithoutLeftPadding]
|
|
101
|
+
css: [mainToolbarWrapperStyleNew, props.twoLineEditorToolbar && mainToolbarTwoLineStylesNew, fg('platform-visual-refresh-icons') && mainToolbarWrapperStylesVisualRefresh, stickyToolbarWrapperStyleNew, props.isNewToolbarEnabled && !isToolbarAIFCEnabled && mainToolbarWithoutLeftPadding, props.isNewToolbarEnabled && isToolbarAIFCEnabled && mainToolbarWithPadding]
|
|
96
102
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
97
103
|
,
|
|
98
104
|
style: {
|
|
@@ -72,7 +72,9 @@ export var ToolbarNext = function ToolbarNext(_ref) {
|
|
|
72
72
|
connectivityStateMode = _usePluginState.connectivityStateMode,
|
|
73
73
|
editorViewMode = _usePluginState.editorViewMode,
|
|
74
74
|
editorToolbarDockingPreference = _usePluginState.editorToolbarDockingPreference;
|
|
75
|
+
// remove offline check when patch6Enabled is cleaned up
|
|
75
76
|
var isOffline = connectivityStateMode === 'offline';
|
|
77
|
+
var patch6Enabled = expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true);
|
|
76
78
|
return /*#__PURE__*/React.createElement(EditorToolbarProvider, {
|
|
77
79
|
editorView: editorView !== null && editorView !== void 0 ? editorView : null,
|
|
78
80
|
editorAppearance: editorAppearance,
|
|
@@ -80,7 +82,7 @@ export var ToolbarNext = function ToolbarNext(_ref) {
|
|
|
80
82
|
editorToolbarDockingPreference: editorToolbarDockingPreference
|
|
81
83
|
}, /*#__PURE__*/React.createElement(EditorToolbarUIProvider, {
|
|
82
84
|
api: editorAPI,
|
|
83
|
-
isDisabled: isOffline || isDisabled,
|
|
85
|
+
isDisabled: patch6Enabled ? isDisabled : isOffline || isDisabled,
|
|
84
86
|
popupsMountPoint: popupsMountPoint,
|
|
85
87
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
86
88
|
popupsScrollableElement: popupsScrollableElement
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "214.1.
|
|
2
|
+
export var version = "214.1.3";
|
|
@@ -49,7 +49,10 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
49
49
|
outdentDisabled: boolean;
|
|
50
50
|
} | undefined;
|
|
51
51
|
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"syncedBlock", {
|
|
52
|
-
|
|
52
|
+
commands: {
|
|
53
|
+
insertSyncedBlock: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
54
|
+
};
|
|
55
|
+
dependencies: [import("@atlaskit/editor-plugins/selection").SelectionPlugin, import("@atlaskit/editor-plugins/floating-toolbar").FloatingToolbarPlugin, import("@atlaskit/editor-plugins/decorations").DecorationsPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-menu").BlockMenuPlugin>];
|
|
53
56
|
pluginConfiguration: import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined;
|
|
54
57
|
}, import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"status", {
|
|
55
58
|
actions: import("@atlaskit/editor-plugins/status").StatusPluginActions;
|
|
@@ -110,7 +110,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
110
110
|
outdentDisabled: boolean;
|
|
111
111
|
} | undefined;
|
|
112
112
|
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"syncedBlock", {
|
|
113
|
-
|
|
113
|
+
commands: {
|
|
114
|
+
insertSyncedBlock: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
115
|
+
};
|
|
116
|
+
dependencies: [import("@atlaskit/editor-plugins/selection").SelectionPlugin, import("@atlaskit/editor-plugins/floating-toolbar").FloatingToolbarPlugin, import("@atlaskit/editor-plugins/decorations").DecorationsPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-menu").BlockMenuPlugin>];
|
|
114
117
|
pluginConfiguration: import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined;
|
|
115
118
|
}, import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"status", {
|
|
116
119
|
actions: import("@atlaskit/editor-plugins/status").StatusPluginActions;
|
|
@@ -49,7 +49,10 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
49
49
|
outdentDisabled: boolean;
|
|
50
50
|
} | undefined;
|
|
51
51
|
}, undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"syncedBlock", {
|
|
52
|
-
|
|
52
|
+
commands: {
|
|
53
|
+
insertSyncedBlock: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
54
|
+
};
|
|
55
|
+
dependencies: [import("@atlaskit/editor-plugins/selection").SelectionPlugin, import("@atlaskit/editor-plugins/floating-toolbar").FloatingToolbarPlugin, import("@atlaskit/editor-plugins/decorations").DecorationsPlugin, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-menu").BlockMenuPlugin>];
|
|
53
56
|
pluginConfiguration: import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined;
|
|
54
57
|
}, import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined> | undefined, import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"status", {
|
|
55
58
|
actions: import("@atlaskit/editor-plugins/status").StatusPluginActions;
|
|
@@ -4,6 +4,7 @@ import type { ToolbarPlugin } from '@atlaskit/editor-plugins/toolbar';
|
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
type ToolbarEditorPlugins = [OptionalPlugin<ToolbarPlugin>];
|
|
6
6
|
type CommentToolbarProps = {
|
|
7
|
+
disabled?: boolean;
|
|
7
8
|
editorAPI?: PublicPluginAPI<ToolbarEditorPlugins>;
|
|
8
9
|
editorAppearance: EditorAppearance;
|
|
9
10
|
editorView?: EditorView;
|
|
@@ -11,5 +12,5 @@ type CommentToolbarProps = {
|
|
|
11
12
|
/**
|
|
12
13
|
* Primary toolbar driven by components registered by `editor-plugin-toolbar`, introduced in `platform_editor_toolbar_aifc`.
|
|
13
14
|
*/
|
|
14
|
-
export declare const CommentToolbar: ({ editorAPI, editorView, editorAppearance, }: CommentToolbarProps) => React.JSX.Element | null;
|
|
15
|
+
export declare const CommentToolbar: ({ editorAPI, editorView, editorAppearance, disabled, }: CommentToolbarProps) => React.JSX.Element | null;
|
|
15
16
|
export {};
|
|
@@ -146,10 +146,14 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
146
146
|
} | undefined;
|
|
147
147
|
}, undefined> | undefined,
|
|
148
148
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"syncedBlock", {
|
|
149
|
+
commands: {
|
|
150
|
+
insertSyncedBlock: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
151
|
+
};
|
|
149
152
|
dependencies: [
|
|
150
153
|
import("@atlaskit/editor-plugins/selection").SelectionPlugin,
|
|
151
154
|
import("@atlaskit/editor-plugins/floating-toolbar").FloatingToolbarPlugin,
|
|
152
|
-
import("@atlaskit/editor-plugins/decorations").DecorationsPlugin
|
|
155
|
+
import("@atlaskit/editor-plugins/decorations").DecorationsPlugin,
|
|
156
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-menu").BlockMenuPlugin>
|
|
153
157
|
];
|
|
154
158
|
pluginConfiguration: import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined;
|
|
155
159
|
}, import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined> | undefined,
|
|
@@ -207,10 +207,14 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
207
207
|
} | undefined;
|
|
208
208
|
}, undefined> | undefined,
|
|
209
209
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"syncedBlock", {
|
|
210
|
+
commands: {
|
|
211
|
+
insertSyncedBlock: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
212
|
+
};
|
|
210
213
|
dependencies: [
|
|
211
214
|
import("@atlaskit/editor-plugins/selection").SelectionPlugin,
|
|
212
215
|
import("@atlaskit/editor-plugins/floating-toolbar").FloatingToolbarPlugin,
|
|
213
|
-
import("@atlaskit/editor-plugins/decorations").DecorationsPlugin
|
|
216
|
+
import("@atlaskit/editor-plugins/decorations").DecorationsPlugin,
|
|
217
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-menu").BlockMenuPlugin>
|
|
214
218
|
];
|
|
215
219
|
pluginConfiguration: import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined;
|
|
216
220
|
}, import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined> | undefined,
|
|
@@ -146,10 +146,14 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
146
146
|
} | undefined;
|
|
147
147
|
}, undefined> | undefined,
|
|
148
148
|
import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"syncedBlock", {
|
|
149
|
+
commands: {
|
|
150
|
+
insertSyncedBlock: () => import("@atlaskit/editor-common/types").EditorCommand;
|
|
151
|
+
};
|
|
149
152
|
dependencies: [
|
|
150
153
|
import("@atlaskit/editor-plugins/selection").SelectionPlugin,
|
|
151
154
|
import("@atlaskit/editor-plugins/floating-toolbar").FloatingToolbarPlugin,
|
|
152
|
-
import("@atlaskit/editor-plugins/decorations").DecorationsPlugin
|
|
155
|
+
import("@atlaskit/editor-plugins/decorations").DecorationsPlugin,
|
|
156
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugins/block-menu").BlockMenuPlugin>
|
|
153
157
|
];
|
|
154
158
|
pluginConfiguration: import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined;
|
|
155
159
|
}, import("@atlaskit/editor-plugins/synced-block").SyncedBlockPluginOptions | undefined> | undefined,
|
|
@@ -6,6 +6,7 @@ type ToolbarEditorPlugins = [
|
|
|
6
6
|
OptionalPlugin<ToolbarPlugin>
|
|
7
7
|
];
|
|
8
8
|
type CommentToolbarProps = {
|
|
9
|
+
disabled?: boolean;
|
|
9
10
|
editorAPI?: PublicPluginAPI<ToolbarEditorPlugins>;
|
|
10
11
|
editorAppearance: EditorAppearance;
|
|
11
12
|
editorView?: EditorView;
|
|
@@ -13,5 +14,5 @@ type CommentToolbarProps = {
|
|
|
13
14
|
/**
|
|
14
15
|
* Primary toolbar driven by components registered by `editor-plugin-toolbar`, introduced in `platform_editor_toolbar_aifc`.
|
|
15
16
|
*/
|
|
16
|
-
export declare const CommentToolbar: ({ editorAPI, editorView, editorAppearance, }: CommentToolbarProps) => React.JSX.Element | null;
|
|
17
|
+
export declare const CommentToolbar: ({ editorAPI, editorView, editorAppearance, disabled, }: CommentToolbarProps) => React.JSX.Element | null;
|
|
17
18
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "214.1.
|
|
3
|
+
"version": "214.1.4",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"@atlaskit/editor-plugins": "^10.6.0",
|
|
54
54
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
55
55
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
56
|
-
"@atlaskit/editor-toolbar": "^0.
|
|
56
|
+
"@atlaskit/editor-toolbar": "^0.14.0",
|
|
57
57
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
58
58
|
"@atlaskit/emoji": "^69.5.0",
|
|
59
|
-
"@atlaskit/icon": "^28.
|
|
59
|
+
"@atlaskit/icon": "^28.4.0",
|
|
60
60
|
"@atlaskit/link": "^3.2.0",
|
|
61
61
|
"@atlaskit/media-card": "^79.5.0",
|
|
62
62
|
"@atlaskit/mention": "^24.2.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"@atlaskit/primitives": "^14.15.0",
|
|
108
108
|
"@atlaskit/renderer": "^124.1.0",
|
|
109
109
|
"@atlaskit/section-message": "^8.7.0",
|
|
110
|
-
"@atlaskit/smart-card": "^
|
|
110
|
+
"@atlaskit/smart-card": "^43.0.0",
|
|
111
111
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
112
112
|
"@atlaskit/toggle": "^15.1.0",
|
|
113
113
|
"@atlaskit/util-data-test": "^18.3.0",
|