@atlaskit/emoji 73.2.0 → 73.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/cjs/components/common/EmojiPreviewComponent.js +22 -1
- package/dist/cjs/components/common/ResourcedEmojiComponent.js +2 -35
- package/dist/cjs/util/analytics/createEvent.js +1 -1
- package/dist/es2019/components/common/EmojiPreviewComponent.js +20 -2
- package/dist/es2019/components/common/ResourcedEmojiComponent.js +2 -34
- package/dist/es2019/util/analytics/createEvent.js +1 -1
- package/dist/esm/components/common/EmojiPreviewComponent.js +22 -1
- package/dist/esm/components/common/ResourcedEmojiComponent.js +2 -35
- package/dist/esm/util/analytics/createEvent.js +1 -1
- package/dist/types/components/common/EmojiPreviewComponent.d.ts +1 -1
- package/package.json +4 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 73.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`69008f6bdcb98`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/69008f6bdcb98) -
|
|
8
|
+
Adjust all mention picker rows and emoji results to use 6px vertical padding, 8px between rows,
|
|
9
|
+
and 2px between primary and secondary text behind platform_editor_mentions_email_search.
|
|
10
|
+
|
|
11
|
+
Center the avatar and text within the 50px selection row and reserve the 8px gap outside the
|
|
12
|
+
selection and focus backgrounds.
|
|
13
|
+
|
|
14
|
+
Share the presentational picker row between mentions and emoji through
|
|
15
|
+
`@atlaskit/user-picker/picker-item-content`.
|
|
16
|
+
|
|
17
|
+
Apply the same gated preview spacing to the emoji picker footer, and use 12px horizontal padding
|
|
18
|
+
and avatar-to-text spacing for both mentions and emoji.
|
|
19
|
+
|
|
20
|
+
Consolidate byline formatting within the email-search layout, keeping the original byline
|
|
21
|
+
components in the legacy path and subtext presentation internal to each layout.
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
27
|
+
## 73.2.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- [`d5c2acafa064f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d5c2acafa064f) -
|
|
32
|
+
Cleanup feature gate `platform_emoji_prevent_img_src_changing_all`. Preserve optimistic emoji
|
|
33
|
+
images when catalogue data arrives on all surfaces.
|
|
34
|
+
|
|
3
35
|
## 73.2.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
|
@@ -10,6 +10,8 @@ exports.EmojiPreviewComponent = void 0;
|
|
|
10
10
|
require("./EmojiPreviewComponent.compiled.css");
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
14
|
+
var _pickerItemContent = require("@atlaskit/user-picker/picker-item-content");
|
|
13
15
|
var _CachingEmoji = _interopRequireDefault(require("./CachingEmoji"));
|
|
14
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
17
|
var emojiName = null;
|
|
@@ -17,7 +19,7 @@ var emojiShortName = null;
|
|
|
17
19
|
var preview = null;
|
|
18
20
|
var previewImg = null;
|
|
19
21
|
var previewText = null;
|
|
20
|
-
var
|
|
22
|
+
var EmojiPreviewComponentLegacy = function EmojiPreviewComponentLegacy(_ref) {
|
|
21
23
|
var emoji = _ref.emoji;
|
|
22
24
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
25
|
className: (0, _runtime.ax)(["_ca0q19bv _u5f319bv _n3td19bv _19bv19bv _1e0c1txw _2lx2vrvc _1n261q9c _4t3izwfg _4cvr1h6o"])
|
|
@@ -33,4 +35,23 @@ var EmojiPreviewComponent = exports.EmojiPreviewComponent = function EmojiPrevie
|
|
|
33
35
|
}, emoji.name), /*#__PURE__*/React.createElement("div", {
|
|
34
36
|
className: (0, _runtime.ax)(["_11c8wadc _1reo15vq _18m915vq _1e0c1ule _syazazsu _vwz4kb7n _otyr1i6y _n3tdv77o _1bto1l2s _o5721q9c _10hwfhey _pnmbi7uo"])
|
|
35
37
|
}, emoji.shortName)));
|
|
38
|
+
};
|
|
39
|
+
var previewImageNext = null;
|
|
40
|
+
var EmojiPreviewComponentNext = function EmojiPreviewComponentNext(_ref2) {
|
|
41
|
+
var emoji = _ref2.emoji;
|
|
42
|
+
return /*#__PURE__*/React.createElement(_pickerItemContent.PickerItemContent, {
|
|
43
|
+
avatar: /*#__PURE__*/React.createElement("span", {
|
|
44
|
+
className: (0, _runtime.ax)(["_1e0c1o8l _1bsbzwfg _12s6idpf _1e4didpf _1dvqidpf _vwlxidpf _1gdiidpf _1f45idpf _pdfdidpf _mwo3idpf _5ilezwfg _boltzwfg _1pc7zwfg _u5wqzwfg _w7981kw7 _1vqe1kw7 _1l4xidpf _1l79idpf _118didpf _1pa4idpf _1pglh2mm _1vjf1ssb _1h6o1ssb _8fp6dbra _1os4zwfg _1e7azwfg _7mh21ule", "_1e0c1txw"])
|
|
45
|
+
}, /*#__PURE__*/React.createElement(_CachingEmoji.default, {
|
|
46
|
+
key: emoji.id || emoji.shortName,
|
|
47
|
+
emoji: emoji
|
|
48
|
+
})),
|
|
49
|
+
title: emoji.name ? /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: (0, _runtime.ax)(["_1reo15vq _18m915vq _1e0c1ule _syazi7uo _1bto1l2s _o5721q9c _299mangw"])
|
|
51
|
+
}, emoji.name) : emoji.shortName,
|
|
52
|
+
subtext: emoji.name ? emoji.shortName : undefined
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
var EmojiPreviewComponent = exports.EmojiPreviewComponent = function EmojiPreviewComponent(props) {
|
|
56
|
+
return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mentions_email_search') ? /*#__PURE__*/React.createElement(EmojiPreviewComponentNext, props) : /*#__PURE__*/React.createElement(EmojiPreviewComponentLegacy, props);
|
|
36
57
|
};
|
|
@@ -10,7 +10,6 @@ exports.default = exports.ResourcedEmojiComponent = void 0;
|
|
|
10
10
|
require("./ResourcedEmojiComponent.compiled.css");
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
13
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
13
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -20,14 +19,10 @@ var _types = require("../../types");
|
|
|
20
19
|
var _hasUfoMarked = require("../../util/analytics/hasUfoMarked");
|
|
21
20
|
var _sampledUfoRenderedEmoji = require("../../util/analytics/sampledUfoRenderedEmoji");
|
|
22
21
|
var _constants = require("../../util/constants");
|
|
23
|
-
var _isImageRepresentation = require("../../util/is-image-representation");
|
|
24
|
-
var _isMediaRepresentation = require("../../util/is-media-representation");
|
|
25
22
|
var _isPromise = require("../../util/is-promise");
|
|
26
23
|
var _Emoji = _interopRequireDefault(require("./Emoji"));
|
|
27
24
|
var _EmojiPlaceholder = _interopRequireDefault(require("./EmojiPlaceholder"));
|
|
28
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
29
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
30
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
26
|
var ignoreWrapperStyles = null;
|
|
32
27
|
var ResourcedEmojiComponentRenderStatesEnum = /*#__PURE__*/function (ResourcedEmojiComponentRenderStatesEnum) {
|
|
33
28
|
ResourcedEmojiComponentRenderStatesEnum["INITIAL"] = "INITIAL";
|
|
@@ -208,8 +203,8 @@ var ResourcedEmojiComponent = exports.ResourcedEmojiComponent = function Resourc
|
|
|
208
203
|
}
|
|
209
204
|
};
|
|
210
205
|
}
|
|
211
|
-
//
|
|
212
|
-
if (optimisticImageURL
|
|
206
|
+
// Keep the optimistic representation stable when catalogue data arrives.
|
|
207
|
+
if (optimisticImageURL) {
|
|
213
208
|
return {
|
|
214
209
|
id: id,
|
|
215
210
|
shortName: shortName,
|
|
@@ -224,34 +219,6 @@ var ResourcedEmojiComponent = exports.ResourcedEmojiComponent = function Resourc
|
|
|
224
219
|
}
|
|
225
220
|
};
|
|
226
221
|
}
|
|
227
|
-
if (optimisticImageURL) {
|
|
228
|
-
if (emoji && ((0, _isImageRepresentation.isImageRepresentation)(emoji.representation) || (0, _isMediaRepresentation.isMediaRepresentation)(emoji === null || emoji === void 0 ? void 0 : emoji.representation))) {
|
|
229
|
-
var _emoji$representation = emoji.representation,
|
|
230
|
-
width = _emoji$representation.width,
|
|
231
|
-
height = _emoji$representation.height;
|
|
232
|
-
return _objectSpread(_objectSpread({}, emoji), {}, {
|
|
233
|
-
representation: {
|
|
234
|
-
width: width,
|
|
235
|
-
height: height,
|
|
236
|
-
imagePath: optimisticImageURL
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
} else {
|
|
240
|
-
return {
|
|
241
|
-
id: id,
|
|
242
|
-
shortName: shortName,
|
|
243
|
-
fallback: fallback,
|
|
244
|
-
type: '',
|
|
245
|
-
category: '',
|
|
246
|
-
representation: {
|
|
247
|
-
height: fitToHeight || _constants.defaultEmojiHeight,
|
|
248
|
-
width: fitToHeight || _constants.defaultEmojiHeight,
|
|
249
|
-
imagePath: optimisticImageURL
|
|
250
|
-
},
|
|
251
|
-
searchable: true
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
222
|
return emoji;
|
|
256
223
|
}, [emoji, optimisticImageURL, fallback, fitToHeight, id, shortName, pageTitleEmoji]);
|
|
257
224
|
var handleOnLoadError = (0, _react.useCallback)(function (emojiId) {
|
|
@@ -19,7 +19,7 @@ var createEvent = exports.createEvent = function createEvent(eventType, action,
|
|
|
19
19
|
actionSubjectId: actionSubjectId,
|
|
20
20
|
attributes: _objectSpread({
|
|
21
21
|
packageName: "@atlaskit/emoji",
|
|
22
|
-
packageVersion: "73.1
|
|
22
|
+
packageVersion: "73.2.1"
|
|
23
23
|
}, attributes)
|
|
24
24
|
};
|
|
25
25
|
};
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import "./EmojiPreviewComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
|
+
import { PickerItemContent } from '@atlaskit/user-picker/picker-item-content';
|
|
5
7
|
import CachingEmoji from './CachingEmoji';
|
|
6
8
|
const emojiName = null;
|
|
7
9
|
const emojiShortName = null;
|
|
8
10
|
const preview = null;
|
|
9
11
|
const previewImg = null;
|
|
10
12
|
const previewText = null;
|
|
11
|
-
|
|
13
|
+
const EmojiPreviewComponentLegacy = ({
|
|
12
14
|
emoji
|
|
13
15
|
}) => {
|
|
14
16
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -25,4 +27,20 @@ export const EmojiPreviewComponent = ({
|
|
|
25
27
|
}, emoji.name), /*#__PURE__*/React.createElement("div", {
|
|
26
28
|
className: ax(["_11c8wadc _1reo15vq _18m915vq _1e0c1ule _syazazsu _vwz4kb7n _otyr1i6y _n3tdv77o _1bto1l2s _o5721q9c _10hwfhey _pnmbi7uo"])
|
|
27
29
|
}, emoji.shortName)));
|
|
28
|
-
};
|
|
30
|
+
};
|
|
31
|
+
const previewImageNext = null;
|
|
32
|
+
const EmojiPreviewComponentNext = ({
|
|
33
|
+
emoji
|
|
34
|
+
}) => /*#__PURE__*/React.createElement(PickerItemContent, {
|
|
35
|
+
avatar: /*#__PURE__*/React.createElement("span", {
|
|
36
|
+
className: ax(["_1e0c1o8l _1bsbzwfg _12s6idpf _1e4didpf _1dvqidpf _vwlxidpf _1gdiidpf _1f45idpf _pdfdidpf _mwo3idpf _5ilezwfg _boltzwfg _1pc7zwfg _u5wqzwfg _w7981kw7 _1vqe1kw7 _1l4xidpf _1l79idpf _118didpf _1pa4idpf _1pglh2mm _1vjf1ssb _1h6o1ssb _8fp6dbra _1os4zwfg _1e7azwfg _7mh21ule", "_1e0c1txw"])
|
|
37
|
+
}, /*#__PURE__*/React.createElement(CachingEmoji, {
|
|
38
|
+
key: emoji.id || emoji.shortName,
|
|
39
|
+
emoji: emoji
|
|
40
|
+
})),
|
|
41
|
+
title: emoji.name ? /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: ax(["_1reo15vq _18m915vq _1e0c1ule _syazi7uo _1bto1l2s _o5721q9c _299mangw"])
|
|
43
|
+
}, emoji.name) : emoji.shortName,
|
|
44
|
+
subtext: emoji.name ? emoji.shortName : undefined
|
|
45
|
+
});
|
|
46
|
+
export const EmojiPreviewComponent = props => isExperimentEnabled('platform_editor_mentions_email_search') ? /*#__PURE__*/React.createElement(EmojiPreviewComponentNext, props) : /*#__PURE__*/React.createElement(EmojiPreviewComponentLegacy, props);
|
|
@@ -8,8 +8,6 @@ import { UfoEmojiTimings } from '../../types';
|
|
|
8
8
|
import { hasUfoMarked } from '../../util/analytics/hasUfoMarked';
|
|
9
9
|
import { sampledUfoRenderedEmoji } from '../../util/analytics/sampledUfoRenderedEmoji';
|
|
10
10
|
import { defaultEmojiHeight } from '../../util/constants';
|
|
11
|
-
import { isImageRepresentation } from '../../util/is-image-representation';
|
|
12
|
-
import { isMediaRepresentation } from '../../util/is-media-representation';
|
|
13
11
|
import { isPromise } from '../../util/is-promise';
|
|
14
12
|
import Emoji from './Emoji';
|
|
15
13
|
import EmojiPlaceholder from './EmojiPlaceholder';
|
|
@@ -159,8 +157,8 @@ export const ResourcedEmojiComponent = ({
|
|
|
159
157
|
}
|
|
160
158
|
};
|
|
161
159
|
}
|
|
162
|
-
//
|
|
163
|
-
if (optimisticImageURL
|
|
160
|
+
// Keep the optimistic representation stable when catalogue data arrives.
|
|
161
|
+
if (optimisticImageURL) {
|
|
164
162
|
return {
|
|
165
163
|
id,
|
|
166
164
|
shortName,
|
|
@@ -175,36 +173,6 @@ export const ResourcedEmojiComponent = ({
|
|
|
175
173
|
}
|
|
176
174
|
};
|
|
177
175
|
}
|
|
178
|
-
if (optimisticImageURL) {
|
|
179
|
-
if (emoji && (isImageRepresentation(emoji.representation) || isMediaRepresentation(emoji === null || emoji === void 0 ? void 0 : emoji.representation))) {
|
|
180
|
-
const {
|
|
181
|
-
width,
|
|
182
|
-
height
|
|
183
|
-
} = emoji.representation;
|
|
184
|
-
return {
|
|
185
|
-
...emoji,
|
|
186
|
-
representation: {
|
|
187
|
-
width,
|
|
188
|
-
height,
|
|
189
|
-
imagePath: optimisticImageURL
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
} else {
|
|
193
|
-
return {
|
|
194
|
-
id,
|
|
195
|
-
shortName,
|
|
196
|
-
fallback,
|
|
197
|
-
type: '',
|
|
198
|
-
category: '',
|
|
199
|
-
representation: {
|
|
200
|
-
height: fitToHeight || defaultEmojiHeight,
|
|
201
|
-
width: fitToHeight || defaultEmojiHeight,
|
|
202
|
-
imagePath: optimisticImageURL
|
|
203
|
-
},
|
|
204
|
-
searchable: true
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
176
|
return emoji;
|
|
209
177
|
}, [emoji, optimisticImageURL, fallback, fitToHeight, id, shortName, pageTitleEmoji]);
|
|
210
178
|
const handleOnLoadError = useCallback(emojiId => {
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
import "./EmojiPreviewComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
|
+
import { PickerItemContent } from '@atlaskit/user-picker/picker-item-content';
|
|
5
7
|
import CachingEmoji from './CachingEmoji';
|
|
6
8
|
var emojiName = null;
|
|
7
9
|
var emojiShortName = null;
|
|
8
10
|
var preview = null;
|
|
9
11
|
var previewImg = null;
|
|
10
12
|
var previewText = null;
|
|
11
|
-
|
|
13
|
+
var EmojiPreviewComponentLegacy = function EmojiPreviewComponentLegacy(_ref) {
|
|
12
14
|
var emoji = _ref.emoji;
|
|
13
15
|
return /*#__PURE__*/React.createElement("div", {
|
|
14
16
|
className: ax(["_ca0q19bv _u5f319bv _n3td19bv _19bv19bv _1e0c1txw _2lx2vrvc _1n261q9c _4t3izwfg _4cvr1h6o"])
|
|
@@ -24,4 +26,23 @@ export var EmojiPreviewComponent = function EmojiPreviewComponent(_ref) {
|
|
|
24
26
|
}, emoji.name), /*#__PURE__*/React.createElement("div", {
|
|
25
27
|
className: ax(["_11c8wadc _1reo15vq _18m915vq _1e0c1ule _syazazsu _vwz4kb7n _otyr1i6y _n3tdv77o _1bto1l2s _o5721q9c _10hwfhey _pnmbi7uo"])
|
|
26
28
|
}, emoji.shortName)));
|
|
29
|
+
};
|
|
30
|
+
var previewImageNext = null;
|
|
31
|
+
var EmojiPreviewComponentNext = function EmojiPreviewComponentNext(_ref2) {
|
|
32
|
+
var emoji = _ref2.emoji;
|
|
33
|
+
return /*#__PURE__*/React.createElement(PickerItemContent, {
|
|
34
|
+
avatar: /*#__PURE__*/React.createElement("span", {
|
|
35
|
+
className: ax(["_1e0c1o8l _1bsbzwfg _12s6idpf _1e4didpf _1dvqidpf _vwlxidpf _1gdiidpf _1f45idpf _pdfdidpf _mwo3idpf _5ilezwfg _boltzwfg _1pc7zwfg _u5wqzwfg _w7981kw7 _1vqe1kw7 _1l4xidpf _1l79idpf _118didpf _1pa4idpf _1pglh2mm _1vjf1ssb _1h6o1ssb _8fp6dbra _1os4zwfg _1e7azwfg _7mh21ule", "_1e0c1txw"])
|
|
36
|
+
}, /*#__PURE__*/React.createElement(CachingEmoji, {
|
|
37
|
+
key: emoji.id || emoji.shortName,
|
|
38
|
+
emoji: emoji
|
|
39
|
+
})),
|
|
40
|
+
title: emoji.name ? /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: ax(["_1reo15vq _18m915vq _1e0c1ule _syazi7uo _1bto1l2s _o5721q9c _299mangw"])
|
|
42
|
+
}, emoji.name) : emoji.shortName,
|
|
43
|
+
subtext: emoji.name ? emoji.shortName : undefined
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
export var EmojiPreviewComponent = function EmojiPreviewComponent(props) {
|
|
47
|
+
return isExperimentEnabled('platform_editor_mentions_email_search') ? /*#__PURE__*/React.createElement(EmojiPreviewComponentNext, props) : /*#__PURE__*/React.createElement(EmojiPreviewComponentLegacy, props);
|
|
27
48
|
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
/* ResourcedEmojiComponent.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
4
|
import "./ResourcedEmojiComponent.compiled.css";
|
|
6
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
7
|
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react';
|
|
11
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -14,8 +11,6 @@ import { UfoEmojiTimings } from '../../types';
|
|
|
14
11
|
import { hasUfoMarked } from '../../util/analytics/hasUfoMarked';
|
|
15
12
|
import { sampledUfoRenderedEmoji } from '../../util/analytics/sampledUfoRenderedEmoji';
|
|
16
13
|
import { defaultEmojiHeight } from '../../util/constants';
|
|
17
|
-
import { isImageRepresentation } from '../../util/is-image-representation';
|
|
18
|
-
import { isMediaRepresentation } from '../../util/is-media-representation';
|
|
19
14
|
import { isPromise } from '../../util/is-promise';
|
|
20
15
|
import Emoji from './Emoji';
|
|
21
16
|
import EmojiPlaceholder from './EmojiPlaceholder';
|
|
@@ -199,8 +194,8 @@ export var ResourcedEmojiComponent = function ResourcedEmojiComponent(_ref) {
|
|
|
199
194
|
}
|
|
200
195
|
};
|
|
201
196
|
}
|
|
202
|
-
//
|
|
203
|
-
if (optimisticImageURL
|
|
197
|
+
// Keep the optimistic representation stable when catalogue data arrives.
|
|
198
|
+
if (optimisticImageURL) {
|
|
204
199
|
return {
|
|
205
200
|
id: id,
|
|
206
201
|
shortName: shortName,
|
|
@@ -215,34 +210,6 @@ export var ResourcedEmojiComponent = function ResourcedEmojiComponent(_ref) {
|
|
|
215
210
|
}
|
|
216
211
|
};
|
|
217
212
|
}
|
|
218
|
-
if (optimisticImageURL) {
|
|
219
|
-
if (emoji && (isImageRepresentation(emoji.representation) || isMediaRepresentation(emoji === null || emoji === void 0 ? void 0 : emoji.representation))) {
|
|
220
|
-
var _emoji$representation = emoji.representation,
|
|
221
|
-
width = _emoji$representation.width,
|
|
222
|
-
height = _emoji$representation.height;
|
|
223
|
-
return _objectSpread(_objectSpread({}, emoji), {}, {
|
|
224
|
-
representation: {
|
|
225
|
-
width: width,
|
|
226
|
-
height: height,
|
|
227
|
-
imagePath: optimisticImageURL
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
} else {
|
|
231
|
-
return {
|
|
232
|
-
id: id,
|
|
233
|
-
shortName: shortName,
|
|
234
|
-
fallback: fallback,
|
|
235
|
-
type: '',
|
|
236
|
-
category: '',
|
|
237
|
-
representation: {
|
|
238
|
-
height: fitToHeight || defaultEmojiHeight,
|
|
239
|
-
width: fitToHeight || defaultEmojiHeight,
|
|
240
|
-
imagePath: optimisticImageURL
|
|
241
|
-
},
|
|
242
|
-
searchable: true
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
213
|
return emoji;
|
|
247
214
|
}, [emoji, optimisticImageURL, fallback, fitToHeight, id, shortName, pageTitleEmoji]);
|
|
248
215
|
var handleOnLoadError = useCallback(function (emojiId) {
|
|
@@ -12,7 +12,7 @@ export var createEvent = function createEvent(eventType, action, actionSubject,
|
|
|
12
12
|
actionSubjectId: actionSubjectId,
|
|
13
13
|
attributes: _objectSpread({
|
|
14
14
|
packageName: "@atlaskit/emoji",
|
|
15
|
-
packageVersion: "73.1
|
|
15
|
+
packageVersion: "73.2.1"
|
|
16
16
|
}, attributes)
|
|
17
17
|
};
|
|
18
18
|
};
|
|
@@ -2,5 +2,5 @@ import type { EmojiDescription } from '../../types';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
emoji: EmojiDescription;
|
|
4
4
|
};
|
|
5
|
-
export declare const EmojiPreviewComponent: (
|
|
5
|
+
export declare const EmojiPreviewComponent: (props: Props) => JSX.Element;
|
|
6
6
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "73.
|
|
3
|
+
"version": "73.3.0",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
38
38
|
"@atlaskit/button": "^25.6.0",
|
|
39
39
|
"@atlaskit/css": "^1.1.0",
|
|
40
|
-
"@atlaskit/feature-gate-js-client": "^7.
|
|
40
|
+
"@atlaskit/feature-gate-js-client": "^7.1.0",
|
|
41
41
|
"@atlaskit/form": "^18.3.0",
|
|
42
42
|
"@atlaskit/heading": "^8.0.0",
|
|
43
43
|
"@atlaskit/icon": "^38.0.0",
|
|
@@ -54,10 +54,11 @@
|
|
|
54
54
|
"@atlaskit/spinner": "^20.4.0",
|
|
55
55
|
"@atlaskit/textfield": "^10.3.0",
|
|
56
56
|
"@atlaskit/theme": "^28.2.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^248.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^248.1.0",
|
|
58
58
|
"@atlaskit/tokens": "^20.8.0",
|
|
59
59
|
"@atlaskit/tooltip": "^24.4.0",
|
|
60
60
|
"@atlaskit/ufo": "^2.0.0",
|
|
61
|
+
"@atlaskit/user-picker": "^14.5.0",
|
|
61
62
|
"@atlaskit/util-service-support": "^7.4.0",
|
|
62
63
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
63
64
|
"@babel/runtime": "^7.0.0",
|
|
@@ -124,9 +125,6 @@
|
|
|
124
125
|
"platform_emoji_prevent_img_src_changing": {
|
|
125
126
|
"type": "boolean"
|
|
126
127
|
},
|
|
127
|
-
"platform_emoji_prevent_img_src_changing_all": {
|
|
128
|
-
"type": "boolean"
|
|
129
|
-
},
|
|
130
128
|
"platform_suppression_removal_fix_reactions": {
|
|
131
129
|
"type": "boolean"
|
|
132
130
|
},
|