@atlaskit/editor-core 195.8.1 → 195.9.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 +22 -0
- package/dist/cjs/composable-editor/editor-internal.js +2 -1
- package/dist/cjs/editor.js +6 -3
- package/dist/cjs/presets/universal.js +10 -5
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +0 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/composable-editor/editor-internal.js +2 -1
- package/dist/es2019/editor.js +6 -3
- package/dist/es2019/presets/universal.js +10 -4
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +0 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/composable-editor/editor-internal.js +2 -1
- package/dist/esm/editor.js +6 -3
- package/dist/esm/presets/universal.js +10 -5
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +0 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +5 -4
- package/dist/types/editor.d.ts +6 -2
- package/dist/types/presets/default.d.ts +8 -2
- package/dist/types/presets/universal.d.ts +8 -4
- package/dist/types/presets/useUniversalPreset.d.ts +5 -4
- package/dist/types/types/editor-props.d.ts +4 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +6 -4
- package/dist/types-ts4.5/editor.d.ts +6 -2
- package/dist/types-ts4.5/presets/default.d.ts +10 -2
- package/dist/types-ts4.5/presets/universal.d.ts +9 -4
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +6 -4
- package/dist/types-ts4.5/types/editor-props.d.ts +4 -0
- package/package.json +12 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 195.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#134135](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134135)
|
|
8
|
+
[`aff992988cf17`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/aff992988cf17) -
|
|
9
|
+
Deprecated hideAvatarGroup prop
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#134213](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134213)
|
|
14
|
+
[`93bd7032842ec`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/93bd7032842ec) -
|
|
15
|
+
[ux] [ED-24636] Bump ADF Schema package
|
|
16
|
+
|
|
17
|
+
## 195.8.2
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`a88c92506a873`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a88c92506a873) -
|
|
22
|
+
Use initialPluginConfiguration to enabled table resizing
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 195.8.1
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -13,6 +13,7 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
14
14
|
var _portal = require("@atlaskit/editor-common/portal");
|
|
15
15
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _createEditor = require("../create-editor");
|
|
17
18
|
var _ErrorBoundary = _interopRequireDefault(require("../create-editor/ErrorBoundary"));
|
|
18
19
|
var _featureFlagsFromProps = require("../create-editor/feature-flags-from-props");
|
|
@@ -141,7 +142,7 @@ var EditorInternal = exports.EditorInternal = /*#__PURE__*/(0, _react.memo)(func
|
|
|
141
142
|
useStickyToolbar: props.useStickyToolbar,
|
|
142
143
|
featureFlags: featureFlags,
|
|
143
144
|
pluginHooks: config.pluginHooks,
|
|
144
|
-
hideAvatarGroup: props.hideAvatarGroup
|
|
145
|
+
hideAvatarGroup: (0, _platformFeatureFlags.fg)('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
145
146
|
}));
|
|
146
147
|
}
|
|
147
148
|
}), (0, _react2.jsx)(PortalRenderer, null))))))));
|
package/dist/cjs/editor.js
CHANGED
|
@@ -23,9 +23,11 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
26
|
-
var props = _ref.props
|
|
26
|
+
var props = _ref.props,
|
|
27
|
+
initialPluginConfiguration = _ref.initialPluginConfiguration;
|
|
27
28
|
var preset = (0, _useUniversalPreset.default)({
|
|
28
|
-
props: props
|
|
29
|
+
props: props,
|
|
30
|
+
initialPluginConfiguration: initialPluginConfiguration
|
|
29
31
|
});
|
|
30
32
|
return (0, _react2.jsx)(_composableEditor.ComposableEditor, (0, _extends2.default)({
|
|
31
33
|
preset: preset
|
|
@@ -45,7 +47,8 @@ var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
45
47
|
key: "render",
|
|
46
48
|
value: function render() {
|
|
47
49
|
return (0, _react2.jsx)(ComposableEditorWrapper, {
|
|
48
|
-
props: this.props
|
|
50
|
+
props: this.props,
|
|
51
|
+
initialPluginConfiguration: this.props.initialPluginConfiguration
|
|
49
52
|
});
|
|
50
53
|
}
|
|
51
54
|
}]);
|
|
@@ -139,9 +139,8 @@ function createUniversalPresetInternal(_ref) {
|
|
|
139
139
|
allowZeroWidthSpaceAfter: !isMobile,
|
|
140
140
|
HighlightComponent: (_props$mention2 = props.mention) === null || _props$mention2 === void 0 ? void 0 : _props$mention2.HighlightComponent,
|
|
141
141
|
profilecardProvider: (_props$mention3 = props.mention) === null || _props$mention3 === void 0 ? void 0 : _props$mention3.profilecardProvider
|
|
142
|
-
}, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.mentionsPlugin)], Boolean(props.mentionProvider)).maybeAdd(_emoji.emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([_table.tablesPlugin, {
|
|
142
|
+
}, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.mentionsPlugin)], Boolean(props.mentionProvider)).maybeAdd(_emoji.emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([_table.tablesPlugin, _objectSpread({
|
|
143
143
|
tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
|
|
144
|
-
tableResizingEnabled: isFullPage || isComment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment'),
|
|
145
144
|
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && (isFullPage || (isComment || isChromeless) && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment')),
|
|
146
145
|
isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && (isFullPage || isComment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment')),
|
|
147
146
|
allowContextualMenu: !isMobile,
|
|
@@ -152,7 +151,7 @@ function createUniversalPresetInternal(_ref) {
|
|
|
152
151
|
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage,
|
|
153
152
|
isCommentEditor: isComment,
|
|
154
153
|
isChromelessEditor: isChromeless
|
|
155
|
-
}], Boolean(props.allowTables)).maybeAdd([_tasksAndDecisions.tasksAndDecisionsPlugin, {
|
|
154
|
+
}, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.tablesPlugin)], Boolean(props.allowTables)).maybeAdd([_tasksAndDecisions.tasksAndDecisionsPlugin, {
|
|
156
155
|
allowNestedTasks: props.allowNestedTasks,
|
|
157
156
|
consumeTabs: isFullPage,
|
|
158
157
|
useLongPressSelection: false
|
|
@@ -226,9 +225,15 @@ function createUniversalPresetInternal(_ref) {
|
|
|
226
225
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
227
226
|
collabEdit: props.collabEdit,
|
|
228
227
|
takeFullWidth: !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
229
|
-
showAvatarGroup:
|
|
228
|
+
showAvatarGroup:
|
|
229
|
+
// Cleanup: `platform_editor_remove_hide_avatar_group_prop`
|
|
230
|
+
// Remove `!props.hideAvatarGroup`
|
|
231
|
+
!props.hideAvatarGroup && featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar
|
|
230
232
|
}]).maybeAdd([_findReplace.findReplacePlugin, {
|
|
231
|
-
takeFullWidth:
|
|
233
|
+
takeFullWidth:
|
|
234
|
+
// Cleanup: `platform_editor_remove_hide_avatar_group_prop`
|
|
235
|
+
// Remove `!props.hideAvatarGroup`
|
|
236
|
+
!props.hideAvatarGroup && !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
232
237
|
twoLineEditorToolbar: !!props.primaryToolbarComponents && !!featureFlags.twoLineEditorToolbar
|
|
233
238
|
}], Boolean(props.allowFindReplace)).maybeAdd(_border.borderPlugin, Boolean(props.allowBorderMark || props.UNSAFE_allowBorderMark)).maybeAdd(_fragment.fragmentPlugin, Boolean(props.allowFragmentMark)).add(_pasteOptionsToolbar.pasteOptionsToolbarPlugin).add([_codeBidiWarning.codeBidiWarningPlugin, {
|
|
234
239
|
appearance: appearance
|
|
@@ -106,7 +106,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
106
106
|
providerFactory: props.providerFactory,
|
|
107
107
|
showKeyline: showKeyline,
|
|
108
108
|
featureFlags: props.featureFlags,
|
|
109
|
-
hideAvatarGroup: props.hideAvatarGroup
|
|
109
|
+
hideAvatarGroup: (0, _platformFeatureFlags.fg)('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
110
110
|
}), (0, _react2.jsx)(_FullPageContentArea.FullPageContentArea, {
|
|
111
111
|
editorAPI: editorAPI,
|
|
112
112
|
ref: scrollContentContainerRef,
|
|
@@ -64,16 +64,15 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
64
64
|
css: _MainToolbar.customToolbarWrapperStyle
|
|
65
65
|
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
|
|
66
66
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
67
|
-
}) : null, props.hideAvatarGroup || (props === null || props === void 0 || (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null : // Avatars are moved to Confluence codebase for Edit in Context
|
|
67
|
+
}) : null, !(0, _platformFeatureFlags.fg)('platform_editor_remove_hide_avatar_group_prop') ? props.hideAvatarGroup || (props === null || props === void 0 || (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null : // Avatars are moved to Confluence codebase for Edit in Context
|
|
68
68
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
69
69
|
// For more details please check
|
|
70
70
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
71
71
|
editorAPI === null || editorAPI === void 0 || (_editorAPI$avatarGrou = editorAPI.avatarGroup) === null || _editorAPI$avatarGrou === void 0 ? void 0 : _editorAPI$avatarGrou.actions.getToolbarItem({
|
|
72
|
-
editorView: props.editorView,
|
|
73
72
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
74
73
|
inviteToEditHandler: (_props$collabEdit2 = props.collabEdit) === null || _props$collabEdit2 === void 0 ? void 0 : _props$collabEdit2.inviteToEditHandler,
|
|
75
74
|
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected
|
|
76
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
75
|
+
}) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
77
76
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
78
77
|
popupsMountPoint: props.popupsMountPoint,
|
|
79
78
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -10,6 +10,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import { usePortalProvider } from '@atlaskit/editor-common/portal';
|
|
12
12
|
import { BaseTheme, IntlProviderIfMissingWrapper, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { getUiComponent } from '../create-editor';
|
|
14
15
|
import ErrorBoundary from '../create-editor/ErrorBoundary';
|
|
15
16
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
@@ -133,7 +134,7 @@ export const EditorInternal = /*#__PURE__*/memo(({
|
|
|
133
134
|
useStickyToolbar: props.useStickyToolbar,
|
|
134
135
|
featureFlags: featureFlags,
|
|
135
136
|
pluginHooks: config.pluginHooks,
|
|
136
|
-
hideAvatarGroup: props.hideAvatarGroup
|
|
137
|
+
hideAvatarGroup: fg('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
137
138
|
}));
|
|
138
139
|
}
|
|
139
140
|
}), jsx(PortalRenderer, null))))))));
|
package/dist/es2019/editor.js
CHANGED
|
@@ -12,10 +12,12 @@ import { ComposableEditor } from './composable-editor';
|
|
|
12
12
|
import useUniversalPreset from './presets/useUniversalPreset';
|
|
13
13
|
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
14
14
|
const ComposableEditorWrapper = ({
|
|
15
|
-
props
|
|
15
|
+
props,
|
|
16
|
+
initialPluginConfiguration
|
|
16
17
|
}) => {
|
|
17
18
|
const preset = useUniversalPreset({
|
|
18
|
-
props
|
|
19
|
+
props,
|
|
20
|
+
initialPluginConfiguration
|
|
19
21
|
});
|
|
20
22
|
return jsx(ComposableEditor, _extends({
|
|
21
23
|
preset: preset
|
|
@@ -28,7 +30,8 @@ export default class Editor extends React.Component {
|
|
|
28
30
|
}
|
|
29
31
|
render() {
|
|
30
32
|
return jsx(ComposableEditorWrapper, {
|
|
31
|
-
props: this.props
|
|
33
|
+
props: this.props,
|
|
34
|
+
initialPluginConfiguration: this.props.initialPluginConfiguration
|
|
32
35
|
});
|
|
33
36
|
}
|
|
34
37
|
}
|
|
@@ -133,7 +133,6 @@ export default function createUniversalPresetInternal({
|
|
|
133
133
|
...(initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.mentionsPlugin)
|
|
134
134
|
}], Boolean(props.mentionProvider)).maybeAdd(emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([tablesPlugin, {
|
|
135
135
|
tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
|
|
136
|
-
tableResizingEnabled: isFullPage || isComment && fg('platform_editor_table_support_in_comment'),
|
|
137
136
|
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && (isFullPage || (isComment || isChromeless) && fg('platform_editor_table_support_in_comment')),
|
|
138
137
|
isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && (isFullPage || isComment && fg('platform_editor_table_support_in_comment')),
|
|
139
138
|
allowContextualMenu: !isMobile,
|
|
@@ -143,7 +142,8 @@ export default function createUniversalPresetInternal({
|
|
|
143
142
|
isTableAlignmentEnabled: fg('platform.editor.table.allow-table-alignment') && (isFullPage || isComment && fg('platform_editor_table_support_in_comment')),
|
|
144
143
|
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage,
|
|
145
144
|
isCommentEditor: isComment,
|
|
146
|
-
isChromelessEditor: isChromeless
|
|
145
|
+
isChromelessEditor: isChromeless,
|
|
146
|
+
...(initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.tablesPlugin)
|
|
147
147
|
}], Boolean(props.allowTables)).maybeAdd([tasksAndDecisionsPlugin, {
|
|
148
148
|
allowNestedTasks: props.allowNestedTasks,
|
|
149
149
|
consumeTabs: isFullPage,
|
|
@@ -224,9 +224,15 @@ export default function createUniversalPresetInternal({
|
|
|
224
224
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
225
225
|
collabEdit: props.collabEdit,
|
|
226
226
|
takeFullWidth: !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
227
|
-
showAvatarGroup:
|
|
227
|
+
showAvatarGroup:
|
|
228
|
+
// Cleanup: `platform_editor_remove_hide_avatar_group_prop`
|
|
229
|
+
// Remove `!props.hideAvatarGroup`
|
|
230
|
+
!props.hideAvatarGroup && featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar
|
|
228
231
|
}]).maybeAdd([findReplacePlugin, {
|
|
229
|
-
takeFullWidth:
|
|
232
|
+
takeFullWidth:
|
|
233
|
+
// Cleanup: `platform_editor_remove_hide_avatar_group_prop`
|
|
234
|
+
// Remove `!props.hideAvatarGroup`
|
|
235
|
+
!props.hideAvatarGroup && !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
230
236
|
twoLineEditorToolbar: !!props.primaryToolbarComponents && !!featureFlags.twoLineEditorToolbar
|
|
231
237
|
}], Boolean(props.allowFindReplace)).maybeAdd(borderPlugin, Boolean(props.allowBorderMark || props.UNSAFE_allowBorderMark)).maybeAdd(fragmentPlugin, Boolean(props.allowFragmentMark)).add(pasteOptionsToolbarPlugin).add([codeBidiWarningPlugin, {
|
|
232
238
|
appearance
|
|
@@ -88,7 +88,7 @@ export const FullPageEditor = props => {
|
|
|
88
88
|
providerFactory: props.providerFactory,
|
|
89
89
|
showKeyline: showKeyline,
|
|
90
90
|
featureFlags: props.featureFlags,
|
|
91
|
-
hideAvatarGroup: props.hideAvatarGroup
|
|
91
|
+
hideAvatarGroup: fg('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
92
92
|
}), jsx(FullPageContentArea, {
|
|
93
93
|
editorAPI: editorAPI,
|
|
94
94
|
ref: scrollContentContainerRef,
|
|
@@ -52,16 +52,15 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
52
52
|
css: customToolbarWrapperStyle
|
|
53
53
|
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
|
|
54
54
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
55
|
-
}) : null, props.hideAvatarGroup || (props === null || props === void 0 ? void 0 : (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null : // Avatars are moved to Confluence codebase for Edit in Context
|
|
55
|
+
}) : null, !fg('platform_editor_remove_hide_avatar_group_prop') ? props.hideAvatarGroup || (props === null || props === void 0 ? void 0 : (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null : // Avatars are moved to Confluence codebase for Edit in Context
|
|
56
56
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
57
57
|
// For more details please check
|
|
58
58
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
59
59
|
editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$avatarGrou = editorAPI.avatarGroup) === null || _editorAPI$avatarGrou === void 0 ? void 0 : _editorAPI$avatarGrou.actions.getToolbarItem({
|
|
60
|
-
editorView: props.editorView,
|
|
61
60
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
62
61
|
inviteToEditHandler: (_props$collabEdit2 = props.collabEdit) === null || _props$collabEdit2 === void 0 ? void 0 : _props$collabEdit2.inviteToEditHandler,
|
|
63
62
|
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected
|
|
64
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
63
|
+
}) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
65
64
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
66
65
|
popupsMountPoint: props.popupsMountPoint,
|
|
67
66
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "195.
|
|
2
|
+
export const version = "195.9.0";
|
|
@@ -14,6 +14,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
14
14
|
import { ACTION, ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
15
15
|
import { usePortalProvider } from '@atlaskit/editor-common/portal';
|
|
16
16
|
import { BaseTheme, IntlProviderIfMissingWrapper, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { getUiComponent } from '../create-editor';
|
|
18
19
|
import ErrorBoundary from '../create-editor/ErrorBoundary';
|
|
19
20
|
import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
|
|
@@ -137,7 +138,7 @@ export var EditorInternal = /*#__PURE__*/memo(function (_ref) {
|
|
|
137
138
|
useStickyToolbar: props.useStickyToolbar,
|
|
138
139
|
featureFlags: featureFlags,
|
|
139
140
|
pluginHooks: config.pluginHooks,
|
|
140
|
-
hideAvatarGroup: props.hideAvatarGroup
|
|
141
|
+
hideAvatarGroup: fg('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
141
142
|
}));
|
|
142
143
|
}
|
|
143
144
|
}), jsx(PortalRenderer, null))))))));
|
package/dist/esm/editor.js
CHANGED
|
@@ -19,9 +19,11 @@ import { ComposableEditor } from './composable-editor';
|
|
|
19
19
|
import useUniversalPreset from './presets/useUniversalPreset';
|
|
20
20
|
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
21
21
|
var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
22
|
-
var props = _ref.props
|
|
22
|
+
var props = _ref.props,
|
|
23
|
+
initialPluginConfiguration = _ref.initialPluginConfiguration;
|
|
23
24
|
var preset = useUniversalPreset({
|
|
24
|
-
props: props
|
|
25
|
+
props: props,
|
|
26
|
+
initialPluginConfiguration: initialPluginConfiguration
|
|
25
27
|
});
|
|
26
28
|
return jsx(ComposableEditor, _extends({
|
|
27
29
|
preset: preset
|
|
@@ -41,7 +43,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
41
43
|
key: "render",
|
|
42
44
|
value: function render() {
|
|
43
45
|
return jsx(ComposableEditorWrapper, {
|
|
44
|
-
props: this.props
|
|
46
|
+
props: this.props,
|
|
47
|
+
initialPluginConfiguration: this.props.initialPluginConfiguration
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
50
|
}]);
|
|
@@ -132,9 +132,8 @@ export default function createUniversalPresetInternal(_ref) {
|
|
|
132
132
|
allowZeroWidthSpaceAfter: !isMobile,
|
|
133
133
|
HighlightComponent: (_props$mention2 = props.mention) === null || _props$mention2 === void 0 ? void 0 : _props$mention2.HighlightComponent,
|
|
134
134
|
profilecardProvider: (_props$mention3 = props.mention) === null || _props$mention3 === void 0 ? void 0 : _props$mention3.profilecardProvider
|
|
135
|
-
}, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.mentionsPlugin)], Boolean(props.mentionProvider)).maybeAdd(emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([tablesPlugin, {
|
|
135
|
+
}, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.mentionsPlugin)], Boolean(props.mentionProvider)).maybeAdd(emojiPlugin, Boolean(props.emojiProvider)).maybeAdd([tablesPlugin, _objectSpread({
|
|
136
136
|
tableOptions: !props.allowTables || typeof props.allowTables === 'boolean' ? {} : props.allowTables,
|
|
137
|
-
tableResizingEnabled: isFullPage || isComment && fg('platform_editor_table_support_in_comment'),
|
|
138
137
|
dragAndDropEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableDragAndDrop) && (isFullPage || (isComment || isChromeless) && fg('platform_editor_table_support_in_comment')),
|
|
139
138
|
isTableScalingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tablePreserveWidth) && (isFullPage || isComment && fg('platform_editor_table_support_in_comment')),
|
|
140
139
|
allowContextualMenu: !isMobile,
|
|
@@ -145,7 +144,7 @@ export default function createUniversalPresetInternal(_ref) {
|
|
|
145
144
|
isNewColumnResizingEnabled: (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.tableNewColumnResizing) && isFullPage,
|
|
146
145
|
isCommentEditor: isComment,
|
|
147
146
|
isChromelessEditor: isChromeless
|
|
148
|
-
}], Boolean(props.allowTables)).maybeAdd([tasksAndDecisionsPlugin, {
|
|
147
|
+
}, initialPluginConfiguration === null || initialPluginConfiguration === void 0 ? void 0 : initialPluginConfiguration.tablesPlugin)], Boolean(props.allowTables)).maybeAdd([tasksAndDecisionsPlugin, {
|
|
149
148
|
allowNestedTasks: props.allowNestedTasks,
|
|
150
149
|
consumeTabs: isFullPage,
|
|
151
150
|
useLongPressSelection: false
|
|
@@ -219,9 +218,15 @@ export default function createUniversalPresetInternal(_ref) {
|
|
|
219
218
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
220
219
|
collabEdit: props.collabEdit,
|
|
221
220
|
takeFullWidth: !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
222
|
-
showAvatarGroup:
|
|
221
|
+
showAvatarGroup:
|
|
222
|
+
// Cleanup: `platform_editor_remove_hide_avatar_group_prop`
|
|
223
|
+
// Remove `!props.hideAvatarGroup`
|
|
224
|
+
!props.hideAvatarGroup && featureFlags.showAvatarGroupAsPlugin === true && !featureFlags.twoLineEditorToolbar
|
|
223
225
|
}]).maybeAdd([findReplacePlugin, {
|
|
224
|
-
takeFullWidth:
|
|
226
|
+
takeFullWidth:
|
|
227
|
+
// Cleanup: `platform_editor_remove_hide_avatar_group_prop`
|
|
228
|
+
// Remove `!props.hideAvatarGroup`
|
|
229
|
+
!props.hideAvatarGroup && !!featureFlags.showAvatarGroupAsPlugin === false && !hasBeforePrimaryToolbar(props.primaryToolbarComponents),
|
|
225
230
|
twoLineEditorToolbar: !!props.primaryToolbarComponents && !!featureFlags.twoLineEditorToolbar
|
|
226
231
|
}], Boolean(props.allowFindReplace)).maybeAdd(borderPlugin, Boolean(props.allowBorderMark || props.UNSAFE_allowBorderMark)).maybeAdd(fragmentPlugin, Boolean(props.allowFragmentMark)).add(pasteOptionsToolbarPlugin).add([codeBidiWarningPlugin, {
|
|
227
232
|
appearance: appearance
|
|
@@ -95,7 +95,7 @@ export var FullPageEditor = function FullPageEditor(props) {
|
|
|
95
95
|
providerFactory: props.providerFactory,
|
|
96
96
|
showKeyline: showKeyline,
|
|
97
97
|
featureFlags: props.featureFlags,
|
|
98
|
-
hideAvatarGroup: props.hideAvatarGroup
|
|
98
|
+
hideAvatarGroup: fg('platform_editor_remove_hide_avatar_group_prop') ? undefined : props.hideAvatarGroup
|
|
99
99
|
}), jsx(FullPageContentArea, {
|
|
100
100
|
editorAPI: editorAPI,
|
|
101
101
|
ref: scrollContentContainerRef,
|
|
@@ -54,16 +54,15 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
54
54
|
css: customToolbarWrapperStyle
|
|
55
55
|
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
|
|
56
56
|
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
57
|
-
}) : null, props.hideAvatarGroup || (props === null || props === void 0 || (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null : // Avatars are moved to Confluence codebase for Edit in Context
|
|
57
|
+
}) : null, !fg('platform_editor_remove_hide_avatar_group_prop') ? props.hideAvatarGroup || (props === null || props === void 0 || (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.showAvatarGroupAsPlugin) === true && !((_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.twoLineEditorToolbar) ? null : // Avatars are moved to Confluence codebase for Edit in Context
|
|
58
58
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
59
59
|
// For more details please check
|
|
60
60
|
// https://hello.atlassian.net/wiki/spaces/PCG/pages/2851572180/Editor+toolbar+for+live+pages+and+edit+in+context+projects
|
|
61
61
|
editorAPI === null || editorAPI === void 0 || (_editorAPI$avatarGrou = editorAPI.avatarGroup) === null || _editorAPI$avatarGrou === void 0 ? void 0 : _editorAPI$avatarGrou.actions.getToolbarItem({
|
|
62
|
-
editorView: props.editorView,
|
|
63
62
|
inviteToEditComponent: (_props$collabEdit = props.collabEdit) === null || _props$collabEdit === void 0 ? void 0 : _props$collabEdit.inviteToEditComponent,
|
|
64
63
|
inviteToEditHandler: (_props$collabEdit2 = props.collabEdit) === null || _props$collabEdit2 === void 0 ? void 0 : _props$collabEdit2.inviteToEditHandler,
|
|
65
64
|
isInviteToEditButtonSelected: (_props$collabEdit3 = props.collabEdit) === null || _props$collabEdit3 === void 0 ? void 0 : _props$collabEdit3.isInviteToEditButtonSelected
|
|
66
|
-
}), editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
65
|
+
}) : null, editorAPI !== null && editorAPI !== void 0 && editorAPI.findReplace && twoLineEditorToolbar ? editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.findReplace.actions.getToolbarButton({
|
|
67
66
|
popupsBoundariesElement: props.popupsBoundariesElement,
|
|
68
67
|
popupsMountPoint: props.popupsMountPoint,
|
|
69
68
|
popupsScrollableElement: props.popupsScrollableElement,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "195.
|
|
2
|
+
export var version = "195.9.0";
|
|
@@ -901,9 +901,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
901
901
|
};
|
|
902
902
|
}, undefined>>];
|
|
903
903
|
actions: {
|
|
904
|
-
getToolbarItem: ({
|
|
905
|
-
editorView: import("prosemirror-view").EditorView;
|
|
906
|
-
} & import("@atlaskit/editor-plugin-collab-edit").CollabInviteToEditProps) => JSX.Element | null;
|
|
904
|
+
getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: import("@atlaskit/editor-plugin-collab-edit").CollabInviteToEditProps) => JSX.Element | null;
|
|
907
905
|
};
|
|
908
906
|
}, {
|
|
909
907
|
collabEdit?: import("@atlaskit/editor-common/collab").CollabEditOptions | undefined;
|
|
@@ -4252,7 +4250,10 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
4252
4250
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
4253
4251
|
}) => void;
|
|
4254
4252
|
};
|
|
4255
|
-
}, undefined
|
|
4253
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
4254
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
4255
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
4256
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
4256
4257
|
sharedState: import("@atlaskit/editor-plugin-block-type").BlockTypeState | undefined;
|
|
4257
4258
|
actions: {
|
|
4258
4259
|
insertBlockQuote: (inputMethod: import("@atlaskit/editor-plugin-block-type").InputMethod) => import("@atlaskit/editor-common/types").Command;
|
package/dist/types/editor.d.ts
CHANGED
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import type { InitialPluginConfiguration } from './preset-universal';
|
|
7
8
|
import type { EditorProps } from './types/editor-props';
|
|
8
9
|
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PluginsOptions, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
|
|
9
10
|
export type { FeedbackInfo } from '@atlaskit/editor-common/types';
|
|
10
|
-
|
|
11
|
+
interface EditorPropsWithInitialPluginConfiguration extends EditorProps {
|
|
12
|
+
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
13
|
+
}
|
|
14
|
+
export default class Editor extends React.Component<EditorPropsWithInitialPluginConfiguration> {
|
|
11
15
|
static defaultProps: EditorProps;
|
|
12
|
-
constructor(props:
|
|
16
|
+
constructor(props: EditorPropsWithInitialPluginConfiguration);
|
|
13
17
|
render(): jsx.JSX.Element;
|
|
14
18
|
}
|
|
@@ -971,7 +971,10 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
|
|
|
971
971
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
972
972
|
}) => void;
|
|
973
973
|
};
|
|
974
|
-
}, undefined
|
|
974
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
975
|
+
pluginConfiguration: FeatureFlags;
|
|
976
|
+
sharedState: FeatureFlags;
|
|
977
|
+
}, FeatureFlags>>];
|
|
975
978
|
sharedState: import("@atlaskit/editor-plugins/block-type").BlockTypeState | undefined;
|
|
976
979
|
actions: {
|
|
977
980
|
insertBlockQuote: (inputMethod: import("@atlaskit/editor-plugins/block-type").InputMethod) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -2834,7 +2837,10 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
|
|
|
2834
2837
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
2835
2838
|
}) => void;
|
|
2836
2839
|
};
|
|
2837
|
-
}, undefined
|
|
2840
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
2841
|
+
pluginConfiguration: FeatureFlags;
|
|
2842
|
+
sharedState: FeatureFlags;
|
|
2843
|
+
}, FeatureFlags>>];
|
|
2838
2844
|
sharedState: import("@atlaskit/editor-plugins/block-type").BlockTypeState | undefined;
|
|
2839
2845
|
actions: {
|
|
2840
2846
|
insertBlockQuote: (inputMethod: import("@atlaskit/editor-plugins/block-type").InputMethod) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -18,6 +18,9 @@ export type InitialPluginConfiguration = {
|
|
|
18
18
|
id: string;
|
|
19
19
|
}[]) => void;
|
|
20
20
|
};
|
|
21
|
+
tablesPlugin?: {
|
|
22
|
+
tableResizingEnabled?: boolean;
|
|
23
|
+
};
|
|
21
24
|
};
|
|
22
25
|
/**
|
|
23
26
|
* Creates a preset with all of the available plugins.
|
|
@@ -937,9 +940,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
937
940
|
};
|
|
938
941
|
}, undefined>>];
|
|
939
942
|
actions: {
|
|
940
|
-
getToolbarItem: ({
|
|
941
|
-
editorView: import("prosemirror-view").EditorView;
|
|
942
|
-
} & import("@atlaskit/editor-common/collab").CollabInviteToEditProps) => JSX.Element | null;
|
|
943
|
+
getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: import("@atlaskit/editor-common/collab").CollabInviteToEditProps) => JSX.Element | null;
|
|
943
944
|
};
|
|
944
945
|
}, {
|
|
945
946
|
collabEdit?: import("@atlaskit/editor-common/collab").CollabEditOptions | undefined;
|
|
@@ -4288,7 +4289,10 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
4288
4289
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
4289
4290
|
}) => void;
|
|
4290
4291
|
};
|
|
4291
|
-
}, undefined
|
|
4292
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
4293
|
+
pluginConfiguration: FeatureFlags;
|
|
4294
|
+
sharedState: FeatureFlags;
|
|
4295
|
+
}, FeatureFlags>>];
|
|
4292
4296
|
sharedState: import("@atlaskit/editor-plugin-block-type").BlockTypeState | undefined;
|
|
4293
4297
|
actions: {
|
|
4294
4298
|
insertBlockQuote: (inputMethod: import("@atlaskit/editor-plugin-block-type").InputMethod) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -901,9 +901,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
901
901
|
};
|
|
902
902
|
}, undefined>>];
|
|
903
903
|
actions: {
|
|
904
|
-
getToolbarItem: ({
|
|
905
|
-
editorView: import("prosemirror-view").EditorView;
|
|
906
|
-
} & import("@atlaskit/editor-plugin-collab-edit").CollabInviteToEditProps) => JSX.Element | null;
|
|
904
|
+
getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: import("@atlaskit/editor-plugin-collab-edit").CollabInviteToEditProps) => JSX.Element | null;
|
|
907
905
|
};
|
|
908
906
|
}, {
|
|
909
907
|
collabEdit?: import("@atlaskit/editor-common/collab").CollabEditOptions | undefined;
|
|
@@ -4252,7 +4250,10 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
4252
4250
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
4253
4251
|
}) => void;
|
|
4254
4252
|
};
|
|
4255
|
-
}, undefined
|
|
4253
|
+
}, undefined>>, import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-clear-marks-on-empty-doc").ClearMarksOnEmptyDocPlugin<"featureFlags", {
|
|
4254
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
4255
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
4256
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
4256
4257
|
sharedState: import("@atlaskit/editor-plugin-block-type").BlockTypeState | undefined;
|
|
4257
4258
|
actions: {
|
|
4258
4259
|
insertBlockQuote: (inputMethod: import("@atlaskit/editor-plugin-block-type").InputMethod) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -148,6 +148,10 @@ export interface EditorSharedPropsWithPlugins {
|
|
|
148
148
|
collabEdit?: CollabEditOptions;
|
|
149
149
|
primaryToolbarComponents?: PrimaryToolbarComponents;
|
|
150
150
|
allowUndoRedoButtons?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated
|
|
153
|
+
* This prop is no longer in use and will be removed soon.
|
|
154
|
+
*/
|
|
151
155
|
hideAvatarGroup?: boolean;
|
|
152
156
|
}
|
|
153
157
|
export interface EditorProps extends EditorBaseProps, EditorPluginFeatureProps, EditorSharedPropsWithPlugins, EditorProviderProps {
|
|
@@ -1177,9 +1177,7 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
1177
1177
|
}, undefined>>
|
|
1178
1178
|
];
|
|
1179
1179
|
actions: {
|
|
1180
|
-
getToolbarItem: ({
|
|
1181
|
-
editorView: import("prosemirror-view").EditorView;
|
|
1182
|
-
} & import("@atlaskit/editor-plugin-collab-edit").CollabInviteToEditProps) => JSX.Element | null;
|
|
1180
|
+
getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: import("@atlaskit/editor-plugin-collab-edit").CollabInviteToEditProps) => JSX.Element | null;
|
|
1183
1181
|
};
|
|
1184
1182
|
}, {
|
|
1185
1183
|
collabEdit?: import("@atlaskit/editor-common/collab").CollabEditOptions | undefined;
|
|
@@ -5271,7 +5269,11 @@ export declare function createUniversalPreset({ props, prevProps, initialPluginC
|
|
|
5271
5269
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
5272
5270
|
}) => void;
|
|
5273
5271
|
};
|
|
5274
|
-
}, undefined
|
|
5272
|
+
}, undefined>>,
|
|
5273
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
5274
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
5275
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
5276
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
5275
5277
|
];
|
|
5276
5278
|
sharedState: import("@atlaskit/editor-plugin-block-type").BlockTypeState | undefined;
|
|
5277
5279
|
actions: {
|
|
@@ -4,11 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
+
import type { InitialPluginConfiguration } from './preset-universal';
|
|
7
8
|
import type { EditorProps } from './types/editor-props';
|
|
8
9
|
export type { AllowedBlockTypes, Command, CommandDispatch, DomAtPos, EditorAppearance, EditorAppearanceComponentProps, EditorConfig, EditorInstance, EditorPlugin, EditorProps, ExtensionConfig, ExtensionProvidersProp, MarkConfig, MessageDescriptor, NodeConfig, NodeViewConfig, PluginsOptions, PMPlugin, PMPluginCreateConfig, PMPluginFactory, PMPluginFactoryParams, ReactComponents, ToolbarUIComponentFactory, ToolbarUiComponentFactoryParams, UIComponentFactory, UiComponentFactoryParams, } from './types';
|
|
9
10
|
export type { FeedbackInfo } from '@atlaskit/editor-common/types';
|
|
10
|
-
|
|
11
|
+
interface EditorPropsWithInitialPluginConfiguration extends EditorProps {
|
|
12
|
+
initialPluginConfiguration?: InitialPluginConfiguration;
|
|
13
|
+
}
|
|
14
|
+
export default class Editor extends React.Component<EditorPropsWithInitialPluginConfiguration> {
|
|
11
15
|
static defaultProps: EditorProps;
|
|
12
|
-
constructor(props:
|
|
16
|
+
constructor(props: EditorPropsWithInitialPluginConfiguration);
|
|
13
17
|
render(): jsx.JSX.Element;
|
|
14
18
|
}
|
|
@@ -1211,7 +1211,11 @@ export declare function createDefaultPreset(options: DefaultPresetPluginOptions)
|
|
|
1211
1211
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
1212
1212
|
}) => void;
|
|
1213
1213
|
};
|
|
1214
|
-
}, undefined
|
|
1214
|
+
}, undefined>>,
|
|
1215
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
1216
|
+
pluginConfiguration: FeatureFlags;
|
|
1217
|
+
sharedState: FeatureFlags;
|
|
1218
|
+
}, FeatureFlags>>
|
|
1215
1219
|
];
|
|
1216
1220
|
sharedState: import("@atlaskit/editor-plugins/block-type").BlockTypeState | undefined;
|
|
1217
1221
|
actions: {
|
|
@@ -3518,7 +3522,11 @@ export declare function useDefaultPreset(props: DefaultPresetPluginOptions): Edi
|
|
|
3518
3522
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
3519
3523
|
}) => void;
|
|
3520
3524
|
};
|
|
3521
|
-
}, undefined
|
|
3525
|
+
}, undefined>>,
|
|
3526
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
3527
|
+
pluginConfiguration: FeatureFlags;
|
|
3528
|
+
sharedState: FeatureFlags;
|
|
3529
|
+
}, FeatureFlags>>
|
|
3522
3530
|
];
|
|
3523
3531
|
sharedState: import("@atlaskit/editor-plugins/block-type").BlockTypeState | undefined;
|
|
3524
3532
|
actions: {
|
|
@@ -18,6 +18,9 @@ export type InitialPluginConfiguration = {
|
|
|
18
18
|
id: string;
|
|
19
19
|
}[]) => void;
|
|
20
20
|
};
|
|
21
|
+
tablesPlugin?: {
|
|
22
|
+
tableResizingEnabled?: boolean;
|
|
23
|
+
};
|
|
21
24
|
};
|
|
22
25
|
/**
|
|
23
26
|
* Creates a preset with all of the available plugins.
|
|
@@ -1213,9 +1216,7 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
1213
1216
|
}, undefined>>
|
|
1214
1217
|
];
|
|
1215
1218
|
actions: {
|
|
1216
|
-
getToolbarItem: ({
|
|
1217
|
-
editorView: import("prosemirror-view").EditorView;
|
|
1218
|
-
} & import("@atlaskit/editor-common/collab").CollabInviteToEditProps) => JSX.Element | null;
|
|
1219
|
+
getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: import("@atlaskit/editor-common/collab").CollabInviteToEditProps) => JSX.Element | null;
|
|
1219
1220
|
};
|
|
1220
1221
|
}, {
|
|
1221
1222
|
collabEdit?: import("@atlaskit/editor-common/collab").CollabEditOptions | undefined;
|
|
@@ -5307,7 +5308,11 @@ export default function createUniversalPresetInternal({ appearance, props, featu
|
|
|
5307
5308
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
5308
5309
|
}) => void;
|
|
5309
5310
|
};
|
|
5310
|
-
}, undefined
|
|
5311
|
+
}, undefined>>,
|
|
5312
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-common/types").NextEditorPluginFunctionOptionalConfigDefinition<"featureFlags", {
|
|
5313
|
+
pluginConfiguration: FeatureFlags;
|
|
5314
|
+
sharedState: FeatureFlags;
|
|
5315
|
+
}, FeatureFlags>>
|
|
5311
5316
|
];
|
|
5312
5317
|
sharedState: import("@atlaskit/editor-plugin-block-type").BlockTypeState | undefined;
|
|
5313
5318
|
actions: {
|
|
@@ -1177,9 +1177,7 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
1177
1177
|
}, undefined>>
|
|
1178
1178
|
];
|
|
1179
1179
|
actions: {
|
|
1180
|
-
getToolbarItem: ({
|
|
1181
|
-
editorView: import("prosemirror-view").EditorView;
|
|
1182
|
-
} & import("@atlaskit/editor-plugin-collab-edit").CollabInviteToEditProps) => JSX.Element | null;
|
|
1180
|
+
getToolbarItem: ({ inviteToEditHandler, isInviteToEditButtonSelected, inviteToEditComponent, }: import("@atlaskit/editor-plugin-collab-edit").CollabInviteToEditProps) => JSX.Element | null;
|
|
1183
1181
|
};
|
|
1184
1182
|
}, {
|
|
1185
1183
|
collabEdit?: import("@atlaskit/editor-common/collab").CollabEditOptions | undefined;
|
|
@@ -5271,7 +5269,11 @@ export default function useUniversalPreset({ props, initialPluginConfiguration }
|
|
|
5271
5269
|
component: import("@atlaskit/editor-common/types").ToolbarUIComponentFactory;
|
|
5272
5270
|
}) => void;
|
|
5273
5271
|
};
|
|
5274
|
-
}, undefined
|
|
5272
|
+
}, undefined>>,
|
|
5273
|
+
import("@atlaskit/editor-common/types").OptionalPlugin<import("@atlaskit/editor-plugin-clear-marks-on-empty-doc").ClearMarksOnEmptyDocPlugin<"featureFlags", {
|
|
5274
|
+
pluginConfiguration: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
5275
|
+
sharedState: import("@atlaskit/editor-common/types").FeatureFlags;
|
|
5276
|
+
}, import("@atlaskit/editor-common/types").FeatureFlags>>
|
|
5275
5277
|
];
|
|
5276
5278
|
sharedState: import("@atlaskit/editor-plugin-block-type").BlockTypeState | undefined;
|
|
5277
5279
|
actions: {
|
|
@@ -148,6 +148,10 @@ export interface EditorSharedPropsWithPlugins {
|
|
|
148
148
|
collabEdit?: CollabEditOptions;
|
|
149
149
|
primaryToolbarComponents?: PrimaryToolbarComponents;
|
|
150
150
|
allowUndoRedoButtons?: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated
|
|
153
|
+
* This prop is no longer in use and will be removed soon.
|
|
154
|
+
*/
|
|
151
155
|
hideAvatarGroup?: boolean;
|
|
152
156
|
}
|
|
153
157
|
export interface EditorProps extends EditorBaseProps, EditorPluginFeatureProps, EditorSharedPropsWithPlugins, EditorProviderProps {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "195.
|
|
3
|
+
"version": "195.9.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
43
|
-
"@atlaskit/adf-schema": "^40.
|
|
43
|
+
"@atlaskit/adf-schema": "^40.9.0",
|
|
44
44
|
"@atlaskit/analytics-namespaced-context": "^6.11.0",
|
|
45
45
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
46
46
|
"@atlaskit/analytics-next-stable-react-context": "1.0.1",
|
|
47
47
|
"@atlaskit/button": "^20.1.0",
|
|
48
|
-
"@atlaskit/editor-common": "^88.
|
|
48
|
+
"@atlaskit/editor-common": "^88.2.0",
|
|
49
49
|
"@atlaskit/editor-plugins": "^4.2.0",
|
|
50
50
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
51
51
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
52
52
|
"@atlaskit/emoji": "^67.7.0",
|
|
53
|
-
"@atlaskit/icon": "^22.
|
|
53
|
+
"@atlaskit/icon": "^22.15.0",
|
|
54
54
|
"@atlaskit/media-card": "^78.1.0",
|
|
55
55
|
"@atlaskit/mention": "^23.2.0",
|
|
56
56
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
@@ -80,14 +80,14 @@
|
|
|
80
80
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@af/editor-examples-helpers": "0.3.
|
|
83
|
+
"@af/editor-examples-helpers": "0.3.2",
|
|
84
84
|
"@af/editor-libra": "*",
|
|
85
85
|
"@af/visual-regression": "*",
|
|
86
86
|
"@atlaskit/adf-utils": "^19.8.0",
|
|
87
87
|
"@atlaskit/analytics-listeners": "^8.11.0",
|
|
88
|
-
"@atlaskit/collab-provider": "9.37.
|
|
88
|
+
"@atlaskit/collab-provider": "9.37.4",
|
|
89
89
|
"@atlaskit/editor-json-transformer": "^8.18.0",
|
|
90
|
-
"@atlaskit/editor-plugin-annotation": "1.19.
|
|
90
|
+
"@atlaskit/editor-plugin-annotation": "1.19.3",
|
|
91
91
|
"@atlaskit/editor-plugin-card": "^2.13.0",
|
|
92
92
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
93
93
|
"@atlaskit/editor-plugin-list": "^3.8.0",
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"@atlaskit/modal-dialog": "^12.15.0",
|
|
102
102
|
"@atlaskit/primitives": "^12.0.0",
|
|
103
103
|
"@atlaskit/renderer": "^109.50.0",
|
|
104
|
-
"@atlaskit/smart-card": "^27.
|
|
104
|
+
"@atlaskit/smart-card": "^27.18.0",
|
|
105
105
|
"@atlaskit/synchrony-test-helpers": "^2.5.0",
|
|
106
106
|
"@atlaskit/toggle": "^13.3.0",
|
|
107
107
|
"@atlaskit/util-data-test": "^17.9.0",
|
|
108
108
|
"@atlaskit/visual-regression": "*",
|
|
109
109
|
"@atlassian/adf-schema-json": "^1.22.0",
|
|
110
110
|
"@atlassian/feature-flags-test-utils": "*",
|
|
111
|
-
"@atlassian/search-provider": "2.4.
|
|
111
|
+
"@atlassian/search-provider": "2.4.115",
|
|
112
112
|
"@emotion/jest": "^11.8.0",
|
|
113
113
|
"@storybook/addon-knobs": "^5.3.18",
|
|
114
114
|
"@testing-library/react": "^12.1.5",
|
|
@@ -277,6 +277,9 @@
|
|
|
277
277
|
},
|
|
278
278
|
"platform_editor_toolbar_ssr": {
|
|
279
279
|
"type": "boolean"
|
|
280
|
+
},
|
|
281
|
+
"platform_editor_remove_hide_avatar_group_prop": {
|
|
282
|
+
"type": "boolean"
|
|
280
283
|
}
|
|
281
284
|
},
|
|
282
285
|
"stricter": {
|