@atlaskit/emoji 72.4.33 → 72.4.34
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 +9 -0
- package/dist/cjs/components/picker/CategorySelector.js +1 -10
- package/dist/cjs/components/picker/EmojiPickerListSearch.js +0 -20
- package/dist/cjs/util/analytics/createEvent.js +1 -1
- package/dist/es2019/components/picker/CategorySelector.js +1 -10
- package/dist/es2019/components/picker/EmojiPickerListSearch.js +1 -21
- package/dist/es2019/util/analytics/createEvent.js +1 -1
- package/dist/esm/components/picker/CategorySelector.js +1 -10
- package/dist/esm/components/picker/EmojiPickerListSearch.js +1 -21
- package/dist/esm/util/analytics/createEvent.js +1 -1
- package/package.json +2 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 72.4.34
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b94ae37dcc0f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b94ae37dcc0f8) -
|
|
8
|
+
Cleanup `experiment` `tef_fix_a11y_keyboard_control_emoji_picker`. The emoji picker now always
|
|
9
|
+
moves initial keyboard focus to the active category instead of autofocusing the search field.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 72.4.33
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -14,7 +14,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
15
|
var _reactIntl = require("react-intl");
|
|
16
16
|
var _css = require("@atlaskit/css");
|
|
17
|
-
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
18
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
19
18
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
20
19
|
var _usePrevious = require("../../hooks/usePrevious");
|
|
@@ -27,14 +26,6 @@ var _EmojiPickerList = require("./EmojiPickerList");
|
|
|
27
26
|
var _sortCategories = require("./sortCategories");
|
|
28
27
|
var _sortCategoriesNew = require("./sortCategoriesNew");
|
|
29
28
|
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); }
|
|
30
|
-
var isEmojiPickerInitialFocusFixEnabled = function isEmojiPickerInitialFocusFixEnabled() {
|
|
31
|
-
if (!_featureGates.default.initializeCompleted()) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
36
|
-
return _featureGates.default.getExperimentValue('tef_fix_a11y_keyboard_control_emoji_picker', 'isEnabled', false);
|
|
37
|
-
};
|
|
38
29
|
var styles = {
|
|
39
30
|
commonCategory: "_2rko12b0 _v564h5h4 _189eidpf _bfhksm61 _ca0qze3t _n3tdze3t _19bvze3t _u5f3ze3t",
|
|
40
31
|
commonCategoryNew: "_v564h5h4 _189eidpf _bfhksm61 _ca0qu2gc _n3tdu2gc _19bv12x7 _u5f312x7 _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -92,7 +83,7 @@ var CategorySelector = function CategorySelector(props) {
|
|
|
92
83
|
}, [categoryRef, setCurrentFocus]);
|
|
93
84
|
(0, _react.useEffect)(function () {
|
|
94
85
|
var _categoryRef$current2, _categoryRef$current3;
|
|
95
|
-
if (hasSetInitialFocus.current || !
|
|
86
|
+
if (hasSetInitialFocus.current || !activeCategoryId) {
|
|
96
87
|
return;
|
|
97
88
|
}
|
|
98
89
|
var activeCategoryIndex = categories.indexOf(activeCategoryId);
|
|
@@ -13,7 +13,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
15
|
var _useDebounce = require("use-debounce");
|
|
16
|
-
var _featureGates = _interopRequireDefault(require("@atlaskit/feature-gate-js-client/feature-gates"));
|
|
17
16
|
var _search = _interopRequireDefault(require("@atlaskit/icon/core/search"));
|
|
18
17
|
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
19
18
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden/visually-hidden"));
|
|
@@ -21,14 +20,6 @@ var _constants = require("../../util/constants");
|
|
|
21
20
|
var _isRefreshEmojiPickerEnabled = require("../common/isRefreshEmojiPickerEnabled");
|
|
22
21
|
var _i18n = require("../i18n");
|
|
23
22
|
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); }
|
|
24
|
-
var isEmojiPickerInitialFocusFixEnabled = function isEmojiPickerInitialFocusFixEnabled() {
|
|
25
|
-
if (!_featureGates.default.initializeCompleted()) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
30
|
-
return _featureGates.default.getExperimentValue('tef_fix_a11y_keyboard_control_emoji_picker', 'isEnabled', false);
|
|
31
|
-
};
|
|
32
23
|
var input = null;
|
|
33
24
|
var inputNew = null;
|
|
34
25
|
var textFieldWrapperNew = null;
|
|
@@ -64,17 +55,6 @@ var EmojiPickerListSearch = exports.EmojiPickerListSearch = function EmojiPicker
|
|
|
64
55
|
var handleOnChange = function handleOnChange(e) {
|
|
65
56
|
debouncedSearch(e.target.value);
|
|
66
57
|
};
|
|
67
|
-
(0, _react.useLayoutEffect)(function () {
|
|
68
|
-
if (isEmojiPickerInitialFocusFixEnabled()) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
requestAnimationFrame(function () {
|
|
72
|
-
if (textRef) {
|
|
73
|
-
var _textRef$current;
|
|
74
|
-
(_textRef$current = textRef.current) === null || _textRef$current === void 0 || _textRef$current.focus();
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}, []);
|
|
78
58
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
79
59
|
style: style,
|
|
80
60
|
className: (0, _runtime.ax)(["_vchhusvi _ca0qutpp _n3tdutpp _19bvutpp _u5f3utpp _1bsb1osq", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw"])
|
|
@@ -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: "72.4.
|
|
22
|
+
packageVersion: "72.4.33"
|
|
23
23
|
}, attributes)
|
|
24
24
|
};
|
|
25
25
|
};
|
|
@@ -5,7 +5,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { cx } from '@atlaskit/css';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
9
8
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
11
10
|
import { usePrevious } from '../../hooks/usePrevious';
|
|
@@ -17,14 +16,6 @@ import { categorySelectorCategoryTestId } from './categorySelectorCategoryTestId
|
|
|
17
16
|
import { RENDER_EMOJI_PICKER_LIST_TESTID } from './EmojiPickerList';
|
|
18
17
|
import { sortCategories } from './sortCategories';
|
|
19
18
|
import { sortCategoriesNew } from './sortCategoriesNew';
|
|
20
|
-
const isEmojiPickerInitialFocusFixEnabled = () => {
|
|
21
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
22
|
-
return false;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
26
|
-
return FeatureGates.getExperimentValue('tef_fix_a11y_keyboard_control_emoji_picker', 'isEnabled', false);
|
|
27
|
-
};
|
|
28
19
|
const styles = {
|
|
29
20
|
commonCategory: "_2rko12b0 _v564h5h4 _189eidpf _bfhksm61 _ca0qze3t _n3tdze3t _19bvze3t _u5f3ze3t",
|
|
30
21
|
commonCategoryNew: "_v564h5h4 _189eidpf _bfhksm61 _ca0qu2gc _n3tdu2gc _19bv12x7 _u5f312x7 _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -77,7 +68,7 @@ const CategorySelector = props => {
|
|
|
77
68
|
}, [categoryRef, setCurrentFocus]);
|
|
78
69
|
useEffect(() => {
|
|
79
70
|
var _categoryRef$current2, _categoryRef$current3;
|
|
80
|
-
if (hasSetInitialFocus.current || !
|
|
71
|
+
if (hasSetInitialFocus.current || !activeCategoryId) {
|
|
81
72
|
return;
|
|
82
73
|
}
|
|
83
74
|
const activeCategoryIndex = categories.indexOf(activeCategoryId);
|
|
@@ -1,24 +1,15 @@
|
|
|
1
1
|
/* EmojiPickerListSearch.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
2
|
import "./EmojiPickerListSearch.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
-
import React, {
|
|
4
|
+
import React, { useRef, useState } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { useDebouncedCallback } from 'use-debounce';
|
|
7
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
8
7
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
9
8
|
import TextField from '@atlaskit/textfield/text-field';
|
|
10
9
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
11
10
|
import { EMOJI_SEARCH_DEBOUNCE } from '../../util/constants';
|
|
12
11
|
import { isRefreshEmojiPickerEnabled } from '../common/isRefreshEmojiPickerEnabled';
|
|
13
12
|
import { messages } from '../i18n';
|
|
14
|
-
const isEmojiPickerInitialFocusFixEnabled = () => {
|
|
15
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
20
|
-
return FeatureGates.getExperimentValue('tef_fix_a11y_keyboard_control_emoji_picker', 'isEnabled', false);
|
|
21
|
-
};
|
|
22
13
|
const input = null;
|
|
23
14
|
const inputNew = null;
|
|
24
15
|
const textFieldWrapperNew = null;
|
|
@@ -51,17 +42,6 @@ export const EmojiPickerListSearch = props => {
|
|
|
51
42
|
const handleOnChange = e => {
|
|
52
43
|
debouncedSearch(e.target.value);
|
|
53
44
|
};
|
|
54
|
-
useLayoutEffect(() => {
|
|
55
|
-
if (isEmojiPickerInitialFocusFixEnabled()) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
requestAnimationFrame(() => {
|
|
59
|
-
if (textRef) {
|
|
60
|
-
var _textRef$current;
|
|
61
|
-
(_textRef$current = textRef.current) === null || _textRef$current === void 0 ? void 0 : _textRef$current.focus();
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}, []);
|
|
65
45
|
return /*#__PURE__*/React.createElement("div", {
|
|
66
46
|
style: style,
|
|
67
47
|
className: ax(["_vchhusvi _ca0qutpp _n3tdutpp _19bvutpp _u5f3utpp _1bsb1osq", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw"])
|
|
@@ -6,7 +6,6 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { useIntl } from 'react-intl';
|
|
8
8
|
import { cx } from '@atlaskit/css';
|
|
9
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
10
9
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
12
11
|
import { usePrevious } from '../../hooks/usePrevious';
|
|
@@ -18,14 +17,6 @@ import { categorySelectorCategoryTestId } from './categorySelectorCategoryTestId
|
|
|
18
17
|
import { RENDER_EMOJI_PICKER_LIST_TESTID } from './EmojiPickerList';
|
|
19
18
|
import { sortCategories } from './sortCategories';
|
|
20
19
|
import { sortCategoriesNew } from './sortCategoriesNew';
|
|
21
|
-
var isEmojiPickerInitialFocusFixEnabled = function isEmojiPickerInitialFocusFixEnabled() {
|
|
22
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
27
|
-
return FeatureGates.getExperimentValue('tef_fix_a11y_keyboard_control_emoji_picker', 'isEnabled', false);
|
|
28
|
-
};
|
|
29
20
|
var styles = {
|
|
30
21
|
commonCategory: "_2rko12b0 _v564h5h4 _189eidpf _bfhksm61 _ca0qze3t _n3tdze3t _19bvze3t _u5f3ze3t",
|
|
31
22
|
commonCategoryNew: "_v564h5h4 _189eidpf _bfhksm61 _ca0qu2gc _n3tdu2gc _19bv12x7 _u5f312x7 _1e0c1txw _4cvr1h6o _1bah1h6o",
|
|
@@ -83,7 +74,7 @@ var CategorySelector = function CategorySelector(props) {
|
|
|
83
74
|
}, [categoryRef, setCurrentFocus]);
|
|
84
75
|
useEffect(function () {
|
|
85
76
|
var _categoryRef$current2, _categoryRef$current3;
|
|
86
|
-
if (hasSetInitialFocus.current || !
|
|
77
|
+
if (hasSetInitialFocus.current || !activeCategoryId) {
|
|
87
78
|
return;
|
|
88
79
|
}
|
|
89
80
|
var activeCategoryIndex = categories.indexOf(activeCategoryId);
|
|
@@ -2,24 +2,15 @@
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import "./EmojiPickerListSearch.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import React, {
|
|
5
|
+
import React, { useRef, useState } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { useDebouncedCallback } from 'use-debounce';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
9
8
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
10
9
|
import TextField from '@atlaskit/textfield/text-field';
|
|
11
10
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
12
11
|
import { EMOJI_SEARCH_DEBOUNCE } from '../../util/constants';
|
|
13
12
|
import { isRefreshEmojiPickerEnabled } from '../common/isRefreshEmojiPickerEnabled';
|
|
14
13
|
import { messages } from '../i18n';
|
|
15
|
-
var isEmojiPickerInitialFocusFixEnabled = function isEmojiPickerInitialFocusFixEnabled() {
|
|
16
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
21
|
-
return FeatureGates.getExperimentValue('tef_fix_a11y_keyboard_control_emoji_picker', 'isEnabled', false);
|
|
22
|
-
};
|
|
23
14
|
var input = null;
|
|
24
15
|
var inputNew = null;
|
|
25
16
|
var textFieldWrapperNew = null;
|
|
@@ -55,17 +46,6 @@ export var EmojiPickerListSearch = function EmojiPickerListSearch(props) {
|
|
|
55
46
|
var handleOnChange = function handleOnChange(e) {
|
|
56
47
|
debouncedSearch(e.target.value);
|
|
57
48
|
};
|
|
58
|
-
useLayoutEffect(function () {
|
|
59
|
-
if (isEmojiPickerInitialFocusFixEnabled()) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
requestAnimationFrame(function () {
|
|
63
|
-
if (textRef) {
|
|
64
|
-
var _textRef$current;
|
|
65
|
-
(_textRef$current = textRef.current) === null || _textRef$current === void 0 || _textRef$current.focus();
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}, []);
|
|
69
49
|
return /*#__PURE__*/React.createElement("div", {
|
|
70
50
|
style: style,
|
|
71
51
|
className: ax(["_vchhusvi _ca0qutpp _n3tdutpp _19bvutpp _u5f3utpp _1bsb1osq", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw"])
|
|
@@ -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: "72.4.
|
|
15
|
+
packageVersion: "72.4.33"
|
|
16
16
|
}, attributes)
|
|
17
17
|
};
|
|
18
18
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "72.4.
|
|
3
|
+
"version": "72.4.34",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@atlaskit/theme": "^28.2.0",
|
|
57
57
|
"@atlaskit/tmp-editor-statsig": "^219.0.0",
|
|
58
58
|
"@atlaskit/tokens": "^20.1.0",
|
|
59
|
-
"@atlaskit/tooltip": "^24.
|
|
59
|
+
"@atlaskit/tooltip": "^24.4.0",
|
|
60
60
|
"@atlaskit/ufo": "^2.0.0",
|
|
61
61
|
"@atlaskit/util-service-support": "^7.4.0",
|
|
62
62
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
@@ -140,10 +140,6 @@
|
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
142
|
"platform-experiments": {
|
|
143
|
-
"tef_fix_a11y_keyboard_control_emoji_picker": {
|
|
144
|
-
"param": "isEnabled",
|
|
145
|
-
"defaultValue": false
|
|
146
|
-
},
|
|
147
143
|
"platform_teamoji_26_refresh_emoji_picker": {
|
|
148
144
|
"param": "isEnabled",
|
|
149
145
|
"defaultValue": false
|