@atlaskit/emoji 71.15.12 → 71.15.14
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 +14 -0
- package/dist/cjs/components/picker/EmojiPickerEmojiRow.js +4 -47
- package/dist/cjs/components/picker/VirtualList.js +2 -12
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/components/picker/EmojiPickerEmojiRow.js +4 -49
- package/dist/es2019/components/picker/VirtualList.js +2 -12
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/components/picker/EmojiPickerEmojiRow.js +4 -47
- package/dist/esm/components/picker/VirtualList.js +2 -12
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/types/components/picker/EmojiPickerEmojiRow.d.ts +1 -1
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 71.15.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 71.15.13
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d95e6444df894`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d95e6444df894) -
|
|
14
|
+
Cleanup feature gate `platform_a11y_fixes_reaction_emoji`
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 71.15.12
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ require("./EmojiPickerEmojiRow.compiled.css");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _reactIntl = require("react-intl");
|
|
16
15
|
var _CachingEmoji = _interopRequireDefault(require("../common/CachingEmoji"));
|
|
17
16
|
var _useEmojiPickerListContext = require("../../hooks/useEmojiPickerListContext");
|
|
@@ -19,13 +18,11 @@ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equa
|
|
|
19
18
|
var _i18n = require("../i18n");
|
|
20
19
|
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); }
|
|
21
20
|
var emojiItem = null;
|
|
22
|
-
var emojiPickerRow = null;
|
|
23
21
|
var emojiPickerRowList = null;
|
|
24
22
|
var EmojiPickerEmojiRow = function EmojiPickerEmojiRow(_ref) {
|
|
25
23
|
var emojis = _ref.emojis,
|
|
26
24
|
onSelected = _ref.onSelected,
|
|
27
25
|
onMouseMove = _ref.onMouseMove,
|
|
28
|
-
onMouseLeave = _ref.onMouseLeave,
|
|
29
26
|
onFocus = _ref.onFocus,
|
|
30
27
|
title = _ref.title,
|
|
31
28
|
showDelete = _ref.showDelete,
|
|
@@ -48,56 +45,16 @@ var EmojiPickerEmojiRow = function EmojiPickerEmojiRow(_ref) {
|
|
|
48
45
|
onFocus && onFocus(emojiId, emoji, event);
|
|
49
46
|
};
|
|
50
47
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// items. Each virtualized row is its own list (valid list/listitem ownership,
|
|
55
|
-
// virtualization-safe). This is gated separately from the existing
|
|
56
|
-
// platform_a11y_fixes_reaction_emoji flag.
|
|
57
|
-
var isEmojiPickerListEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_a11y_fixes_emoji_picker_list', 'isEnabled', true);
|
|
58
|
-
if (isEmojiPickerListEnabled || (0, _platformFeatureFlags.fg)('platform_a11y_fixes_reaction_emoji')) {
|
|
59
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
60
|
-
role: "list",
|
|
61
|
-
className: (0, _runtime.ax)(["_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _18u0u2gc"])
|
|
62
|
-
}, emojis.map(function (emoji, index) {
|
|
63
|
-
var shortName = emoji.shortName,
|
|
64
|
-
id = emoji.id;
|
|
65
|
-
var key = id ? "".concat(id, "-").concat(title) : "".concat(shortName, "-").concat(title);
|
|
66
|
-
var focus = currentEmojisFocus.rowIndex === rowIndex && currentEmojisFocus.columnIndex === index;
|
|
67
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
68
|
-
key: key,
|
|
69
|
-
className: (0, _runtime.ax)(["_1e0c1o8l _y3gn1h6o _1bsb1ylp _1wcg1qi0 _1678tlke _7b50u2gc _1rf4u2gc _b4kiu2gc _bm9mu2gc _1lvc1tcg _1cf71tcg _8vlfze3t _1909ze3t _1tcfze3t _n7xcze3t _4ubfu2gc _18x3u2gc _fw9su2gc _29jju2gc _qpkw1tcg _elsp1tcg _vtzrze3t _w2q0ze3t _o5kcze3t _1mc3ze3t _115ch2mm _yrst1ssb _85ft1ssb _5mfndbra _1k8z1tcg _17dz1tcg _zdyf1ule _1mn81tcg _u5ah1tcg"])
|
|
70
|
-
}, /*#__PURE__*/React.createElement(_CachingEmoji.default, {
|
|
71
|
-
emoji: emoji,
|
|
72
|
-
selectOnHover: true,
|
|
73
|
-
onSelected: onSelected,
|
|
74
|
-
onMouseMove: onMouseMove,
|
|
75
|
-
onFocus: handleFocus(index),
|
|
76
|
-
showDelete: showDelete,
|
|
77
|
-
onDelete: onDelete,
|
|
78
|
-
placeholderSize: 24,
|
|
79
|
-
"data-focus-index": "".concat(rowIndex, "-").concat(index),
|
|
80
|
-
tabIndex: focus ? 0 : -1,
|
|
81
|
-
"aria-roledescription": formatMessage(_i18n.messages.emojiButtonRoleDescription),
|
|
82
|
-
shouldBeInteractive: true,
|
|
83
|
-
fitToHeight: fitToHeight,
|
|
84
|
-
preventFocusOnMouseDown: preventFocusOnMouseDown
|
|
85
|
-
}));
|
|
86
|
-
}));
|
|
87
|
-
}
|
|
88
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
role: "presentation",
|
|
90
|
-
className: (0, _runtime.ax)(["_18u0u2gc"])
|
|
48
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
49
|
+
role: "list",
|
|
50
|
+
className: (0, _runtime.ax)(["_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _18u0u2gc"])
|
|
91
51
|
}, emojis.map(function (emoji, index) {
|
|
92
52
|
var shortName = emoji.shortName,
|
|
93
53
|
id = emoji.id;
|
|
94
54
|
var key = id ? "".concat(id, "-").concat(title) : "".concat(shortName, "-").concat(title);
|
|
95
55
|
var focus = currentEmojisFocus.rowIndex === rowIndex && currentEmojisFocus.columnIndex === index;
|
|
96
|
-
return /*#__PURE__*/React.createElement("
|
|
56
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
97
57
|
key: key,
|
|
98
|
-
role: "presentation",
|
|
99
|
-
onMouseLeave: onMouseLeave,
|
|
100
|
-
onBlur: onMouseLeave,
|
|
101
58
|
className: (0, _runtime.ax)(["_1e0c1o8l _y3gn1h6o _1bsb1ylp _1wcg1qi0 _1678tlke _7b50u2gc _1rf4u2gc _b4kiu2gc _bm9mu2gc _1lvc1tcg _1cf71tcg _8vlfze3t _1909ze3t _1tcfze3t _n7xcze3t _4ubfu2gc _18x3u2gc _fw9su2gc _29jju2gc _qpkw1tcg _elsp1tcg _vtzrze3t _w2q0ze3t _o5kcze3t _1mc3ze3t _115ch2mm _yrst1ssb _85ft1ssb _5mfndbra _1k8z1tcg _17dz1tcg _zdyf1ule _1mn81tcg _u5ah1tcg"])
|
|
102
59
|
}, /*#__PURE__*/React.createElement(_CachingEmoji.default, {
|
|
103
60
|
emoji: emoji,
|
|
@@ -12,8 +12,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactVirtual = require("@tanstack/react-virtual");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
17
15
|
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
18
16
|
var _useEmojiPickerListContext = require("../../hooks/useEmojiPickerListContext");
|
|
19
17
|
var _constants = require("../../util/constants");
|
|
@@ -44,14 +42,6 @@ var VirtualList = exports.VirtualList = /*#__PURE__*/_react.default.forwardRef(f
|
|
|
44
42
|
var _useEmojiPickerListCo = (0, _useEmojiPickerListContext.useEmojiPickerListContext)(),
|
|
45
43
|
currentEmojisFocus = _useEmojiPickerListCo.currentEmojisFocus,
|
|
46
44
|
setEmojisFocus = _useEmojiPickerListCo.setEmojisFocus;
|
|
47
|
-
|
|
48
|
-
// A11Y-31084: When the emoji picker list experiment is enabled, each row is
|
|
49
|
-
// rendered as its own <ul role="list"> (see EmojiPickerEmojiRow). For that
|
|
50
|
-
// list markup to be valid, the surrounding grid semantics must be dropped:
|
|
51
|
-
// the scroll container becomes an application container and each row wrapper
|
|
52
|
-
// becomes presentational, matching the existing a11y reaction-emoji flag.
|
|
53
|
-
var isEmojiPickerListEnabled = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_a11y_fixes_emoji_picker_list', 'isEnabled', true);
|
|
54
|
-
var useListSemantics = isEmojiPickerListEnabled || (0, _platformFeatureFlags.fg)('platform_a11y_fixes_reaction_emoji');
|
|
55
45
|
var getVirtualizerOptions = function getVirtualizerOptions() {
|
|
56
46
|
var rowCount = props.rowCount,
|
|
57
47
|
rowHeight = props.rowHeight,
|
|
@@ -292,8 +282,8 @@ var VirtualList = exports.VirtualList = /*#__PURE__*/_react.default.forwardRef(f
|
|
|
292
282
|
},
|
|
293
283
|
"data-testid": virtualListScrollContainerTestId,
|
|
294
284
|
"aria-labelledby": "emoji-picker-table-description",
|
|
295
|
-
role:
|
|
296
|
-
tabIndex:
|
|
285
|
+
role: "application",
|
|
286
|
+
tabIndex: -1,
|
|
297
287
|
className: (0, _runtime.ax)(["_1reo15vq _18m91wug _n3tdu2gc _nt751r31 _49pcglyw _1hvw1o36"])
|
|
298
288
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
299
289
|
style: {
|
|
@@ -20,7 +20,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
20
20
|
actionSubjectId: actionSubjectId,
|
|
21
21
|
attributes: _objectSpread({
|
|
22
22
|
packageName: "@atlaskit/emoji",
|
|
23
|
-
packageVersion: "71.15.
|
|
23
|
+
packageVersion: "71.15.13"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -3,20 +3,17 @@ import "./EmojiPickerEmojiRow.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { memo } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useIntl } from 'react-intl';
|
|
8
7
|
import CachingEmoji from '../common/CachingEmoji';
|
|
9
8
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
10
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
10
|
import { messages } from '../i18n';
|
|
12
11
|
const emojiItem = null;
|
|
13
|
-
const emojiPickerRow = null;
|
|
14
12
|
const emojiPickerRowList = null;
|
|
15
13
|
const EmojiPickerEmojiRow = ({
|
|
16
14
|
emojis,
|
|
17
15
|
onSelected,
|
|
18
16
|
onMouseMove,
|
|
19
|
-
onMouseLeave,
|
|
20
17
|
onFocus,
|
|
21
18
|
title,
|
|
22
19
|
showDelete,
|
|
@@ -40,48 +37,9 @@ const EmojiPickerEmojiRow = ({
|
|
|
40
37
|
});
|
|
41
38
|
onFocus && onFocus(emojiId, emoji, event);
|
|
42
39
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// items. Each virtualized row is its own list (valid list/listitem ownership,
|
|
47
|
-
// virtualization-safe). This is gated separately from the existing
|
|
48
|
-
// platform_a11y_fixes_reaction_emoji flag.
|
|
49
|
-
const isEmojiPickerListEnabled = expValEqualsNoExposure('platform_a11y_fixes_emoji_picker_list', 'isEnabled', true);
|
|
50
|
-
if (isEmojiPickerListEnabled || fg('platform_a11y_fixes_reaction_emoji')) {
|
|
51
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
52
|
-
role: "list",
|
|
53
|
-
className: ax(["_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _18u0u2gc"])
|
|
54
|
-
}, emojis.map((emoji, index) => {
|
|
55
|
-
const {
|
|
56
|
-
shortName,
|
|
57
|
-
id
|
|
58
|
-
} = emoji;
|
|
59
|
-
const key = id ? `${id}-${title}` : `${shortName}-${title}`;
|
|
60
|
-
const focus = currentEmojisFocus.rowIndex === rowIndex && currentEmojisFocus.columnIndex === index;
|
|
61
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
62
|
-
key: key,
|
|
63
|
-
className: ax(["_1e0c1o8l _y3gn1h6o _1bsb1ylp _1wcg1qi0 _1678tlke _7b50u2gc _1rf4u2gc _b4kiu2gc _bm9mu2gc _1lvc1tcg _1cf71tcg _8vlfze3t _1909ze3t _1tcfze3t _n7xcze3t _4ubfu2gc _18x3u2gc _fw9su2gc _29jju2gc _qpkw1tcg _elsp1tcg _vtzrze3t _w2q0ze3t _o5kcze3t _1mc3ze3t _115ch2mm _yrst1ssb _85ft1ssb _5mfndbra _1k8z1tcg _17dz1tcg _zdyf1ule _1mn81tcg _u5ah1tcg"])
|
|
64
|
-
}, /*#__PURE__*/React.createElement(CachingEmoji, {
|
|
65
|
-
emoji: emoji,
|
|
66
|
-
selectOnHover: true,
|
|
67
|
-
onSelected: onSelected,
|
|
68
|
-
onMouseMove: onMouseMove,
|
|
69
|
-
onFocus: handleFocus(index),
|
|
70
|
-
showDelete: showDelete,
|
|
71
|
-
onDelete: onDelete,
|
|
72
|
-
placeholderSize: 24,
|
|
73
|
-
"data-focus-index": `${rowIndex}-${index}`,
|
|
74
|
-
tabIndex: focus ? 0 : -1,
|
|
75
|
-
"aria-roledescription": formatMessage(messages.emojiButtonRoleDescription),
|
|
76
|
-
shouldBeInteractive: true,
|
|
77
|
-
fitToHeight: fitToHeight,
|
|
78
|
-
preventFocusOnMouseDown: preventFocusOnMouseDown
|
|
79
|
-
}));
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
role: "presentation",
|
|
84
|
-
className: ax(["_18u0u2gc"])
|
|
40
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
41
|
+
role: "list",
|
|
42
|
+
className: ax(["_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _18u0u2gc"])
|
|
85
43
|
}, emojis.map((emoji, index) => {
|
|
86
44
|
const {
|
|
87
45
|
shortName,
|
|
@@ -89,11 +47,8 @@ const EmojiPickerEmojiRow = ({
|
|
|
89
47
|
} = emoji;
|
|
90
48
|
const key = id ? `${id}-${title}` : `${shortName}-${title}`;
|
|
91
49
|
const focus = currentEmojisFocus.rowIndex === rowIndex && currentEmojisFocus.columnIndex === index;
|
|
92
|
-
return /*#__PURE__*/React.createElement("
|
|
50
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
93
51
|
key: key,
|
|
94
|
-
role: "presentation",
|
|
95
|
-
onMouseLeave: onMouseLeave,
|
|
96
|
-
onBlur: onMouseLeave,
|
|
97
52
|
className: ax(["_1e0c1o8l _y3gn1h6o _1bsb1ylp _1wcg1qi0 _1678tlke _7b50u2gc _1rf4u2gc _b4kiu2gc _bm9mu2gc _1lvc1tcg _1cf71tcg _8vlfze3t _1909ze3t _1tcfze3t _n7xcze3t _4ubfu2gc _18x3u2gc _fw9su2gc _29jju2gc _qpkw1tcg _elsp1tcg _vtzrze3t _w2q0ze3t _o5kcze3t _1mc3ze3t _115ch2mm _yrst1ssb _85ft1ssb _5mfndbra _1k8z1tcg _17dz1tcg _zdyf1ule _1mn81tcg _u5ah1tcg"])
|
|
98
53
|
}, /*#__PURE__*/React.createElement(CachingEmoji, {
|
|
99
54
|
emoji: emoji,
|
|
@@ -3,8 +3,6 @@ import "./VirtualList.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useImperativeHandle } from 'react';
|
|
5
5
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
6
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
7
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
10
8
|
import { EMOJIPICKERLIST_KEYBOARD_KEYS_SUPPORTED, EMOJI_LIST_COLUMNS, EMOJI_LIST_PAGE_COUNT, KeyboardNavigationDirection, KeyboardKeys } from '../../util/constants';
|
|
@@ -35,14 +33,6 @@ export const VirtualList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
35
33
|
currentEmojisFocus,
|
|
36
34
|
setEmojisFocus
|
|
37
35
|
} = useEmojiPickerListContext();
|
|
38
|
-
|
|
39
|
-
// A11Y-31084: When the emoji picker list experiment is enabled, each row is
|
|
40
|
-
// rendered as its own <ul role="list"> (see EmojiPickerEmojiRow). For that
|
|
41
|
-
// list markup to be valid, the surrounding grid semantics must be dropped:
|
|
42
|
-
// the scroll container becomes an application container and each row wrapper
|
|
43
|
-
// becomes presentational, matching the existing a11y reaction-emoji flag.
|
|
44
|
-
const isEmojiPickerListEnabled = expValEqualsNoExposure('platform_a11y_fixes_emoji_picker_list', 'isEnabled', true);
|
|
45
|
-
const useListSemantics = isEmojiPickerListEnabled || fg('platform_a11y_fixes_reaction_emoji');
|
|
46
36
|
const getVirtualizerOptions = () => {
|
|
47
37
|
const {
|
|
48
38
|
rowCount,
|
|
@@ -280,8 +270,8 @@ export const VirtualList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
280
270
|
},
|
|
281
271
|
"data-testid": virtualListScrollContainerTestId,
|
|
282
272
|
"aria-labelledby": "emoji-picker-table-description",
|
|
283
|
-
role:
|
|
284
|
-
tabIndex:
|
|
273
|
+
role: "application",
|
|
274
|
+
tabIndex: -1,
|
|
285
275
|
className: ax(["_1reo15vq _18m91wug _n3tdu2gc _nt751r31 _49pcglyw _1hvw1o36"])
|
|
286
276
|
}, /*#__PURE__*/React.createElement("div", {
|
|
287
277
|
style: {
|
|
@@ -3,20 +3,17 @@ import "./EmojiPickerEmojiRow.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { memo } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useIntl } from 'react-intl';
|
|
8
7
|
import CachingEmoji from '../common/CachingEmoji';
|
|
9
8
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
10
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
10
|
import { messages } from '../i18n';
|
|
12
11
|
var emojiItem = null;
|
|
13
|
-
var emojiPickerRow = null;
|
|
14
12
|
var emojiPickerRowList = null;
|
|
15
13
|
var EmojiPickerEmojiRow = function EmojiPickerEmojiRow(_ref) {
|
|
16
14
|
var emojis = _ref.emojis,
|
|
17
15
|
onSelected = _ref.onSelected,
|
|
18
16
|
onMouseMove = _ref.onMouseMove,
|
|
19
|
-
onMouseLeave = _ref.onMouseLeave,
|
|
20
17
|
onFocus = _ref.onFocus,
|
|
21
18
|
title = _ref.title,
|
|
22
19
|
showDelete = _ref.showDelete,
|
|
@@ -39,56 +36,16 @@ var EmojiPickerEmojiRow = function EmojiPickerEmojiRow(_ref) {
|
|
|
39
36
|
onFocus && onFocus(emojiId, emoji, event);
|
|
40
37
|
};
|
|
41
38
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
// items. Each virtualized row is its own list (valid list/listitem ownership,
|
|
46
|
-
// virtualization-safe). This is gated separately from the existing
|
|
47
|
-
// platform_a11y_fixes_reaction_emoji flag.
|
|
48
|
-
var isEmojiPickerListEnabled = expValEqualsNoExposure('platform_a11y_fixes_emoji_picker_list', 'isEnabled', true);
|
|
49
|
-
if (isEmojiPickerListEnabled || fg('platform_a11y_fixes_reaction_emoji')) {
|
|
50
|
-
return /*#__PURE__*/React.createElement("ul", {
|
|
51
|
-
role: "list",
|
|
52
|
-
className: ax(["_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _18u0u2gc"])
|
|
53
|
-
}, emojis.map(function (emoji, index) {
|
|
54
|
-
var shortName = emoji.shortName,
|
|
55
|
-
id = emoji.id;
|
|
56
|
-
var key = id ? "".concat(id, "-").concat(title) : "".concat(shortName, "-").concat(title);
|
|
57
|
-
var focus = currentEmojisFocus.rowIndex === rowIndex && currentEmojisFocus.columnIndex === index;
|
|
58
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
59
|
-
key: key,
|
|
60
|
-
className: ax(["_1e0c1o8l _y3gn1h6o _1bsb1ylp _1wcg1qi0 _1678tlke _7b50u2gc _1rf4u2gc _b4kiu2gc _bm9mu2gc _1lvc1tcg _1cf71tcg _8vlfze3t _1909ze3t _1tcfze3t _n7xcze3t _4ubfu2gc _18x3u2gc _fw9su2gc _29jju2gc _qpkw1tcg _elsp1tcg _vtzrze3t _w2q0ze3t _o5kcze3t _1mc3ze3t _115ch2mm _yrst1ssb _85ft1ssb _5mfndbra _1k8z1tcg _17dz1tcg _zdyf1ule _1mn81tcg _u5ah1tcg"])
|
|
61
|
-
}, /*#__PURE__*/React.createElement(CachingEmoji, {
|
|
62
|
-
emoji: emoji,
|
|
63
|
-
selectOnHover: true,
|
|
64
|
-
onSelected: onSelected,
|
|
65
|
-
onMouseMove: onMouseMove,
|
|
66
|
-
onFocus: handleFocus(index),
|
|
67
|
-
showDelete: showDelete,
|
|
68
|
-
onDelete: onDelete,
|
|
69
|
-
placeholderSize: 24,
|
|
70
|
-
"data-focus-index": "".concat(rowIndex, "-").concat(index),
|
|
71
|
-
tabIndex: focus ? 0 : -1,
|
|
72
|
-
"aria-roledescription": formatMessage(messages.emojiButtonRoleDescription),
|
|
73
|
-
shouldBeInteractive: true,
|
|
74
|
-
fitToHeight: fitToHeight,
|
|
75
|
-
preventFocusOnMouseDown: preventFocusOnMouseDown
|
|
76
|
-
}));
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
role: "presentation",
|
|
81
|
-
className: ax(["_18u0u2gc"])
|
|
39
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
40
|
+
role: "list",
|
|
41
|
+
className: ax(["_qtt8glyw _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19pkidpf _2hwxidpf _otyridpf _18u0idpf _18u0u2gc"])
|
|
82
42
|
}, emojis.map(function (emoji, index) {
|
|
83
43
|
var shortName = emoji.shortName,
|
|
84
44
|
id = emoji.id;
|
|
85
45
|
var key = id ? "".concat(id, "-").concat(title) : "".concat(shortName, "-").concat(title);
|
|
86
46
|
var focus = currentEmojisFocus.rowIndex === rowIndex && currentEmojisFocus.columnIndex === index;
|
|
87
|
-
return /*#__PURE__*/React.createElement("
|
|
47
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
88
48
|
key: key,
|
|
89
|
-
role: "presentation",
|
|
90
|
-
onMouseLeave: onMouseLeave,
|
|
91
|
-
onBlur: onMouseLeave,
|
|
92
49
|
className: ax(["_1e0c1o8l _y3gn1h6o _1bsb1ylp _1wcg1qi0 _1678tlke _7b50u2gc _1rf4u2gc _b4kiu2gc _bm9mu2gc _1lvc1tcg _1cf71tcg _8vlfze3t _1909ze3t _1tcfze3t _n7xcze3t _4ubfu2gc _18x3u2gc _fw9su2gc _29jju2gc _qpkw1tcg _elsp1tcg _vtzrze3t _w2q0ze3t _o5kcze3t _1mc3ze3t _115ch2mm _yrst1ssb _85ft1ssb _5mfndbra _1k8z1tcg _17dz1tcg _zdyf1ule _1mn81tcg _u5ah1tcg"])
|
|
93
50
|
}, /*#__PURE__*/React.createElement(CachingEmoji, {
|
|
94
51
|
emoji: emoji,
|
|
@@ -6,8 +6,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
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; }
|
|
7
7
|
import React, { useCallback, useImperativeHandle } from 'react';
|
|
8
8
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
9
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
12
10
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
13
11
|
import { EMOJIPICKERLIST_KEYBOARD_KEYS_SUPPORTED, EMOJI_LIST_COLUMNS, EMOJI_LIST_PAGE_COUNT, KeyboardNavigationDirection, KeyboardKeys } from '../../util/constants';
|
|
@@ -35,14 +33,6 @@ export var VirtualList = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
35
33
|
var _useEmojiPickerListCo = useEmojiPickerListContext(),
|
|
36
34
|
currentEmojisFocus = _useEmojiPickerListCo.currentEmojisFocus,
|
|
37
35
|
setEmojisFocus = _useEmojiPickerListCo.setEmojisFocus;
|
|
38
|
-
|
|
39
|
-
// A11Y-31084: When the emoji picker list experiment is enabled, each row is
|
|
40
|
-
// rendered as its own <ul role="list"> (see EmojiPickerEmojiRow). For that
|
|
41
|
-
// list markup to be valid, the surrounding grid semantics must be dropped:
|
|
42
|
-
// the scroll container becomes an application container and each row wrapper
|
|
43
|
-
// becomes presentational, matching the existing a11y reaction-emoji flag.
|
|
44
|
-
var isEmojiPickerListEnabled = expValEqualsNoExposure('platform_a11y_fixes_emoji_picker_list', 'isEnabled', true);
|
|
45
|
-
var useListSemantics = isEmojiPickerListEnabled || fg('platform_a11y_fixes_reaction_emoji');
|
|
46
36
|
var getVirtualizerOptions = function getVirtualizerOptions() {
|
|
47
37
|
var rowCount = props.rowCount,
|
|
48
38
|
rowHeight = props.rowHeight,
|
|
@@ -283,8 +273,8 @@ export var VirtualList = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
283
273
|
},
|
|
284
274
|
"data-testid": virtualListScrollContainerTestId,
|
|
285
275
|
"aria-labelledby": "emoji-picker-table-description",
|
|
286
|
-
role:
|
|
287
|
-
tabIndex:
|
|
276
|
+
role: "application",
|
|
277
|
+
tabIndex: -1,
|
|
288
278
|
className: ax(["_1reo15vq _18m91wug _n3tdu2gc _nt751r31 _49pcglyw _1hvw1o36"])
|
|
289
279
|
}, /*#__PURE__*/React.createElement("div", {
|
|
290
280
|
style: {
|
|
@@ -14,7 +14,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
14
14
|
actionSubjectId: actionSubjectId,
|
|
15
15
|
attributes: _objectSpread({
|
|
16
16
|
packageName: "@atlaskit/emoji",
|
|
17
|
-
packageVersion: "71.15.
|
|
17
|
+
packageVersion: "71.15.13"
|
|
18
18
|
}, attributes)
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -18,5 +18,5 @@ export interface Props {
|
|
|
18
18
|
title: string;
|
|
19
19
|
virtualItemContext?: VirtualItemContext;
|
|
20
20
|
}
|
|
21
|
-
declare const _default_1: MemoExoticComponent<({ emojis, onSelected, onMouseMove,
|
|
21
|
+
declare const _default_1: MemoExoticComponent<({ emojis, onSelected, onMouseMove, onFocus, title, showDelete, onDelete, virtualItemContext, }: Props) => JSX.Element>;
|
|
22
22
|
export default _default_1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "71.15.
|
|
3
|
+
"version": "71.15.14",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
47
47
|
"@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
|
|
48
48
|
"@atlaskit/primitives": "^22.2.0",
|
|
49
|
-
"@atlaskit/radio": "^
|
|
49
|
+
"@atlaskit/radio": "^10.0.0",
|
|
50
50
|
"@atlaskit/spinner": "^20.1.0",
|
|
51
51
|
"@atlaskit/textfield": "^10.0.0",
|
|
52
52
|
"@atlaskit/theme": "^27.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
54
|
-
"@atlaskit/tokens": "^16.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^142.0.0",
|
|
54
|
+
"@atlaskit/tokens": "^16.4.0",
|
|
55
55
|
"@atlaskit/tooltip": "^24.0.0",
|
|
56
56
|
"@atlaskit/ufo": "^1.0.0",
|
|
57
57
|
"@atlaskit/util-service-support": "^7.2.0",
|
|
@@ -137,9 +137,6 @@
|
|
|
137
137
|
"use-elements-stargate-emoji-path": {
|
|
138
138
|
"type": "boolean"
|
|
139
139
|
},
|
|
140
|
-
"platform_a11y_fixes_reaction_emoji": {
|
|
141
|
-
"type": "boolean"
|
|
142
|
-
},
|
|
143
140
|
"cache_emoji_loader_for_the_same_config": {
|
|
144
141
|
"type": "boolean"
|
|
145
142
|
}
|