@atlaskit/emoji 67.8.2 → 67.8.4
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 +20 -0
- package/dist/cjs/components/common/Emoji.js +4 -3
- package/dist/cjs/components/common/ResourcedEmoji.js +4 -17
- package/dist/cjs/components/common/Scrollable.js +3 -3
- package/dist/cjs/components/i18n.js +5 -3
- package/dist/cjs/components/picker/EmojiPickerListSearch.js +2 -1
- package/dist/cjs/components/typeahead/EmojiTypeAheadItem.js +17 -9
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/cjs/util/is-ssr.js +20 -0
- package/dist/es2019/components/common/Emoji.js +4 -3
- package/dist/es2019/components/common/ResourcedEmoji.js +1 -5
- package/dist/es2019/components/common/Scrollable.js +3 -3
- package/dist/es2019/components/i18n.js +5 -3
- package/dist/es2019/components/picker/EmojiPickerListSearch.js +2 -1
- package/dist/es2019/components/typeahead/EmojiTypeAheadItem.js +11 -3
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/es2019/util/is-ssr.js +14 -0
- package/dist/esm/components/common/Emoji.js +4 -3
- package/dist/esm/components/common/ResourcedEmoji.js +1 -11
- package/dist/esm/components/common/Scrollable.js +3 -3
- package/dist/esm/components/i18n.js +5 -3
- package/dist/esm/components/picker/EmojiPickerListSearch.js +2 -1
- package/dist/esm/components/typeahead/EmojiTypeAheadItem.js +16 -9
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/esm/util/is-ssr.js +14 -0
- package/dist/types/components/common/ResourcedEmoji.d.ts +1 -1
- package/dist/types/components/common/ToneSelector.d.ts +1 -1
- package/dist/types/components/i18n.d.ts +0 -5
- package/dist/types/components/typeahead/EmojiTypeAheadItem.d.ts +3 -7
- package/dist/types/util/is-ssr.d.ts +1 -0
- package/dist/types/util/type-helpers.d.ts +1 -1
- package/dist/types-ts4.5/components/common/ResourcedEmoji.d.ts +1 -1
- package/dist/types-ts4.5/components/common/ToneSelector.d.ts +1 -1
- package/dist/types-ts4.5/components/i18n.d.ts +0 -5
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadItem.d.ts +3 -7
- package/dist/types-ts4.5/util/is-ssr.d.ts +1 -0
- package/dist/types-ts4.5/util/type-helpers.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 67.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#151009](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151009)
|
|
8
|
+
[`5b6829417c2e1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5b6829417c2e1) -
|
|
9
|
+
Ignore emoji img element in TTVC
|
|
10
|
+
- [#150635](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/150635)
|
|
11
|
+
[`a9a115fa11aa0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a9a115fa11aa0) -
|
|
12
|
+
remove findDOMNode in emoji typeahead
|
|
13
|
+
|
|
14
|
+
## 67.8.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [#148344](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/148344)
|
|
19
|
+
[`980b03261e807`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/980b03261e807) -
|
|
20
|
+
Skipping duplicated resource id for now
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 67.8.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -12,7 +12,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
17
16
|
var _EmojiUtils = require("../../api/EmojiUtils");
|
|
18
17
|
var _constants = require("../../util/constants");
|
|
@@ -26,6 +25,7 @@ var _browserSupport = _interopRequireDefault(require("../../util/browser-support
|
|
|
26
25
|
var _useInView3 = require("../../hooks/useInView");
|
|
27
26
|
var _ufoExperiences = require("../../util/analytics/ufoExperiences");
|
|
28
27
|
var _DeletableEmojiTooltipContent = require("./DeletableEmojiTooltipContent");
|
|
28
|
+
var _isSsr = require("../../util/is-ssr");
|
|
29
29
|
var _excluded = ["emoji", "fitToHeight", "selected", "selectOnHover", "className", "showTooltip", "showDelete", "shouldBeInteractive", "tabIndex", "onSelected", "onMouseMove", "onFocus", "onDelete", "onLoadError", "onLoadSuccess", "disableLazyLoad", "autoWidth", "children", "type", "editorEmoji"];
|
|
30
30
|
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); }
|
|
31
31
|
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; }
|
|
@@ -172,7 +172,8 @@ var ImageEmoji = exports.ImageEmoji = function ImageEmoji(props) {
|
|
|
172
172
|
if (fitToHeight && width && height) {
|
|
173
173
|
// Presize image, to prevent reflow due to size changes after loading
|
|
174
174
|
sizing = {
|
|
175
|
-
|
|
175
|
+
// Size of <img> needs to be deterministic when rendered on server-side. Auto will cause width to be 0 before image is loaded.
|
|
176
|
+
width: autoWidth && !(0, _isSsr.isSSR)() ? 'auto' : fitToHeight / height * width,
|
|
176
177
|
height: fitToHeight
|
|
177
178
|
};
|
|
178
179
|
}
|
|
@@ -225,7 +226,7 @@ var ImageEmoji = exports.ImageEmoji = function ImageEmoji(props) {
|
|
|
225
226
|
loading: disableLazyLoad ? 'eager' : 'lazy',
|
|
226
227
|
src: src,
|
|
227
228
|
key: src,
|
|
228
|
-
alt:
|
|
229
|
+
alt: emoji.name || emoji.shortName,
|
|
229
230
|
"data-emoji-short-name": emoji.shortName,
|
|
230
231
|
"data-emoji-id": emoji.id,
|
|
231
232
|
"data-emoji-text": emoji.fallback || emoji.shortName
|
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var
|
|
9
|
+
var _ResourcedEmojiComponent = require("./ResourcedEmojiComponent");
|
|
11
10
|
var _UfoErrorBoundary = require("./UfoErrorBoundary");
|
|
12
11
|
var _analytics = require("../../util/analytics");
|
|
13
12
|
var _constants = require("../../util/constants");
|
|
14
13
|
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); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (
|
|
16
|
-
var ResourcedEmojiComponent = (0, _reactLoadable.default)({
|
|
17
|
-
loader: function loader() {
|
|
18
|
-
return Promise.resolve().then(function () {
|
|
19
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_resourcedEmojiComponent" */'./ResourcedEmojiComponent'));
|
|
20
|
-
}).then(function (component) {
|
|
21
|
-
return component.ResourcedEmojiComponent;
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
loading: function loading() {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
14
|
+
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; }
|
|
28
15
|
var ResourcedEmoji = function ResourcedEmoji(props) {
|
|
29
16
|
var emojiId = props.emojiId,
|
|
30
17
|
optimisticImageURL = props.optimisticImageURL;
|
|
@@ -51,6 +38,6 @@ var ResourcedEmoji = function ResourcedEmoji(props) {
|
|
|
51
38
|
}, [emojiId, optimisticImageURL]);
|
|
52
39
|
return /*#__PURE__*/_react.default.createElement(_UfoErrorBoundary.UfoErrorBoundary, {
|
|
53
40
|
experiences: [_analytics.ufoExperiences['emoji-rendered'].getInstance(props.emojiId.id || props.emojiId.shortName)]
|
|
54
|
-
}, /*#__PURE__*/_react.default.createElement(ResourcedEmojiComponent, props));
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_ResourcedEmojiComponent.ResourcedEmojiComponent, props));
|
|
55
42
|
};
|
|
56
43
|
var _default = exports.default = ResourcedEmoji;
|
|
@@ -14,9 +14,10 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
14
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = require("@emotion/react");
|
|
17
|
-
var _reactDom = require("react-dom");
|
|
18
17
|
var _react2 = require("react");
|
|
19
18
|
var styles = _interopRequireWildcard(require("./styles"));
|
|
19
|
+
var _reactDom = require("react-dom");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
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); }
|
|
21
22
|
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; }
|
|
22
23
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
@@ -39,11 +40,10 @@ var Scrollable = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
|
39
40
|
// API
|
|
40
41
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "reveal", function (child, forceToTop) {
|
|
41
42
|
if (child && _this.scrollableDiv) {
|
|
42
|
-
var childNode = (0, _reactDom.findDOMNode)(child);
|
|
43
43
|
// Not using Element.scrollIntoView as it scrolls even to top/bottom of view even if
|
|
44
44
|
// already visible
|
|
45
45
|
var scrollableRect = _this.scrollableDiv.getBoundingClientRect();
|
|
46
|
-
var elementRect =
|
|
46
|
+
var elementRect = (0, _platformFeatureFlags.fg)('platform_editor_react18_phase2') ? child.getBoundingClientRect() : (0, _reactDom.findDOMNode)(child).getBoundingClientRect();
|
|
47
47
|
if (forceToTop || elementRect.top < scrollableRect.top) {
|
|
48
48
|
_this.scrollableDiv.scrollTop += elementRect.top - scrollableRect.top;
|
|
49
49
|
} else if (elementRect.bottom > scrollableRect.bottom) {
|
|
@@ -106,11 +106,13 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
106
106
|
defaultMessage: 'Emoji name',
|
|
107
107
|
description: 'verb - button label to search'
|
|
108
108
|
},
|
|
109
|
+
/*
|
|
109
110
|
searchResultsStatus: {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
id: 'fabric.emoji.search.status',
|
|
112
|
+
defaultMessage: 'Found {count} emojis',
|
|
113
|
+
description: 'search results status for screenreader to read out',
|
|
113
114
|
},
|
|
115
|
+
*/
|
|
114
116
|
searchResultsStatusSeeAll: {
|
|
115
117
|
id: 'fabric.emoji.search.status',
|
|
116
118
|
defaultMessage: 'Seeing all emojis',
|
|
@@ -71,7 +71,8 @@ var EmojiPickerListSearch = exports.EmojiPickerListSearch = function EmojiPicker
|
|
|
71
71
|
}, (0, _react.jsx)(_visuallyHidden.default, {
|
|
72
72
|
id: "emoji-search-results-status",
|
|
73
73
|
role: "status"
|
|
74
|
-
}, dirty && query === '' && formatMessage(_i18n.messages.searchResultsStatusSeeAll), query !== '' && formatMessage(_i18n.messages.
|
|
74
|
+
}, dirty && query === '' && formatMessage(_i18n.messages.searchResultsStatusSeeAll), query !== '' && formatMessage(_i18n.messages.searchResultsStatusSeeAll, {
|
|
75
|
+
// change to messages.searchResultsStatus once translated
|
|
75
76
|
count: resultsCount
|
|
76
77
|
})), (0, _react.jsx)(_textfield.default, {
|
|
77
78
|
role: "searchbox",
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
12
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
@@ -27,12 +28,12 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
27
28
|
* @jsxRuntime classic
|
|
28
29
|
* @jsx jsx
|
|
29
30
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
|
-
var
|
|
31
|
-
(0, _inherits2.default)(
|
|
32
|
-
var _super = _createSuper(
|
|
33
|
-
function
|
|
31
|
+
var EmojiTypeAheadItemInternal = /*#__PURE__*/function (_PureComponent) {
|
|
32
|
+
(0, _inherits2.default)(EmojiTypeAheadItemInternal, _PureComponent);
|
|
33
|
+
var _super = _createSuper(EmojiTypeAheadItemInternal);
|
|
34
|
+
function EmojiTypeAheadItemInternal() {
|
|
34
35
|
var _this;
|
|
35
|
-
(0, _classCallCheck2.default)(this,
|
|
36
|
+
(0, _classCallCheck2.default)(this, EmojiTypeAheadItemInternal);
|
|
36
37
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
38
|
args[_key] = arguments[_key];
|
|
38
39
|
}
|
|
@@ -57,7 +58,7 @@ var EmojiTypeAheadItem = exports.default = /*#__PURE__*/function (_PureComponent
|
|
|
57
58
|
});
|
|
58
59
|
return _this;
|
|
59
60
|
}
|
|
60
|
-
(0, _createClass2.default)(
|
|
61
|
+
(0, _createClass2.default)(EmojiTypeAheadItemInternal, [{
|
|
61
62
|
key: "render",
|
|
62
63
|
value: function render() {
|
|
63
64
|
var _this$props3 = this.props,
|
|
@@ -75,7 +76,8 @@ var EmojiTypeAheadItem = exports.default = /*#__PURE__*/function (_PureComponent
|
|
|
75
76
|
css: classes,
|
|
76
77
|
onMouseDown: this.onEmojiSelected,
|
|
77
78
|
onMouseMove: this.onEmojiMenuItemMouseMove,
|
|
78
|
-
"data-emoji-id": emoji.shortName
|
|
79
|
+
"data-emoji-id": emoji.shortName,
|
|
80
|
+
ref: this.props.forwardedRef
|
|
79
81
|
}, (0, _react2.jsx)("div", {
|
|
80
82
|
css: _styles.typeAheadItemRow
|
|
81
83
|
}, emoji && (0, _react2.jsx)(_EmojiPreviewComponent.EmojiPreviewComponent, {
|
|
@@ -83,5 +85,11 @@ var EmojiTypeAheadItem = exports.default = /*#__PURE__*/function (_PureComponent
|
|
|
83
85
|
}))));
|
|
84
86
|
}
|
|
85
87
|
}]);
|
|
86
|
-
return
|
|
87
|
-
}(_react.PureComponent);
|
|
88
|
+
return EmojiTypeAheadItemInternal;
|
|
89
|
+
}(_react.PureComponent);
|
|
90
|
+
var EmojiTypeAheadItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
91
|
+
return (0, _react2.jsx)(EmojiTypeAheadItemInternal, (0, _extends2.default)({}, props, {
|
|
92
|
+
forwardedRef: ref
|
|
93
|
+
}));
|
|
94
|
+
});
|
|
95
|
+
var _default = exports.default = EmojiTypeAheadItem;
|
|
@@ -19,7 +19,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
19
19
|
actionSubjectId: actionSubjectId,
|
|
20
20
|
attributes: _objectSpread({
|
|
21
21
|
packageName: "@atlaskit/emoji",
|
|
22
|
-
packageVersion: "67.8.
|
|
22
|
+
packageVersion: "67.8.4"
|
|
23
23
|
}, attributes)
|
|
24
24
|
};
|
|
25
25
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isSSR = isSSR;
|
|
7
|
+
function isSSR() {
|
|
8
|
+
try {
|
|
9
|
+
var _process;
|
|
10
|
+
return Boolean(
|
|
11
|
+
// In most places there is no document when running on server-side
|
|
12
|
+
typeof document === 'undefined' ||
|
|
13
|
+
// When SSRing editor with full cycle mode we define the document
|
|
14
|
+
// Check Confluence specific environment variable
|
|
15
|
+
typeof process !== 'undefined' && ((_process = process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.REACT_SSR));
|
|
16
|
+
} catch (e) {
|
|
17
|
+
// Catch possible error that might occur and just return false
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -6,7 +6,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
6
6
|
import React, { useEffect, useCallback, forwardRef } from 'react';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
10
|
import { shouldUseAltRepresentation } from '../../api/EmojiUtils';
|
|
12
11
|
import { deleteEmojiLabel, EMOJI_KEYBOARD_KEYS_SUPPORTED, KeyboardKeys, SAMPLING_RATE_EMOJI_RENDERED_EXP } from '../../util/constants';
|
|
@@ -20,6 +19,7 @@ import browserSupport from '../../util/browser-support';
|
|
|
20
19
|
import { useInView } from '../../hooks/useInView';
|
|
21
20
|
import { hasUfoMarked } from '../../util/analytics/ufoExperiences';
|
|
22
21
|
import { DeletableEmojiTooltipContent, DeletableEmojiTooltipContentForScreenReader } from './DeletableEmojiTooltipContent';
|
|
22
|
+
import { isSSR } from '../../util/is-ssr';
|
|
23
23
|
const handleMouseDown = (props, event) => {
|
|
24
24
|
// Clicked emoji delete button
|
|
25
25
|
if (event.target instanceof Element && event.target.getAttribute('aria-label') === deleteEmojiLabel) {
|
|
@@ -172,7 +172,8 @@ export const ImageEmoji = props => {
|
|
|
172
172
|
if (fitToHeight && width && height) {
|
|
173
173
|
// Presize image, to prevent reflow due to size changes after loading
|
|
174
174
|
sizing = {
|
|
175
|
-
|
|
175
|
+
// Size of <img> needs to be deterministic when rendered on server-side. Auto will cause width to be 0 before image is loaded.
|
|
176
|
+
width: autoWidth && !isSSR() ? 'auto' : fitToHeight / height * width,
|
|
176
177
|
height: fitToHeight
|
|
177
178
|
};
|
|
178
179
|
}
|
|
@@ -221,7 +222,7 @@ export const ImageEmoji = props => {
|
|
|
221
222
|
loading: disableLazyLoad ? 'eager' : 'lazy',
|
|
222
223
|
src: src,
|
|
223
224
|
key: src,
|
|
224
|
-
alt:
|
|
225
|
+
alt: emoji.name || emoji.shortName,
|
|
225
226
|
"data-emoji-short-name": emoji.shortName,
|
|
226
227
|
"data-emoji-id": emoji.id,
|
|
227
228
|
"data-emoji-text": emoji.fallback || emoji.shortName
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { ResourcedEmojiComponent } from './ResourcedEmojiComponent';
|
|
3
3
|
import { UfoErrorBoundary } from './UfoErrorBoundary';
|
|
4
4
|
import { sampledUfoRenderedEmoji, ufoExperiences } from '../../util/analytics';
|
|
5
5
|
import { SAMPLING_RATE_EMOJI_RENDERED_EXP } from '../../util/constants';
|
|
6
|
-
const ResourcedEmojiComponent = Loadable({
|
|
7
|
-
loader: () => import( /* webpackChunkName: "@atlaskit-internal_resourcedEmojiComponent" */'./ResourcedEmojiComponent').then(component => component.ResourcedEmojiComponent),
|
|
8
|
-
loading: () => null
|
|
9
|
-
});
|
|
10
6
|
const ResourcedEmoji = props => {
|
|
11
7
|
const {
|
|
12
8
|
emojiId,
|
|
@@ -7,9 +7,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
*/
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
|
-
import { findDOMNode } from 'react-dom';
|
|
11
10
|
import { PureComponent } from 'react';
|
|
12
11
|
import * as styles from './styles';
|
|
12
|
+
import { findDOMNode } from 'react-dom';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
export default class Scrollable extends PureComponent {
|
|
14
15
|
constructor(...args) {
|
|
15
16
|
super(...args);
|
|
@@ -17,11 +18,10 @@ export default class Scrollable extends PureComponent {
|
|
|
17
18
|
// API
|
|
18
19
|
_defineProperty(this, "reveal", (child, forceToTop) => {
|
|
19
20
|
if (child && this.scrollableDiv) {
|
|
20
|
-
const childNode = findDOMNode(child);
|
|
21
21
|
// Not using Element.scrollIntoView as it scrolls even to top/bottom of view even if
|
|
22
22
|
// already visible
|
|
23
23
|
const scrollableRect = this.scrollableDiv.getBoundingClientRect();
|
|
24
|
-
const elementRect =
|
|
24
|
+
const elementRect = fg('platform_editor_react18_phase2') ? child.getBoundingClientRect() : findDOMNode(child).getBoundingClientRect();
|
|
25
25
|
if (forceToTop || elementRect.top < scrollableRect.top) {
|
|
26
26
|
this.scrollableDiv.scrollTop += elementRect.top - scrollableRect.top;
|
|
27
27
|
} else if (elementRect.bottom > scrollableRect.bottom) {
|
|
@@ -100,11 +100,13 @@ export const messages = defineMessages({
|
|
|
100
100
|
defaultMessage: 'Emoji name',
|
|
101
101
|
description: 'verb - button label to search'
|
|
102
102
|
},
|
|
103
|
+
/*
|
|
103
104
|
searchResultsStatus: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
id: 'fabric.emoji.search.status',
|
|
106
|
+
defaultMessage: 'Found {count} emojis',
|
|
107
|
+
description: 'search results status for screenreader to read out',
|
|
107
108
|
},
|
|
109
|
+
*/
|
|
108
110
|
searchResultsStatusSeeAll: {
|
|
109
111
|
id: 'fabric.emoji.search.status',
|
|
110
112
|
defaultMessage: 'Seeing all emojis',
|
|
@@ -55,7 +55,8 @@ export const EmojiPickerListSearch = props => {
|
|
|
55
55
|
}, jsx(VisuallyHidden, {
|
|
56
56
|
id: "emoji-search-results-status",
|
|
57
57
|
role: "status"
|
|
58
|
-
}, dirty && query === '' && formatMessage(messages.searchResultsStatusSeeAll), query !== '' && formatMessage(messages.
|
|
58
|
+
}, dirty && query === '' && formatMessage(messages.searchResultsStatusSeeAll), query !== '' && formatMessage(messages.searchResultsStatusSeeAll, {
|
|
59
|
+
// change to messages.searchResultsStatus once translated
|
|
59
60
|
count: resultsCount
|
|
60
61
|
})), jsx(TextField, {
|
|
61
62
|
role: "searchbox",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
/**
|
|
3
4
|
* @jsxRuntime classic
|
|
@@ -12,7 +13,7 @@ import { leftClick } from '../../util/mouse';
|
|
|
12
13
|
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
13
14
|
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
14
15
|
import { typeAheadItem, selected as selectedStyles, typeAheadItemRow, typeaheadSelected } from './styles';
|
|
15
|
-
|
|
16
|
+
class EmojiTypeAheadItemInternal extends PureComponent {
|
|
16
17
|
constructor(...args) {
|
|
17
18
|
super(...args);
|
|
18
19
|
// internal, used for callbacks
|
|
@@ -53,11 +54,18 @@ export default class EmojiTypeAheadItem extends PureComponent {
|
|
|
53
54
|
css: classes,
|
|
54
55
|
onMouseDown: this.onEmojiSelected,
|
|
55
56
|
onMouseMove: this.onEmojiMenuItemMouseMove,
|
|
56
|
-
"data-emoji-id": emoji.shortName
|
|
57
|
+
"data-emoji-id": emoji.shortName,
|
|
58
|
+
ref: this.props.forwardedRef
|
|
57
59
|
}, jsx("div", {
|
|
58
60
|
css: typeAheadItemRow
|
|
59
61
|
}, emoji && jsx(EmojiPreviewComponent, {
|
|
60
62
|
emoji: emoji
|
|
61
63
|
}))));
|
|
62
64
|
}
|
|
63
|
-
}
|
|
65
|
+
}
|
|
66
|
+
const EmojiTypeAheadItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
67
|
+
return jsx(EmojiTypeAheadItemInternal, _extends({}, props, {
|
|
68
|
+
forwardedRef: ref
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
71
|
+
export default EmojiTypeAheadItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function isSSR() {
|
|
2
|
+
try {
|
|
3
|
+
var _process, _process$env;
|
|
4
|
+
return Boolean(
|
|
5
|
+
// In most places there is no document when running on server-side
|
|
6
|
+
typeof document === 'undefined' ||
|
|
7
|
+
// When SSRing editor with full cycle mode we define the document
|
|
8
|
+
// Check Confluence specific environment variable
|
|
9
|
+
typeof process !== 'undefined' && ((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR));
|
|
10
|
+
} catch (e) {
|
|
11
|
+
// Catch possible error that might occur and just return false
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -12,7 +12,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
12
12
|
import React, { useEffect, useCallback, forwardRef } from 'react';
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
14
|
import { jsx } from '@emotion/react';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
17
16
|
import { shouldUseAltRepresentation } from '../../api/EmojiUtils';
|
|
18
17
|
import { deleteEmojiLabel, EMOJI_KEYBOARD_KEYS_SUPPORTED, KeyboardKeys, SAMPLING_RATE_EMOJI_RENDERED_EXP } from '../../util/constants';
|
|
@@ -26,6 +25,7 @@ import browserSupport from '../../util/browser-support';
|
|
|
26
25
|
import { useInView } from '../../hooks/useInView';
|
|
27
26
|
import { hasUfoMarked } from '../../util/analytics/ufoExperiences';
|
|
28
27
|
import { DeletableEmojiTooltipContent, DeletableEmojiTooltipContentForScreenReader } from './DeletableEmojiTooltipContent';
|
|
28
|
+
import { isSSR } from '../../util/is-ssr';
|
|
29
29
|
var handleMouseDown = function handleMouseDown(props, event) {
|
|
30
30
|
// Clicked emoji delete button
|
|
31
31
|
if (event.target instanceof Element && event.target.getAttribute('aria-label') === deleteEmojiLabel) {
|
|
@@ -164,7 +164,8 @@ export var ImageEmoji = function ImageEmoji(props) {
|
|
|
164
164
|
if (fitToHeight && width && height) {
|
|
165
165
|
// Presize image, to prevent reflow due to size changes after loading
|
|
166
166
|
sizing = {
|
|
167
|
-
|
|
167
|
+
// Size of <img> needs to be deterministic when rendered on server-side. Auto will cause width to be 0 before image is loaded.
|
|
168
|
+
width: autoWidth && !isSSR() ? 'auto' : fitToHeight / height * width,
|
|
168
169
|
height: fitToHeight
|
|
169
170
|
};
|
|
170
171
|
}
|
|
@@ -217,7 +218,7 @@ export var ImageEmoji = function ImageEmoji(props) {
|
|
|
217
218
|
loading: disableLazyLoad ? 'eager' : 'lazy',
|
|
218
219
|
src: src,
|
|
219
220
|
key: src,
|
|
220
|
-
alt:
|
|
221
|
+
alt: emoji.name || emoji.shortName,
|
|
221
222
|
"data-emoji-short-name": emoji.shortName,
|
|
222
223
|
"data-emoji-id": emoji.id,
|
|
223
224
|
"data-emoji-text": emoji.fallback || emoji.shortName
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { ResourcedEmojiComponent } from './ResourcedEmojiComponent';
|
|
3
3
|
import { UfoErrorBoundary } from './UfoErrorBoundary';
|
|
4
4
|
import { sampledUfoRenderedEmoji, ufoExperiences } from '../../util/analytics';
|
|
5
5
|
import { SAMPLING_RATE_EMOJI_RENDERED_EXP } from '../../util/constants';
|
|
6
|
-
var ResourcedEmojiComponent = Loadable({
|
|
7
|
-
loader: function loader() {
|
|
8
|
-
return import( /* webpackChunkName: "@atlaskit-internal_resourcedEmojiComponent" */'./ResourcedEmojiComponent').then(function (component) {
|
|
9
|
-
return component.ResourcedEmojiComponent;
|
|
10
|
-
});
|
|
11
|
-
},
|
|
12
|
-
loading: function loading() {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
6
|
var ResourcedEmoji = function ResourcedEmoji(props) {
|
|
17
7
|
var emojiId = props.emojiId,
|
|
18
8
|
optimisticImageURL = props.optimisticImageURL;
|
|
@@ -15,9 +15,10 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
15
15
|
*/
|
|
16
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
17
|
import { jsx } from '@emotion/react';
|
|
18
|
-
import { findDOMNode } from 'react-dom';
|
|
19
18
|
import { PureComponent } from 'react';
|
|
20
19
|
import * as styles from './styles';
|
|
20
|
+
import { findDOMNode } from 'react-dom';
|
|
21
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
22
|
var Scrollable = /*#__PURE__*/function (_PureComponent) {
|
|
22
23
|
_inherits(Scrollable, _PureComponent);
|
|
23
24
|
var _super = _createSuper(Scrollable);
|
|
@@ -32,11 +33,10 @@ var Scrollable = /*#__PURE__*/function (_PureComponent) {
|
|
|
32
33
|
// API
|
|
33
34
|
_defineProperty(_assertThisInitialized(_this), "reveal", function (child, forceToTop) {
|
|
34
35
|
if (child && _this.scrollableDiv) {
|
|
35
|
-
var childNode = findDOMNode(child);
|
|
36
36
|
// Not using Element.scrollIntoView as it scrolls even to top/bottom of view even if
|
|
37
37
|
// already visible
|
|
38
38
|
var scrollableRect = _this.scrollableDiv.getBoundingClientRect();
|
|
39
|
-
var elementRect =
|
|
39
|
+
var elementRect = fg('platform_editor_react18_phase2') ? child.getBoundingClientRect() : findDOMNode(child).getBoundingClientRect();
|
|
40
40
|
if (forceToTop || elementRect.top < scrollableRect.top) {
|
|
41
41
|
_this.scrollableDiv.scrollTop += elementRect.top - scrollableRect.top;
|
|
42
42
|
} else if (elementRect.bottom > scrollableRect.bottom) {
|
|
@@ -100,11 +100,13 @@ export var messages = defineMessages({
|
|
|
100
100
|
defaultMessage: 'Emoji name',
|
|
101
101
|
description: 'verb - button label to search'
|
|
102
102
|
},
|
|
103
|
+
/*
|
|
103
104
|
searchResultsStatus: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
id: 'fabric.emoji.search.status',
|
|
106
|
+
defaultMessage: 'Found {count} emojis',
|
|
107
|
+
description: 'search results status for screenreader to read out',
|
|
107
108
|
},
|
|
109
|
+
*/
|
|
108
110
|
searchResultsStatusSeeAll: {
|
|
109
111
|
id: 'fabric.emoji.search.status',
|
|
110
112
|
defaultMessage: 'Seeing all emojis',
|
|
@@ -59,7 +59,8 @@ export var EmojiPickerListSearch = function EmojiPickerListSearch(props) {
|
|
|
59
59
|
}, jsx(VisuallyHidden, {
|
|
60
60
|
id: "emoji-search-results-status",
|
|
61
61
|
role: "status"
|
|
62
|
-
}, dirty && query === '' && formatMessage(messages.searchResultsStatusSeeAll), query !== '' && formatMessage(messages.
|
|
62
|
+
}, dirty && query === '' && formatMessage(messages.searchResultsStatusSeeAll), query !== '' && formatMessage(messages.searchResultsStatusSeeAll, {
|
|
63
|
+
// change to messages.searchResultsStatus once translated
|
|
63
64
|
count: resultsCount
|
|
64
65
|
})), jsx(TextField, {
|
|
65
66
|
role: "searchbox",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
4
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -20,12 +21,12 @@ import { leftClick } from '../../util/mouse';
|
|
|
20
21
|
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
21
22
|
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
22
23
|
import { typeAheadItem, selected as selectedStyles, typeAheadItemRow, typeaheadSelected } from './styles';
|
|
23
|
-
var
|
|
24
|
-
_inherits(
|
|
25
|
-
var _super = _createSuper(
|
|
26
|
-
function
|
|
24
|
+
var EmojiTypeAheadItemInternal = /*#__PURE__*/function (_PureComponent) {
|
|
25
|
+
_inherits(EmojiTypeAheadItemInternal, _PureComponent);
|
|
26
|
+
var _super = _createSuper(EmojiTypeAheadItemInternal);
|
|
27
|
+
function EmojiTypeAheadItemInternal() {
|
|
27
28
|
var _this;
|
|
28
|
-
_classCallCheck(this,
|
|
29
|
+
_classCallCheck(this, EmojiTypeAheadItemInternal);
|
|
29
30
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
31
|
args[_key] = arguments[_key];
|
|
31
32
|
}
|
|
@@ -50,7 +51,7 @@ var EmojiTypeAheadItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
50
51
|
});
|
|
51
52
|
return _this;
|
|
52
53
|
}
|
|
53
|
-
_createClass(
|
|
54
|
+
_createClass(EmojiTypeAheadItemInternal, [{
|
|
54
55
|
key: "render",
|
|
55
56
|
value: function render() {
|
|
56
57
|
var _this$props3 = this.props,
|
|
@@ -68,7 +69,8 @@ var EmojiTypeAheadItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
68
69
|
css: classes,
|
|
69
70
|
onMouseDown: this.onEmojiSelected,
|
|
70
71
|
onMouseMove: this.onEmojiMenuItemMouseMove,
|
|
71
|
-
"data-emoji-id": emoji.shortName
|
|
72
|
+
"data-emoji-id": emoji.shortName,
|
|
73
|
+
ref: this.props.forwardedRef
|
|
72
74
|
}, jsx("div", {
|
|
73
75
|
css: typeAheadItemRow
|
|
74
76
|
}, emoji && jsx(EmojiPreviewComponent, {
|
|
@@ -76,6 +78,11 @@ var EmojiTypeAheadItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
76
78
|
}))));
|
|
77
79
|
}
|
|
78
80
|
}]);
|
|
79
|
-
return
|
|
81
|
+
return EmojiTypeAheadItemInternal;
|
|
80
82
|
}(PureComponent);
|
|
81
|
-
|
|
83
|
+
var EmojiTypeAheadItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
84
|
+
return jsx(EmojiTypeAheadItemInternal, _extends({}, props, {
|
|
85
|
+
forwardedRef: ref
|
|
86
|
+
}));
|
|
87
|
+
});
|
|
88
|
+
export default EmojiTypeAheadItem;
|
|
@@ -12,7 +12,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
12
12
|
actionSubjectId: actionSubjectId,
|
|
13
13
|
attributes: _objectSpread({
|
|
14
14
|
packageName: "@atlaskit/emoji",
|
|
15
|
-
packageVersion: "67.8.
|
|
15
|
+
packageVersion: "67.8.4"
|
|
16
16
|
}, attributes)
|
|
17
17
|
};
|
|
18
18
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function isSSR() {
|
|
2
|
+
try {
|
|
3
|
+
var _process;
|
|
4
|
+
return Boolean(
|
|
5
|
+
// In most places there is no document when running on server-side
|
|
6
|
+
typeof document === 'undefined' ||
|
|
7
|
+
// When SSRing editor with full cycle mode we define the document
|
|
8
|
+
// Check Confluence specific environment variable
|
|
9
|
+
typeof process !== 'undefined' && ((_process = process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.REACT_SSR));
|
|
10
|
+
} catch (e) {
|
|
11
|
+
// Catch possible error that might occur and just return false
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type Props as ResourcedEmojiProps } from './ResourcedEmojiComponent';
|
|
3
3
|
export interface Props extends ResourcedEmojiProps {
|
|
4
4
|
}
|
|
5
5
|
declare const ResourcedEmoji: (props: React.PropsWithChildren<Props>) => JSX.Element;
|
|
@@ -16,5 +16,5 @@ export interface Props {
|
|
|
16
16
|
export declare const toneSelectorTestId = "tone-selector";
|
|
17
17
|
type PropsWithAnalyticsEventsPropsType = Props & WithAnalyticsEventsProps;
|
|
18
18
|
export declare const ToneSelectorInternal: (props: PropsWithAnalyticsEventsPropsType) => jsx.JSX.Element;
|
|
19
|
-
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<Props
|
|
19
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any>>>;
|
|
20
20
|
export default _default;
|
|
@@ -99,11 +99,6 @@ export declare const messages: {
|
|
|
99
99
|
defaultMessage: string;
|
|
100
100
|
description: string;
|
|
101
101
|
};
|
|
102
|
-
searchResultsStatus: {
|
|
103
|
-
id: string;
|
|
104
|
-
defaultMessage: string;
|
|
105
|
-
description: string;
|
|
106
|
-
};
|
|
107
102
|
searchResultsStatusSeeAll: {
|
|
108
103
|
id: string;
|
|
109
104
|
defaultMessage: string;
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { PureComponent } from 'react';
|
|
8
6
|
import type { EmojiDescription, EmojiProvider, OnEmojiEvent } from '../../types';
|
|
9
7
|
export interface Props {
|
|
10
8
|
onMouseMove: OnEmojiEvent;
|
|
@@ -12,9 +10,7 @@ export interface Props {
|
|
|
12
10
|
selected: boolean;
|
|
13
11
|
emoji: EmojiDescription;
|
|
14
12
|
emojiProvider?: EmojiProvider;
|
|
13
|
+
forwardedRef?: React.Ref<HTMLDivElement>;
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
onEmojiMenuItemMouseMove: React.MouseEventHandler<HTMLDivElement>;
|
|
19
|
-
render(): jsx.JSX.Element;
|
|
20
|
-
}
|
|
15
|
+
declare const EmojiTypeAheadItem: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export default EmojiTypeAheadItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSSR(): boolean;
|
|
@@ -11,7 +11,7 @@ export declare const hasDataURLImage: (rep: EmojiRepresentation) => boolean;
|
|
|
11
11
|
export declare const isLoadedMediaEmoji: (emoji: EmojiDescription) => boolean;
|
|
12
12
|
export declare const isEmojiDescriptionWithVariations: (emoji: OptionalEmojiDescription) => emoji is EmojiDescriptionWithVariations;
|
|
13
13
|
export declare const isEmojiVariationDescription: (object: any) => object is EmojiVariationDescription;
|
|
14
|
-
export declare const isMessagesKey: (key: string) => key is "deleteEmojiTooltip" | "deleteEmojiTooltipForScreenreader" | "deleteEmojiTitle" | "deleteEmojiDescription" | "deleteEmojiLabel" | "addCustomEmojiLabel" | "emojiPlaceholder" | "emojiNameAriaLabel" | "emojiChooseFileTitle" | "emojiChooseFileScreenReaderDescription" | "emojiSelectSkinToneButtonAriaLabelText" | "emojiSelectSkinToneListAriaLabelText" | "emojiImageRequirements" | "emojiPreviewTitle" | "emojiPreview" | "addEmojiLabel" | "retryLabel" | "cancelLabel" | "searchPlaceholder" | "searchLabel" | "
|
|
14
|
+
export declare const isMessagesKey: (key: string) => key is "deleteEmojiTooltip" | "deleteEmojiTooltipForScreenreader" | "deleteEmojiTitle" | "deleteEmojiDescription" | "deleteEmojiLabel" | "addCustomEmojiLabel" | "emojiPlaceholder" | "emojiNameAriaLabel" | "emojiChooseFileTitle" | "emojiChooseFileScreenReaderDescription" | "emojiSelectSkinToneButtonAriaLabelText" | "emojiSelectSkinToneListAriaLabelText" | "emojiImageRequirements" | "emojiPreviewTitle" | "emojiPreview" | "addEmojiLabel" | "retryLabel" | "cancelLabel" | "searchPlaceholder" | "searchLabel" | "searchResultsStatusSeeAll" | "categoriesSelectorLabel" | "categoriesSearchResults" | "frequentCategory" | "peopleCategory" | "natureCategory" | "foodsCategory" | "activityCategory" | "placesCategory" | "objectsCategory" | "symbolsCategory" | "flagsCategory" | "productivityCategory" | "userUploadsCustomCategory" | "allUploadsCustomCategory" | "deleteEmojiFailed" | "emojiInvalidImage" | "emojiUploadFailed" | "emojiImageTooBig" | "emojiPickerTitle" | "emojiPickerListPanel" | "emojiPickerGrid" | "emojiButtonRoleDescription" | "error";
|
|
15
15
|
export declare const toEmojiId: (emoji: EmojiDescription) => EmojiId;
|
|
16
16
|
export declare const toOptionalEmojiId: (emoji: OptionalEmojiDescription) => EmojiId | undefined;
|
|
17
17
|
export declare const isEmojiIdEqual: (l?: EmojiId, r?: EmojiId) => boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type Props as ResourcedEmojiProps } from './ResourcedEmojiComponent';
|
|
3
3
|
export interface Props extends ResourcedEmojiProps {
|
|
4
4
|
}
|
|
5
5
|
declare const ResourcedEmoji: (props: React.PropsWithChildren<Props>) => JSX.Element;
|
|
@@ -16,5 +16,5 @@ export interface Props {
|
|
|
16
16
|
export declare const toneSelectorTestId = "tone-selector";
|
|
17
17
|
type PropsWithAnalyticsEventsPropsType = Props & WithAnalyticsEventsProps;
|
|
18
18
|
export declare const ToneSelectorInternal: (props: PropsWithAnalyticsEventsPropsType) => jsx.JSX.Element;
|
|
19
|
-
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<Props
|
|
19
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<Props, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any>>>;
|
|
20
20
|
export default _default;
|
|
@@ -99,11 +99,6 @@ export declare const messages: {
|
|
|
99
99
|
defaultMessage: string;
|
|
100
100
|
description: string;
|
|
101
101
|
};
|
|
102
|
-
searchResultsStatus: {
|
|
103
|
-
id: string;
|
|
104
|
-
defaultMessage: string;
|
|
105
|
-
description: string;
|
|
106
|
-
};
|
|
107
102
|
searchResultsStatusSeeAll: {
|
|
108
103
|
id: string;
|
|
109
104
|
defaultMessage: string;
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
|
-
import { PureComponent } from 'react';
|
|
8
6
|
import type { EmojiDescription, EmojiProvider, OnEmojiEvent } from '../../types';
|
|
9
7
|
export interface Props {
|
|
10
8
|
onMouseMove: OnEmojiEvent;
|
|
@@ -12,9 +10,7 @@ export interface Props {
|
|
|
12
10
|
selected: boolean;
|
|
13
11
|
emoji: EmojiDescription;
|
|
14
12
|
emojiProvider?: EmojiProvider;
|
|
13
|
+
forwardedRef?: React.Ref<HTMLDivElement>;
|
|
15
14
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
onEmojiMenuItemMouseMove: React.MouseEventHandler<HTMLDivElement>;
|
|
19
|
-
render(): jsx.JSX.Element;
|
|
20
|
-
}
|
|
15
|
+
declare const EmojiTypeAheadItem: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export default EmojiTypeAheadItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSSR(): boolean;
|
|
@@ -11,7 +11,7 @@ export declare const hasDataURLImage: (rep: EmojiRepresentation) => boolean;
|
|
|
11
11
|
export declare const isLoadedMediaEmoji: (emoji: EmojiDescription) => boolean;
|
|
12
12
|
export declare const isEmojiDescriptionWithVariations: (emoji: OptionalEmojiDescription) => emoji is EmojiDescriptionWithVariations;
|
|
13
13
|
export declare const isEmojiVariationDescription: (object: any) => object is EmojiVariationDescription;
|
|
14
|
-
export declare const isMessagesKey: (key: string) => key is "deleteEmojiTooltip" | "deleteEmojiTooltipForScreenreader" | "deleteEmojiTitle" | "deleteEmojiDescription" | "deleteEmojiLabel" | "addCustomEmojiLabel" | "emojiPlaceholder" | "emojiNameAriaLabel" | "emojiChooseFileTitle" | "emojiChooseFileScreenReaderDescription" | "emojiSelectSkinToneButtonAriaLabelText" | "emojiSelectSkinToneListAriaLabelText" | "emojiImageRequirements" | "emojiPreviewTitle" | "emojiPreview" | "addEmojiLabel" | "retryLabel" | "cancelLabel" | "searchPlaceholder" | "searchLabel" | "
|
|
14
|
+
export declare const isMessagesKey: (key: string) => key is "deleteEmojiTooltip" | "deleteEmojiTooltipForScreenreader" | "deleteEmojiTitle" | "deleteEmojiDescription" | "deleteEmojiLabel" | "addCustomEmojiLabel" | "emojiPlaceholder" | "emojiNameAriaLabel" | "emojiChooseFileTitle" | "emojiChooseFileScreenReaderDescription" | "emojiSelectSkinToneButtonAriaLabelText" | "emojiSelectSkinToneListAriaLabelText" | "emojiImageRequirements" | "emojiPreviewTitle" | "emojiPreview" | "addEmojiLabel" | "retryLabel" | "cancelLabel" | "searchPlaceholder" | "searchLabel" | "searchResultsStatusSeeAll" | "categoriesSelectorLabel" | "categoriesSearchResults" | "frequentCategory" | "peopleCategory" | "natureCategory" | "foodsCategory" | "activityCategory" | "placesCategory" | "objectsCategory" | "symbolsCategory" | "flagsCategory" | "productivityCategory" | "userUploadsCustomCategory" | "allUploadsCustomCategory" | "deleteEmojiFailed" | "emojiInvalidImage" | "emojiUploadFailed" | "emojiImageTooBig" | "emojiPickerTitle" | "emojiPickerListPanel" | "emojiPickerGrid" | "emojiButtonRoleDescription" | "error";
|
|
15
15
|
export declare const toEmojiId: (emoji: EmojiDescription) => EmojiId;
|
|
16
16
|
export declare const toOptionalEmojiId: (emoji: OptionalEmojiDescription) => EmojiId | undefined;
|
|
17
17
|
export declare const isEmojiIdEqual: (l?: EmojiId, r?: EmojiId) => boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "67.8.
|
|
3
|
+
"version": "67.8.4",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
37
37
|
"@atlaskit/button": "^20.2.0",
|
|
38
|
-
"@atlaskit/icon": "^22.
|
|
38
|
+
"@atlaskit/icon": "^22.22.0",
|
|
39
39
|
"@atlaskit/media-client": "^28.0.0",
|
|
40
40
|
"@atlaskit/media-client-react": "^2.2.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/textfield": "^6.5.0",
|
|
45
45
|
"@atlaskit/theme": "^13.0.0",
|
|
46
46
|
"@atlaskit/tokens": "^2.0.0",
|
|
47
|
-
"@atlaskit/tooltip": "^18.
|
|
47
|
+
"@atlaskit/tooltip": "^18.8.0",
|
|
48
48
|
"@atlaskit/ufo": "^0.3.0",
|
|
49
49
|
"@atlaskit/util-service-support": "^6.2.0",
|
|
50
50
|
"@atlaskit/visually-hidden": "^1.5.0",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"platform_index_emoji_just_in_time": {
|
|
121
121
|
"type": "boolean"
|
|
122
122
|
},
|
|
123
|
-
"
|
|
123
|
+
"platform_editor_react18_phase2": {
|
|
124
124
|
"type": "boolean"
|
|
125
125
|
}
|
|
126
126
|
},
|