@atlaskit/editor-core 195.4.8 → 195.4.10
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/composable-editor/editor-internal.js +3 -1
- package/dist/cjs/create-editor/ReactEditorView.js +16 -9
- package/dist/cjs/ui/Appearance/Chromeless.js +4 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +5 -7
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +3 -3
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +6 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +1 -2
- package/dist/cjs/ui/Appearance/FullPage/types.js +1 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +3 -1
- package/dist/es2019/create-editor/ReactEditorView.js +15 -8
- package/dist/es2019/ui/Appearance/Chromeless.js +4 -4
- package/dist/es2019/ui/Appearance/Comment/Comment.js +8 -8
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +3 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +6 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
- package/dist/es2019/ui/Appearance/FullPage/types.js +0 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +3 -1
- package/dist/esm/create-editor/ReactEditorView.js +16 -9
- package/dist/esm/ui/Appearance/Chromeless.js +4 -4
- package/dist/esm/ui/Appearance/Comment/Comment.js +6 -8
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +3 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +6 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +1 -2
- package/dist/esm/ui/Appearance/FullPage/types.js +0 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ReactEditorView.d.ts +2 -1
- package/dist/types/create-editor/get-ui-component.d.ts +3 -1
- package/dist/types/types/editor-appearance-component.d.ts +3 -2
- package/dist/types/ui/Appearance/Chromeless.d.ts +5 -1
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +14 -8
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +11 -1
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -4
- package/dist/types/ui/Appearance/FullPage/FullPageToolbar.d.ts +16 -0
- package/dist/types/ui/Appearance/FullPage/types.d.ts +5 -0
- package/dist/types/ui/Appearance/Mobile.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +2 -1
- package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +3 -1
- package/dist/types-ts4.5/types/editor-appearance-component.d.ts +3 -2
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +7 -1
- package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +14 -8
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +11 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -4
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPageToolbar.d.ts +16 -0
- package/dist/types-ts4.5/ui/Appearance/FullPage/types.d.ts +5 -0
- package/dist/types-ts4.5/ui/Appearance/Mobile.d.ts +1 -1
- package/package.json +5 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 195.4.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#130747](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/130747)
|
|
8
|
+
[`299678481fe83`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/299678481fe83) -
|
|
9
|
+
improve popupsBoundariesElement for full page editor
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 195.4.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`01ab0e352a73e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/01ab0e352a73e) -
|
|
17
|
+
Decoupling editor appearances from preset context.
|
|
18
|
+
|
|
3
19
|
## 195.4.8
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -103,11 +103,13 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
103
103
|
eventDispatcher = _ref2.eventDispatcher,
|
|
104
104
|
config = _ref2.config,
|
|
105
105
|
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
106
|
-
editorRef = _ref2.editorRef
|
|
106
|
+
editorRef = _ref2.editorRef,
|
|
107
|
+
editorAPI = _ref2.editorAPI;
|
|
107
108
|
return (0, _react2.jsx)(_ui.BaseTheme, {
|
|
108
109
|
baseFontSize: (0, _getBaseFontSize.getBaseFontSize)(props.appearance)
|
|
109
110
|
}, (0, _react2.jsx)(Component, {
|
|
110
111
|
innerRef: editorRef,
|
|
112
|
+
editorAPI: editorAPI,
|
|
111
113
|
appearance: props.appearance,
|
|
112
114
|
disabled: props.disabled,
|
|
113
115
|
editorActions: editorActions,
|
|
@@ -27,6 +27,7 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
27
27
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
28
28
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
29
29
|
var _eventDispatcher = require("../event-dispatcher");
|
|
30
|
+
var _context = require("../presets/context");
|
|
30
31
|
var _document = require("../utils/document");
|
|
31
32
|
var _isFullPage = require("../utils/is-full-page");
|
|
32
33
|
var _RenderTracking = require("../utils/performance/components/RenderTracking");
|
|
@@ -773,7 +774,8 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
773
774
|
}, {
|
|
774
775
|
key: "render",
|
|
775
776
|
value: function render() {
|
|
776
|
-
var _this$props$editorPro8
|
|
777
|
+
var _this$props$editorPro8,
|
|
778
|
+
_this3 = this;
|
|
777
779
|
var renderTracking = (_this$props$editorPro8 = this.props.editorProps.performanceTracking) === null || _this$props$editorPro8 === void 0 || (_this$props$editorPro8 = _this$props$editorPro8.renderTracking) === null || _this$props$editorPro8 === void 0 ? void 0 : _this$props$editorPro8.reactEditorView;
|
|
778
780
|
var renderTrackingEnabled = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.enabled;
|
|
779
781
|
var useShallow = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.useShallow;
|
|
@@ -789,14 +791,19 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
789
791
|
actionSubject: _analytics.ACTION_SUBJECT.REACT_EDITOR_VIEW,
|
|
790
792
|
handleAnalyticsEvent: this.handleAnalyticsEvent,
|
|
791
793
|
useShallow: useShallow
|
|
792
|
-
}), this.props.render ?
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
794
|
+
}), this.props.render ? /*#__PURE__*/_react.default.createElement(_context.EditorAPIContext.Consumer, null, function (_ref4) {
|
|
795
|
+
var _this3$props$render, _this3$props$render2, _this3$props;
|
|
796
|
+
var editorApi = _ref4.editorApi;
|
|
797
|
+
return (_this3$props$render = (_this3$props$render2 = (_this3$props = _this3.props).render) === null || _this3$props$render2 === void 0 ? void 0 : _this3$props$render2.call(_this3$props, {
|
|
798
|
+
editor: _this3.editor,
|
|
799
|
+
view: _this3.view,
|
|
800
|
+
config: _this3.config,
|
|
801
|
+
eventDispatcher: _this3.eventDispatcher,
|
|
802
|
+
transformer: _this3.contentTransformer,
|
|
803
|
+
dispatchAnalyticsEvent: _this3.dispatchAnalyticsEvent,
|
|
804
|
+
editorRef: _this3.editorRef,
|
|
805
|
+
editorAPI: editorApi
|
|
806
|
+
})) !== null && _this3$props$render !== void 0 ? _this3$props$render : _this3.editor;
|
|
800
807
|
}) : this.editor);
|
|
801
808
|
}
|
|
802
809
|
}]);
|
|
@@ -17,7 +17,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
19
19
|
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
20
|
-
var _context = require("../../presets/context");
|
|
21
20
|
var _ContentStyles = require("../ContentStyles");
|
|
22
21
|
var _PluginSlot = _interopRequireDefault(require("../PluginSlot"));
|
|
23
22
|
var _WithFlash = _interopRequireDefault(require("../WithFlash"));
|
|
@@ -132,6 +131,7 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
132
131
|
key: "render",
|
|
133
132
|
value: function render() {
|
|
134
133
|
return (0, _react2.jsx)(RenderWithPluginState, {
|
|
134
|
+
editorAPI: this.props.editorAPI,
|
|
135
135
|
renderChrome: this.renderChrome
|
|
136
136
|
});
|
|
137
137
|
}
|
|
@@ -140,9 +140,9 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
140
140
|
}(_react.default.Component);
|
|
141
141
|
(0, _defineProperty2.default)(Editor, "displayName", 'ChromelessEditorAppearance');
|
|
142
142
|
function RenderWithPluginState(_ref3) {
|
|
143
|
-
var renderChrome = _ref3.renderChrome
|
|
144
|
-
|
|
145
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(
|
|
143
|
+
var renderChrome = _ref3.renderChrome,
|
|
144
|
+
editorAPI = _ref3.editorAPI;
|
|
145
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['maxContentSize']),
|
|
146
146
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
147
147
|
return (0, _react2.jsx)(_react.Fragment, null, renderChrome({
|
|
148
148
|
maxContentSize: maxContentSizeState
|
|
@@ -23,7 +23,6 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
23
23
|
var _colors = require("@atlaskit/theme/colors");
|
|
24
24
|
var _constants = require("@atlaskit/theme/constants");
|
|
25
25
|
var _messages = _interopRequireDefault(require("../../../messages"));
|
|
26
|
-
var _context = require("../../../presets/context");
|
|
27
26
|
var _Addon = require("../../Addon");
|
|
28
27
|
var _ContentStyles = require("../../ContentStyles");
|
|
29
28
|
var _PluginSlot = _interopRequireDefault(require("../../PluginSlot"));
|
|
@@ -86,12 +85,13 @@ var secondaryToolbarStyles = (0, _react2.css)({
|
|
|
86
85
|
padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
87
86
|
});
|
|
88
87
|
var appearance = 'comment';
|
|
89
|
-
var
|
|
90
|
-
var
|
|
91
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(
|
|
88
|
+
var CommentEditorWithIntl = exports.CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
89
|
+
var editorAPI = props.editorAPI;
|
|
90
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['media', 'maxContentSize', 'primaryToolbar']),
|
|
92
91
|
mediaState = _useSharedPluginState.mediaState,
|
|
93
92
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState,
|
|
94
93
|
primaryToolbarState = _useSharedPluginState.primaryToolbarState;
|
|
94
|
+
var intl = (0, _reactIntlNext.useIntl)();
|
|
95
95
|
var editorDOMElement = props.editorDOMElement,
|
|
96
96
|
editorView = props.editorView,
|
|
97
97
|
editorActions = props.editorActions,
|
|
@@ -112,7 +112,6 @@ var Editor = function Editor(props) {
|
|
|
112
112
|
onCancel = props.onCancel,
|
|
113
113
|
disabled = props.disabled,
|
|
114
114
|
dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
|
|
115
|
-
intl = props.intl,
|
|
116
115
|
useStickyToolbar = props.useStickyToolbar,
|
|
117
116
|
pluginHooks = props.pluginHooks,
|
|
118
117
|
featureFlags = props.featureFlags,
|
|
@@ -256,5 +255,4 @@ var Editor = function Editor(props) {
|
|
|
256
255
|
}
|
|
257
256
|
}), customSecondaryToolbarComponents));
|
|
258
257
|
};
|
|
259
|
-
|
|
260
|
-
var CommentEditorWithIntl = exports.CommentEditorWithIntl = (0, _reactIntlNext.injectIntl)(Editor);
|
|
258
|
+
CommentEditorWithIntl.displayName = 'CommentEditorAppearance';
|
|
@@ -12,7 +12,6 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
13
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
14
14
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
15
|
-
var _context = require("../../../presets/context");
|
|
16
15
|
var _FullPageContentArea = require("./FullPageContentArea");
|
|
17
16
|
var _FullPageToolbar = require("./FullPageToolbar");
|
|
18
17
|
var _StyledComponents = require("./StyledComponents");
|
|
@@ -61,7 +60,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
61
60
|
}, [props.innerRef]);
|
|
62
61
|
var scrollContentContainerRef = (0, _react.useRef)(null);
|
|
63
62
|
var showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
64
|
-
var editorAPI =
|
|
63
|
+
var editorAPI = props.editorAPI;
|
|
65
64
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['editorViewMode', 'primaryToolbar']),
|
|
66
65
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
67
66
|
primaryToolbarState = _useSharedPluginState.primaryToolbarState;
|
|
@@ -73,7 +72,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
73
72
|
primaryToolbarComponents = additionalComponents.concat(primaryToolbarComponents);
|
|
74
73
|
}
|
|
75
74
|
var isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
76
|
-
var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.
|
|
75
|
+
var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
|
|
77
76
|
return (0, _react2.jsx)(_ui.ContextPanelWidthProvider, null, (0, _react2.jsx)("div", {
|
|
78
77
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
79
78
|
css: _StyledComponents.fullPageEditorWrapper
|
|
@@ -83,6 +82,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
83
82
|
ref: wrapperElementRef
|
|
84
83
|
}, !isEditorToolbarHidden && (0, _react2.jsx)(_FullPageToolbar.FullPageToolbar, {
|
|
85
84
|
appearance: props.appearance,
|
|
85
|
+
editorAPI: editorAPI,
|
|
86
86
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
87
87
|
collabEdit: props.collabEdit,
|
|
88
88
|
containerElement: (_scrollContentContain2 = (_scrollContentContain3 = scrollContentContainerRef.current) === null || _scrollContentContain3 === void 0 ? void 0 : _scrollContentContain3.scrollContainer) !== null && _scrollContentContain2 !== void 0 ? _scrollContentContain2 : null,
|
|
@@ -30,6 +30,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
30
30
|
var fullWidthMode = props.appearance === 'full-width';
|
|
31
31
|
var scrollContainerRef = (0, _react.useRef)(null);
|
|
32
32
|
var contentAreaRef = (0, _react.useRef)(null);
|
|
33
|
+
var containerRef = (0, _react.useRef)(null);
|
|
33
34
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
34
35
|
return {
|
|
35
36
|
get scrollContainer() {
|
|
@@ -37,6 +38,9 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
37
38
|
},
|
|
38
39
|
get contentArea() {
|
|
39
40
|
return contentAreaRef.current;
|
|
41
|
+
},
|
|
42
|
+
get containerArea() {
|
|
43
|
+
return containerRef.current;
|
|
40
44
|
}
|
|
41
45
|
};
|
|
42
46
|
}, []);
|
|
@@ -53,7 +57,8 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
53
57
|
props.isEditorToolbarHidden && _StyledComponents.contentAreaHeightNoToolbar,
|
|
54
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
55
59
|
positionedOverEditor && _StyledComponents.positionedOverEditorStyle],
|
|
56
|
-
"data-testid": CONTENT_AREA_TEST_ID
|
|
60
|
+
"data-testid": CONTENT_AREA_TEST_ID,
|
|
61
|
+
ref: containerRef
|
|
57
62
|
}, (0, _react2.jsx)(_StyledComponents.ScrollContainer
|
|
58
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
59
64
|
, {
|
|
@@ -14,7 +14,6 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
14
14
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
15
15
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var _context = require("../../../presets/context");
|
|
18
17
|
var _Toolbar = _interopRequireDefault(require("../../Toolbar"));
|
|
19
18
|
var _BeforeWrapper = require("./BeforeWrapper");
|
|
20
19
|
var _MainToolbar = require("./MainToolbar");
|
|
@@ -33,7 +32,7 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
33
32
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
34
33
|
shouldSplitToolbar = _useState2[0],
|
|
35
34
|
setShouldSplitToolbar = _useState2[1];
|
|
36
|
-
var editorAPI =
|
|
35
|
+
var editorAPI = props.editorAPI;
|
|
37
36
|
|
|
38
37
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
39
38
|
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents && !!((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -93,13 +93,15 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
93
93
|
eventDispatcher,
|
|
94
94
|
config,
|
|
95
95
|
dispatchAnalyticsEvent,
|
|
96
|
-
editorRef
|
|
96
|
+
editorRef,
|
|
97
|
+
editorAPI
|
|
97
98
|
}) => {
|
|
98
99
|
var _props$featureFlags, _props$featureFlags2;
|
|
99
100
|
return jsx(BaseTheme, {
|
|
100
101
|
baseFontSize: getBaseFontSize(props.appearance)
|
|
101
102
|
}, jsx(Component, {
|
|
102
103
|
innerRef: editorRef,
|
|
104
|
+
editorAPI: editorAPI,
|
|
103
105
|
appearance: props.appearance,
|
|
104
106
|
disabled: props.disabled,
|
|
105
107
|
editorActions: editorActions,
|
|
@@ -13,6 +13,7 @@ import { analyticsEventKey, browser, countNodes, findChangedNodesFromTransaction
|
|
|
13
13
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
14
14
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
15
15
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
16
|
+
import { EditorAPIContext } from '../presets/context';
|
|
16
17
|
import { getNodesCount } from '../utils/document';
|
|
17
18
|
import { isFullPage } from '../utils/is-full-page';
|
|
18
19
|
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
@@ -730,14 +731,20 @@ export class ReactEditorView extends React.Component {
|
|
|
730
731
|
actionSubject: ACTION_SUBJECT.REACT_EDITOR_VIEW,
|
|
731
732
|
handleAnalyticsEvent: this.handleAnalyticsEvent,
|
|
732
733
|
useShallow: useShallow
|
|
733
|
-
}), this.props.render ?
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
734
|
+
}), this.props.render ? /*#__PURE__*/React.createElement(EditorAPIContext.Consumer, null, ({
|
|
735
|
+
editorApi
|
|
736
|
+
}) => {
|
|
737
|
+
var _this$props$render, _this$props$render2, _this$props;
|
|
738
|
+
return (_this$props$render = (_this$props$render2 = (_this$props = this.props).render) === null || _this$props$render2 === void 0 ? void 0 : _this$props$render2.call(_this$props, {
|
|
739
|
+
editor: this.editor,
|
|
740
|
+
view: this.view,
|
|
741
|
+
config: this.config,
|
|
742
|
+
eventDispatcher: this.eventDispatcher,
|
|
743
|
+
transformer: this.contentTransformer,
|
|
744
|
+
dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
|
|
745
|
+
editorRef: this.editorRef,
|
|
746
|
+
editorAPI: editorApi
|
|
747
|
+
})) !== null && _this$props$render !== void 0 ? _this$props$render : this.editor;
|
|
741
748
|
}) : this.editor);
|
|
742
749
|
}
|
|
743
750
|
}
|
|
@@ -9,7 +9,6 @@ import React, { Fragment } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
12
|
-
import { usePresetContext } from '../../presets/context';
|
|
13
12
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
14
13
|
import PluginSlot from '../PluginSlot';
|
|
15
14
|
import WithFlash from '../WithFlash';
|
|
@@ -106,18 +105,19 @@ export default class Editor extends React.Component {
|
|
|
106
105
|
}
|
|
107
106
|
render() {
|
|
108
107
|
return jsx(RenderWithPluginState, {
|
|
108
|
+
editorAPI: this.props.editorAPI,
|
|
109
109
|
renderChrome: this.renderChrome
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
_defineProperty(Editor, "displayName", 'ChromelessEditorAppearance');
|
|
114
114
|
function RenderWithPluginState({
|
|
115
|
-
renderChrome
|
|
115
|
+
renderChrome,
|
|
116
|
+
editorAPI
|
|
116
117
|
}) {
|
|
117
|
-
const api = usePresetContext();
|
|
118
118
|
const {
|
|
119
119
|
maxContentSizeState
|
|
120
|
-
} = useSharedPluginState(
|
|
120
|
+
} = useSharedPluginState(editorAPI, ['maxContentSize']);
|
|
121
121
|
return jsx(Fragment, null, renderChrome({
|
|
122
122
|
maxContentSize: maxContentSizeState
|
|
123
123
|
}));
|
|
@@ -7,7 +7,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import classnames from 'classnames';
|
|
10
|
-
import {
|
|
10
|
+
import { useIntl } from 'react-intl-next';
|
|
11
11
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
12
12
|
import Button from '@atlaskit/button/new';
|
|
13
13
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
@@ -20,7 +20,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
20
20
|
import { N100 } from '@atlaskit/theme/colors';
|
|
21
21
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
22
22
|
import messages from '../../../messages';
|
|
23
|
-
import { usePresetContext } from '../../../presets/context';
|
|
24
23
|
import { ClickAreaBlock } from '../../Addon';
|
|
25
24
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
26
25
|
import PluginSlot from '../../PluginSlot';
|
|
@@ -74,13 +73,16 @@ const secondaryToolbarStyles = css({
|
|
|
74
73
|
padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-025, 2px)"}`
|
|
75
74
|
});
|
|
76
75
|
const appearance = 'comment';
|
|
77
|
-
const
|
|
78
|
-
const
|
|
76
|
+
export const CommentEditorWithIntl = props => {
|
|
77
|
+
const {
|
|
78
|
+
editorAPI
|
|
79
|
+
} = props;
|
|
79
80
|
const {
|
|
80
81
|
mediaState,
|
|
81
82
|
maxContentSizeState,
|
|
82
83
|
primaryToolbarState
|
|
83
|
-
} = useSharedPluginState(
|
|
84
|
+
} = useSharedPluginState(editorAPI, ['media', 'maxContentSize', 'primaryToolbar']);
|
|
85
|
+
const intl = useIntl();
|
|
84
86
|
const {
|
|
85
87
|
editorDOMElement,
|
|
86
88
|
editorView,
|
|
@@ -101,7 +103,6 @@ const Editor = props => {
|
|
|
101
103
|
onCancel,
|
|
102
104
|
disabled,
|
|
103
105
|
dispatchAnalyticsEvent,
|
|
104
|
-
intl,
|
|
105
106
|
useStickyToolbar,
|
|
106
107
|
pluginHooks,
|
|
107
108
|
featureFlags,
|
|
@@ -240,5 +241,4 @@ const Editor = props => {
|
|
|
240
241
|
}
|
|
241
242
|
}), customSecondaryToolbarComponents));
|
|
242
243
|
};
|
|
243
|
-
|
|
244
|
-
export const CommentEditorWithIntl = injectIntl(Editor);
|
|
244
|
+
CommentEditorWithIntl.displayName = 'CommentEditorAppearance';
|
|
@@ -9,7 +9,6 @@ import { jsx } from '@emotion/react';
|
|
|
9
9
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
10
10
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
11
11
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
12
|
-
import { usePresetContext } from '../../../presets/context';
|
|
13
12
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
14
13
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
15
14
|
import { fullPageEditorWrapper } from './StyledComponents';
|
|
@@ -42,7 +41,7 @@ export const FullPageEditor = props => {
|
|
|
42
41
|
const wrapperElementRef = useMemo(() => props.innerRef, [props.innerRef]);
|
|
43
42
|
const scrollContentContainerRef = useRef(null);
|
|
44
43
|
const showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
45
|
-
const editorAPI =
|
|
44
|
+
const editorAPI = props.editorAPI;
|
|
46
45
|
const {
|
|
47
46
|
editorViewModeState,
|
|
48
47
|
primaryToolbarState
|
|
@@ -55,7 +54,7 @@ export const FullPageEditor = props => {
|
|
|
55
54
|
primaryToolbarComponents = additionalComponents.concat(primaryToolbarComponents);
|
|
56
55
|
}
|
|
57
56
|
const isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
58
|
-
const popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 ? void 0 : (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.
|
|
57
|
+
const popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 ? void 0 : (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
|
|
59
58
|
return jsx(ContextPanelWidthProvider, null, jsx("div", {
|
|
60
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
61
60
|
css: fullPageEditorWrapper
|
|
@@ -65,6 +64,7 @@ export const FullPageEditor = props => {
|
|
|
65
64
|
ref: wrapperElementRef
|
|
66
65
|
}, !isEditorToolbarHidden && jsx(FullPageToolbar, {
|
|
67
66
|
appearance: props.appearance,
|
|
67
|
+
editorAPI: editorAPI,
|
|
68
68
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
69
69
|
collabEdit: props.collabEdit,
|
|
70
70
|
containerElement: (_scrollContentContain2 = (_scrollContentContain3 = scrollContentContainerRef.current) === null || _scrollContentContain3 === void 0 ? void 0 : _scrollContentContain3.scrollContainer) !== null && _scrollContentContain2 !== void 0 ? _scrollContentContain2 : null,
|
|
@@ -20,12 +20,16 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
20
20
|
const fullWidthMode = props.appearance === 'full-width';
|
|
21
21
|
const scrollContainerRef = useRef(null);
|
|
22
22
|
const contentAreaRef = useRef(null);
|
|
23
|
+
const containerRef = useRef(null);
|
|
23
24
|
useImperativeHandle(ref, () => ({
|
|
24
25
|
get scrollContainer() {
|
|
25
26
|
return scrollContainerRef.current;
|
|
26
27
|
},
|
|
27
28
|
get contentArea() {
|
|
28
29
|
return contentAreaRef.current;
|
|
30
|
+
},
|
|
31
|
+
get containerArea() {
|
|
32
|
+
return containerRef.current;
|
|
29
33
|
}
|
|
30
34
|
}), []);
|
|
31
35
|
return jsx(WidthConsumer, null, ({
|
|
@@ -42,7 +46,8 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
42
46
|
props.isEditorToolbarHidden && contentAreaHeightNoToolbar,
|
|
43
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
44
48
|
positionedOverEditor && positionedOverEditorStyle],
|
|
45
|
-
"data-testid": CONTENT_AREA_TEST_ID
|
|
49
|
+
"data-testid": CONTENT_AREA_TEST_ID,
|
|
50
|
+
ref: containerRef
|
|
46
51
|
}, jsx(ScrollContainer
|
|
47
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
48
53
|
, {
|
|
@@ -12,14 +12,15 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
12
12
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
13
13
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
-
import { usePresetContext } from '../../../presets/context';
|
|
16
15
|
import Toolbar from '../../Toolbar';
|
|
17
16
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
18
17
|
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
19
18
|
export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
20
19
|
var _props$featureFlags, _props$customPrimaryT, _props$featureFlags2, _props$featureFlags3, _editorAPI$avatarGrou, _props$collabEdit, _props$collabEdit2, _props$collabEdit3;
|
|
21
20
|
const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
|
|
22
|
-
const
|
|
21
|
+
const {
|
|
22
|
+
editorAPI
|
|
23
|
+
} = props;
|
|
23
24
|
|
|
24
25
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
25
26
|
const twoLineEditorToolbar = !!props.customPrimaryToolbarComponents && !!((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar);
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "195.4.
|
|
2
|
+
export const version = "195.4.10";
|
|
@@ -99,11 +99,13 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
99
99
|
eventDispatcher = _ref2.eventDispatcher,
|
|
100
100
|
config = _ref2.config,
|
|
101
101
|
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
102
|
-
editorRef = _ref2.editorRef
|
|
102
|
+
editorRef = _ref2.editorRef,
|
|
103
|
+
editorAPI = _ref2.editorAPI;
|
|
103
104
|
return jsx(BaseTheme, {
|
|
104
105
|
baseFontSize: getBaseFontSize(props.appearance)
|
|
105
106
|
}, jsx(Component, {
|
|
106
107
|
innerRef: editorRef,
|
|
108
|
+
editorAPI: editorAPI,
|
|
107
109
|
appearance: props.appearance,
|
|
108
110
|
disabled: props.disabled,
|
|
109
111
|
editorActions: editorActions,
|
|
@@ -24,6 +24,7 @@ import { analyticsEventKey, browser, countNodes as _countNodes, findChangedNodes
|
|
|
24
24
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
25
25
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
26
26
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
27
|
+
import { EditorAPIContext } from '../presets/context';
|
|
27
28
|
import { getNodesCount } from '../utils/document';
|
|
28
29
|
import { isFullPage } from '../utils/is-full-page';
|
|
29
30
|
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
@@ -766,7 +767,8 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
766
767
|
}, {
|
|
767
768
|
key: "render",
|
|
768
769
|
value: function render() {
|
|
769
|
-
var _this$props$editorPro8
|
|
770
|
+
var _this$props$editorPro8,
|
|
771
|
+
_this3 = this;
|
|
770
772
|
var renderTracking = (_this$props$editorPro8 = this.props.editorProps.performanceTracking) === null || _this$props$editorPro8 === void 0 || (_this$props$editorPro8 = _this$props$editorPro8.renderTracking) === null || _this$props$editorPro8 === void 0 ? void 0 : _this$props$editorPro8.reactEditorView;
|
|
771
773
|
var renderTrackingEnabled = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.enabled;
|
|
772
774
|
var useShallow = renderTracking === null || renderTracking === void 0 ? void 0 : renderTracking.useShallow;
|
|
@@ -782,14 +784,19 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
782
784
|
actionSubject: ACTION_SUBJECT.REACT_EDITOR_VIEW,
|
|
783
785
|
handleAnalyticsEvent: this.handleAnalyticsEvent,
|
|
784
786
|
useShallow: useShallow
|
|
785
|
-
}), this.props.render ?
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
787
|
+
}), this.props.render ? /*#__PURE__*/React.createElement(EditorAPIContext.Consumer, null, function (_ref4) {
|
|
788
|
+
var _this3$props$render, _this3$props$render2, _this3$props;
|
|
789
|
+
var editorApi = _ref4.editorApi;
|
|
790
|
+
return (_this3$props$render = (_this3$props$render2 = (_this3$props = _this3.props).render) === null || _this3$props$render2 === void 0 ? void 0 : _this3$props$render2.call(_this3$props, {
|
|
791
|
+
editor: _this3.editor,
|
|
792
|
+
view: _this3.view,
|
|
793
|
+
config: _this3.config,
|
|
794
|
+
eventDispatcher: _this3.eventDispatcher,
|
|
795
|
+
transformer: _this3.contentTransformer,
|
|
796
|
+
dispatchAnalyticsEvent: _this3.dispatchAnalyticsEvent,
|
|
797
|
+
editorRef: _this3.editorRef,
|
|
798
|
+
editorAPI: editorApi
|
|
799
|
+
})) !== null && _this3$props$render !== void 0 ? _this3$props$render : _this3.editor;
|
|
793
800
|
}) : this.editor);
|
|
794
801
|
}
|
|
795
802
|
}]);
|
|
@@ -17,7 +17,6 @@ import React, { Fragment } from 'react';
|
|
|
17
17
|
import { css, jsx } from '@emotion/react';
|
|
18
18
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
19
19
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
20
|
-
import { usePresetContext } from '../../presets/context';
|
|
21
20
|
import { createEditorContentStyle } from '../ContentStyles';
|
|
22
21
|
import PluginSlot from '../PluginSlot';
|
|
23
22
|
import WithFlash from '../WithFlash';
|
|
@@ -125,6 +124,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
125
124
|
key: "render",
|
|
126
125
|
value: function render() {
|
|
127
126
|
return jsx(RenderWithPluginState, {
|
|
127
|
+
editorAPI: this.props.editorAPI,
|
|
128
128
|
renderChrome: this.renderChrome
|
|
129
129
|
});
|
|
130
130
|
}
|
|
@@ -134,9 +134,9 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
134
134
|
_defineProperty(Editor, "displayName", 'ChromelessEditorAppearance');
|
|
135
135
|
export { Editor as default };
|
|
136
136
|
function RenderWithPluginState(_ref3) {
|
|
137
|
-
var renderChrome = _ref3.renderChrome
|
|
138
|
-
|
|
139
|
-
var _useSharedPluginState = useSharedPluginState(
|
|
137
|
+
var renderChrome = _ref3.renderChrome,
|
|
138
|
+
editorAPI = _ref3.editorAPI;
|
|
139
|
+
var _useSharedPluginState = useSharedPluginState(editorAPI, ['maxContentSize']),
|
|
140
140
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState;
|
|
141
141
|
return jsx(Fragment, null, renderChrome({
|
|
142
142
|
maxContentSize: maxContentSizeState
|
|
@@ -8,7 +8,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import classnames from 'classnames';
|
|
11
|
-
import {
|
|
11
|
+
import { useIntl } from 'react-intl-next';
|
|
12
12
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
13
13
|
import Button from '@atlaskit/button/new';
|
|
14
14
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
@@ -21,7 +21,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
21
21
|
import { N100 } from '@atlaskit/theme/colors';
|
|
22
22
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
23
23
|
import messages from '../../../messages';
|
|
24
|
-
import { usePresetContext } from '../../../presets/context';
|
|
25
24
|
import { ClickAreaBlock } from '../../Addon';
|
|
26
25
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
27
26
|
import PluginSlot from '../../PluginSlot';
|
|
@@ -75,12 +74,13 @@ var secondaryToolbarStyles = css({
|
|
|
75
74
|
padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-025, 2px)")
|
|
76
75
|
});
|
|
77
76
|
var appearance = 'comment';
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var _useSharedPluginState = useSharedPluginState(
|
|
77
|
+
export var CommentEditorWithIntl = function CommentEditorWithIntl(props) {
|
|
78
|
+
var editorAPI = props.editorAPI;
|
|
79
|
+
var _useSharedPluginState = useSharedPluginState(editorAPI, ['media', 'maxContentSize', 'primaryToolbar']),
|
|
81
80
|
mediaState = _useSharedPluginState.mediaState,
|
|
82
81
|
maxContentSizeState = _useSharedPluginState.maxContentSizeState,
|
|
83
82
|
primaryToolbarState = _useSharedPluginState.primaryToolbarState;
|
|
83
|
+
var intl = useIntl();
|
|
84
84
|
var editorDOMElement = props.editorDOMElement,
|
|
85
85
|
editorView = props.editorView,
|
|
86
86
|
editorActions = props.editorActions,
|
|
@@ -101,7 +101,6 @@ var Editor = function Editor(props) {
|
|
|
101
101
|
onCancel = props.onCancel,
|
|
102
102
|
disabled = props.disabled,
|
|
103
103
|
dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
|
|
104
|
-
intl = props.intl,
|
|
105
104
|
useStickyToolbar = props.useStickyToolbar,
|
|
106
105
|
pluginHooks = props.pluginHooks,
|
|
107
106
|
featureFlags = props.featureFlags,
|
|
@@ -245,5 +244,4 @@ var Editor = function Editor(props) {
|
|
|
245
244
|
}
|
|
246
245
|
}), customSecondaryToolbarComponents));
|
|
247
246
|
};
|
|
248
|
-
|
|
249
|
-
export var CommentEditorWithIntl = injectIntl(Editor);
|
|
247
|
+
CommentEditorWithIntl.displayName = 'CommentEditorAppearance';
|
|
@@ -10,7 +10,6 @@ import { jsx } from '@emotion/react';
|
|
|
10
10
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
13
|
-
import { usePresetContext } from '../../../presets/context';
|
|
14
13
|
import { FullPageContentArea } from './FullPageContentArea';
|
|
15
14
|
import { FullPageToolbar } from './FullPageToolbar';
|
|
16
15
|
import { fullPageEditorWrapper } from './StyledComponents';
|
|
@@ -50,7 +49,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
50
49
|
}, [props.innerRef]);
|
|
51
50
|
var scrollContentContainerRef = useRef(null);
|
|
52
51
|
var showKeyline = useShowKeyline(scrollContentContainerRef);
|
|
53
|
-
var editorAPI =
|
|
52
|
+
var editorAPI = props.editorAPI;
|
|
54
53
|
var _useSharedPluginState = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar']),
|
|
55
54
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
56
55
|
primaryToolbarState = _useSharedPluginState.primaryToolbarState;
|
|
@@ -62,7 +61,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
62
61
|
primaryToolbarComponents = additionalComponents.concat(primaryToolbarComponents);
|
|
63
62
|
}
|
|
64
63
|
var isEditorToolbarHidden = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
65
|
-
var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.
|
|
64
|
+
var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
|
|
66
65
|
return jsx(ContextPanelWidthProvider, null, jsx("div", {
|
|
67
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
68
67
|
css: fullPageEditorWrapper
|
|
@@ -72,6 +71,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
72
71
|
ref: wrapperElementRef
|
|
73
72
|
}, !isEditorToolbarHidden && jsx(FullPageToolbar, {
|
|
74
73
|
appearance: props.appearance,
|
|
74
|
+
editorAPI: editorAPI,
|
|
75
75
|
beforeIcon: props.primaryToolbarIconBefore,
|
|
76
76
|
collabEdit: props.collabEdit,
|
|
77
77
|
containerElement: (_scrollContentContain2 = (_scrollContentContain3 = scrollContentContainerRef.current) === null || _scrollContentContain3 === void 0 ? void 0 : _scrollContentContain3.scrollContainer) !== null && _scrollContentContain2 !== void 0 ? _scrollContentContain2 : null,
|
|
@@ -20,6 +20,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
20
20
|
var fullWidthMode = props.appearance === 'full-width';
|
|
21
21
|
var scrollContainerRef = useRef(null);
|
|
22
22
|
var contentAreaRef = useRef(null);
|
|
23
|
+
var containerRef = useRef(null);
|
|
23
24
|
useImperativeHandle(ref, function () {
|
|
24
25
|
return {
|
|
25
26
|
get scrollContainer() {
|
|
@@ -27,6 +28,9 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
27
28
|
},
|
|
28
29
|
get contentArea() {
|
|
29
30
|
return contentAreaRef.current;
|
|
31
|
+
},
|
|
32
|
+
get containerArea() {
|
|
33
|
+
return containerRef.current;
|
|
30
34
|
}
|
|
31
35
|
};
|
|
32
36
|
}, []);
|
|
@@ -43,7 +47,8 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
43
47
|
props.isEditorToolbarHidden && contentAreaHeightNoToolbar,
|
|
44
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
45
49
|
positionedOverEditor && positionedOverEditorStyle],
|
|
46
|
-
"data-testid": CONTENT_AREA_TEST_ID
|
|
50
|
+
"data-testid": CONTENT_AREA_TEST_ID,
|
|
51
|
+
ref: containerRef
|
|
47
52
|
}, jsx(ScrollContainer
|
|
48
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
49
54
|
, {
|
|
@@ -13,7 +13,6 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
13
13
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
14
14
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
15
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
-
import { usePresetContext } from '../../../presets/context';
|
|
17
16
|
import Toolbar from '../../Toolbar';
|
|
18
17
|
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
19
18
|
import { customToolbarWrapperStyle, mainToolbarFirstChildStyle, mainToolbarIconBeforeStyle, mainToolbarSecondChildStyle, mainToolbarStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, nonCustomToolbarWrapperStyle } from './MainToolbar';
|
|
@@ -23,7 +22,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
23
22
|
_useState2 = _slicedToArray(_useState, 2),
|
|
24
23
|
shouldSplitToolbar = _useState2[0],
|
|
25
24
|
setShouldSplitToolbar = _useState2[1];
|
|
26
|
-
var editorAPI =
|
|
25
|
+
var editorAPI = props.editorAPI;
|
|
27
26
|
|
|
28
27
|
// When primary toolbar components is undefined, do not show two line editor toolbar
|
|
29
28
|
var twoLineEditorToolbar = !!props.customPrimaryToolbarComponents && !!((_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.twoLineEditorToolbar);
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "195.4.
|
|
2
|
+
export var version = "195.4.10";
|
|
@@ -7,7 +7,7 @@ import type { AnalyticsEventPayload, DispatchAnalyticsEvent, FireAnalyticsCallba
|
|
|
7
7
|
import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
9
9
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
10
|
-
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type { PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
|
|
11
11
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
12
12
|
import type { ErrorReporter, SEVERITY } from '@atlaskit/editor-common/utils';
|
|
13
13
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -38,6 +38,7 @@ export interface EditorViewProps {
|
|
|
38
38
|
transformer?: Transformer<string>;
|
|
39
39
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
40
40
|
editorRef: React.RefObject<HTMLDivElement>;
|
|
41
|
+
editorAPI: PublicPluginAPI<any> | undefined;
|
|
41
42
|
}) => JSX.Element;
|
|
42
43
|
onEditorCreated: (instance: {
|
|
43
44
|
view: EditorView;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { EditorAppearance, EditorAppearanceComponentProps } from '../types';
|
|
3
|
-
|
|
3
|
+
type ReturnType = React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<any[]>>>;
|
|
4
|
+
export default function getUiComponent(appearance: EditorAppearance): ReturnType;
|
|
5
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
4
4
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { NextEditorPlugin, PublicPluginAPI, ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -14,7 +14,8 @@ import type { UIComponentFactory } from '../types/ui-components';
|
|
|
14
14
|
import type { ToolbarUIComponentFactory } from '../ui/Toolbar/types';
|
|
15
15
|
import type { EditorAppearance } from './editor-appearance';
|
|
16
16
|
import type { FeatureFlags } from './feature-flags';
|
|
17
|
-
export interface EditorAppearanceComponentProps {
|
|
17
|
+
export interface EditorAppearanceComponentProps<Plugins extends NextEditorPlugin<any, any>[]> {
|
|
18
|
+
editorAPI: PublicPluginAPI<Plugins> | undefined;
|
|
18
19
|
appearance?: EditorAppearance;
|
|
19
20
|
onSave?: (editorView: EditorView) => void;
|
|
20
21
|
onCancel?: (editorView: EditorView) => void;
|
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
7
9
|
import type { EditorAppearanceComponentProps } from '../../types';
|
|
8
|
-
|
|
10
|
+
type AppearanceProps = EditorAppearanceComponentProps<[OptionalPlugin<MaxContentSizePlugin>]>;
|
|
11
|
+
export default class Editor extends React.Component<AppearanceProps, any> {
|
|
9
12
|
static displayName: string;
|
|
10
13
|
private appearance;
|
|
11
14
|
private containerElement;
|
|
12
15
|
private renderChrome;
|
|
13
16
|
render(): jsx.JSX.Element;
|
|
14
17
|
}
|
|
18
|
+
export {};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
4
|
+
import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
|
|
5
|
+
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
7
6
|
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
type ComponentProps = EditorAppearanceComponentProps<[
|
|
8
|
+
OptionalPlugin<MediaPlugin>,
|
|
9
|
+
OptionalPlugin<MaxContentSizePlugin>,
|
|
10
|
+
OptionalPlugin<PrimaryToolbarPlugin>
|
|
11
|
+
]>;
|
|
12
|
+
export declare const CommentEditorWithIntl: {
|
|
13
|
+
(props: ComponentProps): jsx.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
10
15
|
};
|
|
16
|
+
export {};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
4
|
+
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
2
5
|
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
3
|
-
|
|
6
|
+
import type { ToolbarEditorPlugins } from './FullPageToolbar';
|
|
7
|
+
type ComponentProps = EditorAppearanceComponentProps<[
|
|
8
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
9
|
+
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
10
|
+
...ToolbarEditorPlugins
|
|
11
|
+
]>;
|
|
12
|
+
export declare const FullPageEditor: (props: ComponentProps) => jsx.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -13,6 +13,7 @@ import type EditorActions from '../../../actions';
|
|
|
13
13
|
import type { EventDispatcher } from '../../../event-dispatcher';
|
|
14
14
|
import type { ContentComponents, EditorAppearance, ReactComponents, UIComponentFactory } from '../../../types';
|
|
15
15
|
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
16
|
+
import { type ScrollContainerRefs } from './types';
|
|
16
17
|
interface FullPageEditorContentAreaProps {
|
|
17
18
|
appearance: EditorAppearance | undefined;
|
|
18
19
|
contentComponents: UIComponentFactory[] | undefined;
|
|
@@ -34,10 +35,6 @@ interface FullPageEditorContentAreaProps {
|
|
|
34
35
|
isEditorToolbarHidden?: boolean;
|
|
35
36
|
}
|
|
36
37
|
export declare const CONTENT_AREA_TEST_ID = "ak-editor-fp-content-area";
|
|
37
|
-
type ScrollContainerRefs = {
|
|
38
|
-
scrollContainer: HTMLDivElement | null;
|
|
39
|
-
contentArea: HTMLDivElement | null;
|
|
40
|
-
};
|
|
41
38
|
export declare const FullPageContentArea: React.ForwardRefExoticComponent<Pick<import("react-intl-next").WithIntlProps<React.PropsWithChildren<FullPageEditorContentAreaProps & WrappedComponentProps & React.RefAttributes<ScrollContainerRefs>>>, "children" | "key" | keyof FullPageEditorContentAreaProps | "forwardedRef"> & React.RefAttributes<any>> & {
|
|
42
39
|
WrappedComponent: React.ComponentType<FullPageEditorContentAreaProps & WrappedComponentProps & React.RefAttributes<ScrollContainerRefs>>;
|
|
43
40
|
};
|
|
@@ -10,10 +10,25 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
|
10
10
|
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
11
11
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
12
12
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
13
|
+
import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
14
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugins/analytics';
|
|
15
|
+
import type { AvatarGroupPlugin } from '@atlaskit/editor-plugins/avatar-group';
|
|
16
|
+
import type { BeforePrimaryToolbarPlugin } from '@atlaskit/editor-plugins/before-primary-toolbar';
|
|
17
|
+
import type { CollabEditPlugin } from '@atlaskit/editor-plugins/collab-edit';
|
|
18
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugins/feature-flags';
|
|
19
|
+
import type { FindReplacePlugin } from '@atlaskit/editor-plugins/find-replace';
|
|
13
20
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
21
|
import type { EditorActions } from '../../../index';
|
|
15
22
|
import type { EditorAppearance, PrimaryToolbarComponents, ToolbarUIComponentFactory } from '../../../types';
|
|
16
23
|
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
24
|
+
export type ToolbarEditorPlugins = [
|
|
25
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
26
|
+
OptionalPlugin<FindReplacePlugin>,
|
|
27
|
+
OptionalPlugin<FeatureFlagsPlugin>,
|
|
28
|
+
OptionalPlugin<CollabEditPlugin>,
|
|
29
|
+
OptionalPlugin<AvatarGroupPlugin>,
|
|
30
|
+
OptionalPlugin<BeforePrimaryToolbarPlugin>
|
|
31
|
+
];
|
|
17
32
|
export interface FullPageToolbarProps {
|
|
18
33
|
appearance?: EditorAppearance;
|
|
19
34
|
providerFactory: ProviderFactory;
|
|
@@ -35,6 +50,7 @@ export interface FullPageToolbarProps {
|
|
|
35
50
|
hasMinWidth?: boolean;
|
|
36
51
|
featureFlags: FeatureFlags;
|
|
37
52
|
hideAvatarGroup?: boolean;
|
|
53
|
+
editorAPI: PublicPluginAPI<ToolbarEditorPlugins> | undefined;
|
|
38
54
|
}
|
|
39
55
|
export declare const EditorToolbar: React.MemoExoticComponent<(props: FullPageToolbarProps & WrappedComponentProps) => jsx.JSX.Element>;
|
|
40
56
|
export declare const FullPageToolbar: React.FC<import("react-intl-next").WithIntlProps<FullPageToolbarProps & WrappedComponentProps>> & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { EditorAppearanceComponentProps } from '../../types';
|
|
3
|
-
export default function Mobile({ editorView, maxHeight, persistScrollGutter, editorDOMElement, disabled, contentComponents, editorActions, eventDispatcher, dispatchAnalyticsEvent, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, innerRef, pluginHooks, featureFlags, }: EditorAppearanceComponentProps): JSX.Element;
|
|
3
|
+
export default function Mobile({ editorView, maxHeight, persistScrollGutter, editorDOMElement, disabled, contentComponents, editorActions, eventDispatcher, dispatchAnalyticsEvent, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, innerRef, pluginHooks, featureFlags, }: EditorAppearanceComponentProps<any>): JSX.Element;
|
|
@@ -7,7 +7,7 @@ import type { AnalyticsEventPayload, DispatchAnalyticsEvent, FireAnalyticsCallba
|
|
|
7
7
|
import type { AllEditorPresetPluginTypes, EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
9
9
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/src/portal';
|
|
10
|
-
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
10
|
+
import type { PublicPluginAPI, Transformer } from '@atlaskit/editor-common/types';
|
|
11
11
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
12
12
|
import type { ErrorReporter, SEVERITY } from '@atlaskit/editor-common/utils';
|
|
13
13
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -38,6 +38,7 @@ export interface EditorViewProps {
|
|
|
38
38
|
transformer?: Transformer<string>;
|
|
39
39
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
40
40
|
editorRef: React.RefObject<HTMLDivElement>;
|
|
41
|
+
editorAPI: PublicPluginAPI<any> | undefined;
|
|
41
42
|
}) => JSX.Element;
|
|
42
43
|
onEditorCreated: (instance: {
|
|
43
44
|
view: EditorView;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { EditorAppearance, EditorAppearanceComponentProps } from '../types';
|
|
3
|
-
|
|
3
|
+
type ReturnType = React.ComponentType<React.PropsWithChildren<EditorAppearanceComponentProps<any[]>>>;
|
|
4
|
+
export default function getUiComponent(appearance: EditorAppearance): ReturnType;
|
|
5
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
|
3
3
|
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
4
4
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
6
|
+
import type { NextEditorPlugin, PublicPluginAPI, ReactHookFactory } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { UseStickyToolbarType } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
@@ -14,7 +14,8 @@ import type { UIComponentFactory } from '../types/ui-components';
|
|
|
14
14
|
import type { ToolbarUIComponentFactory } from '../ui/Toolbar/types';
|
|
15
15
|
import type { EditorAppearance } from './editor-appearance';
|
|
16
16
|
import type { FeatureFlags } from './feature-flags';
|
|
17
|
-
export interface EditorAppearanceComponentProps {
|
|
17
|
+
export interface EditorAppearanceComponentProps<Plugins extends NextEditorPlugin<any, any>[]> {
|
|
18
|
+
editorAPI: PublicPluginAPI<Plugins> | undefined;
|
|
18
19
|
appearance?: EditorAppearance;
|
|
19
20
|
onSave?: (editorView: EditorView) => void;
|
|
20
21
|
onCancel?: (editorView: EditorView) => void;
|
|
@@ -4,11 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
7
9
|
import type { EditorAppearanceComponentProps } from '../../types';
|
|
8
|
-
|
|
10
|
+
type AppearanceProps = EditorAppearanceComponentProps<[
|
|
11
|
+
OptionalPlugin<MaxContentSizePlugin>
|
|
12
|
+
]>;
|
|
13
|
+
export default class Editor extends React.Component<AppearanceProps, any> {
|
|
9
14
|
static displayName: string;
|
|
10
15
|
private appearance;
|
|
11
16
|
private containerElement;
|
|
12
17
|
private renderChrome;
|
|
13
18
|
render(): jsx.JSX.Element;
|
|
14
19
|
}
|
|
20
|
+
export {};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import type { WrappedComponentProps } from 'react-intl-next';
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
4
|
+
import type { MediaPlugin } from '@atlaskit/editor-plugins/media';
|
|
5
|
+
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
7
6
|
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
type ComponentProps = EditorAppearanceComponentProps<[
|
|
8
|
+
OptionalPlugin<MediaPlugin>,
|
|
9
|
+
OptionalPlugin<MaxContentSizePlugin>,
|
|
10
|
+
OptionalPlugin<PrimaryToolbarPlugin>
|
|
11
|
+
]>;
|
|
12
|
+
export declare const CommentEditorWithIntl: {
|
|
13
|
+
(props: ComponentProps): jsx.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
10
15
|
};
|
|
16
|
+
export {};
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
4
|
+
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugins/primary-toolbar';
|
|
2
5
|
import type { EditorAppearanceComponentProps } from '../../../types';
|
|
3
|
-
|
|
6
|
+
import type { ToolbarEditorPlugins } from './FullPageToolbar';
|
|
7
|
+
type ComponentProps = EditorAppearanceComponentProps<[
|
|
8
|
+
OptionalPlugin<EditorViewModePlugin>,
|
|
9
|
+
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
10
|
+
...ToolbarEditorPlugins
|
|
11
|
+
]>;
|
|
12
|
+
export declare const FullPageEditor: (props: ComponentProps) => jsx.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -13,6 +13,7 @@ import type EditorActions from '../../../actions';
|
|
|
13
13
|
import type { EventDispatcher } from '../../../event-dispatcher';
|
|
14
14
|
import type { ContentComponents, EditorAppearance, ReactComponents, UIComponentFactory } from '../../../types';
|
|
15
15
|
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
16
|
+
import { type ScrollContainerRefs } from './types';
|
|
16
17
|
interface FullPageEditorContentAreaProps {
|
|
17
18
|
appearance: EditorAppearance | undefined;
|
|
18
19
|
contentComponents: UIComponentFactory[] | undefined;
|
|
@@ -34,10 +35,6 @@ interface FullPageEditorContentAreaProps {
|
|
|
34
35
|
isEditorToolbarHidden?: boolean;
|
|
35
36
|
}
|
|
36
37
|
export declare const CONTENT_AREA_TEST_ID = "ak-editor-fp-content-area";
|
|
37
|
-
type ScrollContainerRefs = {
|
|
38
|
-
scrollContainer: HTMLDivElement | null;
|
|
39
|
-
contentArea: HTMLDivElement | null;
|
|
40
|
-
};
|
|
41
38
|
export declare const FullPageContentArea: React.ForwardRefExoticComponent<Pick<import("react-intl-next").WithIntlProps<React.PropsWithChildren<FullPageEditorContentAreaProps & WrappedComponentProps & React.RefAttributes<ScrollContainerRefs>>>, "children" | "key" | keyof FullPageEditorContentAreaProps | "forwardedRef"> & React.RefAttributes<any>> & {
|
|
42
39
|
WrappedComponent: React.ComponentType<FullPageEditorContentAreaProps & WrappedComponentProps & React.RefAttributes<ScrollContainerRefs>>;
|
|
43
40
|
};
|
|
@@ -10,10 +10,25 @@ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
|
10
10
|
import type { CollabEditOptions } from '@atlaskit/editor-common/collab';
|
|
11
11
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
12
12
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
13
|
+
import type { OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
14
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugins/analytics';
|
|
15
|
+
import type { AvatarGroupPlugin } from '@atlaskit/editor-plugins/avatar-group';
|
|
16
|
+
import type { BeforePrimaryToolbarPlugin } from '@atlaskit/editor-plugins/before-primary-toolbar';
|
|
17
|
+
import type { CollabEditPlugin } from '@atlaskit/editor-plugins/collab-edit';
|
|
18
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugins/feature-flags';
|
|
19
|
+
import type { FindReplacePlugin } from '@atlaskit/editor-plugins/find-replace';
|
|
13
20
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
14
21
|
import type { EditorActions } from '../../../index';
|
|
15
22
|
import type { EditorAppearance, PrimaryToolbarComponents, ToolbarUIComponentFactory } from '../../../types';
|
|
16
23
|
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
24
|
+
export type ToolbarEditorPlugins = [
|
|
25
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
26
|
+
OptionalPlugin<FindReplacePlugin>,
|
|
27
|
+
OptionalPlugin<FeatureFlagsPlugin>,
|
|
28
|
+
OptionalPlugin<CollabEditPlugin>,
|
|
29
|
+
OptionalPlugin<AvatarGroupPlugin>,
|
|
30
|
+
OptionalPlugin<BeforePrimaryToolbarPlugin>
|
|
31
|
+
];
|
|
17
32
|
export interface FullPageToolbarProps {
|
|
18
33
|
appearance?: EditorAppearance;
|
|
19
34
|
providerFactory: ProviderFactory;
|
|
@@ -35,6 +50,7 @@ export interface FullPageToolbarProps {
|
|
|
35
50
|
hasMinWidth?: boolean;
|
|
36
51
|
featureFlags: FeatureFlags;
|
|
37
52
|
hideAvatarGroup?: boolean;
|
|
53
|
+
editorAPI: PublicPluginAPI<ToolbarEditorPlugins> | undefined;
|
|
38
54
|
}
|
|
39
55
|
export declare const EditorToolbar: React.MemoExoticComponent<(props: FullPageToolbarProps & WrappedComponentProps) => jsx.JSX.Element>;
|
|
40
56
|
export declare const FullPageToolbar: React.FC<import("react-intl-next").WithIntlProps<FullPageToolbarProps & WrappedComponentProps>> & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { EditorAppearanceComponentProps } from '../../types';
|
|
3
|
-
export default function Mobile({ editorView, maxHeight, persistScrollGutter, editorDOMElement, disabled, contentComponents, editorActions, eventDispatcher, dispatchAnalyticsEvent, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, innerRef, pluginHooks, featureFlags, }: EditorAppearanceComponentProps): JSX.Element;
|
|
3
|
+
export default function Mobile({ editorView, maxHeight, persistScrollGutter, editorDOMElement, disabled, contentComponents, editorActions, eventDispatcher, dispatchAnalyticsEvent, providerFactory, appearance, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, innerRef, pluginHooks, featureFlags, }: EditorAppearanceComponentProps<any>): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "195.4.
|
|
3
|
+
"version": "195.4.10",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
47
|
"@atlaskit/button": "^20.0.0",
|
|
48
|
-
"@atlaskit/editor-common": "^87.
|
|
48
|
+
"@atlaskit/editor-common": "^87.12.0",
|
|
49
49
|
"@atlaskit/editor-plugins": "^4.0.0",
|
|
50
50
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
51
51
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@atlaskit/link-provider": "^1.12.0",
|
|
77
|
-
"@atlaskit/media-core": "^34.
|
|
77
|
+
"@atlaskit/media-core": "^34.3.0",
|
|
78
78
|
"react": "^16.8.0",
|
|
79
79
|
"react-dom": "^16.8.0",
|
|
80
80
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"@atlaskit/editor-test-helpers": "*",
|
|
96
96
|
"@atlaskit/link-provider": "^1.14.0",
|
|
97
97
|
"@atlaskit/logo": "^14.2.0",
|
|
98
|
-
"@atlaskit/media-core": "^34.
|
|
98
|
+
"@atlaskit/media-core": "^34.3.0",
|
|
99
99
|
"@atlaskit/media-integration-test-helpers": "^3.1.0",
|
|
100
100
|
"@atlaskit/media-test-helpers": "^34.0.0",
|
|
101
101
|
"@atlaskit/modal-dialog": "^12.15.0",
|
|
102
102
|
"@atlaskit/primitives": "^12.0.0",
|
|
103
|
-
"@atlaskit/renderer": "^109.
|
|
103
|
+
"@atlaskit/renderer": "^109.48.0",
|
|
104
104
|
"@atlaskit/smart-card": "^27.16.0",
|
|
105
105
|
"@atlaskit/synchrony-test-helpers": "^2.5.0",
|
|
106
106
|
"@atlaskit/toggle": "^13.3.0",
|
|
@@ -227,10 +227,6 @@
|
|
|
227
227
|
"type": "boolean",
|
|
228
228
|
"referenceOnly": "true"
|
|
229
229
|
},
|
|
230
|
-
"platform.editor.preserve-whitespace-clipboard-text-serialization": {
|
|
231
|
-
"type": "boolean",
|
|
232
|
-
"referenceOnly": "true"
|
|
233
|
-
},
|
|
234
230
|
"platform.editor.live-view.disable-editing-in-view-mode_fi1rx": {
|
|
235
231
|
"type": "boolean",
|
|
236
232
|
"referenceOnly": "true"
|