@atlaskit/editor-core 191.0.3 → 191.0.6
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 +15 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/plugins/avatar-group/ui/avatars-with-plugin-state.js +16 -22
- package/dist/cjs/plugins/avatar-group/ui/colored-avatar-item.js +1 -1
- package/dist/cjs/plugins/index.js +1 -8
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/BeforeWrapper.js +24 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +4 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/avatar-group/ui/avatars-with-plugin-state.js +16 -23
- package/dist/es2019/plugins/avatar-group/ui/colored-avatar-item.js +2 -2
- package/dist/es2019/plugins/index.js +1 -2
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/BeforeWrapper.js +15 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -3
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/avatar-group/ui/avatars-with-plugin-state.js +16 -22
- package/dist/esm/plugins/avatar-group/ui/colored-avatar-item.js +1 -1
- package/dist/esm/plugins/index.js +1 -2
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/BeforeWrapper.js +17 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -3
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/avatar-group/ui/avatars-with-plugin-state.d.ts +4 -9
- package/dist/types/plugins/avatar-group/ui/invite-to-edit.d.ts +1 -1
- package/dist/types/plugins/avatar-group/ui/to-avatar.d.ts +1 -4
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/ui/Appearance/FullPage/BeforeWrapper.d.ts +8 -0
- package/dist/types-ts4.5/plugins/avatar-group/ui/avatars-with-plugin-state.d.ts +4 -9
- package/dist/types-ts4.5/plugins/avatar-group/ui/invite-to-edit.d.ts +1 -1
- package/dist/types-ts4.5/plugins/avatar-group/ui/to-avatar.d.ts +1 -4
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/BeforeWrapper.d.ts +8 -0
- package/package.json +16 -3
- package/dist/cjs/plugins/before-primaryToolbar/index.js +0 -21
- package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +0 -18
- package/dist/es2019/plugins/before-primaryToolbar/index.js +0 -13
- package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +0 -13
- package/dist/esm/plugins/before-primaryToolbar/index.js +0 -14
- package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +0 -11
- package/dist/types/plugins/before-primaryToolbar/index.d.ts +0 -8
- package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +0 -5
- package/dist/types-ts4.5/plugins/before-primaryToolbar/index.d.ts +0 -8
- package/dist/types-ts4.5/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 191.0.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#61125](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61125) [`9571e3502584`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9571e3502584) - ECA11Y-72 Update files toolbar to replace dropdown by buttons
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 191.0.4
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#66110](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66110) [`eb05333c3a59`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eb05333c3a59) - Extract before primary toolbar plugin from editor-core
|
|
15
|
+
- [#66119](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/66119) [`3f87176f284d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f87176f284d) - [ED-21806] Refactoring plugin to match NextEditorPlugin standard
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 191.0.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -20,29 +20,23 @@ var AvatarsWithPluginState = function AvatarsWithPluginState(props) {
|
|
|
20
20
|
featureFlags = props.featureFlags,
|
|
21
21
|
editorAnalyticsAPI = props.editorAnalyticsAPI,
|
|
22
22
|
editorAPI = props.editorAPI;
|
|
23
|
-
var render = _react.default.useCallback(function (_ref) {
|
|
24
|
-
var data = _ref.data;
|
|
25
|
-
if (!data) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(_avatars.Avatars, {
|
|
29
|
-
sessionId: data.sessionId,
|
|
30
|
-
participants: data.activeParticipants,
|
|
31
|
-
editorView: editorView,
|
|
32
|
-
featureFlags: featureFlags,
|
|
33
|
-
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
34
|
-
editorAPI: editorAPI
|
|
35
|
-
}, /*#__PURE__*/_react.default.createElement(_inviteToEdit.InviteToEditButton, {
|
|
36
|
-
title: title,
|
|
37
|
-
selected: selected,
|
|
38
|
-
onClick: onClick,
|
|
39
|
-
Component: Component
|
|
40
|
-
}));
|
|
41
|
-
}, [selected, onClick, Component, title, editorView, featureFlags, editorAnalyticsAPI, editorAPI]);
|
|
42
23
|
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(editorAPI, ['collabEdit']),
|
|
43
24
|
collabEditState = _useSharedPluginState.collabEditState;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
25
|
+
if (!collabEditState) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_avatars.Avatars, {
|
|
29
|
+
sessionId: collabEditState.sessionId,
|
|
30
|
+
participants: collabEditState.activeParticipants,
|
|
31
|
+
editorView: editorView,
|
|
32
|
+
featureFlags: featureFlags,
|
|
33
|
+
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
34
|
+
editorAPI: editorAPI
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_inviteToEdit.InviteToEditButton, {
|
|
36
|
+
title: title,
|
|
37
|
+
selected: selected,
|
|
38
|
+
onClick: onClick,
|
|
39
|
+
Component: Component
|
|
40
|
+
}));
|
|
47
41
|
};
|
|
48
42
|
var _default = exports.default = (0, _reactIntlNext.injectIntl)(AvatarsWithPluginState);
|
|
@@ -11,7 +11,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
11
11
|
|
|
12
12
|
var ColoredAvatarItem = exports.ColoredAvatarItem = function ColoredAvatarItem(props) {
|
|
13
13
|
var _props$api;
|
|
14
|
-
var color = (_props$api = props.api) === null || _props$api === void 0 || (_props$api = _props$api.collabEdit) === null || _props$api === void 0 ? void 0 : _props$api.
|
|
14
|
+
var color = (_props$api = props.api) === null || _props$api === void 0 || (_props$api = _props$api.collabEdit) === null || _props$api === void 0 || (_props$api = _props$api.actions) === null || _props$api === void 0 ? void 0 : _props$api.getAvatarColor(props.sessionId).color.solid;
|
|
15
15
|
var avatar = props.name.substr(0, 1).toUpperCase();
|
|
16
16
|
return (0, _react.jsx)("div", {
|
|
17
17
|
css: (0, _styles.badge)(color || _colors.R100),
|
|
@@ -10,12 +10,6 @@ Object.defineProperty(exports, "avatarGroupPlugin", {
|
|
|
10
10
|
return _avatarGroup.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
Object.defineProperty(exports, "beforePrimaryToolbarPlugin", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _beforePrimaryToolbar.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
13
|
Object.defineProperty(exports, "findReplacePlugin", {
|
|
20
14
|
enumerable: true,
|
|
21
15
|
get: function get() {
|
|
@@ -30,5 +24,4 @@ Object.defineProperty(exports, "jiraIssuePlugin", {
|
|
|
30
24
|
});
|
|
31
25
|
var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
|
|
32
26
|
var _findReplace = _interopRequireDefault(require("./find-replace"));
|
|
33
|
-
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
34
|
-
var _beforePrimaryToolbar = _interopRequireDefault(require("./before-primaryToolbar"));
|
|
27
|
+
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
@@ -51,6 +51,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
51
51
|
var _editorPluginCollabEdit = require("@atlaskit/editor-plugin-collab-edit");
|
|
52
52
|
var _plugins = require("../plugins");
|
|
53
53
|
var _editorPluginExtension = require("@atlaskit/editor-plugin-extension");
|
|
54
|
+
var _editorPluginBeforePrimaryToolbar = require("@atlaskit/editor-plugin-before-primary-toolbar");
|
|
54
55
|
var _editorPluginFeedbackDialog = require("@atlaskit/editor-plugin-feedback-dialog");
|
|
55
56
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
56
57
|
var _isFullPage = require("../utils/is-full-page");
|
|
@@ -377,7 +378,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
377
378
|
nativeStatusSupported: !statusMenuDisabled,
|
|
378
379
|
showElementBrowserLink: props.elementBrowser && props.elementBrowser.showModal || false,
|
|
379
380
|
replacePlusMenuWithElementBrowser: props.elementBrowser && props.elementBrowser.replacePlusMenu || false
|
|
380
|
-
}]).maybeAdd(
|
|
381
|
+
}]).maybeAdd(_editorPluginBeforePrimaryToolbar.beforePrimaryToolbarPlugin, function (plugin, builder) {
|
|
381
382
|
if (hasBeforePrimaryToolbar(props.primaryToolbarComponents) && !featureFlags.twoLineEditorToolbar) {
|
|
382
383
|
return builder.add([plugin, {
|
|
383
384
|
beforePrimaryToolbarComponents: props.primaryToolbarComponents.before
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BeforePrimaryToolbarWrapper = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
|
|
10
|
+
var beforePrimaryToolbarPluginWrapperStyles = (0, _react.css)({
|
|
11
|
+
display: 'flex',
|
|
12
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
13
|
+
flexGrow: 1,
|
|
14
|
+
justifyContent: 'flex-end',
|
|
15
|
+
alignItems: 'center'
|
|
16
|
+
});
|
|
17
|
+
// Duplicate of the wrapper from `editor-plugin-before-primary-toolbar` used
|
|
18
|
+
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
19
|
+
var BeforePrimaryToolbarWrapper = exports.BeforePrimaryToolbarWrapper = function BeforePrimaryToolbarWrapper(props) {
|
|
20
|
+
return (0, _react.jsx)("div", {
|
|
21
|
+
css: beforePrimaryToolbarPluginWrapperStyles,
|
|
22
|
+
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
23
|
+
}, props.beforePrimaryToolbarComponents);
|
|
24
|
+
};
|
|
@@ -11,19 +11,19 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _ui = _interopRequireDefault(require("../../../plugins/avatar-group/ui"));
|
|
14
|
-
var _BeforePrimaryToolbarWrapper = require("../../../plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper");
|
|
15
14
|
var _Toolbar = _interopRequireDefault(require("../../Toolbar"));
|
|
16
15
|
var _MainToolbar = require("./MainToolbar");
|
|
17
16
|
var _ui2 = require("@atlaskit/editor-common/ui");
|
|
18
17
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
19
18
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
20
19
|
var _context = require("../../../presets/context");
|
|
20
|
+
var _BeforeWrapper = require("./BeforeWrapper");
|
|
21
21
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
/** @jsx jsx */
|
|
24
24
|
|
|
25
25
|
var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
|
|
26
|
-
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
|
|
26
|
+
var _props$featureFlags, _props$customPrimaryT, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
|
|
27
27
|
var _useState = (0, _react.useState)(false),
|
|
28
28
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
29
29
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -54,8 +54,8 @@ var EditorToolbar = exports.EditorToolbar = /*#__PURE__*/_react.default.memo(fun
|
|
|
54
54
|
}));
|
|
55
55
|
var customToolbar = (0, _react2.jsx)("div", {
|
|
56
56
|
css: _MainToolbar.customToolbarWrapperStyle
|
|
57
|
-
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(
|
|
58
|
-
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
57
|
+
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? (0, _react2.jsx)(_BeforeWrapper.BeforePrimaryToolbarWrapper, {
|
|
58
|
+
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
59
59
|
}) : 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 :
|
|
60
60
|
// Avatars are moved to Confluence codebase for Edit in Context
|
|
61
61
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
@@ -15,31 +15,24 @@ const AvatarsWithPluginState = props => {
|
|
|
15
15
|
editorAnalyticsAPI,
|
|
16
16
|
editorAPI
|
|
17
17
|
} = props;
|
|
18
|
-
const render = React.useCallback(({
|
|
19
|
-
data
|
|
20
|
-
}) => {
|
|
21
|
-
if (!data) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
return /*#__PURE__*/React.createElement(Avatars, {
|
|
25
|
-
sessionId: data.sessionId,
|
|
26
|
-
participants: data.activeParticipants,
|
|
27
|
-
editorView: editorView,
|
|
28
|
-
featureFlags: featureFlags,
|
|
29
|
-
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
30
|
-
editorAPI: editorAPI
|
|
31
|
-
}, /*#__PURE__*/React.createElement(InviteToEditButton, {
|
|
32
|
-
title: title,
|
|
33
|
-
selected: selected,
|
|
34
|
-
onClick: onClick,
|
|
35
|
-
Component: Component
|
|
36
|
-
}));
|
|
37
|
-
}, [selected, onClick, Component, title, editorView, featureFlags, editorAnalyticsAPI, editorAPI]);
|
|
38
18
|
const {
|
|
39
19
|
collabEditState
|
|
40
20
|
} = useSharedPluginState(editorAPI, ['collabEdit']);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
21
|
+
if (!collabEditState) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
return /*#__PURE__*/React.createElement(Avatars, {
|
|
25
|
+
sessionId: collabEditState.sessionId,
|
|
26
|
+
participants: collabEditState.activeParticipants,
|
|
27
|
+
editorView: editorView,
|
|
28
|
+
featureFlags: featureFlags,
|
|
29
|
+
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
30
|
+
editorAPI: editorAPI
|
|
31
|
+
}, /*#__PURE__*/React.createElement(InviteToEditButton, {
|
|
32
|
+
title: title,
|
|
33
|
+
selected: selected,
|
|
34
|
+
onClick: onClick,
|
|
35
|
+
Component: Component
|
|
36
|
+
}));
|
|
44
37
|
};
|
|
45
38
|
export default injectIntl(AvatarsWithPluginState);
|
|
@@ -3,8 +3,8 @@ import { jsx } from '@emotion/react';
|
|
|
3
3
|
import { badge } from './styles';
|
|
4
4
|
import { R100 } from '@atlaskit/theme/colors';
|
|
5
5
|
export const ColoredAvatarItem = props => {
|
|
6
|
-
var _props$api, _props$api$collabEdit;
|
|
7
|
-
const color = (_props$api = props.api) === null || _props$api === void 0 ? void 0 : (_props$api$collabEdit = _props$api.collabEdit) === null || _props$api$collabEdit === void 0 ? void 0 : _props$api$collabEdit.actions.getAvatarColor(props.sessionId).color.solid;
|
|
6
|
+
var _props$api, _props$api$collabEdit, _props$api$collabEdit2;
|
|
7
|
+
const color = (_props$api = props.api) === null || _props$api === void 0 ? void 0 : (_props$api$collabEdit = _props$api.collabEdit) === null || _props$api$collabEdit === void 0 ? void 0 : (_props$api$collabEdit2 = _props$api$collabEdit.actions) === null || _props$api$collabEdit2 === void 0 ? void 0 : _props$api$collabEdit2.getAvatarColor(props.sessionId).color.solid;
|
|
8
8
|
const avatar = props.name.substr(0, 1).toUpperCase();
|
|
9
9
|
return jsx("div", {
|
|
10
10
|
css: badge(color || R100),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
2
2
|
export { default as findReplacePlugin } from './find-replace';
|
|
3
|
-
export { default as avatarGroupPlugin } from './avatar-group';
|
|
4
|
-
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
3
|
+
export { default as avatarGroupPlugin } from './avatar-group';
|
|
@@ -39,8 +39,9 @@ import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
|
39
39
|
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
40
40
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
41
41
|
import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
42
|
-
import { avatarGroupPlugin,
|
|
42
|
+
import { avatarGroupPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
|
|
43
43
|
import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
44
|
+
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
|
|
44
45
|
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
45
46
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
46
47
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
|
+
const beforePrimaryToolbarPluginWrapperStyles = css({
|
|
4
|
+
display: 'flex',
|
|
5
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
6
|
+
flexGrow: 1,
|
|
7
|
+
justifyContent: 'flex-end',
|
|
8
|
+
alignItems: 'center'
|
|
9
|
+
});
|
|
10
|
+
// Duplicate of the wrapper from `editor-plugin-before-primary-toolbar` used
|
|
11
|
+
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
12
|
+
export const BeforePrimaryToolbarWrapper = props => jsx("div", {
|
|
13
|
+
css: beforePrimaryToolbarPluginWrapperStyles,
|
|
14
|
+
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
15
|
+
}, props.beforePrimaryToolbarComponents);
|
|
@@ -4,15 +4,15 @@ import React, { useState, useEffect } from 'react';
|
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import AvatarsWithPluginState from '../../../plugins/avatar-group/ui';
|
|
7
|
-
import { BeforePrimaryToolbarWrapper } from '../../../plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper';
|
|
8
7
|
import Toolbar from '../../Toolbar';
|
|
9
8
|
import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyle, mainToolbarSecondChildStyle, nonCustomToolbarWrapperStyle, customToolbarWrapperStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
|
|
10
9
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
11
10
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
12
11
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
13
12
|
import { usePresetContext } from '../../../presets/context';
|
|
13
|
+
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
14
14
|
export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
15
|
-
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
|
|
15
|
+
var _props$featureFlags, _props$customPrimaryT, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
|
|
16
16
|
const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
|
|
17
17
|
const editorAPI = usePresetContext();
|
|
18
18
|
|
|
@@ -41,7 +41,7 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
|
|
|
41
41
|
const customToolbar = jsx("div", {
|
|
42
42
|
css: customToolbarWrapperStyle
|
|
43
43
|
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
|
|
44
|
-
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
44
|
+
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
45
45
|
}) : 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 :
|
|
46
46
|
// Avatars are moved to Confluence codebase for Edit in Context
|
|
47
47
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "191.0.
|
|
2
|
+
export const version = "191.0.6";
|
|
@@ -13,29 +13,23 @@ var AvatarsWithPluginState = function AvatarsWithPluginState(props) {
|
|
|
13
13
|
featureFlags = props.featureFlags,
|
|
14
14
|
editorAnalyticsAPI = props.editorAnalyticsAPI,
|
|
15
15
|
editorAPI = props.editorAPI;
|
|
16
|
-
var render = React.useCallback(function (_ref) {
|
|
17
|
-
var data = _ref.data;
|
|
18
|
-
if (!data) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
return /*#__PURE__*/React.createElement(Avatars, {
|
|
22
|
-
sessionId: data.sessionId,
|
|
23
|
-
participants: data.activeParticipants,
|
|
24
|
-
editorView: editorView,
|
|
25
|
-
featureFlags: featureFlags,
|
|
26
|
-
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
27
|
-
editorAPI: editorAPI
|
|
28
|
-
}, /*#__PURE__*/React.createElement(InviteToEditButton, {
|
|
29
|
-
title: title,
|
|
30
|
-
selected: selected,
|
|
31
|
-
onClick: onClick,
|
|
32
|
-
Component: Component
|
|
33
|
-
}));
|
|
34
|
-
}, [selected, onClick, Component, title, editorView, featureFlags, editorAnalyticsAPI, editorAPI]);
|
|
35
16
|
var _useSharedPluginState = useSharedPluginState(editorAPI, ['collabEdit']),
|
|
36
17
|
collabEditState = _useSharedPluginState.collabEditState;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
18
|
+
if (!collabEditState) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/React.createElement(Avatars, {
|
|
22
|
+
sessionId: collabEditState.sessionId,
|
|
23
|
+
participants: collabEditState.activeParticipants,
|
|
24
|
+
editorView: editorView,
|
|
25
|
+
featureFlags: featureFlags,
|
|
26
|
+
editorAnalyticsAPI: editorAnalyticsAPI,
|
|
27
|
+
editorAPI: editorAPI
|
|
28
|
+
}, /*#__PURE__*/React.createElement(InviteToEditButton, {
|
|
29
|
+
title: title,
|
|
30
|
+
selected: selected,
|
|
31
|
+
onClick: onClick,
|
|
32
|
+
Component: Component
|
|
33
|
+
}));
|
|
40
34
|
};
|
|
41
35
|
export default injectIntl(AvatarsWithPluginState);
|
|
@@ -4,7 +4,7 @@ import { badge } from './styles';
|
|
|
4
4
|
import { R100 } from '@atlaskit/theme/colors';
|
|
5
5
|
export var ColoredAvatarItem = function ColoredAvatarItem(props) {
|
|
6
6
|
var _props$api;
|
|
7
|
-
var color = (_props$api = props.api) === null || _props$api === void 0 || (_props$api = _props$api.collabEdit) === null || _props$api === void 0 ? void 0 : _props$api.
|
|
7
|
+
var color = (_props$api = props.api) === null || _props$api === void 0 || (_props$api = _props$api.collabEdit) === null || _props$api === void 0 || (_props$api = _props$api.actions) === null || _props$api === void 0 ? void 0 : _props$api.getAvatarColor(props.sessionId).color.solid;
|
|
8
8
|
var avatar = props.name.substr(0, 1).toUpperCase();
|
|
9
9
|
return jsx("div", {
|
|
10
10
|
css: badge(color || R100),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
2
2
|
export { default as findReplacePlugin } from './find-replace';
|
|
3
|
-
export { default as avatarGroupPlugin } from './avatar-group';
|
|
4
|
-
export { default as beforePrimaryToolbarPlugin } from './before-primaryToolbar';
|
|
3
|
+
export { default as avatarGroupPlugin } from './avatar-group';
|
|
@@ -43,8 +43,9 @@ import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
|
43
43
|
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
44
44
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
45
45
|
import { collabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
46
|
-
import { avatarGroupPlugin,
|
|
46
|
+
import { avatarGroupPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
|
|
47
47
|
import { extensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
48
|
+
import { beforePrimaryToolbarPlugin } from '@atlaskit/editor-plugin-before-primary-toolbar';
|
|
48
49
|
import { feedbackDialogPlugin } from '@atlaskit/editor-plugin-feedback-dialog';
|
|
49
50
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
50
51
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
|
+
var beforePrimaryToolbarPluginWrapperStyles = css({
|
|
4
|
+
display: 'flex',
|
|
5
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
6
|
+
flexGrow: 1,
|
|
7
|
+
justifyContent: 'flex-end',
|
|
8
|
+
alignItems: 'center'
|
|
9
|
+
});
|
|
10
|
+
// Duplicate of the wrapper from `editor-plugin-before-primary-toolbar` used
|
|
11
|
+
// only in `FullPageToolbar` to decouple the plugin from the main toolbar
|
|
12
|
+
export var BeforePrimaryToolbarWrapper = function BeforePrimaryToolbarWrapper(props) {
|
|
13
|
+
return jsx("div", {
|
|
14
|
+
css: beforePrimaryToolbarPluginWrapperStyles,
|
|
15
|
+
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
16
|
+
}, props.beforePrimaryToolbarComponents);
|
|
17
|
+
};
|
|
@@ -5,15 +5,15 @@ import React, { useState, useEffect } from 'react';
|
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import AvatarsWithPluginState from '../../../plugins/avatar-group/ui';
|
|
8
|
-
import { BeforePrimaryToolbarWrapper } from '../../../plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper';
|
|
9
8
|
import Toolbar from '../../Toolbar';
|
|
10
9
|
import { mainToolbarStyle, mainToolbarIconBeforeStyle, mainToolbarFirstChildStyle, mainToolbarSecondChildStyle, nonCustomToolbarWrapperStyle, customToolbarWrapperStyle, MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT } from './MainToolbar';
|
|
11
10
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
12
11
|
import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
|
|
13
12
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
14
13
|
import { usePresetContext } from '../../../presets/context';
|
|
14
|
+
import { BeforePrimaryToolbarWrapper } from './BeforeWrapper';
|
|
15
15
|
export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
16
|
-
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
|
|
16
|
+
var _props$featureFlags, _props$customPrimaryT, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
|
|
17
17
|
var _useState = useState(false),
|
|
18
18
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19
19
|
shouldSplitToolbar = _useState2[0],
|
|
@@ -45,7 +45,7 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
|
|
|
45
45
|
var customToolbar = jsx("div", {
|
|
46
46
|
css: customToolbarWrapperStyle
|
|
47
47
|
}, twoLineEditorToolbar && !!props.customPrimaryToolbarComponents && 'before' in props.customPrimaryToolbarComponents ? jsx(BeforePrimaryToolbarWrapper, {
|
|
48
|
-
beforePrimaryToolbarComponents: props.customPrimaryToolbarComponents.before
|
|
48
|
+
beforePrimaryToolbarComponents: (_props$customPrimaryT = props.customPrimaryToolbarComponents) === null || _props$customPrimaryT === void 0 ? void 0 : _props$customPrimaryT.before
|
|
49
49
|
}) : 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 :
|
|
50
50
|
// Avatars are moved to Confluence codebase for Edit in Context
|
|
51
51
|
// When Edit in Context is enabled customPrimaryToolbarComponents is undefined
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "191.0.
|
|
2
|
+
export var version = "191.0.6";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { CollabInviteToEditProps } from '@atlaskit/editor-common/collab';
|
|
4
5
|
import type { EventDispatcher } from '../../../event-dispatcher';
|
|
5
|
-
import type {
|
|
6
|
+
import type { CollabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
6
7
|
import type { FeatureFlags, OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
7
8
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
9
|
export type AvatarsWithPluginStateProps = {
|
|
@@ -35,10 +36,7 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
|
35
36
|
}, FeatureFlags>>];
|
|
36
37
|
actions: EditorAnalyticsAPI;
|
|
37
38
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
38
|
-
sharedState:
|
|
39
|
-
activeParticipants: import("@atlaskit/editor-plugin-collab-edit").ReadOnlyParticipants | undefined;
|
|
40
|
-
sessionId: string | undefined;
|
|
41
|
-
} | undefined;
|
|
39
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
42
40
|
actions: {
|
|
43
41
|
getAvatarColor: (str: string) => {
|
|
44
42
|
index: number;
|
|
@@ -70,10 +68,7 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
|
70
68
|
}, FeatureFlags>>];
|
|
71
69
|
actions: EditorAnalyticsAPI;
|
|
72
70
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
73
|
-
sharedState:
|
|
74
|
-
activeParticipants: import("@atlaskit/editor-plugin-collab-edit").ReadOnlyParticipants | undefined;
|
|
75
|
-
sessionId: string | undefined;
|
|
76
|
-
} | undefined;
|
|
71
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
77
72
|
actions: {
|
|
78
73
|
getAvatarColor: (str: string) => {
|
|
79
74
|
index: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { InviteToEditComponentProps } from '@atlaskit/editor-
|
|
3
|
+
import type { InviteToEditComponentProps } from '@atlaskit/editor-common/collab';
|
|
4
4
|
export interface InviteToEditButtonProps {
|
|
5
5
|
onClick?: React.MouseEventHandler;
|
|
6
6
|
selected?: boolean;
|
|
@@ -19,10 +19,7 @@ declare const _default: import("memoize-one").MemoizedFn<(participant: CollabPar
|
|
|
19
19
|
}, import("@atlaskit/editor-common/types").FeatureFlags>>];
|
|
20
20
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
21
21
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>];
|
|
22
|
-
sharedState:
|
|
23
|
-
activeParticipants: import("@atlaskit/editor-plugin-collab-edit").ReadOnlyParticipants | undefined;
|
|
24
|
-
sessionId: string | undefined;
|
|
25
|
-
} | undefined;
|
|
22
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
26
23
|
actions: {
|
|
27
24
|
getAvatarColor: (str: string) => {
|
|
28
25
|
index: number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
type ReactComponents = ReactElement<any> | ReactElement<any>[];
|
|
5
|
+
export declare const BeforePrimaryToolbarWrapper: (props: {
|
|
6
|
+
beforePrimaryToolbarComponents: ReactComponents | undefined;
|
|
7
|
+
}) => jsx.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { CollabInviteToEditProps } from '@atlaskit/editor-common/collab';
|
|
4
5
|
import type { EventDispatcher } from '../../../event-dispatcher';
|
|
5
|
-
import type {
|
|
6
|
+
import type { CollabEditPlugin } from '@atlaskit/editor-plugin-collab-edit';
|
|
6
7
|
import type { FeatureFlags, OptionalPlugin, PublicPluginAPI } from '@atlaskit/editor-common/types';
|
|
7
8
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
9
|
export type AvatarsWithPluginStateProps = {
|
|
@@ -43,10 +44,7 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
|
43
44
|
actions: EditorAnalyticsAPI;
|
|
44
45
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
45
46
|
];
|
|
46
|
-
sharedState:
|
|
47
|
-
activeParticipants: import("@atlaskit/editor-plugin-collab-edit").ReadOnlyParticipants | undefined;
|
|
48
|
-
sessionId: string | undefined;
|
|
49
|
-
} | undefined;
|
|
47
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
50
48
|
actions: {
|
|
51
49
|
getAvatarColor: (str: string) => {
|
|
52
50
|
index: number;
|
|
@@ -85,10 +83,7 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
|
85
83
|
actions: EditorAnalyticsAPI;
|
|
86
84
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
87
85
|
];
|
|
88
|
-
sharedState:
|
|
89
|
-
activeParticipants: import("@atlaskit/editor-plugin-collab-edit").ReadOnlyParticipants | undefined;
|
|
90
|
-
sessionId: string | undefined;
|
|
91
|
-
} | undefined;
|
|
86
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
92
87
|
actions: {
|
|
93
88
|
getAvatarColor: (str: string) => {
|
|
94
89
|
index: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { InviteToEditComponentProps } from '@atlaskit/editor-
|
|
3
|
+
import type { InviteToEditComponentProps } from '@atlaskit/editor-common/collab';
|
|
4
4
|
export interface InviteToEditButtonProps {
|
|
5
5
|
onClick?: React.MouseEventHandler;
|
|
6
6
|
selected?: boolean;
|
|
@@ -25,10 +25,7 @@ declare const _default: import("memoize-one").MemoizedFn<(participant: CollabPar
|
|
|
25
25
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
26
26
|
}, import("@atlaskit/editor-plugin-analytics").AnalyticsPluginOptions>>
|
|
27
27
|
];
|
|
28
|
-
sharedState:
|
|
29
|
-
activeParticipants: import("@atlaskit/editor-plugin-collab-edit").ReadOnlyParticipants | undefined;
|
|
30
|
-
sessionId: string | undefined;
|
|
31
|
-
} | undefined;
|
|
28
|
+
sharedState: import("@atlaskit/editor-plugin-collab-edit").CollabEditPluginSharedState;
|
|
32
29
|
actions: {
|
|
33
30
|
getAvatarColor: (str: string) => {
|
|
34
31
|
index: number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
type ReactComponents = ReactElement<any> | ReactElement<any>[];
|
|
5
|
+
export declare const BeforePrimaryToolbarWrapper: (props: {
|
|
6
|
+
beforePrimaryToolbarComponents: ReactComponents | undefined;
|
|
7
|
+
}) => jsx.JSX.Element;
|
|
8
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "191.0.
|
|
3
|
+
"version": "191.0.6",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
55
55
|
"@atlaskit/editor-plugin-annotation": "^0.1.0",
|
|
56
56
|
"@atlaskit/editor-plugin-base": "^0.3.0",
|
|
57
|
+
"@atlaskit/editor-plugin-before-primary-toolbar": "^0.1.0",
|
|
57
58
|
"@atlaskit/editor-plugin-better-type-history": "^0.1.0",
|
|
58
59
|
"@atlaskit/editor-plugin-block-type": "^3.0.0",
|
|
59
60
|
"@atlaskit/editor-plugin-border": "^0.1.0",
|
|
@@ -94,7 +95,7 @@
|
|
|
94
95
|
"@atlaskit/editor-plugin-list": "^3.1.0",
|
|
95
96
|
"@atlaskit/editor-plugin-loom": "^0.2.0",
|
|
96
97
|
"@atlaskit/editor-plugin-max-content-size": "^0.1.0",
|
|
97
|
-
"@atlaskit/editor-plugin-media": "^0.
|
|
98
|
+
"@atlaskit/editor-plugin-media": "^0.11.0",
|
|
98
99
|
"@atlaskit/editor-plugin-mentions": "^0.1.0",
|
|
99
100
|
"@atlaskit/editor-plugin-panel": "^0.2.0",
|
|
100
101
|
"@atlaskit/editor-plugin-paste": "^0.2.0",
|
|
@@ -122,7 +123,7 @@
|
|
|
122
123
|
"@atlaskit/editor-shared-styles": "^2.9.0",
|
|
123
124
|
"@atlaskit/emoji": "^67.6.0",
|
|
124
125
|
"@atlaskit/icon": "^22.0.0",
|
|
125
|
-
"@atlaskit/logo": "^13.
|
|
126
|
+
"@atlaskit/logo": "^13.15.0",
|
|
126
127
|
"@atlaskit/media-card": "^77.6.0",
|
|
127
128
|
"@atlaskit/mention": "^22.1.0",
|
|
128
129
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
@@ -366,6 +367,18 @@
|
|
|
366
367
|
"platform.editor.ordered-list-inserting-nodes_bh0vo": {
|
|
367
368
|
"type": "boolean",
|
|
368
369
|
"referenceOnly": "true"
|
|
370
|
+
},
|
|
371
|
+
"platform.editor.allow-action-in-list": {
|
|
372
|
+
"type": "boolean",
|
|
373
|
+
"referenceOnly": "true"
|
|
374
|
+
},
|
|
375
|
+
"platform.editor.allow-extended-panel": {
|
|
376
|
+
"type": "boolean",
|
|
377
|
+
"referenceOnly": "true"
|
|
378
|
+
},
|
|
379
|
+
"platform.editor.ally-media-file-dropdown_1kxo8": {
|
|
380
|
+
"type": "boolean",
|
|
381
|
+
"referenceOnly": "true"
|
|
369
382
|
}
|
|
370
383
|
}
|
|
371
384
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _BeforePrimaryToolbarWrapper = require("./ui/BeforePrimaryToolbarWrapper");
|
|
10
|
-
var beforePrimaryToolbar = function beforePrimaryToolbar(_ref) {
|
|
11
|
-
var props = _ref.config;
|
|
12
|
-
return {
|
|
13
|
-
name: 'beforePrimaryToolbar',
|
|
14
|
-
primaryToolbarComponent: function primaryToolbarComponent() {
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_BeforePrimaryToolbarWrapper.BeforePrimaryToolbarWrapper, {
|
|
16
|
-
beforePrimaryToolbarComponents: props === null || props === void 0 ? void 0 : props.beforePrimaryToolbarComponents
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
var _default = exports.default = beforePrimaryToolbar;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.BeforePrimaryToolbarWrapper = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
var _templateObject;
|
|
11
|
-
/** @jsx jsx */
|
|
12
|
-
var beforePrimaryToolbarPluginWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-right: ", ";\n flex-grow: 1;\n justify-content: flex-end;\n align-items: center;\n"])), "var(--ds-space-100, 8px)");
|
|
13
|
-
var BeforePrimaryToolbarWrapper = exports.BeforePrimaryToolbarWrapper = function BeforePrimaryToolbarWrapper(props) {
|
|
14
|
-
return (0, _react.jsx)("div", {
|
|
15
|
-
css: beforePrimaryToolbarPluginWrapper,
|
|
16
|
-
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
17
|
-
}, props.beforePrimaryToolbarComponents);
|
|
18
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BeforePrimaryToolbarWrapper } from './ui/BeforePrimaryToolbarWrapper';
|
|
3
|
-
const beforePrimaryToolbar = ({
|
|
4
|
-
config: props
|
|
5
|
-
}) => ({
|
|
6
|
-
name: 'beforePrimaryToolbar',
|
|
7
|
-
primaryToolbarComponent() {
|
|
8
|
-
return /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
|
|
9
|
-
beforePrimaryToolbarComponents: props === null || props === void 0 ? void 0 : props.beforePrimaryToolbarComponents
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
export default beforePrimaryToolbar;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import { css, jsx } from '@emotion/react';
|
|
3
|
-
const beforePrimaryToolbarPluginWrapper = css`
|
|
4
|
-
display: flex;
|
|
5
|
-
margin-right: ${"var(--ds-space-100, 8px)"};
|
|
6
|
-
flex-grow: 1;
|
|
7
|
-
justify-content: flex-end;
|
|
8
|
-
align-items: center;
|
|
9
|
-
`;
|
|
10
|
-
export const BeforePrimaryToolbarWrapper = props => jsx("div", {
|
|
11
|
-
css: beforePrimaryToolbarPluginWrapper,
|
|
12
|
-
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
13
|
-
}, props.beforePrimaryToolbarComponents);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BeforePrimaryToolbarWrapper } from './ui/BeforePrimaryToolbarWrapper';
|
|
3
|
-
var beforePrimaryToolbar = function beforePrimaryToolbar(_ref) {
|
|
4
|
-
var props = _ref.config;
|
|
5
|
-
return {
|
|
6
|
-
name: 'beforePrimaryToolbar',
|
|
7
|
-
primaryToolbarComponent: function primaryToolbarComponent() {
|
|
8
|
-
return /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
|
|
9
|
-
beforePrimaryToolbarComponents: props === null || props === void 0 ? void 0 : props.beforePrimaryToolbarComponents
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export default beforePrimaryToolbar;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
|
-
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
5
|
-
var beforePrimaryToolbarPluginWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n margin-right: ", ";\n flex-grow: 1;\n justify-content: flex-end;\n align-items: center;\n"])), "var(--ds-space-100, 8px)");
|
|
6
|
-
export var BeforePrimaryToolbarWrapper = function BeforePrimaryToolbarWrapper(props) {
|
|
7
|
-
return jsx("div", {
|
|
8
|
-
css: beforePrimaryToolbarPluginWrapper,
|
|
9
|
-
"data-testid": 'before-primary-toolbar-components-plugin'
|
|
10
|
-
}, props.beforePrimaryToolbarComponents);
|
|
11
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
type Config = {
|
|
3
|
-
beforePrimaryToolbarComponents?: any;
|
|
4
|
-
};
|
|
5
|
-
declare const beforePrimaryToolbar: NextEditorPlugin<'beforePrimaryToolbar', {
|
|
6
|
-
pluginConfiguration: Config;
|
|
7
|
-
}>;
|
|
8
|
-
export default beforePrimaryToolbar;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
type Config = {
|
|
3
|
-
beforePrimaryToolbarComponents?: any;
|
|
4
|
-
};
|
|
5
|
-
declare const beforePrimaryToolbar: NextEditorPlugin<'beforePrimaryToolbar', {
|
|
6
|
-
pluginConfiguration: Config;
|
|
7
|
-
}>;
|
|
8
|
-
export default beforePrimaryToolbar;
|