@atlaskit/editor-core 203.17.2 → 203.17.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 +14 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +12 -10
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +13 -11
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +12 -10
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +16 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 203.17.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 203.17.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#115142](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115142)
|
|
14
|
+
[`3b18bda297166`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3b18bda297166) -
|
|
15
|
+
[ED-26550] Don't render popups at custom mount points when in a toolbar portal
|
|
16
|
+
|
|
3
17
|
## 203.17.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -28,7 +28,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
28
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
29
29
|
|
|
30
30
|
var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
31
|
-
var _props$customPrimaryT
|
|
31
|
+
var _useToolbarPortal, _props$customPrimaryT;
|
|
32
32
|
var _useState = (0, _react.useState)(false),
|
|
33
33
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
34
34
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -37,6 +37,15 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
37
37
|
|
|
38
38
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
39
39
|
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents;
|
|
40
|
+
|
|
41
|
+
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
42
|
+
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
43
|
+
var _ref = (_useToolbarPortal = (0, _ToolbarPortal.useToolbarPortal)()) !== null && _useToolbarPortal !== void 0 ? _useToolbarPortal : {
|
|
44
|
+
Portal: _react.default.Fragment
|
|
45
|
+
},
|
|
46
|
+
ToolbarPortal = _ref.Portal;
|
|
47
|
+
var hasToolbarPortal = ToolbarPortal !== _react.default.Fragment;
|
|
48
|
+
var popupsMountPoint = hasToolbarPortal && (0, _platformFeatureFlags.fg)('platform_editor_lcm_toolbar_portals') ? undefined : props.popupsMountPoint;
|
|
40
49
|
var nonCustomToolbar =
|
|
41
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
42
51
|
(0, _react2.jsx)("div", {
|
|
@@ -50,7 +59,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
50
59
|
providerFactory: props.providerFactory,
|
|
51
60
|
appearance: props.appearance,
|
|
52
61
|
items: props.primaryToolbarComponents,
|
|
53
|
-
popupsMountPoint:
|
|
62
|
+
popupsMountPoint: popupsMountPoint,
|
|
54
63
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
55
64
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
56
65
|
disabled: props.disabled,
|
|
@@ -67,7 +76,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
67
76
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
68
77
|
}) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
69
78
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
70
|
-
popupsMountPoint:
|
|
79
|
+
popupsMountPoint: popupsMountPoint,
|
|
71
80
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
72
81
|
editorView: props.editorView,
|
|
73
82
|
containerElement: props.containerElement,
|
|
@@ -102,13 +111,6 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
102
111
|
event.preventDefault();
|
|
103
112
|
event.stopPropagation();
|
|
104
113
|
};
|
|
105
|
-
|
|
106
|
-
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
107
|
-
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
108
|
-
var _ref = (_useToolbarPortal = (0, _ToolbarPortal.useToolbarPortal)()) !== null && _useToolbarPortal !== void 0 ? _useToolbarPortal : {
|
|
109
|
-
Portal: _react.default.Fragment
|
|
110
|
-
},
|
|
111
|
-
ToolbarPortal = _ref.Portal;
|
|
112
114
|
return (0, _react2.jsx)(_ui.ContextPanelConsumer, null, function (_ref2) {
|
|
113
115
|
var contextPanelWidth = _ref2.width;
|
|
114
116
|
return (0, _react2.jsx)(_uiMenu.ToolbarArrowKeyNavigationProvider, {
|
|
@@ -17,7 +17,7 @@ import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSiz
|
|
|
17
17
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
18
18
|
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
19
19
|
export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
20
|
-
var _props$customPrimaryT
|
|
20
|
+
var _useToolbarPortal, _props$customPrimaryT;
|
|
21
21
|
const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
|
|
22
22
|
const {
|
|
23
23
|
editorAPI
|
|
@@ -25,6 +25,16 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
25
25
|
|
|
26
26
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
27
27
|
const twoLineEditorToolbar = !!props.customPrimaryToolbarComponents;
|
|
28
|
+
|
|
29
|
+
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
30
|
+
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
31
|
+
const {
|
|
32
|
+
Portal: ToolbarPortal
|
|
33
|
+
} = (_useToolbarPortal = useToolbarPortal()) !== null && _useToolbarPortal !== void 0 ? _useToolbarPortal : {
|
|
34
|
+
Portal: React.Fragment
|
|
35
|
+
};
|
|
36
|
+
const hasToolbarPortal = ToolbarPortal !== React.Fragment;
|
|
37
|
+
const popupsMountPoint = hasToolbarPortal && fg('platform_editor_lcm_toolbar_portals') ? undefined : props.popupsMountPoint;
|
|
28
38
|
const nonCustomToolbar =
|
|
29
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
30
40
|
jsx("div", {
|
|
@@ -38,7 +48,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
38
48
|
providerFactory: props.providerFactory,
|
|
39
49
|
appearance: props.appearance,
|
|
40
50
|
items: props.primaryToolbarComponents,
|
|
41
|
-
popupsMountPoint:
|
|
51
|
+
popupsMountPoint: popupsMountPoint,
|
|
42
52
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
43
53
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
44
54
|
disabled: props.disabled,
|
|
@@ -55,7 +65,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
55
65
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
56
66
|
}) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
57
67
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
58
|
-
popupsMountPoint:
|
|
68
|
+
popupsMountPoint: popupsMountPoint,
|
|
59
69
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
60
70
|
editorView: props.editorView,
|
|
61
71
|
containerElement: props.containerElement,
|
|
@@ -88,14 +98,6 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
88
98
|
event.preventDefault();
|
|
89
99
|
event.stopPropagation();
|
|
90
100
|
};
|
|
91
|
-
|
|
92
|
-
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
93
|
-
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
94
|
-
const {
|
|
95
|
-
Portal: ToolbarPortal
|
|
96
|
-
} = (_useToolbarPortal = useToolbarPortal()) !== null && _useToolbarPortal !== void 0 ? _useToolbarPortal : {
|
|
97
|
-
Portal: React.Fragment
|
|
98
|
-
};
|
|
99
101
|
return jsx(ContextPanelConsumer, null, ({
|
|
100
102
|
width: contextPanelWidth
|
|
101
103
|
}) => jsx(ToolbarArrowKeyNavigationProvider, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "203.17.
|
|
2
|
+
export const version = "203.17.4";
|
|
@@ -18,7 +18,7 @@ import { ToolbarWithSizeDetector as Toolbar } from '../../Toolbar/ToolbarWithSiz
|
|
|
18
18
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
19
19
|
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
20
20
|
export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
21
|
-
var _props$customPrimaryT
|
|
21
|
+
var _useToolbarPortal, _props$customPrimaryT;
|
|
22
22
|
var _useState = useState(false),
|
|
23
23
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
24
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -27,6 +27,15 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
27
27
|
|
|
28
28
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
29
29
|
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents;
|
|
30
|
+
|
|
31
|
+
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
32
|
+
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
33
|
+
var _ref = (_useToolbarPortal = useToolbarPortal()) !== null && _useToolbarPortal !== void 0 ? _useToolbarPortal : {
|
|
34
|
+
Portal: React.Fragment
|
|
35
|
+
},
|
|
36
|
+
ToolbarPortal = _ref.Portal;
|
|
37
|
+
var hasToolbarPortal = ToolbarPortal !== React.Fragment;
|
|
38
|
+
var popupsMountPoint = hasToolbarPortal && fg('platform_editor_lcm_toolbar_portals') ? undefined : props.popupsMountPoint;
|
|
30
39
|
var nonCustomToolbar =
|
|
31
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
32
41
|
jsx("div", {
|
|
@@ -40,7 +49,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
40
49
|
providerFactory: props.providerFactory,
|
|
41
50
|
appearance: props.appearance,
|
|
42
51
|
items: props.primaryToolbarComponents,
|
|
43
|
-
popupsMountPoint:
|
|
52
|
+
popupsMountPoint: popupsMountPoint,
|
|
44
53
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
45
54
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
46
55
|
disabled: props.disabled,
|
|
@@ -57,7 +66,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
57
66
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
58
67
|
}) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
59
68
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
60
|
-
popupsMountPoint:
|
|
69
|
+
popupsMountPoint: popupsMountPoint,
|
|
61
70
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
62
71
|
editorView: props.editorView,
|
|
63
72
|
containerElement: props.containerElement,
|
|
@@ -92,13 +101,6 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
92
101
|
event.preventDefault();
|
|
93
102
|
event.stopPropagation();
|
|
94
103
|
};
|
|
95
|
-
|
|
96
|
-
// When a toolbar portal context is provided, render the toolbar inside a portal.
|
|
97
|
-
// Otherwise fall back to a fragment just to avoid forking rendering logic.
|
|
98
|
-
var _ref = (_useToolbarPortal = useToolbarPortal()) !== null && _useToolbarPortal !== void 0 ? _useToolbarPortal : {
|
|
99
|
-
Portal: React.Fragment
|
|
100
|
-
},
|
|
101
|
-
ToolbarPortal = _ref.Portal;
|
|
102
104
|
return jsx(ContextPanelConsumer, null, function (_ref2) {
|
|
103
105
|
var contextPanelWidth = _ref2.width;
|
|
104
106
|
return jsx(ToolbarArrowKeyNavigationProvider, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "203.17.
|
|
2
|
+
export var version = "203.17.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "203.17.
|
|
3
|
+
"version": "203.17.4",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
"@atlaskit/button": "^20.5.0",
|
|
46
46
|
"@atlaskit/editor-common": "^99.17.0",
|
|
47
47
|
"@atlaskit/editor-json-transformer": "^8.23.0",
|
|
48
|
-
"@atlaskit/editor-performance-metrics": "1.
|
|
48
|
+
"@atlaskit/editor-performance-metrics": "1.5.0",
|
|
49
49
|
"@atlaskit/editor-plugin-quick-insert": "1.10.2",
|
|
50
50
|
"@atlaskit/editor-plugins": "^7.2.0",
|
|
51
51
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
52
52
|
"@atlaskit/editor-shared-styles": "^3.3.0",
|
|
53
53
|
"@atlaskit/emoji": "^67.14.0",
|
|
54
|
-
"@atlaskit/icon": "^23.
|
|
54
|
+
"@atlaskit/icon": "^23.10.0",
|
|
55
55
|
"@atlaskit/media-card": "^78.19.0",
|
|
56
56
|
"@atlaskit/mention": "^23.11.0",
|
|
57
57
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
58
|
-
"@atlaskit/react-ufo": "^2.
|
|
58
|
+
"@atlaskit/react-ufo": "^2.16.0",
|
|
59
59
|
"@atlaskit/task-decision": "^17.12.0",
|
|
60
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
60
|
+
"@atlaskit/tmp-editor-statsig": "^2.47.0",
|
|
61
61
|
"@atlaskit/tokens": "^3.3.0",
|
|
62
|
-
"@atlaskit/tooltip": "^19.
|
|
62
|
+
"@atlaskit/tooltip": "^19.2.0",
|
|
63
63
|
"@atlaskit/width-detector": "^4.4.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
65
65
|
"@emotion/react": "^11.7.1",
|
|
@@ -85,27 +85,27 @@
|
|
|
85
85
|
"@af/visual-regression": "*",
|
|
86
86
|
"@atlaskit/adf-utils": "^19.18.0",
|
|
87
87
|
"@atlaskit/analytics-listeners": "^8.15.0",
|
|
88
|
-
"@atlaskit/collab-provider": "10.
|
|
88
|
+
"@atlaskit/collab-provider": "10.7.0",
|
|
89
89
|
"@atlaskit/editor-plugin-annotation": "1.28.1",
|
|
90
90
|
"@atlaskit/editor-plugin-card": "^4.6.0",
|
|
91
91
|
"@atlaskit/editor-plugin-list": "^3.10.0",
|
|
92
92
|
"@atlaskit/editor-plugin-paste": "^2.3.0",
|
|
93
93
|
"@atlaskit/link-provider": "^1.19.0",
|
|
94
|
-
"@atlaskit/logo": "^15.
|
|
94
|
+
"@atlaskit/logo": "^15.4.0",
|
|
95
95
|
"@atlaskit/media-core": "^34.5.0",
|
|
96
96
|
"@atlaskit/media-integration-test-helpers": "^3.1.0",
|
|
97
97
|
"@atlaskit/media-test-helpers": "^34.8.0",
|
|
98
98
|
"@atlaskit/modal-dialog": "^12.20.0",
|
|
99
|
-
"@atlaskit/primitives": "^13.
|
|
99
|
+
"@atlaskit/primitives": "^13.6.0",
|
|
100
100
|
"@atlaskit/renderer": "^112.14.0",
|
|
101
|
-
"@atlaskit/smart-card": "^34.
|
|
101
|
+
"@atlaskit/smart-card": "^34.11.0",
|
|
102
102
|
"@atlaskit/synchrony-test-helpers": "^3.1.0",
|
|
103
|
-
"@atlaskit/toggle": "^14.
|
|
103
|
+
"@atlaskit/toggle": "^14.2.0",
|
|
104
104
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
105
105
|
"@atlaskit/visual-regression": "*",
|
|
106
106
|
"@atlassian/adf-schema-json": "^1.27.0",
|
|
107
107
|
"@atlassian/feature-flags-test-utils": "*",
|
|
108
|
-
"@atlassian/search-provider": "3.0.
|
|
108
|
+
"@atlassian/search-provider": "3.0.36",
|
|
109
109
|
"@emotion/jest": "^11.8.0",
|
|
110
110
|
"@storybook/addon-knobs": "^6.4.0",
|
|
111
111
|
"@testing-library/react": "^13.4.0",
|
|
@@ -423,6 +423,10 @@
|
|
|
423
423
|
"type": "boolean",
|
|
424
424
|
"referenceOnly": true
|
|
425
425
|
},
|
|
426
|
+
"nested_table_control_padding_with_css": {
|
|
427
|
+
"type": "boolean",
|
|
428
|
+
"referenceOnly": true
|
|
429
|
+
},
|
|
426
430
|
"platform_editor_react_18_autofocus_fix": {
|
|
427
431
|
"type": "boolean"
|
|
428
432
|
},
|