@atlaskit/emoji 70.15.2 → 70.16.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 +15 -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 +9 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useIntl } from 'react-intl';
|
|
2
2
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
4
4
|
import { customCategory, defaultEmojiPickerSize, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
5
5
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
6
6
|
import CategoryTracker from './CategoryTracker';
|
|
@@ -114,7 +114,7 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
114
114
|
}, [groupByCategory]);
|
|
115
115
|
const addToCategoryMap = (categoryToGroupMap, emoji, category) => {
|
|
116
116
|
if (!categoryToGroupMap[category]) {
|
|
117
|
-
const categoryDefinition =
|
|
117
|
+
const categoryDefinition = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew[category] : CategoryDescriptionMap[category];
|
|
118
118
|
categoryToGroupMap[category] = {
|
|
119
119
|
emojis: [],
|
|
120
120
|
title: categoryDefinition.name,
|
|
@@ -145,7 +145,7 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
145
145
|
onDelete: onEmojiDelete,
|
|
146
146
|
onMouseMove: onEmojiActive,
|
|
147
147
|
onFocus: onEmojiActive,
|
|
148
|
-
onMouseLeave:
|
|
148
|
+
onMouseLeave: FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? onEmojiLeave : undefined
|
|
149
149
|
}));
|
|
150
150
|
}
|
|
151
151
|
return items;
|
|
@@ -158,8 +158,8 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
158
158
|
items.push(new LoadingItem());
|
|
159
159
|
} else {
|
|
160
160
|
if (query) {
|
|
161
|
-
const search =
|
|
162
|
-
if (emojis.length === 0 &&
|
|
161
|
+
const search = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew.SEARCH : CategoryDescriptionMap.SEARCH;
|
|
162
|
+
if (emojis.length === 0 && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
163
163
|
// Show a "No results" category heading, then a no-results illustration below it
|
|
164
164
|
items.push(new CategoryHeadingItem({
|
|
165
165
|
id: searchCategory,
|
|
@@ -312,11 +312,11 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
312
312
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
313
313
|
}, [virtualItems, categoriesChanged]);
|
|
314
314
|
const virtualListHeight = useMemo(() => {
|
|
315
|
-
if (query && emojis.length === 0 &&
|
|
315
|
+
if (query && emojis.length === 0 && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
316
316
|
// No-results state: expand the list height to fit heading + illustration without scrolling
|
|
317
317
|
return sizes.categoryHeadingHeight + sizes.noResultsHeight + emojiPickerHeightOffset(size);
|
|
318
318
|
}
|
|
319
|
-
return
|
|
319
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? sizes.listHeightNew + emojiPickerHeightOffset(size) : sizes.listHeight + emojiPickerHeightOffset(size);
|
|
320
320
|
}, [size, query, emojis.length]);
|
|
321
321
|
return /*#__PURE__*/React.createElement(EmojiPickerTabPanel, {
|
|
322
322
|
showSearchResults: !!query
|
|
@@ -4,11 +4,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
5
5
|
import TextField from '@atlaskit/textfield';
|
|
6
6
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
9
8
|
import { useIntl } from 'react-intl';
|
|
10
9
|
import { useDebouncedCallback } from 'use-debounce';
|
|
11
10
|
import { EMOJI_SEARCH_DEBOUNCE } from '../../util/constants';
|
|
11
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
12
12
|
import { messages } from '../i18n';
|
|
13
13
|
const input = null;
|
|
14
14
|
const inputNew = null;
|
|
@@ -58,7 +58,7 @@ export const EmojiPickerListSearch = props => {
|
|
|
58
58
|
role: "status"
|
|
59
59
|
}, dirty ? query === '' ? formatMessage(messages.searchResultsStatusSeeAll) : formatMessage(messages.searchResultsStatus, {
|
|
60
60
|
count: resultsCount
|
|
61
|
-
}) : null),
|
|
61
|
+
}) : null), FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
62
62
|
className: ax(["_n6341l7x _18z11b66"])
|
|
63
63
|
}, /*#__PURE__*/React.createElement(TextField, {
|
|
64
64
|
role: "searchbox",
|
|
@@ -5,9 +5,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import Button from '@atlaskit/button/standard-button';
|
|
6
6
|
import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
7
7
|
import { deleteEmojiLabel } from '../../util/constants';
|
|
8
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
8
9
|
import { emojiDeleteButton } from './styles';
|
|
9
10
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
var styles = {
|
|
12
12
|
boxWrapperStyle: "_1bsbf6fq _4t3if6fq"
|
|
13
13
|
};
|
|
@@ -19,15 +19,15 @@ var refreshedDeleteButton = null;
|
|
|
19
19
|
*/
|
|
20
20
|
export var RENDER_EMOJI_DELETE_BUTTON_TESTID = 'render-emoji-delete-button';
|
|
21
21
|
var DeleteButton = function DeleteButton(props) {
|
|
22
|
-
var
|
|
22
|
+
var isRefreshEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
23
23
|
return /*#__PURE__*/React.createElement("span", {
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
25
|
-
className: ax(["_3um015vq _1e0c1txw _kqswstnw _154ix0bf _1xi2x0bf _1pbykb7n _13t3idpf",
|
|
25
|
+
className: ax(["_3um015vq _1e0c1txw _kqswstnw _154ix0bf _1xi2x0bf _1pbykb7n _13t3idpf", isRefreshEnabled && "_154ir5cr _1xi2r5cr", emojiDeleteButton]),
|
|
26
26
|
"data-testid": RENDER_EMOJI_DELETE_BUTTON_TESTID
|
|
27
27
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
28
28
|
iconBefore: /*#__PURE__*/React.createElement(Box, {
|
|
29
29
|
xcss: styles.boxWrapperStyle
|
|
30
|
-
},
|
|
30
|
+
}, isRefreshEnabled ? /*#__PURE__*/React.createElement(CrossCircleIcon, {
|
|
31
31
|
label: deleteEmojiLabel,
|
|
32
32
|
color: "var(--ds-icon, #292A2E)",
|
|
33
33
|
size: "medium"
|
|
@@ -18,6 +18,7 @@ import AddIcon from '@atlaskit/icon/core/add';
|
|
|
18
18
|
import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
|
|
19
19
|
import { emojiPickerAddEmoji } from './styles';
|
|
20
20
|
import { DEFAULT_TONE } from '../../util/constants';
|
|
21
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
21
22
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
22
23
|
var styles = {
|
|
23
24
|
icon: "_18u0r5cr _2hwx1i6y"
|
|
@@ -125,7 +126,7 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
125
126
|
isVisible: !showToneSelector
|
|
126
127
|
}));
|
|
127
128
|
};
|
|
128
|
-
// TODO: remove this on cleanup of
|
|
129
|
+
// TODO: remove this on cleanup of platform_teamoji_26_refresh_emoji_picker
|
|
129
130
|
export var EmojiActions = function EmojiActions(props) {
|
|
130
131
|
var onToneSelected = props.onToneSelected,
|
|
131
132
|
onToneSelectorCancelled = props.onToneSelectorCancelled,
|
|
@@ -165,7 +166,7 @@ export var EmojiActions = function EmojiActions(props) {
|
|
|
165
166
|
setShowToneSelector(false);
|
|
166
167
|
}, [showToneSelector, onToneSelectorCancelled]);
|
|
167
168
|
if (uploading) {
|
|
168
|
-
return
|
|
169
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
169
170
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug"])
|
|
170
171
|
}, /*#__PURE__*/React.createElement(EmojiUploadPicker, {
|
|
171
172
|
onUploadCancelled: onUploadCancelled,
|
|
@@ -184,7 +185,7 @@ export var EmojiActions = function EmojiActions(props) {
|
|
|
184
185
|
}));
|
|
185
186
|
}
|
|
186
187
|
if (emojiToDelete) {
|
|
187
|
-
return
|
|
188
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
188
189
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug"])
|
|
189
190
|
}, /*#__PURE__*/React.createElement(EmojiDeletePreview, {
|
|
190
191
|
emoji: emojiToDelete,
|
|
@@ -198,7 +199,7 @@ export var EmojiActions = function EmojiActions(props) {
|
|
|
198
199
|
onCloseDelete: onCloseDelete
|
|
199
200
|
}));
|
|
200
201
|
}
|
|
201
|
-
return
|
|
202
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
202
203
|
"data-testid": emojiActionsTestId,
|
|
203
204
|
onMouseLeave: onMouseLeaveHandler,
|
|
204
205
|
onBlur: fg('platform_suppression_removal_fix_reactions') ? onMouseLeaveHandler : undefined,
|
|
@@ -17,7 +17,7 @@ import AkButton from '@atlaskit/button/new';
|
|
|
17
17
|
import Heading from '@atlaskit/heading';
|
|
18
18
|
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
19
19
|
import FocusLock from 'react-focus-lock';
|
|
20
|
-
import
|
|
20
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
21
21
|
import { messages } from '../i18n';
|
|
22
22
|
import CachingEmoji from './CachingEmoji';
|
|
23
23
|
import EmojiErrorMessage, { emojiErrorScreenreaderTestId } from './EmojiErrorMessage';
|
|
@@ -88,7 +88,7 @@ var EmojiDeletePreview = /*#__PURE__*/function (_Component) {
|
|
|
88
88
|
loading = _this$state.loading,
|
|
89
89
|
error = _this$state.error;
|
|
90
90
|
var formatMessage = intl.formatMessage;
|
|
91
|
-
if (
|
|
91
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
92
92
|
return /*#__PURE__*/React.createElement(FocusLock, {
|
|
93
93
|
noFocusGuards: true
|
|
94
94
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import "./EmojiErrorMessage.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
6
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
8
7
|
import { ErrorMessage } from '@atlaskit/form';
|
|
8
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
import { messages } from '../i18n';
|
|
11
11
|
var errorMessageStyles = {
|
|
@@ -35,7 +35,7 @@ var EmojiErrorMessage = function EmojiErrorMessage(props) {
|
|
|
35
35
|
label: formatMessage(messages.error),
|
|
36
36
|
spacing: "spacious",
|
|
37
37
|
testId: emojiErrorIconTestId
|
|
38
|
-
}))) :
|
|
38
|
+
}))) : FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
39
39
|
"data-testid": emojiErrorMessageTestId
|
|
40
40
|
}, /*#__PURE__*/React.createElement(ErrorMessage, null, message)) : /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
"data-testid": emojiErrorMessageTestId,
|
|
@@ -3,6 +3,7 @@ import "./EmojiRadioButton.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { memo, forwardRef } from 'react';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
6
7
|
import Emoji from './Emoji';
|
|
7
8
|
import { TONESELECTOR_KEYBOARD_KEYS_SUPPORTED } from '../../util/constants';
|
|
8
9
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -11,7 +12,7 @@ var emojiRadio = {
|
|
|
11
12
|
default: "_tzy4idpf _kqswstnw _154i14id _1ltv14id _3y8mfajl _157z1r31 _1dzmglyw _1sqm1o36 _fh6w1y54 _1i1213zc"
|
|
12
13
|
};
|
|
13
14
|
var handleKeyDown = function handleKeyDown(props, event) {
|
|
14
|
-
if ((event.key === 'ArrowLeft' || event.key === 'ArrowRight') &&
|
|
15
|
+
if ((event.key === 'ArrowLeft' || event.key === 'ArrowRight') && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
15
16
|
var _props$onArrowKey;
|
|
16
17
|
event.preventDefault();
|
|
17
18
|
event.stopPropagation();
|
|
@@ -48,7 +49,7 @@ export var EmojiRadioButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
48
49
|
onKeyDown: function onKeyDown(event) {
|
|
49
50
|
return handleKeyDown(props, event);
|
|
50
51
|
},
|
|
51
|
-
onChange:
|
|
52
|
+
onChange: FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? function (e) {
|
|
52
53
|
return e.preventDefault();
|
|
53
54
|
} : undefined,
|
|
54
55
|
className: ax([emojiRadio.default])
|
|
@@ -12,6 +12,7 @@ import CrossIcon from '@atlaskit/icon/core/cross';
|
|
|
12
12
|
import AkButton from '@atlaskit/button/standard-button';
|
|
13
13
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
14
14
|
import FocusLock from 'react-focus-lock';
|
|
15
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
15
16
|
import * as ImageUtil from '../../util/image';
|
|
16
17
|
import debug from '../../util/logger';
|
|
17
18
|
import { messages } from '../i18n';
|
|
@@ -54,7 +55,7 @@ var toEmojiName = function toEmojiName(uploadName) {
|
|
|
54
55
|
return "".concat(name.substr(0, 1).toLocaleUpperCase()).concat(name.substr(1));
|
|
55
56
|
};
|
|
56
57
|
var isSupportedEmojiUploadFileType = function isSupportedEmojiUploadFileType(file) {
|
|
57
|
-
if (!
|
|
58
|
+
if (!FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
58
59
|
return true;
|
|
59
60
|
}
|
|
60
61
|
if (supportedEmojiUploadMimeTypes.has(file.type)) {
|
|
@@ -100,7 +101,7 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
100
101
|
var emojiChooseFileTitleNew = formatMessage(messages.emojiChooseFileDndTitle);
|
|
101
102
|
var isUploading = uploadStatus === UploadStatus.Uploading;
|
|
102
103
|
var addEmojiDisabled = !previewImage || !name || isUploading;
|
|
103
|
-
return
|
|
104
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
104
105
|
"data-testid": uploadEmojiComponentTestId,
|
|
105
106
|
className: ax(["_ca0qu2gc _u5f3pxbi _n3tdu2gc _19bvpxbi _1e0c1txw _2lx21bp4 _1bah1b1v"])
|
|
106
107
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -112,7 +113,7 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
112
113
|
className: ax(["_zulp12x7 _1e0c1txw _2lx21bp4 _1tker0r7"])
|
|
113
114
|
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, function () {
|
|
114
115
|
return /*#__PURE__*/React.createElement(FileChooser, {
|
|
115
|
-
label:
|
|
116
|
+
label: FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? emojiChooseFileTitleNew : emojiChooseFileTitle,
|
|
116
117
|
onChange: onChooseFile,
|
|
117
118
|
onClick: onClick,
|
|
118
119
|
accept: "image/png,image/jpeg,image/gif",
|
|
@@ -197,7 +198,7 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
197
198
|
"aria-required": true
|
|
198
199
|
})), /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, function () {
|
|
199
200
|
return /*#__PURE__*/React.createElement(FileChooser, {
|
|
200
|
-
label:
|
|
201
|
+
label: FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? emojiChooseFileTitleNew : emojiChooseFileTitle,
|
|
201
202
|
onChange: onChooseFile,
|
|
202
203
|
onClick: onClick,
|
|
203
204
|
accept: "image/png,image/jpeg,image/gif",
|
|
@@ -385,8 +386,8 @@ var EmojiUploadPicker = function EmojiUploadPicker(props) {
|
|
|
385
386
|
var onChooseFileClicked = function onChooseFileClicked() {
|
|
386
387
|
onFileChooserClicked && onFileChooserClicked();
|
|
387
388
|
};
|
|
388
|
-
var isDuplicateNameError = errorMessage !== null && errorMessage !== undefined &&
|
|
389
|
-
var content = name && previewImage && !
|
|
389
|
+
var isDuplicateNameError = errorMessage !== null && errorMessage !== undefined && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
390
|
+
var content = name && previewImage && !FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement(EmojiUploadPreview, {
|
|
390
391
|
errorMessage: errorMessage,
|
|
391
392
|
name: name,
|
|
392
393
|
onAddEmoji: onAddEmoji,
|
|
@@ -406,7 +407,7 @@ var EmojiUploadPicker = function EmojiUploadPicker(props) {
|
|
|
406
407
|
nameErrorMessage: isDuplicateNameError ? errorMessage : undefined,
|
|
407
408
|
intl: intl
|
|
408
409
|
});
|
|
409
|
-
return disableFocusLock ||
|
|
410
|
+
return disableFocusLock || FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? content : /*#__PURE__*/React.createElement(FocusLock, {
|
|
410
411
|
noFocusGuards: true
|
|
411
412
|
}, content);
|
|
412
413
|
};
|
|
@@ -5,7 +5,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
import Button from '@atlaskit/button/new';
|
|
7
7
|
import UploadIcon from '@atlaskit/icon/core/upload';
|
|
8
|
-
import
|
|
8
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
9
|
import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
|
|
10
10
|
import { containsFiles, getFiles } from '@atlaskit/pragmatic-drag-and-drop/external/file';
|
|
11
11
|
export var chooseFileButtonTestId = 'choose-file-button';
|
|
@@ -62,7 +62,7 @@ var FileChooser = function FileChooser(props) {
|
|
|
62
62
|
}, [onChange]);
|
|
63
63
|
useEffect(function () {
|
|
64
64
|
var element = dropzoneRef.current;
|
|
65
|
-
if (!element || !
|
|
65
|
+
if (!element || !FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
var suppressNativeFileDrop = function suppressNativeFileDrop(event) {
|
|
@@ -122,7 +122,7 @@ var FileChooser = function FileChooser(props) {
|
|
|
122
122
|
},
|
|
123
123
|
"data-testid": fileUploadInputTestId
|
|
124
124
|
});
|
|
125
|
-
if (
|
|
125
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
126
126
|
return /*#__PURE__*/React.createElement("div", {
|
|
127
127
|
ref: dropzoneRef,
|
|
128
128
|
"data-testid": dropzoneTestId,
|
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef, memo } from 'react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
8
|
import Emoji from './Emoji';
|
|
8
9
|
export var tonePreviewTestId = 'tone-preview';
|
|
9
10
|
var emojiButton = null;
|
|
@@ -18,7 +19,7 @@ export var TonePreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
18
19
|
_props$isVisible = props.isVisible,
|
|
19
20
|
isVisible = _props$isVisible === void 0 ? true : _props$isVisible;
|
|
20
21
|
var fitToHeight = fg('platform_twemoji_removal_unicode_emojis') ? 24 : undefined;
|
|
21
|
-
return
|
|
22
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("button", {
|
|
22
23
|
ref: ref,
|
|
23
24
|
onClick: onSelected,
|
|
24
25
|
"aria-label": ariaLabelText,
|
|
@@ -6,7 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
8
|
import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
9
|
-
import
|
|
9
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
10
10
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
11
11
|
import { createAndFireEventInElementsChannel, toneSelectedEvent, toneSelectorOpenedEvent } from '../../util/analytics';
|
|
12
12
|
import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
|
|
@@ -94,7 +94,7 @@ export var ToneSelectorInternal = function ToneSelectorInternal(props) {
|
|
|
94
94
|
"aria-label": formatMessage(messages.emojiSelectSkinToneListAriaLabelText),
|
|
95
95
|
className: ax([!isVisible && "_tzy4idpf _3um015vq _1e0cglyw"])
|
|
96
96
|
}, emojiToneCollection.map(function (tone, renderIndex) {
|
|
97
|
-
return
|
|
97
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement(EmojiRadioButton, {
|
|
98
98
|
ref: function ref(el) {
|
|
99
99
|
radioRefs.current[renderIndex] = el;
|
|
100
100
|
if (tone.isSelected && selectedToneRadioRef) {
|
|
@@ -5,11 +5,11 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
7
|
import { cx } from '@atlaskit/css';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { useIntl } from 'react-intl';
|
|
10
9
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import Tooltip from '@atlaskit/tooltip';
|
|
12
11
|
import { CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED, defaultCategories, KeyboardKeys } from '../../util/constants';
|
|
12
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
13
13
|
import { messages } from '../i18n';
|
|
14
14
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
15
15
|
import { usePrevious } from '../../hooks/usePrevious';
|
|
@@ -38,8 +38,8 @@ var addNewCategories = function addNewCategories(oldCategories, newCategories) {
|
|
|
38
38
|
return oldCategories;
|
|
39
39
|
}
|
|
40
40
|
return oldCategories.concat(newCategories.filter(function (category) {
|
|
41
|
-
return !!(
|
|
42
|
-
})).sort(
|
|
41
|
+
return !!(FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew : CategoryDescriptionMap)[category];
|
|
42
|
+
})).sort(FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? sortCategoriesNew : sortCategories);
|
|
43
43
|
};
|
|
44
44
|
export var categorySelectorComponentTestId = 'category-selector-component';
|
|
45
45
|
export var categorySelectorCategoryTestId = function categorySelectorCategoryTestId(categoryId) {
|
|
@@ -117,14 +117,14 @@ var CategorySelector = function CategorySelector(props) {
|
|
|
117
117
|
};
|
|
118
118
|
var categoriesSection;
|
|
119
119
|
if (categories) {
|
|
120
|
-
categoriesSection =
|
|
120
|
+
categoriesSection = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
121
121
|
role: "tablist",
|
|
122
122
|
"aria-label": formatMessage(messages.categoriesSelectorLabel),
|
|
123
123
|
"data-testid": categorySelectorComponentTestId,
|
|
124
124
|
ref: categoryRef,
|
|
125
125
|
className: ax(["_ca0qze3t _n3tdze3t _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1fhb"])
|
|
126
126
|
}, categories.map(function (categoryId, index) {
|
|
127
|
-
var category =
|
|
127
|
+
var category = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew[categoryId] : CategoryDescriptionMap[categoryId];
|
|
128
128
|
var Icon = category.icon;
|
|
129
129
|
var categoryName = formatMessage(messages[category.name]);
|
|
130
130
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -154,7 +154,7 @@ var CategorySelector = function CategorySelector(props) {
|
|
|
154
154
|
ref: categoryRef,
|
|
155
155
|
className: ax(["_ca0q12x7 _n3td12x7 _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1h6o"])
|
|
156
156
|
}, categories.map(function (categoryId, index) {
|
|
157
|
-
var category =
|
|
157
|
+
var category = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew[categoryId] : CategoryDescriptionMap[categoryId];
|
|
158
158
|
var Icon = category.icon;
|
|
159
159
|
var categoryName = formatMessage(messages[category.name]);
|
|
160
160
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -179,7 +179,7 @@ var CategorySelector = function CategorySelector(props) {
|
|
|
179
179
|
})));
|
|
180
180
|
}));
|
|
181
181
|
}
|
|
182
|
-
return
|
|
182
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
183
183
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkvuon _ca0qze3t _n3tdze3t _1doce4h9 _1il9nqa1 _1o3i1l7x _dpd31txw"])
|
|
184
184
|
}, categoriesSection) : /*#__PURE__*/React.createElement("div", {
|
|
185
185
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkhfxm _dpd31txw"])
|
|
@@ -12,9 +12,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
12
12
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
13
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
14
|
import React from 'react';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
17
16
|
import { ufoExperiences } from '../../util/analytics';
|
|
17
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
18
18
|
import LoadingEmojiComponent from '../common/LoadingEmojiComponent';
|
|
19
19
|
import { LoadingItem } from './EmojiPickerVirtualItems';
|
|
20
20
|
import { UfoErrorBoundary } from '../common/UfoErrorBoundary';
|
|
@@ -67,7 +67,7 @@ export var EmojiPickerInternal = /*#__PURE__*/function (_LoadingEmojiComponen) {
|
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
ufoExperiences['emoji-picker-opened'].markFMP();
|
|
70
|
-
return
|
|
70
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
71
71
|
ref: handlePickerRef,
|
|
72
72
|
className: ax(["_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iixjv _1bsb1edt _1ul91edt _1tke5x59 _c71l1y6z"])
|
|
73
73
|
}, item.renderItem()) : /*#__PURE__*/React.createElement("div", {
|
|
@@ -10,7 +10,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
10
10
|
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; }
|
|
11
11
|
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; }
|
|
12
12
|
import { useCallback, useEffect, useMemo, useRef, useState, createRef, memo } from 'react';
|
|
13
|
-
import
|
|
13
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
14
14
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
15
15
|
import { dropTargetForExternal, monitorForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
|
|
16
16
|
import { containsFiles } from '@atlaskit/pragmatic-drag-and-drop/external/file';
|
|
@@ -149,7 +149,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
149
149
|
var isProgrammaticScroll = useRef(false);
|
|
150
150
|
var pickerRef = useRef(null);
|
|
151
151
|
var setPickerRef = useCallback(function (el) {
|
|
152
|
-
if (
|
|
152
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
153
153
|
pickerRef.current = el;
|
|
154
154
|
}
|
|
155
155
|
onPickerRef === null || onPickerRef === void 0 || onPickerRef(el);
|
|
@@ -169,7 +169,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
169
169
|
}
|
|
170
170
|
}, [selectedEmoji]);
|
|
171
171
|
var onEmojiLeave = useCallback(function () {
|
|
172
|
-
if (
|
|
172
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
173
173
|
setSelectedEmoji(undefined);
|
|
174
174
|
}
|
|
175
175
|
}, []);
|
|
@@ -177,16 +177,16 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
177
177
|
// Ignore scroll-driven category changes while a programmatic reveal()
|
|
178
178
|
// scroll is in progress — they would flicker the indicator through
|
|
179
179
|
// intermediate categories before landing on the correct one.
|
|
180
|
-
if (isProgrammaticScroll.current &&
|
|
180
|
+
if (isProgrammaticScroll.current && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
// Ignore scroll-driven category changes while the upload or delete screen is open
|
|
184
|
-
if ((uploading || emojiToDelete) &&
|
|
184
|
+
if ((uploading || emojiToDelete) && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
185
185
|
return;
|
|
186
186
|
}
|
|
187
187
|
if (activeCategory !== category) {
|
|
188
188
|
setActiveCategory(category);
|
|
189
|
-
if (!query &&
|
|
189
|
+
if (!query && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
190
190
|
lastNonSearchCategory.current = category;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
@@ -203,7 +203,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
203
203
|
setUploadErrorMessage(undefined);
|
|
204
204
|
});
|
|
205
205
|
fireAnalytics(uploadCancelButton());
|
|
206
|
-
if (
|
|
206
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
207
207
|
setTimeout(function () {
|
|
208
208
|
var _getDocument;
|
|
209
209
|
(_getDocument = getDocument()) === null || _getDocument === void 0 || (_getDocument = _getDocument.getElementById('add-custom-emoji')) === null || _getDocument === void 0 || _getDocument.focus();
|
|
@@ -347,7 +347,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
// If the upload or delete screen is open, close it when a category is selected
|
|
350
|
-
if (
|
|
350
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
351
351
|
if (uploading) {
|
|
352
352
|
setUploading(false);
|
|
353
353
|
setUploadErrorMessage(undefined);
|
|
@@ -365,11 +365,11 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
367
|
if (emojiPickerList.current) {
|
|
368
|
-
if (
|
|
368
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
369
369
|
isProgrammaticScroll.current = true;
|
|
370
370
|
}
|
|
371
371
|
emojiPickerList.current.reveal(categoryId);
|
|
372
|
-
if (
|
|
372
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
373
373
|
// Clear the flag after the scroll animation has settled.
|
|
374
374
|
setTimeout(function () {
|
|
375
375
|
isProgrammaticScroll.current = false;
|
|
@@ -408,7 +408,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
408
408
|
};
|
|
409
409
|
if (searchQuery !== query) {
|
|
410
410
|
// Capture the active category before entering search so we can keep it highlighted
|
|
411
|
-
if (!query && searchQuery &&
|
|
411
|
+
if (!query && searchQuery && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
412
412
|
lastNonSearchCategory.current = activeCategory;
|
|
413
413
|
}
|
|
414
414
|
setQuery(searchQuery);
|
|
@@ -424,7 +424,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
424
424
|
// cannot reach underlying page drop handlers (e.g. the Confluence editor).
|
|
425
425
|
useEffect(function () {
|
|
426
426
|
var _getDocument2;
|
|
427
|
-
if (!uploading || !
|
|
427
|
+
if (!uploading || !FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
428
428
|
return;
|
|
429
429
|
}
|
|
430
430
|
var body = (_getDocument2 = getDocument()) === null || _getDocument2 === void 0 ? void 0 : _getDocument2.body;
|
|
@@ -493,7 +493,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
493
493
|
});
|
|
494
494
|
scrollToUploadedEmoji(emojiDescription);
|
|
495
495
|
};
|
|
496
|
-
if (!
|
|
496
|
+
if (!FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
497
497
|
_context.next = 2;
|
|
498
498
|
break;
|
|
499
499
|
}
|
|
@@ -631,14 +631,14 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
631
631
|
emojiProvider.unsubscribe(onProviderChange);
|
|
632
632
|
};
|
|
633
633
|
}, [emojiProvider, onProviderChange]);
|
|
634
|
-
var showPreview =
|
|
634
|
+
var showPreview = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? !uploading : selectedEmoji && !uploading;
|
|
635
635
|
return /*#__PURE__*/React.createElement("div", {
|
|
636
636
|
ref: setPickerRef,
|
|
637
637
|
"data-emoji-picker-container": true,
|
|
638
638
|
role: "dialog",
|
|
639
639
|
"aria-label": formatMessage(messages.emojiPickerTitle),
|
|
640
640
|
"aria-modal": true,
|
|
641
|
-
className: ax([
|
|
641
|
+
className: ax([FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? "_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iuxo9 _1bsb10mj _1ul910mj _c71l1y6z _kqswh2mm" : "_19itahnd _2rkofajl _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iuxo9 _1bsb10mj _1ul910mj _c71l1y6z _kqswh2mm", !!emojiToDelete && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withDeleteRefreshHeight[size] : uploading && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withUploadRefreshHeight[size] : query && filteredEmojis.length === 0 && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withNoResultsRefreshHeight[size] : showPreview ? withPreviewHeight[size] : withoutPreviewHeight[size]]),
|
|
642
642
|
style: {
|
|
643
643
|
"--_19dn98e": ix("".concat(emojiPickerHeight, "px")),
|
|
644
644
|
"--_gsvyy7": ix("".concat(emojiPickerWidth, "px"))
|
|
@@ -650,7 +650,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
650
650
|
onKeyDown: suppressKeyPress,
|
|
651
651
|
className: ax(["_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo15vq _18m915vq _1e0c1txw _2lx21bp4 _1bah1yb4 _1tkeidpf"])
|
|
652
652
|
}, /*#__PURE__*/React.createElement(CategorySelector, {
|
|
653
|
-
activeCategoryId: (uploading || emojiToDelete) &&
|
|
653
|
+
activeCategoryId: (uploading || emojiToDelete) && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? null : activeCategory,
|
|
654
654
|
dynamicCategories: dynamicCategories,
|
|
655
655
|
disableCategories: disableCategories,
|
|
656
656
|
onCategorySelected: onCategorySelected
|
|
@@ -683,7 +683,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
683
683
|
onOpenUpload: onOpenUpload,
|
|
684
684
|
size: size,
|
|
685
685
|
activeCategoryId: activeCategory
|
|
686
|
-
}), showPreview && !(emojiToDelete &&
|
|
686
|
+
}), showPreview && !(emojiToDelete && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) && !(query && filteredEmojis.length === 0 && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) && /*#__PURE__*/React.createElement(EmojiPickerFooter, {
|
|
687
687
|
selectedEmoji: selectedEmoji,
|
|
688
688
|
uploadEnabled: isUploadSupported && !uploading,
|
|
689
689
|
onOpenUpload: onOpenUpload
|
|
@@ -4,8 +4,8 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
9
|
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
10
10
|
import { AddOwnEmoji } from '../common/AddEmoji';
|
|
11
11
|
var emojiPickerFooter = null;
|
|
@@ -20,7 +20,7 @@ var EmojiPickerFooter = function EmojiPickerFooter(_ref) {
|
|
|
20
20
|
onOpenUpload = _ref.onOpenUpload,
|
|
21
21
|
uploadEnabled = _ref.uploadEnabled;
|
|
22
22
|
var intl = useIntl();
|
|
23
|
-
return
|
|
23
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
24
24
|
"data-testid": emojiPickerFooterTestId,
|
|
25
25
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug", "_x3doia51"])
|
|
26
26
|
}, selectedEmoji ? /*#__PURE__*/React.createElement(Box, {
|