@atlaskit/emoji 73.3.9 → 73.4.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 +26 -0
- package/dist/cjs/components/common/ImageEmoji.js +4 -2
- package/dist/cjs/components/picker/EmojiPickerComponent.js +8 -5
- package/dist/cjs/util/analytics/createEvent.js +1 -1
- package/dist/es2019/components/common/ImageEmoji.js +4 -2
- package/dist/es2019/components/picker/EmojiPickerComponent.js +8 -5
- package/dist/es2019/util/analytics/createEvent.js +1 -1
- package/dist/esm/components/common/ImageEmoji.js +4 -2
- package/dist/esm/components/picker/EmojiPickerComponent.js +8 -5
- package/dist/esm/util/analytics/createEvent.js +1 -1
- package/dist/types/api/EmojiResource.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 73.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`52041aceb2dbb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/52041aceb2dbb) -
|
|
8
|
+
Restore focus to the Add custom emoji button after cancelling behind
|
|
9
|
+
platform_ally_emoji_fixes_various
|
|
10
|
+
- [`17e8d92cb49c7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/17e8d92cb49c7) -
|
|
11
|
+
[ux] Mark emoji picker images as decorative while preserving the interactive emoji's accessible
|
|
12
|
+
name, behind the `platform_ally_emoji_fixes_various` feature gate.
|
|
13
|
+
|
|
14
|
+
## 73.4.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [`df88d83ca2263`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df88d83ca2263) -
|
|
19
|
+
Add an optional asciiApi URL to EmojiResourceConfig for the confluence_on_demand_emoji_repository
|
|
20
|
+
experiment.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [`5dd091d3c082d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5dd091d3c082d) -
|
|
25
|
+
Remove the presentation role from the emoji picker search wrapper behind
|
|
26
|
+
platform_ally_emoji_fixes_various
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 73.3.9
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _browserApis = require("@atlaskit/browser-apis");
|
|
15
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
15
16
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
16
17
|
var _shouldUseAltRepresentation = require("../../api/shouldUseAltRepresentation");
|
|
17
18
|
var _useInView3 = require("../../hooks/useInView");
|
|
@@ -54,7 +55,8 @@ var ImageEmoji = exports.ImageEmoji = function ImageEmoji(props) {
|
|
|
54
55
|
onLoadSuccess = props.onLoadSuccess,
|
|
55
56
|
disableLazyLoad = props.disableLazyLoad,
|
|
56
57
|
autoWidth = props.autoWidth,
|
|
57
|
-
isDecorative = props.isDecorative
|
|
58
|
+
isDecorative = props.isDecorative,
|
|
59
|
+
shouldBeInteractive = props.shouldBeInteractive;
|
|
58
60
|
var _useInView = (0, _useInView3.useInView)({
|
|
59
61
|
triggerOnce: true
|
|
60
62
|
}),
|
|
@@ -141,7 +143,7 @@ var ImageEmoji = exports.ImageEmoji = function ImageEmoji(props) {
|
|
|
141
143
|
onBeforeLoad();
|
|
142
144
|
}
|
|
143
145
|
}, [inView, onBeforeLoad]);
|
|
144
|
-
var imgAlt = isDecorative ? '' : emoji.name || emoji.shortName || '';
|
|
146
|
+
var imgAlt = isDecorative || shouldBeInteractive && (0, _fg.fg)('platform_ally_emoji_fixes_various') ? '' : emoji.name || emoji.shortName || '';
|
|
145
147
|
var emojiNode = /*#__PURE__*/_react.default.createElement("img", (0, _extends2.default)({
|
|
146
148
|
loading: disableLazyLoad ? 'eager' : 'lazy',
|
|
147
149
|
src: src,
|
|
@@ -20,6 +20,7 @@ var _reactDom = require("react-dom");
|
|
|
20
20
|
var _reactIntl = require("react-intl");
|
|
21
21
|
var _browserApis = require("@atlaskit/browser-apis");
|
|
22
22
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
23
24
|
var _dropTargetForExternal = require("@atlaskit/pragmatic-drag-and-drop/adapter/drop-target-for-external");
|
|
24
25
|
var _monitorForExternal = require("@atlaskit/pragmatic-drag-and-drop/adapter/monitor-for-external");
|
|
25
26
|
var _combine = require("@atlaskit/pragmatic-drag-and-drop/utils/combine");
|
|
@@ -257,10 +258,12 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
257
258
|
setUploadErrorMessage(undefined);
|
|
258
259
|
});
|
|
259
260
|
fireAnalytics((0, _uploadCancelButton.uploadCancelButton)());
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
if ((0, _fg.fg)('platform_ally_emoji_fixes_various')) {
|
|
262
|
+
setTimeout(function () {
|
|
263
|
+
var _getDocument;
|
|
264
|
+
(_getDocument = (0, _browserApis.getDocument)()) === null || _getDocument === void 0 || (_getDocument = _getDocument.getElementById('add-custom-emoji')) === null || _getDocument === void 0 || _getDocument.focus();
|
|
265
|
+
}, 0);
|
|
266
|
+
}
|
|
264
267
|
}, [fireAnalytics]);
|
|
265
268
|
var getDynamicCategories = (0, _react.useCallback)(function () {
|
|
266
269
|
if (!emojiProvider.calculateDynamicCategories) {
|
|
@@ -698,7 +701,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
698
701
|
"--_gsvyy7": (0, _runtime.ix)("".concat(emojiPickerWidth, "px"))
|
|
699
702
|
}
|
|
700
703
|
}, /*#__PURE__*/React.createElement("div", {
|
|
701
|
-
role:
|
|
704
|
+
role: (0, _fg.fg)('platform_ally_emoji_fixes_various') ? undefined : 'presentation',
|
|
702
705
|
onKeyPress: suppressKeyPress,
|
|
703
706
|
onKeyUp: suppressKeyPress,
|
|
704
707
|
onKeyDown: suppressKeyPress,
|
|
@@ -17,7 +17,7 @@ var createEvent = exports.createEvent = function createEvent(eventType, action,
|
|
|
17
17
|
actionSubjectId: actionSubjectId,
|
|
18
18
|
attributes: _objectSpread({
|
|
19
19
|
packageName: "@atlaskit/emoji",
|
|
20
|
-
packageVersion: "73.
|
|
20
|
+
packageVersion: "73.4.0"
|
|
21
21
|
}, attributes)
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useEffect, useCallback, useMemo } from 'react';
|
|
5
5
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
7
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
7
8
|
import { shouldUseAltRepresentation } from '../../api/shouldUseAltRepresentation';
|
|
8
9
|
import { useInView } from '../../hooks/useInView';
|
|
@@ -47,7 +48,8 @@ export const ImageEmoji = props => {
|
|
|
47
48
|
onLoadSuccess,
|
|
48
49
|
disableLazyLoad,
|
|
49
50
|
autoWidth,
|
|
50
|
-
isDecorative
|
|
51
|
+
isDecorative,
|
|
52
|
+
shouldBeInteractive
|
|
51
53
|
} = props;
|
|
52
54
|
const [ref, inView] = useInView({
|
|
53
55
|
triggerOnce: true
|
|
@@ -126,7 +128,7 @@ export const ImageEmoji = props => {
|
|
|
126
128
|
onBeforeLoad();
|
|
127
129
|
}
|
|
128
130
|
}, [inView, onBeforeLoad]);
|
|
129
|
-
const imgAlt = isDecorative ? '' : emoji.name || emoji.shortName || '';
|
|
131
|
+
const imgAlt = isDecorative || shouldBeInteractive && fg('platform_ally_emoji_fixes_various') ? '' : emoji.name || emoji.shortName || '';
|
|
130
132
|
const emojiNode = /*#__PURE__*/React.createElement("img", _extends({
|
|
131
133
|
loading: disableLazyLoad ? 'eager' : 'lazy',
|
|
132
134
|
src: src,
|
|
@@ -7,6 +7,7 @@ import { unstable_batchedUpdates as batchedUpdates } from 'react-dom';
|
|
|
7
7
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
8
8
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
9
9
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
11
|
import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/adapter/drop-target-for-external';
|
|
11
12
|
import { monitorForExternal } from '@atlaskit/pragmatic-drag-and-drop/adapter/monitor-for-external';
|
|
12
13
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
@@ -191,10 +192,12 @@ const EmojiPickerComponent = ({
|
|
|
191
192
|
setUploadErrorMessage(undefined);
|
|
192
193
|
});
|
|
193
194
|
fireAnalytics(uploadCancelButton());
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
if (fg('platform_ally_emoji_fixes_various')) {
|
|
196
|
+
setTimeout(() => {
|
|
197
|
+
var _getDocument, _getDocument$getEleme;
|
|
198
|
+
(_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : (_getDocument$getEleme = _getDocument.getElementById('add-custom-emoji')) === null || _getDocument$getEleme === void 0 ? void 0 : _getDocument$getEleme.focus();
|
|
199
|
+
}, 0);
|
|
200
|
+
}
|
|
198
201
|
}, [fireAnalytics]);
|
|
199
202
|
const getDynamicCategories = useCallback(() => {
|
|
200
203
|
if (!emojiProvider.calculateDynamicCategories) {
|
|
@@ -598,7 +601,7 @@ const EmojiPickerComponent = ({
|
|
|
598
601
|
"aria-modal": true,
|
|
599
602
|
className: ax(["_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iaq3k _1bsb1edt _1ul91edt _c71l1y6z _kqswh2mm", !!emojiToDelete ? withDeleteRefreshHeight[size] : uploading ? hasUploadPreviewError ? withUploadRefreshAndPreviewErrorHeight[size] : withUploadRefreshHeight[size] : query && filteredEmojis.length === 0 ? withNoResultsRefreshHeight[size] : showPreview ? withPreviewHeight[size] : withoutPreviewHeight[size], showAiUpload && "_4t3ikbql _c71l8k0t"])
|
|
600
603
|
}, /*#__PURE__*/React.createElement("div", {
|
|
601
|
-
role:
|
|
604
|
+
role: fg('platform_ally_emoji_fixes_various') ? undefined : 'presentation',
|
|
602
605
|
onKeyPress: suppressKeyPress,
|
|
603
606
|
onKeyUp: suppressKeyPress,
|
|
604
607
|
onKeyDown: suppressKeyPress,
|
|
@@ -4,6 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useEffect, useCallback, useMemo } from 'react';
|
|
6
6
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
8
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
8
9
|
import { shouldUseAltRepresentation } from '../../api/shouldUseAltRepresentation';
|
|
9
10
|
import { useInView } from '../../hooks/useInView';
|
|
@@ -45,7 +46,8 @@ export var ImageEmoji = function ImageEmoji(props) {
|
|
|
45
46
|
onLoadSuccess = props.onLoadSuccess,
|
|
46
47
|
disableLazyLoad = props.disableLazyLoad,
|
|
47
48
|
autoWidth = props.autoWidth,
|
|
48
|
-
isDecorative = props.isDecorative
|
|
49
|
+
isDecorative = props.isDecorative,
|
|
50
|
+
shouldBeInteractive = props.shouldBeInteractive;
|
|
49
51
|
var _useInView = useInView({
|
|
50
52
|
triggerOnce: true
|
|
51
53
|
}),
|
|
@@ -132,7 +134,7 @@ export var ImageEmoji = function ImageEmoji(props) {
|
|
|
132
134
|
onBeforeLoad();
|
|
133
135
|
}
|
|
134
136
|
}, [inView, onBeforeLoad]);
|
|
135
|
-
var imgAlt = isDecorative ? '' : emoji.name || emoji.shortName || '';
|
|
137
|
+
var imgAlt = isDecorative || shouldBeInteractive && fg('platform_ally_emoji_fixes_various') ? '' : emoji.name || emoji.shortName || '';
|
|
136
138
|
var emojiNode = /*#__PURE__*/React.createElement("img", _extends({
|
|
137
139
|
loading: disableLazyLoad ? 'eager' : 'lazy',
|
|
138
140
|
src: src,
|
|
@@ -14,6 +14,7 @@ import { unstable_batchedUpdates as batchedUpdates } from 'react-dom';
|
|
|
14
14
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
15
15
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
16
16
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
17
18
|
import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/adapter/drop-target-for-external';
|
|
18
19
|
import { monitorForExternal } from '@atlaskit/pragmatic-drag-and-drop/adapter/monitor-for-external';
|
|
19
20
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
@@ -248,10 +249,12 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
248
249
|
setUploadErrorMessage(undefined);
|
|
249
250
|
});
|
|
250
251
|
fireAnalytics(uploadCancelButton());
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
if (fg('platform_ally_emoji_fixes_various')) {
|
|
253
|
+
setTimeout(function () {
|
|
254
|
+
var _getDocument;
|
|
255
|
+
(_getDocument = getDocument()) === null || _getDocument === void 0 || (_getDocument = _getDocument.getElementById('add-custom-emoji')) === null || _getDocument === void 0 || _getDocument.focus();
|
|
256
|
+
}, 0);
|
|
257
|
+
}
|
|
255
258
|
}, [fireAnalytics]);
|
|
256
259
|
var getDynamicCategories = useCallback(function () {
|
|
257
260
|
if (!emojiProvider.calculateDynamicCategories) {
|
|
@@ -689,7 +692,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
689
692
|
"--_gsvyy7": ix("".concat(emojiPickerWidth, "px"))
|
|
690
693
|
}
|
|
691
694
|
}, /*#__PURE__*/React.createElement("div", {
|
|
692
|
-
role:
|
|
695
|
+
role: fg('platform_ally_emoji_fixes_various') ? undefined : 'presentation',
|
|
693
696
|
onKeyPress: suppressKeyPress,
|
|
694
697
|
onKeyUp: suppressKeyPress,
|
|
695
698
|
onKeyDown: suppressKeyPress,
|
|
@@ -10,7 +10,7 @@ export var createEvent = function createEvent(eventType, action, actionSubject,
|
|
|
10
10
|
actionSubjectId: actionSubjectId,
|
|
11
11
|
attributes: _objectSpread({
|
|
12
12
|
packageName: "@atlaskit/emoji",
|
|
13
|
-
packageVersion: "73.
|
|
13
|
+
packageVersion: "73.4.0"
|
|
14
14
|
}, attributes)
|
|
15
15
|
};
|
|
16
16
|
};
|