@atlaskit/editor-core 241.0.2 → 241.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +5 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +4 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/Chromeless.js +5 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +4 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/Chromeless.js +5 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +2 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +4 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Appearance/Chromeless.d.ts +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 241.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8c836aa200b92`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8c836aa200b92) -
|
|
8
|
+
Keep top-level expands inside the content width on comment surfaces (Jira description and
|
|
9
|
+
comments) behind platform_editor_expand_standard_width_fix or the work_item_modernization
|
|
10
|
+
experiment: the renderer drops the -12px gutter offset for comment appearance, and the editor
|
|
11
|
+
applies the block menu useStandardNodeWidth config without the platform_editor_controls
|
|
12
|
+
experiment, including chromeless.
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 241.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
16
|
var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
|
|
17
17
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
18
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
18
19
|
var _EditorContentContainer = _interopRequireDefault(require("../EditorContentContainer/EditorContentContainer"));
|
|
19
20
|
var _PluginSlot = _interopRequireDefault(require("../PluginSlot"));
|
|
20
21
|
var _WithFlash = _interopRequireDefault(require("../WithFlash"));
|
|
@@ -42,6 +43,7 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
42
43
|
_this.containerElement = ref;
|
|
43
44
|
});
|
|
44
45
|
(0, _defineProperty2.default)(_this, "renderChrome", function (_ref) {
|
|
46
|
+
var _this$props$editorAPI, _this$props$editorAPI2;
|
|
45
47
|
var maxContentSize = _ref.maxContentSize;
|
|
46
48
|
var _this$props = _this.props,
|
|
47
49
|
editorDOMElement = _this$props.editorDOMElement,
|
|
@@ -66,6 +68,7 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
66
68
|
var _states$editorViewMod;
|
|
67
69
|
return states === null || states === void 0 || (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode;
|
|
68
70
|
});
|
|
71
|
+
var useStandardNodeWidth = ((0, _fg.fg)('platform_editor_expand_standard_width_fix') || (0, _isExperimentEnabled.isExperimentEnabled)('work_item_modernization')) && ((_this$props$editorAPI = (_this$props$editorAPI2 = _this.props.editorAPI) === null || _this$props$editorAPI2 === void 0 || (_this$props$editorAPI2 = _this$props$editorAPI2.blockMenu) === null || _this$props$editorAPI2 === void 0 || (_this$props$editorAPI2 = _this$props$editorAPI2.sharedState) === null || _this$props$editorAPI2 === void 0 || (_this$props$editorAPI2 = _this$props$editorAPI2.currentState()) === null || _this$props$editorAPI2 === void 0 ? void 0 : _this$props$editorAPI2.useStandardNodeWidth) !== null && _this$props$editorAPI !== void 0 ? _this$props$editorAPI : false);
|
|
69
72
|
var containerRef = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_perf_lint_cleanup') ? _this.setContainerElement : function (ref) {
|
|
70
73
|
return _this.containerElement = ref;
|
|
71
74
|
};
|
|
@@ -81,7 +84,8 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
81
84
|
className: "ak-editor-content-area",
|
|
82
85
|
featureFlags: featureFlags,
|
|
83
86
|
viewMode: editorViewMode,
|
|
84
|
-
appearance: _this.appearance
|
|
87
|
+
appearance: _this.appearance,
|
|
88
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
85
89
|
}, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, /*#__PURE__*/_react.default.createElement(_PluginSlot.default, {
|
|
86
90
|
editorView: editorView,
|
|
87
91
|
editorActions: editorActions,
|
|
@@ -49,12 +49,11 @@ var commentEditorCompiledStyles = {
|
|
|
49
49
|
};
|
|
50
50
|
var appearance = 'comment';
|
|
51
51
|
var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
52
|
-
var _editorAPI$blockMenu$, _editorAPI$blockMenu;
|
|
52
|
+
var _editorAPI$blockMenu$, _editorAPI$blockMenu, _editorAPI$blockMenu$2, _editorAPI$blockMenu2;
|
|
53
53
|
var editorAPI = props.editorAPI;
|
|
54
54
|
|
|
55
55
|
// Get useStandardNodeWidth from block menu plugin shared state
|
|
56
|
-
|
|
57
|
-
var useStandardNodeWidth = (0, _editorExperiment.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);
|
|
56
|
+
var useStandardNodeWidth = (0, _fg.fg)('platform_editor_expand_standard_width_fix') || (0, _isExperimentEnabled.isExperimentEnabled)('work_item_modernization') ? (_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 : (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$2 = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu2 = editorAPI.blockMenu) === null || _editorAPI$blockMenu2 === void 0 || (_editorAPI$blockMenu2 = _editorAPI$blockMenu2.sharedState) === null || _editorAPI$blockMenu2 === void 0 || (_editorAPI$blockMenu2 = _editorAPI$blockMenu2.currentState()) === null || _editorAPI$blockMenu2 === void 0 ? void 0 : _editorAPI$blockMenu2.useStandardNodeWidth) !== null && _editorAPI$blockMenu$2 !== void 0 ? _editorAPI$blockMenu$2 : false);
|
|
58
57
|
var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
|
|
59
58
|
var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
|
|
60
59
|
return {
|
|
@@ -14,6 +14,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
15
|
var _fullPage = require("@atlaskit/editor-common/messages/full-page");
|
|
16
16
|
var _constants = require("@atlaskit/editor-shared-styles/constants");
|
|
17
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
18
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
19
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
18
20
|
var _ClickAreaBlock = require("../../Addon/ClickAreaBlock");
|
|
19
21
|
var _contentComponentWrapper = require("../../Addon/ClickAreaBlock/contentComponentWrapper");
|
|
@@ -60,7 +62,7 @@ var compiledStyles = {
|
|
|
60
62
|
var CONTENT_AREA_TEST_ID = exports.CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
61
63
|
var EDITOR_CONTAINER = 'ak-editor-container';
|
|
62
64
|
var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
63
|
-
var _props$editorAPI, _props$editorAPI$bloc, _props$editorAPI2, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
65
|
+
var _props$editorAPI, _props$editorAPI$bloc, _props$editorAPI2, _props$editorAPI$bloc2, _props$editorAPI3, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
64
66
|
var fullWidthMode = props.appearance === 'full-width';
|
|
65
67
|
var maxWidthMode = props.appearance === 'max';
|
|
66
68
|
var scrollContainerRef = (0, _react.useRef)(null);
|
|
@@ -70,8 +72,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
70
72
|
var contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : _constants.akEditorDefaultLayoutWidth : akEditorFullWidthLayoutWidth);
|
|
71
73
|
|
|
72
74
|
// Get useStandardNodeWidth from block menu plugin shared state
|
|
73
|
-
|
|
74
|
-
var useStandardNodeWidth = (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.blockMenu) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.sharedState) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.currentState()) === null || _props$editorAPI2 === void 0 ? void 0 : _props$editorAPI2.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false);
|
|
75
|
+
var useStandardNodeWidth = (0, _fg.fg)('platform_editor_expand_standard_width_fix') || (0, _isExperimentEnabled.isExperimentEnabled)('work_item_modernization') ? (_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.blockMenu) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.sharedState) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.currentState()) === null || _props$editorAPI2 === void 0 ? void 0 : _props$editorAPI2.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false : (0, _editorExperiment.editorExperiment)('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc2 = (_props$editorAPI3 = props.editorAPI) === null || _props$editorAPI3 === void 0 || (_props$editorAPI3 = _props$editorAPI3.blockMenu) === null || _props$editorAPI3 === void 0 || (_props$editorAPI3 = _props$editorAPI3.sharedState) === null || _props$editorAPI3 === void 0 || (_props$editorAPI3 = _props$editorAPI3.currentState()) === null || _props$editorAPI3 === void 0 ? void 0 : _props$editorAPI3.useStandardNodeWidth) !== null && _props$editorAPI$bloc2 !== void 0 ? _props$editorAPI$bloc2 : false);
|
|
75
76
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
76
77
|
return {
|
|
77
78
|
get scrollContainer() {
|
|
@@ -43,7 +43,7 @@ var MainToolbarWrapper = function MainToolbarWrapper(_ref) {
|
|
|
43
43
|
showKeyline = _ref.showKeyline;
|
|
44
44
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
45
45
|
"data-testid": testId,
|
|
46
|
-
className: (0, _runtime.ax)([styles.mainToolbarWrapper, showKeyline && styles.mainToolbarWithKeyline, styles.mainToolbarZIndex, styles.mainToolbarNew, styles.backgroundColor])
|
|
46
|
+
className: (0, _runtime.ax)([styles.mainToolbarWrapper, showKeyline && styles.mainToolbarWithKeyline, styles.mainToolbarZIndex, styles.mainToolbarNew, (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && styles.backgroundColor])
|
|
47
47
|
}, children);
|
|
48
48
|
};
|
|
49
49
|
var FirstChildWrapper = function FirstChildWrapper(_ref2) {
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
8
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
9
|
-
var version = exports.version = "241.0.
|
|
9
|
+
var version = exports.version = "241.0.2";
|
|
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
import React, { Fragment } from 'react';
|
|
3
3
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
4
4
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
6
|
import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
|
|
6
7
|
import PluginSlot from '../PluginSlot';
|
|
7
8
|
import WithFlash from '../WithFlash';
|
|
@@ -23,6 +24,7 @@ export default class Editor extends React.Component {
|
|
|
23
24
|
_defineProperty(this, "renderChrome", ({
|
|
24
25
|
maxContentSize
|
|
25
26
|
}) => {
|
|
27
|
+
var _this$props$editorAPI, _this$props$editorAPI2, _this$props$editorAPI3, _this$props$editorAPI4, _this$props$editorAPI5;
|
|
26
28
|
const {
|
|
27
29
|
editorDOMElement,
|
|
28
30
|
editorView,
|
|
@@ -46,6 +48,7 @@ export default class Editor extends React.Component {
|
|
|
46
48
|
var _states$editorViewMod;
|
|
47
49
|
return states === null || states === void 0 ? void 0 : (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode;
|
|
48
50
|
});
|
|
51
|
+
const useStandardNodeWidth = (fg('platform_editor_expand_standard_width_fix') || isExperimentEnabled('work_item_modernization')) && ((_this$props$editorAPI = (_this$props$editorAPI2 = this.props.editorAPI) === null || _this$props$editorAPI2 === void 0 ? void 0 : (_this$props$editorAPI3 = _this$props$editorAPI2.blockMenu) === null || _this$props$editorAPI3 === void 0 ? void 0 : (_this$props$editorAPI4 = _this$props$editorAPI3.sharedState) === null || _this$props$editorAPI4 === void 0 ? void 0 : (_this$props$editorAPI5 = _this$props$editorAPI4.currentState()) === null || _this$props$editorAPI5 === void 0 ? void 0 : _this$props$editorAPI5.useStandardNodeWidth) !== null && _this$props$editorAPI !== void 0 ? _this$props$editorAPI : false);
|
|
49
52
|
const containerRef = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? this.setContainerElement : ref => this.containerElement = ref;
|
|
50
53
|
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
51
54
|
animate: maxContentSizeReached
|
|
@@ -59,7 +62,8 @@ export default class Editor extends React.Component {
|
|
|
59
62
|
className: "ak-editor-content-area",
|
|
60
63
|
featureFlags: featureFlags,
|
|
61
64
|
viewMode: editorViewMode,
|
|
62
|
-
appearance: this.appearance
|
|
65
|
+
appearance: this.appearance,
|
|
66
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
63
67
|
}, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
64
68
|
editorView: editorView,
|
|
65
69
|
editorActions: editorActions,
|
|
@@ -37,14 +37,13 @@ const commentEditorCompiledStyles = {
|
|
|
37
37
|
};
|
|
38
38
|
const appearance = 'comment';
|
|
39
39
|
export const CommentEditorWithIntl = props => {
|
|
40
|
-
var _editorAPI$blockMenu$, _editorAPI$blockMenu, _editorAPI$blockMenu$2, _editorAPI$blockMenu$3;
|
|
40
|
+
var _editorAPI$blockMenu$, _editorAPI$blockMenu, _editorAPI$blockMenu$2, _editorAPI$blockMenu$3, _editorAPI$blockMenu$4, _editorAPI$blockMenu2, _editorAPI$blockMenu3, _editorAPI$blockMenu4;
|
|
41
41
|
const {
|
|
42
42
|
editorAPI
|
|
43
43
|
} = props;
|
|
44
44
|
|
|
45
45
|
// Get useStandardNodeWidth from block menu plugin shared state
|
|
46
|
-
|
|
47
|
-
const useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 ? void 0 : (_editorAPI$blockMenu$2 = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu$2 === void 0 ? void 0 : (_editorAPI$blockMenu$3 = _editorAPI$blockMenu$2.currentState()) === null || _editorAPI$blockMenu$3 === void 0 ? void 0 : _editorAPI$blockMenu$3.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
|
|
46
|
+
const useStandardNodeWidth = fg('platform_editor_expand_standard_width_fix') || isExperimentEnabled('work_item_modernization') ? (_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 ? void 0 : (_editorAPI$blockMenu$2 = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu$2 === void 0 ? void 0 : (_editorAPI$blockMenu$3 = _editorAPI$blockMenu$2.currentState()) === null || _editorAPI$blockMenu$3 === void 0 ? void 0 : _editorAPI$blockMenu$3.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false : editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$4 = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$blockMenu2 = editorAPI.blockMenu) === null || _editorAPI$blockMenu2 === void 0 ? void 0 : (_editorAPI$blockMenu3 = _editorAPI$blockMenu2.sharedState) === null || _editorAPI$blockMenu3 === void 0 ? void 0 : (_editorAPI$blockMenu4 = _editorAPI$blockMenu3.currentState()) === null || _editorAPI$blockMenu4 === void 0 ? void 0 : _editorAPI$blockMenu4.useStandardNodeWidth) !== null && _editorAPI$blockMenu$4 !== void 0 ? _editorAPI$blockMenu$4 : false);
|
|
48
47
|
const {
|
|
49
48
|
editorViewMode,
|
|
50
49
|
primaryToolbarComponentsState,
|
|
@@ -6,6 +6,8 @@ import classnames from 'classnames';
|
|
|
6
6
|
import { injectIntl } from 'react-intl';
|
|
7
7
|
import { messages } from '@atlaskit/editor-common/messages/full-page';
|
|
8
8
|
import { akEditorGutterPaddingDynamic, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles/constants';
|
|
9
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
12
|
|
|
11
13
|
// Ignored via go/ees005
|
|
@@ -51,7 +53,7 @@ const compiledStyles = {
|
|
|
51
53
|
export const CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
52
54
|
const EDITOR_CONTAINER = 'ak-editor-container';
|
|
53
55
|
const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
54
|
-
var _props$editorAPI, _props$editorAPI$base, _props$editorAPI$base2, _props$editorAPI$bloc, _props$editorAPI2, _props$editorAPI2$blo, _props$editorAPI2$blo2, _props$editorAPI2$blo3, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
56
|
+
var _props$editorAPI, _props$editorAPI$base, _props$editorAPI$base2, _props$editorAPI$bloc, _props$editorAPI2, _props$editorAPI2$blo, _props$editorAPI2$blo2, _props$editorAPI2$blo3, _props$editorAPI$bloc2, _props$editorAPI3, _props$editorAPI3$blo, _props$editorAPI3$blo2, _props$editorAPI3$blo3, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
55
57
|
const fullWidthMode = props.appearance === 'full-width';
|
|
56
58
|
const maxWidthMode = props.appearance === 'max';
|
|
57
59
|
const scrollContainerRef = useRef(null);
|
|
@@ -61,8 +63,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
61
63
|
const contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : akEditorDefaultLayoutWidth : akEditorFullWidthLayoutWidth);
|
|
62
64
|
|
|
63
65
|
// Get useStandardNodeWidth from block menu plugin shared state
|
|
64
|
-
|
|
65
|
-
const useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 ? void 0 : (_props$editorAPI2$blo = _props$editorAPI2.blockMenu) === null || _props$editorAPI2$blo === void 0 ? void 0 : (_props$editorAPI2$blo2 = _props$editorAPI2$blo.sharedState) === null || _props$editorAPI2$blo2 === void 0 ? void 0 : (_props$editorAPI2$blo3 = _props$editorAPI2$blo2.currentState()) === null || _props$editorAPI2$blo3 === void 0 ? void 0 : _props$editorAPI2$blo3.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false);
|
|
66
|
+
const useStandardNodeWidth = fg('platform_editor_expand_standard_width_fix') || isExperimentEnabled('work_item_modernization') ? (_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 ? void 0 : (_props$editorAPI2$blo = _props$editorAPI2.blockMenu) === null || _props$editorAPI2$blo === void 0 ? void 0 : (_props$editorAPI2$blo2 = _props$editorAPI2$blo.sharedState) === null || _props$editorAPI2$blo2 === void 0 ? void 0 : (_props$editorAPI2$blo3 = _props$editorAPI2$blo2.currentState()) === null || _props$editorAPI2$blo3 === void 0 ? void 0 : _props$editorAPI2$blo3.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false : editorExperiment('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc2 = (_props$editorAPI3 = props.editorAPI) === null || _props$editorAPI3 === void 0 ? void 0 : (_props$editorAPI3$blo = _props$editorAPI3.blockMenu) === null || _props$editorAPI3$blo === void 0 ? void 0 : (_props$editorAPI3$blo2 = _props$editorAPI3$blo.sharedState) === null || _props$editorAPI3$blo2 === void 0 ? void 0 : (_props$editorAPI3$blo3 = _props$editorAPI3$blo2.currentState()) === null || _props$editorAPI3$blo3 === void 0 ? void 0 : _props$editorAPI3$blo3.useStandardNodeWidth) !== null && _props$editorAPI$bloc2 !== void 0 ? _props$editorAPI$bloc2 : false);
|
|
66
67
|
useImperativeHandle(ref, () => ({
|
|
67
68
|
get scrollContainer() {
|
|
68
69
|
return scrollContainerRef.current;
|
|
@@ -35,7 +35,7 @@ const MainToolbarWrapper = ({
|
|
|
35
35
|
}) => {
|
|
36
36
|
return /*#__PURE__*/React.createElement("div", {
|
|
37
37
|
"data-testid": testId,
|
|
38
|
-
className: ax([styles.mainToolbarWrapper, showKeyline && styles.mainToolbarWithKeyline, styles.mainToolbarZIndex, styles.mainToolbarNew, styles.backgroundColor])
|
|
38
|
+
className: ax([styles.mainToolbarWrapper, showKeyline && styles.mainToolbarWithKeyline, styles.mainToolbarZIndex, styles.mainToolbarNew, expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && styles.backgroundColor])
|
|
39
39
|
}, children);
|
|
40
40
|
};
|
|
41
41
|
const FirstChildWrapper = ({
|
|
@@ -9,6 +9,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
9
9
|
import React, { Fragment } from 'react';
|
|
10
10
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
|
|
11
11
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
12
13
|
import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
|
|
13
14
|
import PluginSlot from '../PluginSlot';
|
|
14
15
|
import WithFlash from '../WithFlash';
|
|
@@ -33,6 +34,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
33
34
|
_this.containerElement = ref;
|
|
34
35
|
});
|
|
35
36
|
_defineProperty(_this, "renderChrome", function (_ref) {
|
|
37
|
+
var _this$props$editorAPI, _this$props$editorAPI2;
|
|
36
38
|
var maxContentSize = _ref.maxContentSize;
|
|
37
39
|
var _this$props = _this.props,
|
|
38
40
|
editorDOMElement = _this$props.editorDOMElement,
|
|
@@ -57,6 +59,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
57
59
|
var _states$editorViewMod;
|
|
58
60
|
return states === null || states === void 0 || (_states$editorViewMod = states.editorViewModeState) === null || _states$editorViewMod === void 0 ? void 0 : _states$editorViewMod.mode;
|
|
59
61
|
});
|
|
62
|
+
var useStandardNodeWidth = (fg('platform_editor_expand_standard_width_fix') || isExperimentEnabled('work_item_modernization')) && ((_this$props$editorAPI = (_this$props$editorAPI2 = _this.props.editorAPI) === null || _this$props$editorAPI2 === void 0 || (_this$props$editorAPI2 = _this$props$editorAPI2.blockMenu) === null || _this$props$editorAPI2 === void 0 || (_this$props$editorAPI2 = _this$props$editorAPI2.sharedState) === null || _this$props$editorAPI2 === void 0 || (_this$props$editorAPI2 = _this$props$editorAPI2.currentState()) === null || _this$props$editorAPI2 === void 0 ? void 0 : _this$props$editorAPI2.useStandardNodeWidth) !== null && _this$props$editorAPI !== void 0 ? _this$props$editorAPI : false);
|
|
60
63
|
var containerRef = isExperimentEnabled('platform_editor_perf_lint_cleanup') ? _this.setContainerElement : function (ref) {
|
|
61
64
|
return _this.containerElement = ref;
|
|
62
65
|
};
|
|
@@ -72,7 +75,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
72
75
|
className: "ak-editor-content-area",
|
|
73
76
|
featureFlags: featureFlags,
|
|
74
77
|
viewMode: editorViewMode,
|
|
75
|
-
appearance: _this.appearance
|
|
78
|
+
appearance: _this.appearance,
|
|
79
|
+
useStandardNodeWidth: useStandardNodeWidth
|
|
76
80
|
}, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
77
81
|
editorView: editorView,
|
|
78
82
|
editorActions: editorActions,
|
|
@@ -41,12 +41,11 @@ var commentEditorCompiledStyles = {
|
|
|
41
41
|
};
|
|
42
42
|
var appearance = 'comment';
|
|
43
43
|
export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
44
|
-
var _editorAPI$blockMenu$, _editorAPI$blockMenu;
|
|
44
|
+
var _editorAPI$blockMenu$, _editorAPI$blockMenu, _editorAPI$blockMenu$2, _editorAPI$blockMenu2;
|
|
45
45
|
var editorAPI = props.editorAPI;
|
|
46
46
|
|
|
47
47
|
// Get useStandardNodeWidth from block menu plugin shared state
|
|
48
|
-
|
|
49
|
-
var useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$ = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu = editorAPI.blockMenu) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.sharedState) === null || _editorAPI$blockMenu === void 0 || (_editorAPI$blockMenu = _editorAPI$blockMenu.currentState()) === null || _editorAPI$blockMenu === void 0 ? void 0 : _editorAPI$blockMenu.useStandardNodeWidth) !== null && _editorAPI$blockMenu$ !== void 0 ? _editorAPI$blockMenu$ : false);
|
|
48
|
+
var useStandardNodeWidth = fg('platform_editor_expand_standard_width_fix') || isExperimentEnabled('work_item_modernization') ? (_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 : editorExperiment('platform_editor_controls', 'variant1') && ((_editorAPI$blockMenu$2 = editorAPI === null || editorAPI === void 0 || (_editorAPI$blockMenu2 = editorAPI.blockMenu) === null || _editorAPI$blockMenu2 === void 0 || (_editorAPI$blockMenu2 = _editorAPI$blockMenu2.sharedState) === null || _editorAPI$blockMenu2 === void 0 || (_editorAPI$blockMenu2 = _editorAPI$blockMenu2.currentState()) === null || _editorAPI$blockMenu2 === void 0 ? void 0 : _editorAPI$blockMenu2.useStandardNodeWidth) !== null && _editorAPI$blockMenu$2 !== void 0 ? _editorAPI$blockMenu$2 : false);
|
|
50
49
|
var _useSharedPluginState = useSharedPluginStateWithSelector(editorAPI, ['maxContentSize', 'primaryToolbar', 'editorViewMode'], function (states) {
|
|
51
50
|
var _states$maxContentSiz, _states$primaryToolba, _states$editorViewMod;
|
|
52
51
|
return {
|
|
@@ -6,6 +6,8 @@ import classnames from 'classnames';
|
|
|
6
6
|
import { injectIntl } from 'react-intl';
|
|
7
7
|
import { messages } from '@atlaskit/editor-common/messages/full-page';
|
|
8
8
|
import { akEditorGutterPaddingDynamic, akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles/constants';
|
|
9
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
11
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
10
12
|
|
|
11
13
|
// Ignored via go/ees005
|
|
@@ -53,7 +55,7 @@ var compiledStyles = {
|
|
|
53
55
|
export var CONTENT_AREA_TEST_ID = 'ak-editor-fp-content-area';
|
|
54
56
|
var EDITOR_CONTAINER = 'ak-editor-container';
|
|
55
57
|
var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
56
|
-
var _props$editorAPI, _props$editorAPI$bloc, _props$editorAPI2, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
58
|
+
var _props$editorAPI, _props$editorAPI$bloc, _props$editorAPI2, _props$editorAPI$bloc2, _props$editorAPI3, _contentAreaRef$curre, _allowScrollGutter$gu;
|
|
57
59
|
var fullWidthMode = props.appearance === 'full-width';
|
|
58
60
|
var maxWidthMode = props.appearance === 'max';
|
|
59
61
|
var scrollContainerRef = useRef(null);
|
|
@@ -63,8 +65,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
63
65
|
var contentAreaMaxWidth = getTotalPadding() + (!fullWidthMode ? maxWidthMode ? akEditorUltraWideLayoutWidth : akEditorDefaultLayoutWidth : akEditorFullWidthLayoutWidth);
|
|
64
66
|
|
|
65
67
|
// Get useStandardNodeWidth from block menu plugin shared state
|
|
66
|
-
|
|
67
|
-
var useStandardNodeWidth = editorExperiment('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.blockMenu) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.sharedState) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.currentState()) === null || _props$editorAPI2 === void 0 ? void 0 : _props$editorAPI2.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false);
|
|
68
|
+
var useStandardNodeWidth = fg('platform_editor_expand_standard_width_fix') || isExperimentEnabled('work_item_modernization') ? (_props$editorAPI$bloc = (_props$editorAPI2 = props.editorAPI) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.blockMenu) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.sharedState) === null || _props$editorAPI2 === void 0 || (_props$editorAPI2 = _props$editorAPI2.currentState()) === null || _props$editorAPI2 === void 0 ? void 0 : _props$editorAPI2.useStandardNodeWidth) !== null && _props$editorAPI$bloc !== void 0 ? _props$editorAPI$bloc : false : editorExperiment('platform_editor_controls', 'variant1') && ((_props$editorAPI$bloc2 = (_props$editorAPI3 = props.editorAPI) === null || _props$editorAPI3 === void 0 || (_props$editorAPI3 = _props$editorAPI3.blockMenu) === null || _props$editorAPI3 === void 0 || (_props$editorAPI3 = _props$editorAPI3.sharedState) === null || _props$editorAPI3 === void 0 || (_props$editorAPI3 = _props$editorAPI3.currentState()) === null || _props$editorAPI3 === void 0 ? void 0 : _props$editorAPI3.useStandardNodeWidth) !== null && _props$editorAPI$bloc2 !== void 0 ? _props$editorAPI$bloc2 : false);
|
|
68
69
|
useImperativeHandle(ref, function () {
|
|
69
70
|
return {
|
|
70
71
|
get scrollContainer() {
|
|
@@ -34,7 +34,7 @@ var MainToolbarWrapper = function MainToolbarWrapper(_ref) {
|
|
|
34
34
|
showKeyline = _ref.showKeyline;
|
|
35
35
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
36
|
"data-testid": testId,
|
|
37
|
-
className: ax([styles.mainToolbarWrapper, showKeyline && styles.mainToolbarWithKeyline, styles.mainToolbarZIndex, styles.mainToolbarNew, styles.backgroundColor])
|
|
37
|
+
className: ax([styles.mainToolbarWrapper, showKeyline && styles.mainToolbarWithKeyline, styles.mainToolbarZIndex, styles.mainToolbarNew, expValEquals('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && styles.backgroundColor])
|
|
38
38
|
}, children);
|
|
39
39
|
};
|
|
40
40
|
var FirstChildWrapper = function FirstChildWrapper(_ref2) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
|
|
3
|
+
import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu/blockMenuPluginType';
|
|
3
4
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
4
5
|
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
5
6
|
import type { EditorAppearanceComponentProps } from '../../types/editor-appearance-component';
|
|
6
7
|
type AppearanceProps = EditorAppearanceComponentProps<[
|
|
7
8
|
OptionalPlugin<MaxContentSizePlugin>,
|
|
8
|
-
OptionalPlugin<EditorViewModePlugin
|
|
9
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
10
|
+
OptionalPlugin<BlockMenuPlugin>
|
|
9
11
|
]>;
|
|
10
12
|
/**
|
|
11
13
|
* Render the editor in a chromeless appearance.
|