@atlaskit/emoji 70.15.2 → 70.15.3
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 +7 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/components/common/DeleteButton.js +4 -4
- package/dist/cjs/components/common/EmojiActions.js +5 -4
- package/dist/cjs/components/common/EmojiDeletePreview.js +2 -2
- package/dist/cjs/components/common/EmojiErrorMessage.js +2 -2
- package/dist/cjs/components/common/EmojiRadioButton.js +3 -2
- package/dist/cjs/components/common/EmojiUploadPicker.js +8 -7
- package/dist/cjs/components/common/FileChooser.js +3 -3
- package/dist/cjs/components/common/TonePreviewButton.js +2 -1
- package/dist/cjs/components/common/ToneSelector.js +2 -2
- package/dist/cjs/components/picker/CategorySelector.js +7 -7
- package/dist/cjs/components/picker/EmojiPicker.js +2 -2
- package/dist/cjs/components/picker/EmojiPickerComponent.js +17 -17
- package/dist/cjs/components/picker/EmojiPickerFooter.js +3 -2
- package/dist/cjs/components/picker/EmojiPickerList.js +7 -7
- package/dist/cjs/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/components/common/DeleteButton.js +4 -4
- package/dist/es2019/components/common/EmojiActions.js +5 -4
- package/dist/es2019/components/common/EmojiDeletePreview.js +2 -2
- package/dist/es2019/components/common/EmojiErrorMessage.js +2 -2
- package/dist/es2019/components/common/EmojiRadioButton.js +3 -2
- package/dist/es2019/components/common/EmojiUploadPicker.js +8 -7
- package/dist/es2019/components/common/FileChooser.js +3 -3
- package/dist/es2019/components/common/TonePreviewButton.js +2 -1
- package/dist/es2019/components/common/ToneSelector.js +2 -2
- package/dist/es2019/components/picker/CategorySelector.js +6 -6
- package/dist/es2019/components/picker/EmojiPicker.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerComponent.js +17 -17
- package/dist/es2019/components/picker/EmojiPickerFooter.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerList.js +7 -7
- package/dist/es2019/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/components/common/DeleteButton.js +4 -4
- package/dist/esm/components/common/EmojiActions.js +5 -4
- package/dist/esm/components/common/EmojiDeletePreview.js +2 -2
- package/dist/esm/components/common/EmojiErrorMessage.js +2 -2
- package/dist/esm/components/common/EmojiRadioButton.js +3 -2
- package/dist/esm/components/common/EmojiUploadPicker.js +8 -7
- package/dist/esm/components/common/FileChooser.js +3 -3
- package/dist/esm/components/common/TonePreviewButton.js +2 -1
- package/dist/esm/components/common/ToneSelector.js +2 -2
- package/dist/esm/components/picker/CategorySelector.js +7 -7
- package/dist/esm/components/picker/EmojiPicker.js +2 -2
- package/dist/esm/components/picker/EmojiPickerComponent.js +17 -17
- package/dist/esm/components/picker/EmojiPickerFooter.js +2 -2
- package/dist/esm/components/picker/EmojiPickerList.js +7 -7
- package/dist/esm/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/package.json +8 -4
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
5
|
-
import
|
|
5
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
6
6
|
import { customCategory, defaultEmojiPickerSize, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
7
7
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
8
8
|
import CategoryTracker from './CategoryTracker';
|
|
@@ -137,7 +137,7 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
137
137
|
}, [groupByCategory]);
|
|
138
138
|
var addToCategoryMap = function addToCategoryMap(categoryToGroupMap, emoji, category) {
|
|
139
139
|
if (!categoryToGroupMap[category]) {
|
|
140
|
-
var categoryDefinition =
|
|
140
|
+
var categoryDefinition = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew[category] : CategoryDescriptionMap[category];
|
|
141
141
|
categoryToGroupMap[category] = {
|
|
142
142
|
emojis: [],
|
|
143
143
|
title: categoryDefinition.name,
|
|
@@ -168,7 +168,7 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
168
168
|
onDelete: onEmojiDelete,
|
|
169
169
|
onMouseMove: onEmojiActive,
|
|
170
170
|
onFocus: onEmojiActive,
|
|
171
|
-
onMouseLeave:
|
|
171
|
+
onMouseLeave: FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? onEmojiLeave : undefined
|
|
172
172
|
}));
|
|
173
173
|
}
|
|
174
174
|
return items;
|
|
@@ -181,8 +181,8 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
181
181
|
items.push(new LoadingItem());
|
|
182
182
|
} else {
|
|
183
183
|
if (query) {
|
|
184
|
-
var search =
|
|
185
|
-
if (emojis.length === 0 &&
|
|
184
|
+
var search = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew.SEARCH : CategoryDescriptionMap.SEARCH;
|
|
185
|
+
if (emojis.length === 0 && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
186
186
|
// Show a "No results" category heading, then a no-results illustration below it
|
|
187
187
|
items.push(new CategoryHeadingItem({
|
|
188
188
|
id: searchCategory,
|
|
@@ -336,11 +336,11 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
336
336
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
337
337
|
}, [virtualItems, categoriesChanged]);
|
|
338
338
|
var virtualListHeight = useMemo(function () {
|
|
339
|
-
if (query && emojis.length === 0 &&
|
|
339
|
+
if (query && emojis.length === 0 && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
340
340
|
// No-results state: expand the list height to fit heading + illustration without scrolling
|
|
341
341
|
return sizes.categoryHeadingHeight + sizes.noResultsHeight + emojiPickerHeightOffset(size);
|
|
342
342
|
}
|
|
343
|
-
return
|
|
343
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? sizes.listHeightNew + emojiPickerHeightOffset(size) : sizes.listHeight + emojiPickerHeightOffset(size);
|
|
344
344
|
}, [size, query, emojis.length]);
|
|
345
345
|
return /*#__PURE__*/React.createElement(EmojiPickerTabPanel, {
|
|
346
346
|
showSearchResults: !!query
|
|
@@ -5,11 +5,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
6
6
|
import TextField from '@atlaskit/textfield';
|
|
7
7
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
10
9
|
import { useIntl } from 'react-intl';
|
|
11
10
|
import { useDebouncedCallback } from 'use-debounce';
|
|
12
11
|
import { EMOJI_SEARCH_DEBOUNCE } from '../../util/constants';
|
|
12
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
13
13
|
import { messages } from '../i18n';
|
|
14
14
|
var input = null;
|
|
15
15
|
var inputNew = null;
|
|
@@ -62,7 +62,7 @@ export var EmojiPickerListSearch = function EmojiPickerListSearch(props) {
|
|
|
62
62
|
role: "status"
|
|
63
63
|
}, dirty ? query === '' ? formatMessage(messages.searchResultsStatusSeeAll) : formatMessage(messages.searchResultsStatus, {
|
|
64
64
|
count: resultsCount
|
|
65
|
-
}) : null),
|
|
65
|
+
}) : null), FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
66
66
|
className: ax(["_n6341l7x _18z11b66"])
|
|
67
67
|
}, /*#__PURE__*/React.createElement(TextField, {
|
|
68
68
|
role: "searchbox",
|
|
@@ -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: "70.15.
|
|
17
|
+
packageVersion: "70.15.2"
|
|
18
18
|
}, attributes)
|
|
19
19
|
};
|
|
20
20
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "70.15.
|
|
3
|
+
"version": "70.15.3",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@atlaskit/browser-apis": "^0.0.2",
|
|
43
43
|
"@atlaskit/button": "^23.11.0",
|
|
44
44
|
"@atlaskit/css": "^0.19.0",
|
|
45
|
+
"@atlaskit/feature-gate-js-client": "^5.7.0",
|
|
45
46
|
"@atlaskit/form": "^15.5.0",
|
|
46
47
|
"@atlaskit/heading": "^5.4.0",
|
|
47
48
|
"@atlaskit/icon": "^35.4.0",
|
|
@@ -141,9 +142,6 @@
|
|
|
141
142
|
"increase-emoji-client-upload-timeout": {
|
|
142
143
|
"type": "boolean"
|
|
143
144
|
},
|
|
144
|
-
"platform_emoji_picker_refresh": {
|
|
145
|
-
"type": "boolean"
|
|
146
|
-
},
|
|
147
145
|
"platform_emoji_keep_picker_open_on_upload": {
|
|
148
146
|
"type": "boolean"
|
|
149
147
|
},
|
|
@@ -157,6 +155,12 @@
|
|
|
157
155
|
"type": "boolean"
|
|
158
156
|
}
|
|
159
157
|
},
|
|
158
|
+
"platform-experiments": {
|
|
159
|
+
"platform_teamoji_26_refresh_emoji_picker": {
|
|
160
|
+
"param": "isEnabled",
|
|
161
|
+
"defaultValue": false
|
|
162
|
+
}
|
|
163
|
+
},
|
|
160
164
|
"scripts": {
|
|
161
165
|
"setup-first-time": "yarn run setup-local-config; yarn run setup-env",
|
|
162
166
|
"setup-local-config": "cp -nv local-config-template.ts local-config.ts",
|