@atlaskit/editor-plugin-emoji 3.5.4 → 3.6.1
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/ui/InlineEmojiPopup.js +24 -20
- package/dist/es2019/ui/InlineEmojiPopup.js +26 -22
- package/dist/esm/ui/InlineEmojiPopup.js +26 -22
- package/dist/types/emojiPluginType.d.ts +3 -1
- package/dist/types-ts4.5/emojiPluginType.d.ts +3 -1
- package/package.json +16 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-emoji
|
|
2
2
|
|
|
3
|
+
## 3.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#144658](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144658)
|
|
8
|
+
[`e59e7f0ae0803`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e59e7f0ae0803) -
|
|
9
|
+
Change to use getDomRefFromSelection utility from editor-common
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 3.6.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#139089](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139089)
|
|
17
|
+
[`69dcdc0c4a543`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/69dcdc0c4a543) -
|
|
18
|
+
ED-26588 Start activity session and persist active session when type ahead and element broswer is
|
|
19
|
+
open
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 3.5.4
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -8,28 +8,16 @@ exports.InlineEmojiPopup = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
|
+
var _getDomRefFromSelection = require("@atlaskit/editor-common/get-dom-ref-from-selection");
|
|
11
12
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
12
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
13
14
|
var _uiReact = require("@atlaskit/editor-common/ui-react");
|
|
14
|
-
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
15
15
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
16
16
|
var _emoji = require("@atlaskit/emoji");
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
20
|
var PopupWithListeners = (0, _uiReact.withReactEditorViewOuterListeners)(_ui.Popup);
|
|
20
|
-
var getDomRefFromSelection = function getDomRefFromSelection(view) {
|
|
21
|
-
var domRef = (0, _utils.findDomRefAtPos)(view.state.selection.from, view.domAtPos.bind(view));
|
|
22
|
-
if (domRef instanceof HTMLElement) {
|
|
23
|
-
if (domRef.nodeName !== 'P') {
|
|
24
|
-
var paragraphRef = domRef.closest('p');
|
|
25
|
-
if (paragraphRef) {
|
|
26
|
-
return paragraphRef;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return domRef;
|
|
30
|
-
}
|
|
31
|
-
throw new Error('Invalid DOM reference');
|
|
32
|
-
};
|
|
33
21
|
var emojiPopupMessages = {
|
|
34
22
|
emojiPickerAriaLabel: {
|
|
35
23
|
id: 'fabric.emoji.picker.aria.label',
|
|
@@ -38,7 +26,7 @@ var emojiPopupMessages = {
|
|
|
38
26
|
}
|
|
39
27
|
};
|
|
40
28
|
var InlineEmojiPopup = exports.InlineEmojiPopup = function InlineEmojiPopup(_ref) {
|
|
41
|
-
var _useSharedPluginState, _useSharedPluginState2;
|
|
29
|
+
var _useSharedPluginState, _useSharedPluginState2, _api$analytics;
|
|
42
30
|
var api = _ref.api,
|
|
43
31
|
popupsMountPoint = _ref.popupsMountPoint,
|
|
44
32
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
@@ -49,6 +37,22 @@ var InlineEmojiPopup = exports.InlineEmojiPopup = function InlineEmojiPopup(_ref
|
|
|
49
37
|
emojiProvider = _ref2.emojiProvider,
|
|
50
38
|
isOpen = _ref2.inlineEmojiPopupOpen;
|
|
51
39
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
40
|
+
var handleOnClose = (0, _react.useCallback)(function () {
|
|
41
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_ease_of_use_metrics')) {
|
|
42
|
+
var _api$metrics;
|
|
43
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 ? void 0 : _api$metrics.commands.startActiveSessionTimer());
|
|
44
|
+
}
|
|
45
|
+
onClose();
|
|
46
|
+
}, [onClose, api]);
|
|
47
|
+
(0, _react.useEffect)(function () {
|
|
48
|
+
if (isOpen && (0, _platformFeatureFlags.fg)('platform_editor_ease_of_use_metrics')) {
|
|
49
|
+
var _api$metrics2;
|
|
50
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$metrics2 = api.metrics) === null || _api$metrics2 === void 0 ? void 0 : _api$metrics2.commands.handleIntentToStartEdit({
|
|
51
|
+
shouldStartTimer: false,
|
|
52
|
+
shouldPersistActiveSession: true
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
}, [isOpen, api]);
|
|
52
56
|
var focusEditor = (0, _react.useCallback)(function () {
|
|
53
57
|
// use requestAnimationFrame to run this async after the call
|
|
54
58
|
requestAnimationFrame(function () {
|
|
@@ -57,12 +61,12 @@ var InlineEmojiPopup = exports.InlineEmojiPopup = function InlineEmojiPopup(_ref
|
|
|
57
61
|
}, [editorView]);
|
|
58
62
|
var handleSelection = (0, _react.useCallback)(function (emojiId) {
|
|
59
63
|
api.core.actions.execute(api.emoji.commands.insertEmoji(emojiId, _analytics.INPUT_METHOD.PICKER));
|
|
60
|
-
|
|
61
|
-
}, [api.core.actions, api.emoji.commands,
|
|
64
|
+
handleOnClose();
|
|
65
|
+
}, [api.core.actions, api.emoji.commands, handleOnClose]);
|
|
62
66
|
if (!isOpen || !emojiProvider) {
|
|
63
67
|
return null;
|
|
64
68
|
}
|
|
65
|
-
var domRef = getDomRefFromSelection(editorView);
|
|
69
|
+
var domRef = (0, _getDomRefFromSelection.getDomRefFromSelection)(editorView, _analytics.ACTION_SUBJECT_ID.PICKER_EMOJI, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
66
70
|
return /*#__PURE__*/_react.default.createElement(PopupWithListeners, {
|
|
67
71
|
ariaLabel: intl.formatMessage(emojiPopupMessages.emojiPickerAriaLabel),
|
|
68
72
|
offset: [0, 12],
|
|
@@ -76,8 +80,8 @@ var InlineEmojiPopup = exports.InlineEmojiPopup = function InlineEmojiPopup(_ref
|
|
|
76
80
|
onUnmount: focusEditor,
|
|
77
81
|
focusTrap: true,
|
|
78
82
|
preventOverflow: true,
|
|
79
|
-
handleClickOutside:
|
|
80
|
-
handleEscapeKeydown:
|
|
83
|
+
handleClickOutside: handleOnClose,
|
|
84
|
+
handleEscapeKeydown: handleOnClose,
|
|
81
85
|
captureClick: true
|
|
82
86
|
}, /*#__PURE__*/_react.default.createElement(_uiReact.OutsideClickTargetRefContext.Consumer, null, function (setOutsideClickTargetRef) {
|
|
83
87
|
return /*#__PURE__*/_react.default.createElement(_emoji.EmojiPicker, {
|
|
@@ -1,26 +1,14 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { ACTION_SUBJECT_ID, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { getDomRefFromSelection } from '@atlaskit/editor-common/get-dom-ref-from-selection';
|
|
4
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
6
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
6
7
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
7
|
-
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { EmojiPicker } from '@atlaskit/emoji';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
const PopupWithListeners = withOuterListeners(Popup);
|
|
11
|
-
const getDomRefFromSelection = view => {
|
|
12
|
-
const domRef = findDomRefAtPos(view.state.selection.from, view.domAtPos.bind(view));
|
|
13
|
-
if (domRef instanceof HTMLElement) {
|
|
14
|
-
if (domRef.nodeName !== 'P') {
|
|
15
|
-
const paragraphRef = domRef.closest('p');
|
|
16
|
-
if (paragraphRef) {
|
|
17
|
-
return paragraphRef;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return domRef;
|
|
21
|
-
}
|
|
22
|
-
throw new Error('Invalid DOM reference');
|
|
23
|
-
};
|
|
24
12
|
const emojiPopupMessages = {
|
|
25
13
|
emojiPickerAriaLabel: {
|
|
26
14
|
id: 'fabric.emoji.picker.aria.label',
|
|
@@ -36,24 +24,40 @@ export const InlineEmojiPopup = ({
|
|
|
36
24
|
editorView,
|
|
37
25
|
onClose
|
|
38
26
|
}) => {
|
|
39
|
-
var _useSharedPluginState, _useSharedPluginState2;
|
|
27
|
+
var _useSharedPluginState, _useSharedPluginState2, _api$analytics;
|
|
40
28
|
const {
|
|
41
29
|
emojiProvider,
|
|
42
30
|
inlineEmojiPopupOpen: isOpen
|
|
43
31
|
} = (_useSharedPluginState = (_useSharedPluginState2 = useSharedPluginState(api, ['emoji'])) === null || _useSharedPluginState2 === void 0 ? void 0 : _useSharedPluginState2.emojiState) !== null && _useSharedPluginState !== void 0 ? _useSharedPluginState : {};
|
|
44
32
|
const intl = useIntl();
|
|
33
|
+
const handleOnClose = useCallback(() => {
|
|
34
|
+
if (fg('platform_editor_ease_of_use_metrics')) {
|
|
35
|
+
var _api$metrics;
|
|
36
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$metrics = api.metrics) === null || _api$metrics === void 0 ? void 0 : _api$metrics.commands.startActiveSessionTimer());
|
|
37
|
+
}
|
|
38
|
+
onClose();
|
|
39
|
+
}, [onClose, api]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (isOpen && fg('platform_editor_ease_of_use_metrics')) {
|
|
42
|
+
var _api$metrics2;
|
|
43
|
+
api === null || api === void 0 ? void 0 : api.core.actions.execute(api === null || api === void 0 ? void 0 : (_api$metrics2 = api.metrics) === null || _api$metrics2 === void 0 ? void 0 : _api$metrics2.commands.handleIntentToStartEdit({
|
|
44
|
+
shouldStartTimer: false,
|
|
45
|
+
shouldPersistActiveSession: true
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}, [isOpen, api]);
|
|
45
49
|
const focusEditor = useCallback(() => {
|
|
46
50
|
// use requestAnimationFrame to run this async after the call
|
|
47
51
|
requestAnimationFrame(() => editorView.focus());
|
|
48
52
|
}, [editorView]);
|
|
49
53
|
const handleSelection = useCallback(emojiId => {
|
|
50
54
|
api.core.actions.execute(api.emoji.commands.insertEmoji(emojiId, INPUT_METHOD.PICKER));
|
|
51
|
-
|
|
52
|
-
}, [api.core.actions, api.emoji.commands,
|
|
55
|
+
handleOnClose();
|
|
56
|
+
}, [api.core.actions, api.emoji.commands, handleOnClose]);
|
|
53
57
|
if (!isOpen || !emojiProvider) {
|
|
54
58
|
return null;
|
|
55
59
|
}
|
|
56
|
-
const domRef = getDomRefFromSelection(editorView);
|
|
60
|
+
const domRef = getDomRefFromSelection(editorView, ACTION_SUBJECT_ID.PICKER_EMOJI, api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
57
61
|
return /*#__PURE__*/React.createElement(PopupWithListeners, {
|
|
58
62
|
ariaLabel: intl.formatMessage(emojiPopupMessages.emojiPickerAriaLabel),
|
|
59
63
|
offset: [0, 12],
|
|
@@ -67,8 +71,8 @@ export const InlineEmojiPopup = ({
|
|
|
67
71
|
onUnmount: focusEditor,
|
|
68
72
|
focusTrap: true,
|
|
69
73
|
preventOverflow: true,
|
|
70
|
-
handleClickOutside:
|
|
71
|
-
handleEscapeKeydown:
|
|
74
|
+
handleClickOutside: handleOnClose,
|
|
75
|
+
handleEscapeKeydown: handleOnClose,
|
|
72
76
|
captureClick: true
|
|
73
77
|
}, /*#__PURE__*/React.createElement(OutsideClickTargetRefContext.Consumer, null, setOutsideClickTargetRef => /*#__PURE__*/React.createElement(EmojiPicker, {
|
|
74
78
|
emojiProvider: Promise.resolve(emojiProvider),
|
|
@@ -1,26 +1,14 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
+
import { ACTION_SUBJECT_ID, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { getDomRefFromSelection } from '@atlaskit/editor-common/get-dom-ref-from-selection';
|
|
4
5
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
5
6
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
6
7
|
import { OutsideClickTargetRefContext, withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
|
|
7
|
-
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
8
8
|
import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { EmojiPicker } from '@atlaskit/emoji';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
var PopupWithListeners = withOuterListeners(Popup);
|
|
11
|
-
var getDomRefFromSelection = function getDomRefFromSelection(view) {
|
|
12
|
-
var domRef = findDomRefAtPos(view.state.selection.from, view.domAtPos.bind(view));
|
|
13
|
-
if (domRef instanceof HTMLElement) {
|
|
14
|
-
if (domRef.nodeName !== 'P') {
|
|
15
|
-
var paragraphRef = domRef.closest('p');
|
|
16
|
-
if (paragraphRef) {
|
|
17
|
-
return paragraphRef;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return domRef;
|
|
21
|
-
}
|
|
22
|
-
throw new Error('Invalid DOM reference');
|
|
23
|
-
};
|
|
24
12
|
var emojiPopupMessages = {
|
|
25
13
|
emojiPickerAriaLabel: {
|
|
26
14
|
id: 'fabric.emoji.picker.aria.label',
|
|
@@ -29,7 +17,7 @@ var emojiPopupMessages = {
|
|
|
29
17
|
}
|
|
30
18
|
};
|
|
31
19
|
export var InlineEmojiPopup = function InlineEmojiPopup(_ref) {
|
|
32
|
-
var _useSharedPluginState, _useSharedPluginState2;
|
|
20
|
+
var _useSharedPluginState, _useSharedPluginState2, _api$analytics;
|
|
33
21
|
var api = _ref.api,
|
|
34
22
|
popupsMountPoint = _ref.popupsMountPoint,
|
|
35
23
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
@@ -40,6 +28,22 @@ export var InlineEmojiPopup = function InlineEmojiPopup(_ref) {
|
|
|
40
28
|
emojiProvider = _ref2.emojiProvider,
|
|
41
29
|
isOpen = _ref2.inlineEmojiPopupOpen;
|
|
42
30
|
var intl = useIntl();
|
|
31
|
+
var handleOnClose = useCallback(function () {
|
|
32
|
+
if (fg('platform_editor_ease_of_use_metrics')) {
|
|
33
|
+
var _api$metrics;
|
|
34
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 ? void 0 : _api$metrics.commands.startActiveSessionTimer());
|
|
35
|
+
}
|
|
36
|
+
onClose();
|
|
37
|
+
}, [onClose, api]);
|
|
38
|
+
useEffect(function () {
|
|
39
|
+
if (isOpen && fg('platform_editor_ease_of_use_metrics')) {
|
|
40
|
+
var _api$metrics2;
|
|
41
|
+
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 || (_api$metrics2 = api.metrics) === null || _api$metrics2 === void 0 ? void 0 : _api$metrics2.commands.handleIntentToStartEdit({
|
|
42
|
+
shouldStartTimer: false,
|
|
43
|
+
shouldPersistActiveSession: true
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
}, [isOpen, api]);
|
|
43
47
|
var focusEditor = useCallback(function () {
|
|
44
48
|
// use requestAnimationFrame to run this async after the call
|
|
45
49
|
requestAnimationFrame(function () {
|
|
@@ -48,12 +52,12 @@ export var InlineEmojiPopup = function InlineEmojiPopup(_ref) {
|
|
|
48
52
|
}, [editorView]);
|
|
49
53
|
var handleSelection = useCallback(function (emojiId) {
|
|
50
54
|
api.core.actions.execute(api.emoji.commands.insertEmoji(emojiId, INPUT_METHOD.PICKER));
|
|
51
|
-
|
|
52
|
-
}, [api.core.actions, api.emoji.commands,
|
|
55
|
+
handleOnClose();
|
|
56
|
+
}, [api.core.actions, api.emoji.commands, handleOnClose]);
|
|
53
57
|
if (!isOpen || !emojiProvider) {
|
|
54
58
|
return null;
|
|
55
59
|
}
|
|
56
|
-
var domRef = getDomRefFromSelection(editorView);
|
|
60
|
+
var domRef = getDomRefFromSelection(editorView, ACTION_SUBJECT_ID.PICKER_EMOJI, api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions);
|
|
57
61
|
return /*#__PURE__*/React.createElement(PopupWithListeners, {
|
|
58
62
|
ariaLabel: intl.formatMessage(emojiPopupMessages.emojiPickerAriaLabel),
|
|
59
63
|
offset: [0, 12],
|
|
@@ -67,8 +71,8 @@ export var InlineEmojiPopup = function InlineEmojiPopup(_ref) {
|
|
|
67
71
|
onUnmount: focusEditor,
|
|
68
72
|
focusTrap: true,
|
|
69
73
|
preventOverflow: true,
|
|
70
|
-
handleClickOutside:
|
|
71
|
-
handleEscapeKeydown:
|
|
74
|
+
handleClickOutside: handleOnClose,
|
|
75
|
+
handleEscapeKeydown: handleOnClose,
|
|
72
76
|
captureClick: true
|
|
73
77
|
}, /*#__PURE__*/React.createElement(OutsideClickTargetRefContext.Consumer, null, function (setOutsideClickTargetRef) {
|
|
74
78
|
return /*#__PURE__*/React.createElement(EmojiPicker, {
|
|
@@ -4,6 +4,7 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
4
4
|
import type { InlineCommentInputMethod, InlineCommentMap } from '@atlaskit/editor-plugin-annotation';
|
|
5
5
|
import type { BasePlugin } from '@atlaskit/editor-plugin-base';
|
|
6
6
|
import { type EditorViewModePluginState } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
7
|
+
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
7
8
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
8
9
|
import type { SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
|
|
9
10
|
import type { EmojiDescription, EmojiId, EmojiProvider, EmojiResourceConfig } from '@atlaskit/emoji';
|
|
@@ -51,7 +52,8 @@ export type EmojiPluginDependencies = [
|
|
|
51
52
|
TypeAheadPlugin,
|
|
52
53
|
OptionalPlugin<AnnotationPluginType>,
|
|
53
54
|
OptionalPlugin<EditorViewModePluginType>,
|
|
54
|
-
OptionalPlugin<BasePlugin
|
|
55
|
+
OptionalPlugin<BasePlugin>,
|
|
56
|
+
OptionalPlugin<MetricsPlugin>
|
|
55
57
|
];
|
|
56
58
|
export type EmojiPlugin = NextEditorPlugin<'emoji', {
|
|
57
59
|
pluginConfiguration: EmojiPluginOptions | undefined;
|
|
@@ -4,6 +4,7 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
4
4
|
import type { InlineCommentInputMethod, InlineCommentMap } from '@atlaskit/editor-plugin-annotation';
|
|
5
5
|
import type { BasePlugin } from '@atlaskit/editor-plugin-base';
|
|
6
6
|
import { type EditorViewModePluginState } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
7
|
+
import type { MetricsPlugin } from '@atlaskit/editor-plugin-metrics';
|
|
7
8
|
import type { TypeAheadInputMethod, TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
8
9
|
import type { SelectionBookmark } from '@atlaskit/editor-prosemirror/state';
|
|
9
10
|
import type { EmojiDescription, EmojiId, EmojiProvider, EmojiResourceConfig } from '@atlaskit/emoji';
|
|
@@ -51,7 +52,8 @@ export type EmojiPluginDependencies = [
|
|
|
51
52
|
TypeAheadPlugin,
|
|
52
53
|
OptionalPlugin<AnnotationPluginType>,
|
|
53
54
|
OptionalPlugin<EditorViewModePluginType>,
|
|
54
|
-
OptionalPlugin<BasePlugin
|
|
55
|
+
OptionalPlugin<BasePlugin>,
|
|
56
|
+
OptionalPlugin<MetricsPlugin>
|
|
55
57
|
];
|
|
56
58
|
export type EmojiPlugin = NextEditorPlugin<'emoji', {
|
|
57
59
|
pluginConfiguration: EmojiPluginOptions | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-emoji",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "Emoji plugin for @atlaskit/editor-core",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,22 +23,23 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
26
|
-
"@atlaskit/editor-common": "^103.
|
|
26
|
+
"@atlaskit/editor-common": "^103.19.0",
|
|
27
27
|
"@atlaskit/editor-plugin-analytics": "^2.2.0",
|
|
28
|
-
"@atlaskit/editor-plugin-annotation": "^2.
|
|
28
|
+
"@atlaskit/editor-plugin-annotation": "^2.7.0",
|
|
29
29
|
"@atlaskit/editor-plugin-base": "^2.3.0",
|
|
30
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^3.
|
|
31
|
-
"@atlaskit/editor-plugin-
|
|
30
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^3.1.0",
|
|
31
|
+
"@atlaskit/editor-plugin-metrics": "^3.4.0",
|
|
32
|
+
"@atlaskit/editor-plugin-type-ahead": "^2.5.0",
|
|
32
33
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
33
34
|
"@atlaskit/editor-shared-styles": "^3.4.0",
|
|
34
|
-
"@atlaskit/emoji": "^69.
|
|
35
|
-
"@atlaskit/icon": "^25.
|
|
35
|
+
"@atlaskit/emoji": "^69.1.0",
|
|
36
|
+
"@atlaskit/icon": "^25.6.0",
|
|
36
37
|
"@atlaskit/node-data-provider": "^4.1.0",
|
|
37
38
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
39
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
39
40
|
"@atlaskit/theme": "^18.0.0",
|
|
40
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
41
|
-
"@atlaskit/tokens": "^4.
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^4.15.0",
|
|
42
|
+
"@atlaskit/tokens": "^4.8.0",
|
|
42
43
|
"@babel/runtime": "^7.0.0",
|
|
43
44
|
"@emotion/react": "^11.7.1",
|
|
44
45
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
@@ -49,12 +50,12 @@
|
|
|
49
50
|
"react-dom": "^18.2.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@af/visual-regression": "
|
|
53
|
+
"@af/visual-regression": "workspace:^",
|
|
53
54
|
"@atlaskit/editor-plugin-composition": "^1.3.0",
|
|
54
55
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
55
|
-
"@atlaskit/ssr": "
|
|
56
|
+
"@atlaskit/ssr": "workspace:^",
|
|
56
57
|
"@atlaskit/util-data-test": "^18.0.0",
|
|
57
|
-
"@atlaskit/visual-regression": "
|
|
58
|
+
"@atlaskit/visual-regression": "workspace:^",
|
|
58
59
|
"@testing-library/react": "^13.4.0",
|
|
59
60
|
"typescript": "~5.4.2",
|
|
60
61
|
"wait-for-expect": "^1.2.0"
|
|
@@ -109,6 +110,9 @@
|
|
|
109
110
|
"platform-feature-flags": {
|
|
110
111
|
"editor_inline_comments_paste_insert_nodes": {
|
|
111
112
|
"type": "boolean"
|
|
113
|
+
},
|
|
114
|
+
"platform_editor_ease_of_use_metrics": {
|
|
115
|
+
"type": "boolean"
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
118
|
}
|