@atlaskit/editor-core 185.1.3 → 185.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +4 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +4 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/cjs/ui/Appearance/Mobile.js +4 -2
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +6 -3
- package/dist/cjs/ui/ContentStyles/index.js +5 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/ui/Appearance/Chromeless.js +4 -2
- package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/es2019/ui/Appearance/Mobile.js +4 -2
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +6 -3
- package/dist/es2019/ui/ContentStyles/index.js +5 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/ui/Appearance/Chromeless.js +4 -2
- package/dist/esm/ui/Appearance/Comment/Comment.js +4 -2
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/esm/ui/Appearance/Mobile.js +4 -2
- package/dist/esm/ui/AppearanceComponents/Mobile.js +6 -3
- package/dist/esm/ui/ContentStyles/index.js +5 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +2 -0
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +5 -364
- package/dist/types/ui/Appearance/Mobile.d.ts +1 -1
- package/dist/types/ui/AppearanceComponents/Mobile.d.ts +2 -0
- package/dist/types/ui/ContentStyles/index.d.ts +3 -3
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +2 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +5 -364
- package/dist/types-ts4.5/ui/Appearance/Mobile.d.ts +1 -1
- package/dist/types-ts4.5/ui/AppearanceComponents/Mobile.d.ts +2 -0
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +3 -3
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 185.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`66adfa8cd12`](https://bitbucket.org/atlassian/atlassian-frontend/commits/66adfa8cd12) - [ux] Passthru editor feature flags props into the Appearance content area so it's able to setup styles which rely on feature flags
|
|
8
|
+
|
|
9
|
+
## 185.1.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 185.1.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -58,7 +58,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
58
58
|
popupsScrollableElement = _this$props.popupsScrollableElement,
|
|
59
59
|
disabled = _this$props.disabled,
|
|
60
60
|
dispatchAnalyticsEvent = _this$props.dispatchAnalyticsEvent,
|
|
61
|
-
pluginHooks = _this$props.pluginHooks
|
|
61
|
+
pluginHooks = _this$props.pluginHooks,
|
|
62
|
+
featureFlags = _this$props.featureFlags;
|
|
62
63
|
var maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
63
64
|
return (0, _react2.jsx)(_WithFlash.default, {
|
|
64
65
|
animate: maxContentSizeReached
|
|
@@ -69,7 +70,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
69
70
|
return _this.containerElement = _ref2;
|
|
70
71
|
}
|
|
71
72
|
}, (0, _react2.jsx)(ContentArea, {
|
|
72
|
-
className: "ak-editor-content-area"
|
|
73
|
+
className: "ak-editor-content-area",
|
|
74
|
+
featureFlags: featureFlags
|
|
73
75
|
}, customContentComponents, (0, _react2.jsx)(_PluginSlot.default, {
|
|
74
76
|
editorView: editorView,
|
|
75
77
|
editorActions: editorActions,
|
|
@@ -93,7 +93,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
93
93
|
dispatchAnalyticsEvent = _this$props.dispatchAnalyticsEvent,
|
|
94
94
|
intl = _this$props.intl,
|
|
95
95
|
useStickyToolbar = _this$props.useStickyToolbar,
|
|
96
|
-
pluginHooks = _this$props.pluginHooks
|
|
96
|
+
pluginHooks = _this$props.pluginHooks,
|
|
97
|
+
featureFlags = _this$props.featureFlags;
|
|
97
98
|
var maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
98
99
|
var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
|
|
99
100
|
var isShortcutToFocusToolbar = function isShortcutToFocusToolbar(event) {
|
|
@@ -150,7 +151,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
150
151
|
css: maxHeight ? (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n max-height: ", "px;\n "])), maxHeight) : null,
|
|
151
152
|
className: (0, _classnames.default)('ak-editor-content-area', {
|
|
152
153
|
'less-margin': width < _editorSharedStyles.akEditorMobileBreakoutPoint
|
|
153
|
-
})
|
|
154
|
+
}),
|
|
155
|
+
featureFlags: featureFlags
|
|
154
156
|
}, customContentComponents, (0, _react2.jsx)(_PluginSlot.default, {
|
|
155
157
|
editorView: editorView,
|
|
156
158
|
editorActions: editorActions,
|
|
@@ -133,7 +133,8 @@ var FullPageEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
133
133
|
scrollContainer: this.scrollContainer,
|
|
134
134
|
scrollContainerRef: this.scrollContainerRef,
|
|
135
135
|
wrapperElement: this.wrapperElementRef.current,
|
|
136
|
-
pluginHooks: props.pluginHooks
|
|
136
|
+
pluginHooks: props.pluginHooks,
|
|
137
|
+
featureFlags: this.featureFlags
|
|
137
138
|
})));
|
|
138
139
|
}
|
|
139
140
|
}]);
|
|
@@ -30,7 +30,8 @@ var Content = /*#__PURE__*/_react2.default.memo(function (props) {
|
|
|
30
30
|
"data-testid": CONTENT_AREA_TEST_ID
|
|
31
31
|
}, (0, _react.jsx)(_StyledComponents.ScrollContainer, {
|
|
32
32
|
ref: props.scrollContainerRef,
|
|
33
|
-
className: "fabric-editor-popup-scroll-parent"
|
|
33
|
+
className: "fabric-editor-popup-scroll-parent",
|
|
34
|
+
featureFlags: props.featureFlags
|
|
34
35
|
}, (0, _react.jsx)(_Addon.ClickAreaBlock, {
|
|
35
36
|
editorView: props.editorView,
|
|
36
37
|
editorDisabled: props.disabled
|
|
@@ -25,13 +25,15 @@ function Mobile(_ref) {
|
|
|
25
25
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
26
26
|
popupsScrollableElement = _ref.popupsScrollableElement,
|
|
27
27
|
innerRef = _ref.innerRef,
|
|
28
|
-
pluginHooks = _ref.pluginHooks
|
|
28
|
+
pluginHooks = _ref.pluginHooks,
|
|
29
|
+
featureFlags = _ref.featureFlags;
|
|
29
30
|
return /*#__PURE__*/_react.default.createElement(_Mobile.MobileAppearance, {
|
|
30
31
|
ref: innerRef,
|
|
31
32
|
editorView: editorView || null,
|
|
32
33
|
maxHeight: maxHeight,
|
|
33
34
|
persistScrollGutter: persistScrollGutter,
|
|
34
|
-
editorDisabled: disabled
|
|
35
|
+
editorDisabled: disabled,
|
|
36
|
+
featureFlags: featureFlags
|
|
35
37
|
}, editorDOMElement, /*#__PURE__*/_react.default.createElement(_PluginSlot.default, {
|
|
36
38
|
editorView: editorView,
|
|
37
39
|
editorActions: editorActions,
|
|
@@ -26,7 +26,8 @@ var MobileAppearance = /*#__PURE__*/(0, _react.forwardRef)(function MobileAppear
|
|
|
26
26
|
var editorView = _ref.editorView,
|
|
27
27
|
persistScrollGutter = _ref.persistScrollGutter,
|
|
28
28
|
children = _ref.children,
|
|
29
|
-
editorDisabled = _ref.editorDisabled
|
|
29
|
+
editorDisabled = _ref.editorDisabled,
|
|
30
|
+
featureFlags = _ref.featureFlags;
|
|
30
31
|
var render = (0, _react.useCallback)(function (_ref2) {
|
|
31
32
|
var maxContentSize = _ref2.maxContentSize,
|
|
32
33
|
mobileDimensions = _ref2.mobileDimensions;
|
|
@@ -67,10 +68,12 @@ var MobileAppearance = /*#__PURE__*/(0, _react.forwardRef)(function MobileAppear
|
|
|
67
68
|
persistScrollGutter: persistScrollGutter,
|
|
68
69
|
isExpanded: currentIsExpanded,
|
|
69
70
|
editorDisabled: editorDisabled
|
|
70
|
-
}, (0, _react2.jsx)(ContentArea,
|
|
71
|
+
}, (0, _react2.jsx)(ContentArea, {
|
|
72
|
+
featureFlags: featureFlags
|
|
73
|
+
}, (0, _react2.jsx)("div", {
|
|
71
74
|
className: "ak-editor-content-area"
|
|
72
75
|
}, children)))));
|
|
73
|
-
}, [children, editorView, persistScrollGutter, editorDisabled, ref]);
|
|
76
|
+
}, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags]);
|
|
74
77
|
return (0, _react2.jsx)(_WithPluginState.default, {
|
|
75
78
|
plugins: {
|
|
76
79
|
maxContentSize: _maxContentSize.pluginKey,
|
|
@@ -51,13 +51,15 @@ var contentStyles = function contentStyles(props) {
|
|
|
51
51
|
var createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
52
52
|
return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
53
53
|
var className = props.className,
|
|
54
|
-
children = props.children
|
|
54
|
+
children = props.children,
|
|
55
|
+
featureFlags = props.featureFlags;
|
|
55
56
|
var theme = (0, _react2.useTheme)();
|
|
56
57
|
var memoizedStyle = (0, _react.useMemo)(function () {
|
|
57
58
|
return contentStyles({
|
|
58
|
-
theme: theme
|
|
59
|
+
theme: theme,
|
|
60
|
+
featureFlags: featureFlags
|
|
59
61
|
});
|
|
60
|
-
}, [theme]);
|
|
62
|
+
}, [theme, featureFlags]);
|
|
61
63
|
return (0, _react2.jsx)("div", {
|
|
62
64
|
className: className,
|
|
63
65
|
ref: ref,
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "185.
|
|
9
|
+
var version = "185.2.0";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -55,7 +55,8 @@ export default class Editor extends React.Component {
|
|
|
55
55
|
popupsScrollableElement,
|
|
56
56
|
disabled,
|
|
57
57
|
dispatchAnalyticsEvent,
|
|
58
|
-
pluginHooks
|
|
58
|
+
pluginHooks,
|
|
59
|
+
featureFlags
|
|
59
60
|
} = this.props;
|
|
60
61
|
const maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
61
62
|
return jsx(WithFlash, {
|
|
@@ -69,7 +70,8 @@ export default class Editor extends React.Component {
|
|
|
69
70
|
"data-testid": "chromeless-editor",
|
|
70
71
|
ref: ref => this.containerElement = ref
|
|
71
72
|
}, jsx(ContentArea, {
|
|
72
|
-
className: "ak-editor-content-area"
|
|
73
|
+
className: "ak-editor-content-area",
|
|
74
|
+
featureFlags: featureFlags
|
|
73
75
|
}, customContentComponents, jsx(PluginSlot, {
|
|
74
76
|
editorView: editorView,
|
|
75
77
|
editorActions: editorActions,
|
|
@@ -119,7 +119,8 @@ class Editor extends React.Component {
|
|
|
119
119
|
dispatchAnalyticsEvent,
|
|
120
120
|
intl,
|
|
121
121
|
useStickyToolbar,
|
|
122
|
-
pluginHooks
|
|
122
|
+
pluginHooks,
|
|
123
|
+
featureFlags
|
|
123
124
|
} = this.props;
|
|
124
125
|
const maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
125
126
|
const showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
|
|
@@ -180,7 +181,8 @@ class Editor extends React.Component {
|
|
|
180
181
|
` : null,
|
|
181
182
|
className: classnames('ak-editor-content-area', {
|
|
182
183
|
'less-margin': width < akEditorMobileBreakoutPoint
|
|
183
|
-
})
|
|
184
|
+
}),
|
|
185
|
+
featureFlags: featureFlags
|
|
184
186
|
}, customContentComponents, jsx(PluginSlot, {
|
|
185
187
|
editorView: editorView,
|
|
186
188
|
editorActions: editorActions,
|
|
@@ -114,7 +114,8 @@ export class FullPageEditor extends React.Component {
|
|
|
114
114
|
scrollContainer: this.scrollContainer,
|
|
115
115
|
scrollContainerRef: this.scrollContainerRef,
|
|
116
116
|
wrapperElement: this.wrapperElementRef.current,
|
|
117
|
-
pluginHooks: props.pluginHooks
|
|
117
|
+
pluginHooks: props.pluginHooks,
|
|
118
|
+
featureFlags: this.featureFlags
|
|
118
119
|
})));
|
|
119
120
|
}
|
|
120
121
|
}
|
|
@@ -22,7 +22,8 @@ const Content = /*#__PURE__*/React.memo(props => {
|
|
|
22
22
|
"data-testid": CONTENT_AREA_TEST_ID
|
|
23
23
|
}, jsx(ScrollContainer, {
|
|
24
24
|
ref: props.scrollContainerRef,
|
|
25
|
-
className: "fabric-editor-popup-scroll-parent"
|
|
25
|
+
className: "fabric-editor-popup-scroll-parent",
|
|
26
|
+
featureFlags: props.featureFlags
|
|
26
27
|
}, jsx(ClickAreaBlock, {
|
|
27
28
|
editorView: props.editorView,
|
|
28
29
|
editorDisabled: props.disabled
|
|
@@ -17,7 +17,8 @@ export default function Mobile({
|
|
|
17
17
|
popupsBoundariesElement,
|
|
18
18
|
popupsScrollableElement,
|
|
19
19
|
innerRef,
|
|
20
|
-
pluginHooks
|
|
20
|
+
pluginHooks,
|
|
21
|
+
featureFlags
|
|
21
22
|
}) {
|
|
22
23
|
var _innerRef$current;
|
|
23
24
|
return /*#__PURE__*/React.createElement(MobileAppearance, {
|
|
@@ -25,7 +26,8 @@ export default function Mobile({
|
|
|
25
26
|
editorView: editorView || null,
|
|
26
27
|
maxHeight: maxHeight,
|
|
27
28
|
persistScrollGutter: persistScrollGutter,
|
|
28
|
-
editorDisabled: disabled
|
|
29
|
+
editorDisabled: disabled,
|
|
30
|
+
featureFlags: featureFlags
|
|
29
31
|
}, editorDOMElement, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
30
32
|
editorView: editorView,
|
|
31
33
|
editorActions: editorActions,
|
|
@@ -27,7 +27,8 @@ export const MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearanc
|
|
|
27
27
|
editorView,
|
|
28
28
|
persistScrollGutter,
|
|
29
29
|
children,
|
|
30
|
-
editorDisabled
|
|
30
|
+
editorDisabled,
|
|
31
|
+
featureFlags
|
|
31
32
|
}, ref) {
|
|
32
33
|
const render = useCallback(({
|
|
33
34
|
maxContentSize,
|
|
@@ -72,10 +73,12 @@ export const MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearanc
|
|
|
72
73
|
persistScrollGutter: persistScrollGutter,
|
|
73
74
|
isExpanded: currentIsExpanded,
|
|
74
75
|
editorDisabled: editorDisabled
|
|
75
|
-
}, jsx(ContentArea,
|
|
76
|
+
}, jsx(ContentArea, {
|
|
77
|
+
featureFlags: featureFlags
|
|
78
|
+
}, jsx("div", {
|
|
76
79
|
className: "ak-editor-content-area"
|
|
77
80
|
}, children)))));
|
|
78
|
-
}, [children, editorView, persistScrollGutter, editorDisabled, ref]);
|
|
81
|
+
}, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags]);
|
|
79
82
|
return jsx(WithPluginState, {
|
|
80
83
|
plugins: {
|
|
81
84
|
maxContentSize: maxContentSizePluginKey,
|
|
@@ -161,12 +161,14 @@ export const createEditorContentStyle = styles => {
|
|
|
161
161
|
return /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
162
162
|
const {
|
|
163
163
|
className,
|
|
164
|
-
children
|
|
164
|
+
children,
|
|
165
|
+
featureFlags
|
|
165
166
|
} = props;
|
|
166
167
|
const theme = useTheme();
|
|
167
168
|
const memoizedStyle = useMemo(() => contentStyles({
|
|
168
|
-
theme
|
|
169
|
-
|
|
169
|
+
theme,
|
|
170
|
+
featureFlags
|
|
171
|
+
}), [theme, featureFlags]);
|
|
170
172
|
return jsx("div", {
|
|
171
173
|
className: className,
|
|
172
174
|
ref: ref,
|
package/dist/es2019/version.json
CHANGED
|
@@ -51,7 +51,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
51
51
|
popupsScrollableElement = _this$props.popupsScrollableElement,
|
|
52
52
|
disabled = _this$props.disabled,
|
|
53
53
|
dispatchAnalyticsEvent = _this$props.dispatchAnalyticsEvent,
|
|
54
|
-
pluginHooks = _this$props.pluginHooks
|
|
54
|
+
pluginHooks = _this$props.pluginHooks,
|
|
55
|
+
featureFlags = _this$props.featureFlags;
|
|
55
56
|
var maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
56
57
|
return jsx(WithFlash, {
|
|
57
58
|
animate: maxContentSizeReached
|
|
@@ -62,7 +63,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
62
63
|
return _this.containerElement = _ref2;
|
|
63
64
|
}
|
|
64
65
|
}, jsx(ContentArea, {
|
|
65
|
-
className: "ak-editor-content-area"
|
|
66
|
+
className: "ak-editor-content-area",
|
|
67
|
+
featureFlags: featureFlags
|
|
66
68
|
}, customContentComponents, jsx(PluginSlot, {
|
|
67
69
|
editorView: editorView,
|
|
68
70
|
editorActions: editorActions,
|
|
@@ -86,7 +86,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
86
86
|
dispatchAnalyticsEvent = _this$props.dispatchAnalyticsEvent,
|
|
87
87
|
intl = _this$props.intl,
|
|
88
88
|
useStickyToolbar = _this$props.useStickyToolbar,
|
|
89
|
-
pluginHooks = _this$props.pluginHooks
|
|
89
|
+
pluginHooks = _this$props.pluginHooks,
|
|
90
|
+
featureFlags = _this$props.featureFlags;
|
|
90
91
|
var maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
91
92
|
var showSecondaryToolbar = !!onSave || !!onCancel || !!customSecondaryToolbarComponents;
|
|
92
93
|
var isShortcutToFocusToolbar = function isShortcutToFocusToolbar(event) {
|
|
@@ -143,7 +144,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
143
144
|
css: maxHeight ? css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-height: ", "px;\n "])), maxHeight) : null,
|
|
144
145
|
className: classnames('ak-editor-content-area', {
|
|
145
146
|
'less-margin': width < akEditorMobileBreakoutPoint
|
|
146
|
-
})
|
|
147
|
+
}),
|
|
148
|
+
featureFlags: featureFlags
|
|
147
149
|
}, customContentComponents, jsx(PluginSlot, {
|
|
148
150
|
editorView: editorView,
|
|
149
151
|
editorActions: editorActions,
|
|
@@ -127,7 +127,8 @@ export var FullPageEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
127
127
|
scrollContainer: this.scrollContainer,
|
|
128
128
|
scrollContainerRef: this.scrollContainerRef,
|
|
129
129
|
wrapperElement: this.wrapperElementRef.current,
|
|
130
|
-
pluginHooks: props.pluginHooks
|
|
130
|
+
pluginHooks: props.pluginHooks,
|
|
131
|
+
featureFlags: this.featureFlags
|
|
131
132
|
})));
|
|
132
133
|
}
|
|
133
134
|
}]);
|
|
@@ -22,7 +22,8 @@ var Content = /*#__PURE__*/React.memo(function (props) {
|
|
|
22
22
|
"data-testid": CONTENT_AREA_TEST_ID
|
|
23
23
|
}, jsx(ScrollContainer, {
|
|
24
24
|
ref: props.scrollContainerRef,
|
|
25
|
-
className: "fabric-editor-popup-scroll-parent"
|
|
25
|
+
className: "fabric-editor-popup-scroll-parent",
|
|
26
|
+
featureFlags: props.featureFlags
|
|
26
27
|
}, jsx(ClickAreaBlock, {
|
|
27
28
|
editorView: props.editorView,
|
|
28
29
|
editorDisabled: props.disabled
|
|
@@ -18,13 +18,15 @@ export default function Mobile(_ref) {
|
|
|
18
18
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
19
19
|
popupsScrollableElement = _ref.popupsScrollableElement,
|
|
20
20
|
innerRef = _ref.innerRef,
|
|
21
|
-
pluginHooks = _ref.pluginHooks
|
|
21
|
+
pluginHooks = _ref.pluginHooks,
|
|
22
|
+
featureFlags = _ref.featureFlags;
|
|
22
23
|
return /*#__PURE__*/React.createElement(MobileAppearance, {
|
|
23
24
|
ref: innerRef,
|
|
24
25
|
editorView: editorView || null,
|
|
25
26
|
maxHeight: maxHeight,
|
|
26
27
|
persistScrollGutter: persistScrollGutter,
|
|
27
|
-
editorDisabled: disabled
|
|
28
|
+
editorDisabled: disabled,
|
|
29
|
+
featureFlags: featureFlags
|
|
28
30
|
}, editorDOMElement, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
29
31
|
editorView: editorView,
|
|
30
32
|
editorActions: editorActions,
|
|
@@ -16,7 +16,8 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
|
|
|
16
16
|
var editorView = _ref.editorView,
|
|
17
17
|
persistScrollGutter = _ref.persistScrollGutter,
|
|
18
18
|
children = _ref.children,
|
|
19
|
-
editorDisabled = _ref.editorDisabled
|
|
19
|
+
editorDisabled = _ref.editorDisabled,
|
|
20
|
+
featureFlags = _ref.featureFlags;
|
|
20
21
|
var render = useCallback(function (_ref2) {
|
|
21
22
|
var maxContentSize = _ref2.maxContentSize,
|
|
22
23
|
mobileDimensions = _ref2.mobileDimensions;
|
|
@@ -57,10 +58,12 @@ export var MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearance(
|
|
|
57
58
|
persistScrollGutter: persistScrollGutter,
|
|
58
59
|
isExpanded: currentIsExpanded,
|
|
59
60
|
editorDisabled: editorDisabled
|
|
60
|
-
}, jsx(ContentArea,
|
|
61
|
+
}, jsx(ContentArea, {
|
|
62
|
+
featureFlags: featureFlags
|
|
63
|
+
}, jsx("div", {
|
|
61
64
|
className: "ak-editor-content-area"
|
|
62
65
|
}, children)))));
|
|
63
|
-
}, [children, editorView, persistScrollGutter, editorDisabled, ref]);
|
|
66
|
+
}, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags]);
|
|
64
67
|
return jsx(WithPluginState, {
|
|
65
68
|
plugins: {
|
|
66
69
|
maxContentSize: maxContentSizePluginKey,
|
|
@@ -41,13 +41,15 @@ var contentStyles = function contentStyles(props) {
|
|
|
41
41
|
export var createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
42
42
|
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
43
43
|
var className = props.className,
|
|
44
|
-
children = props.children
|
|
44
|
+
children = props.children,
|
|
45
|
+
featureFlags = props.featureFlags;
|
|
45
46
|
var theme = useTheme();
|
|
46
47
|
var memoizedStyle = useMemo(function () {
|
|
47
48
|
return contentStyles({
|
|
48
|
-
theme: theme
|
|
49
|
+
theme: theme,
|
|
50
|
+
featureFlags: featureFlags
|
|
49
51
|
});
|
|
50
|
-
}, [theme]);
|
|
52
|
+
}, [theme, featureFlags]);
|
|
51
53
|
return jsx("div", {
|
|
52
54
|
className: className,
|
|
53
55
|
ref: ref,
|
package/dist/esm/version.json
CHANGED
|
@@ -7,6 +7,7 @@ import { EventDispatcher } from '../../../event-dispatcher';
|
|
|
7
7
|
import { ReactComponents, EditorAppearance, UIComponentFactory } from '../../../types';
|
|
8
8
|
import { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
9
9
|
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
10
11
|
interface FullPageEditorContentAreaProps {
|
|
11
12
|
appearance: EditorAppearance | undefined;
|
|
12
13
|
contentArea: HTMLElement | undefined;
|
|
@@ -28,6 +29,7 @@ interface FullPageEditorContentAreaProps {
|
|
|
28
29
|
contentAreaRef(ref: HTMLElement | null): void;
|
|
29
30
|
scrollContainerRef(ref: HTMLElement | null): void;
|
|
30
31
|
wrapperElement: HTMLElement | null;
|
|
32
|
+
featureFlags?: FeatureFlags;
|
|
31
33
|
}
|
|
32
34
|
export declare const CONTENT_AREA_TEST_ID = "ak-editor-fp-content-area";
|
|
33
35
|
export declare const FullPageContentArea: React.FC<import("react-intl-next").WithIntlProps<FullPageEditorContentAreaProps & WrappedComponentProps<"intl">>> & {
|