@atlaskit/editor-core 216.7.14 → 216.7.15
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 +8 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +12 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +12 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +12 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 216.7.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b17f23c9e3a68`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b17f23c9e3a68) -
|
|
8
|
+
Avoid rendering entire primary toolbar container when primary toolbar is not registered
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 216.7.14
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -70,6 +70,9 @@ var ToolbarPlaceholder = function ToolbarPlaceholder() {
|
|
|
70
70
|
className: (0, _runtime.ax)([styles.toolbarPlaceholder])
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
+
var shouldShowToolbarContainer = function shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents) {
|
|
74
|
+
return !!toolbar || !!customPrimaryToolbarComponents;
|
|
75
|
+
};
|
|
73
76
|
var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
74
77
|
var _editorAPI$toolbar, _editorAPI$toolbar2, _useToolbarPortal;
|
|
75
78
|
var editorAPI = _ref4.editorAPI,
|
|
@@ -107,6 +110,15 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
|
|
|
107
110
|
event.preventDefault();
|
|
108
111
|
event.stopPropagation();
|
|
109
112
|
}, [editorView]);
|
|
113
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_primary_toolbar_early_exit', 'isEnabled', true)) {
|
|
114
|
+
// Remove entire primary toolbar region if:
|
|
115
|
+
// - primary toolbar isn't registered
|
|
116
|
+
// - no custom primary toolbar components to render
|
|
117
|
+
// note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
|
|
118
|
+
if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(ToolbarPortal, null, null);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
110
122
|
return /*#__PURE__*/_react.default.createElement(_contextPanel.ContextPanelConsumer, null, function (_ref6) {
|
|
111
123
|
var ContextPanelWidth = _ref6.width;
|
|
112
124
|
return /*#__PURE__*/_react.default.createElement(_ExcludeFromHydration.default, {
|
|
@@ -64,6 +64,9 @@ const ToolbarPlaceholder = () => {
|
|
|
64
64
|
className: ax([styles.toolbarPlaceholder])
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
+
const shouldShowToolbarContainer = (toolbar, customPrimaryToolbarComponents) => {
|
|
68
|
+
return !!toolbar || !!customPrimaryToolbarComponents;
|
|
69
|
+
};
|
|
67
70
|
export const FullPageToolbarNext = ({
|
|
68
71
|
editorAPI,
|
|
69
72
|
beforeIcon,
|
|
@@ -101,6 +104,15 @@ export const FullPageToolbarNext = ({
|
|
|
101
104
|
event.preventDefault();
|
|
102
105
|
event.stopPropagation();
|
|
103
106
|
}, [editorView]);
|
|
107
|
+
if (expValEquals('platform_editor_primary_toolbar_early_exit', 'isEnabled', true)) {
|
|
108
|
+
// Remove entire primary toolbar region if:
|
|
109
|
+
// - primary toolbar isn't registered
|
|
110
|
+
// - no custom primary toolbar components to render
|
|
111
|
+
// note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
|
|
112
|
+
if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
|
|
113
|
+
return /*#__PURE__*/React.createElement(ToolbarPortal, null, null);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
104
116
|
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
|
|
105
117
|
width: ContextPanelWidth
|
|
106
118
|
}) => /*#__PURE__*/React.createElement(ExcludeFromHydration, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "216.7.
|
|
2
|
+
export const version = "216.7.14";
|
|
@@ -61,6 +61,9 @@ var ToolbarPlaceholder = function ToolbarPlaceholder() {
|
|
|
61
61
|
className: ax([styles.toolbarPlaceholder])
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
+
var shouldShowToolbarContainer = function shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents) {
|
|
65
|
+
return !!toolbar || !!customPrimaryToolbarComponents;
|
|
66
|
+
};
|
|
64
67
|
export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
65
68
|
var _editorAPI$toolbar, _editorAPI$toolbar2, _useToolbarPortal;
|
|
66
69
|
var editorAPI = _ref4.editorAPI,
|
|
@@ -98,6 +101,15 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
|
|
|
98
101
|
event.preventDefault();
|
|
99
102
|
event.stopPropagation();
|
|
100
103
|
}, [editorView]);
|
|
104
|
+
if (expValEquals('platform_editor_primary_toolbar_early_exit', 'isEnabled', true)) {
|
|
105
|
+
// Remove entire primary toolbar region if:
|
|
106
|
+
// - primary toolbar isn't registered
|
|
107
|
+
// - no custom primary toolbar components to render
|
|
108
|
+
// note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
|
|
109
|
+
if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
|
|
110
|
+
return /*#__PURE__*/React.createElement(ToolbarPortal, null, null);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
101
113
|
return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref6) {
|
|
102
114
|
var ContextPanelWidth = _ref6.width;
|
|
103
115
|
return /*#__PURE__*/React.createElement(ExcludeFromHydration, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "216.7.
|
|
2
|
+
export var version = "216.7.14";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "216.7.
|
|
3
|
+
"version": "216.7.15",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
67
67
|
"@atlaskit/react-ufo": "^5.0.0",
|
|
68
68
|
"@atlaskit/task-decision": "^19.2.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^17.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^17.2.0",
|
|
70
70
|
"@atlaskit/tokens": "^10.1.0",
|
|
71
71
|
"@atlaskit/tooltip": "^20.14.0",
|
|
72
72
|
"@atlaskit/width-detector": "^5.0.0",
|