@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
|
@@ -10,7 +10,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _reactIntl = require("react-intl");
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var
|
|
13
|
+
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
14
14
|
var _constants = require("../../util/constants");
|
|
15
15
|
var _categories = require("./categories");
|
|
16
16
|
var _CategoryTracker = _interopRequireDefault(require("./CategoryTracker"));
|
|
@@ -145,7 +145,7 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
145
145
|
}, [groupByCategory]);
|
|
146
146
|
var addToCategoryMap = function addToCategoryMap(categoryToGroupMap, emoji, category) {
|
|
147
147
|
if (!categoryToGroupMap[category]) {
|
|
148
|
-
var categoryDefinition = (
|
|
148
|
+
var categoryDefinition = _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? _categories.CategoryDescriptionMapNew[category] : _categories.CategoryDescriptionMap[category];
|
|
149
149
|
categoryToGroupMap[category] = {
|
|
150
150
|
emojis: [],
|
|
151
151
|
title: categoryDefinition.name,
|
|
@@ -176,7 +176,7 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
176
176
|
onDelete: onEmojiDelete,
|
|
177
177
|
onMouseMove: onEmojiActive,
|
|
178
178
|
onFocus: onEmojiActive,
|
|
179
|
-
onMouseLeave: (
|
|
179
|
+
onMouseLeave: _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? onEmojiLeave : undefined
|
|
180
180
|
}));
|
|
181
181
|
}
|
|
182
182
|
return items;
|
|
@@ -189,8 +189,8 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
189
189
|
items.push(new _EmojiPickerVirtualItems.LoadingItem());
|
|
190
190
|
} else {
|
|
191
191
|
if (query) {
|
|
192
|
-
var search = (
|
|
193
|
-
if (emojis.length === 0 && (
|
|
192
|
+
var search = _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? _categories.CategoryDescriptionMapNew.SEARCH : _categories.CategoryDescriptionMap.SEARCH;
|
|
193
|
+
if (emojis.length === 0 && _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
194
194
|
// Show a "No results" category heading, then a no-results illustration below it
|
|
195
195
|
items.push(new _EmojiPickerVirtualItems.CategoryHeadingItem({
|
|
196
196
|
id: _constants.searchCategory,
|
|
@@ -344,11 +344,11 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
344
344
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
345
345
|
}, [virtualItems, categoriesChanged]);
|
|
346
346
|
var virtualListHeight = (0, _react.useMemo)(function () {
|
|
347
|
-
if (query && emojis.length === 0 && (
|
|
347
|
+
if (query && emojis.length === 0 && _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
348
348
|
// No-results state: expand the list height to fit heading + illustration without scrolling
|
|
349
349
|
return _EmojiPickerSizes.sizes.categoryHeadingHeight + _EmojiPickerSizes.sizes.noResultsHeight + (0, _utils.emojiPickerHeightOffset)(size);
|
|
350
350
|
}
|
|
351
|
-
return (
|
|
351
|
+
return _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? _EmojiPickerSizes.sizes.listHeightNew + (0, _utils.emojiPickerHeightOffset)(size) : _EmojiPickerSizes.sizes.listHeight + (0, _utils.emojiPickerHeightOffset)(size);
|
|
352
352
|
}, [size, query, emojis.length]);
|
|
353
353
|
return /*#__PURE__*/_react.default.createElement(_EmojiPickerTabPanel.default, {
|
|
354
354
|
showSearchResults: !!query
|
|
@@ -13,11 +13,11 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
13
13
|
var _search = _interopRequireDefault(require("@atlaskit/icon/core/search"));
|
|
14
14
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
15
15
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
17
|
var _reactIntl = require("react-intl");
|
|
19
18
|
var _useDebounce = require("use-debounce");
|
|
20
19
|
var _constants = require("../../util/constants");
|
|
20
|
+
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
21
21
|
var _i18n = require("../i18n");
|
|
22
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); }
|
|
23
23
|
var input = null;
|
|
@@ -71,7 +71,7 @@ var EmojiPickerListSearch = exports.EmojiPickerListSearch = function EmojiPicker
|
|
|
71
71
|
role: "status"
|
|
72
72
|
}, dirty ? query === '' ? formatMessage(_i18n.messages.searchResultsStatusSeeAll) : formatMessage(_i18n.messages.searchResultsStatus, {
|
|
73
73
|
count: resultsCount
|
|
74
|
-
}) : null), (
|
|
74
|
+
}) : null), _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
75
75
|
className: (0, _runtime.ax)(["_n6341l7x _18z11b66"])
|
|
76
76
|
}, /*#__PURE__*/_react.default.createElement(_textfield.default, {
|
|
77
77
|
role: "searchbox",
|
|
@@ -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: "70.15.
|
|
23
|
+
packageVersion: "70.15.3"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -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
|
const styles = {
|
|
12
12
|
boxWrapperStyle: "_1bsbf6fq _4t3if6fq"
|
|
13
13
|
};
|
|
@@ -19,15 +19,15 @@ const refreshedDeleteButton = null;
|
|
|
19
19
|
*/
|
|
20
20
|
export const RENDER_EMOJI_DELETE_BUTTON_TESTID = 'render-emoji-delete-button';
|
|
21
21
|
const DeleteButton = props => {
|
|
22
|
-
const
|
|
22
|
+
const 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"
|
|
@@ -17,6 +17,7 @@ import AddIcon from '@atlaskit/icon/core/add';
|
|
|
17
17
|
import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
|
|
18
18
|
import { emojiPickerAddEmoji } from './styles';
|
|
19
19
|
import { DEFAULT_TONE } from '../../util/constants';
|
|
20
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
20
21
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
21
22
|
const styles = {
|
|
22
23
|
icon: "_18u0r5cr _2hwx1i6y"
|
|
@@ -128,7 +129,7 @@ const TonesWrapper = props => {
|
|
|
128
129
|
isVisible: !showToneSelector
|
|
129
130
|
}));
|
|
130
131
|
};
|
|
131
|
-
// TODO: remove this on cleanup of
|
|
132
|
+
// TODO: remove this on cleanup of platform_teamoji_26_refresh_emoji_picker
|
|
132
133
|
export const EmojiActions = props => {
|
|
133
134
|
const {
|
|
134
135
|
onToneSelected,
|
|
@@ -162,7 +163,7 @@ export const EmojiActions = props => {
|
|
|
162
163
|
setShowToneSelector(false);
|
|
163
164
|
}, [showToneSelector, onToneSelectorCancelled]);
|
|
164
165
|
if (uploading) {
|
|
165
|
-
return
|
|
166
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
166
167
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug"])
|
|
167
168
|
}, /*#__PURE__*/React.createElement(EmojiUploadPicker, {
|
|
168
169
|
onUploadCancelled: onUploadCancelled,
|
|
@@ -181,7 +182,7 @@ export const EmojiActions = props => {
|
|
|
181
182
|
}));
|
|
182
183
|
}
|
|
183
184
|
if (emojiToDelete) {
|
|
184
|
-
return
|
|
185
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
185
186
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug"])
|
|
186
187
|
}, /*#__PURE__*/React.createElement(EmojiDeletePreview, {
|
|
187
188
|
emoji: emojiToDelete,
|
|
@@ -195,7 +196,7 @@ export const EmojiActions = props => {
|
|
|
195
196
|
onCloseDelete: onCloseDelete
|
|
196
197
|
}));
|
|
197
198
|
}
|
|
198
|
-
return
|
|
199
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
199
200
|
"data-testid": emojiActionsTestId,
|
|
200
201
|
onMouseLeave: onMouseLeaveHandler,
|
|
201
202
|
onBlur: fg('platform_suppression_removal_fix_reactions') ? onMouseLeaveHandler : undefined,
|
|
@@ -10,7 +10,7 @@ import AkButton from '@atlaskit/button/new';
|
|
|
10
10
|
import Heading from '@atlaskit/heading';
|
|
11
11
|
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
12
12
|
import FocusLock from 'react-focus-lock';
|
|
13
|
-
import
|
|
13
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
14
14
|
import { messages } from '../i18n';
|
|
15
15
|
import CachingEmoji from './CachingEmoji';
|
|
16
16
|
import EmojiErrorMessage, { emojiErrorScreenreaderTestId } from './EmojiErrorMessage';
|
|
@@ -78,7 +78,7 @@ class EmojiDeletePreview extends Component {
|
|
|
78
78
|
const {
|
|
79
79
|
formatMessage
|
|
80
80
|
} = intl;
|
|
81
|
-
if (
|
|
81
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
82
82
|
return /*#__PURE__*/React.createElement(FocusLock, {
|
|
83
83
|
noFocusGuards: true
|
|
84
84
|
}, /*#__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
|
const errorMessageStyles = {
|
|
@@ -38,7 +38,7 @@ const EmojiErrorMessage = props => {
|
|
|
38
38
|
label: formatMessage(messages.error),
|
|
39
39
|
spacing: "spacious",
|
|
40
40
|
testId: emojiErrorIconTestId
|
|
41
|
-
}))) :
|
|
41
|
+
}))) : FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
42
42
|
"data-testid": emojiErrorMessageTestId
|
|
43
43
|
}, /*#__PURE__*/React.createElement(ErrorMessage, null, message)) : /*#__PURE__*/React.createElement("div", {
|
|
44
44
|
"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 @@ const emojiRadio = {
|
|
|
11
12
|
default: "_tzy4idpf _kqswstnw _154i14id _1ltv14id _3y8mfajl _157z1r31 _1dzmglyw _1sqm1o36 _fh6w1y54 _1i1213zc"
|
|
12
13
|
};
|
|
13
14
|
const 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();
|
|
@@ -50,7 +51,7 @@ export const EmojiRadioButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
50
51
|
return (_props$onSelected = props.onSelected) === null || _props$onSelected === void 0 ? void 0 : _props$onSelected.call(props);
|
|
51
52
|
},
|
|
52
53
|
onKeyDown: event => handleKeyDown(props, event),
|
|
53
|
-
onChange:
|
|
54
|
+
onChange: FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? e => e.preventDefault() : undefined,
|
|
54
55
|
className: ax([emojiRadio.default])
|
|
55
56
|
}), /*#__PURE__*/React.createElement(Emoji, {
|
|
56
57
|
emoji: emoji,
|
|
@@ -9,6 +9,7 @@ import CrossIcon from '@atlaskit/icon/core/cross';
|
|
|
9
9
|
import AkButton from '@atlaskit/button/standard-button';
|
|
10
10
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
11
11
|
import FocusLock from 'react-focus-lock';
|
|
12
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
12
13
|
import * as ImageUtil from '../../util/image';
|
|
13
14
|
import debug from '../../util/logger';
|
|
14
15
|
import { messages } from '../i18n';
|
|
@@ -51,7 +52,7 @@ const toEmojiName = uploadName => {
|
|
|
51
52
|
return `${name.substr(0, 1).toLocaleUpperCase()}${name.substr(1)}`;
|
|
52
53
|
};
|
|
53
54
|
const isSupportedEmojiUploadFileType = file => {
|
|
54
|
-
if (!
|
|
55
|
+
if (!FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
55
56
|
return true;
|
|
56
57
|
}
|
|
57
58
|
if (supportedEmojiUploadMimeTypes.has(file.type)) {
|
|
@@ -98,7 +99,7 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
98
99
|
const emojiChooseFileTitleNew = formatMessage(messages.emojiChooseFileDndTitle);
|
|
99
100
|
const isUploading = uploadStatus === UploadStatus.Uploading;
|
|
100
101
|
const addEmojiDisabled = !previewImage || !name || isUploading;
|
|
101
|
-
return
|
|
102
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
102
103
|
"data-testid": uploadEmojiComponentTestId,
|
|
103
104
|
className: ax(["_ca0qu2gc _u5f3pxbi _n3tdu2gc _19bvpxbi _1e0c1txw _2lx21bp4 _1bah1b1v"])
|
|
104
105
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -109,7 +110,7 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
109
110
|
}, previewImage ? /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiPreviewTitle) : /*#__PURE__*/React.createElement(FormattedMessage, messages.addCustomEmojiLabel))), /*#__PURE__*/React.createElement("div", {
|
|
110
111
|
className: ax(["_zulp12x7 _1e0c1txw _2lx21bp4 _1tker0r7"])
|
|
111
112
|
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, () => /*#__PURE__*/React.createElement(FileChooser, {
|
|
112
|
-
label:
|
|
113
|
+
label: FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? emojiChooseFileTitleNew : emojiChooseFileTitle,
|
|
113
114
|
onChange: onChooseFile,
|
|
114
115
|
onClick: onClick,
|
|
115
116
|
accept: "image/png,image/jpeg,image/gif",
|
|
@@ -192,7 +193,7 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
192
193
|
id: "new-emoji-name-input",
|
|
193
194
|
"aria-required": true
|
|
194
195
|
})), /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, () => /*#__PURE__*/React.createElement(FileChooser, {
|
|
195
|
-
label:
|
|
196
|
+
label: FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? emojiChooseFileTitleNew : emojiChooseFileTitle,
|
|
196
197
|
onChange: onChooseFile,
|
|
197
198
|
onClick: onClick,
|
|
198
199
|
accept: "image/png,image/jpeg,image/gif",
|
|
@@ -346,8 +347,8 @@ const EmojiUploadPicker = props => {
|
|
|
346
347
|
const onChooseFileClicked = () => {
|
|
347
348
|
onFileChooserClicked && onFileChooserClicked();
|
|
348
349
|
};
|
|
349
|
-
const isDuplicateNameError = errorMessage !== null && errorMessage !== undefined &&
|
|
350
|
-
const content = name && previewImage && !
|
|
350
|
+
const isDuplicateNameError = errorMessage !== null && errorMessage !== undefined && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
351
|
+
const content = name && previewImage && !FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement(EmojiUploadPreview, {
|
|
351
352
|
errorMessage: errorMessage,
|
|
352
353
|
name: name,
|
|
353
354
|
onAddEmoji: onAddEmoji,
|
|
@@ -367,7 +368,7 @@ const EmojiUploadPicker = props => {
|
|
|
367
368
|
nameErrorMessage: isDuplicateNameError ? errorMessage : undefined,
|
|
368
369
|
intl: intl
|
|
369
370
|
});
|
|
370
|
-
return disableFocusLock ||
|
|
371
|
+
return disableFocusLock || FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? content : /*#__PURE__*/React.createElement(FocusLock, {
|
|
371
372
|
noFocusGuards: true
|
|
372
373
|
}, content);
|
|
373
374
|
};
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import Button from '@atlaskit/button/new';
|
|
6
6
|
import UploadIcon from '@atlaskit/icon/core/upload';
|
|
7
|
-
import
|
|
7
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
8
8
|
import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
|
|
9
9
|
import { containsFiles, getFiles } from '@atlaskit/pragmatic-drag-and-drop/external/file';
|
|
10
10
|
export const chooseFileButtonTestId = 'choose-file-button';
|
|
@@ -56,7 +56,7 @@ const FileChooser = props => {
|
|
|
56
56
|
}, [onChange]);
|
|
57
57
|
useEffect(() => {
|
|
58
58
|
const element = dropzoneRef.current;
|
|
59
|
-
if (!element || !
|
|
59
|
+
if (!element || !FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
const suppressNativeFileDrop = event => {
|
|
@@ -115,7 +115,7 @@ const FileChooser = props => {
|
|
|
115
115
|
},
|
|
116
116
|
"data-testid": fileUploadInputTestId
|
|
117
117
|
});
|
|
118
|
-
if (
|
|
118
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
119
119
|
return /*#__PURE__*/React.createElement("div", {
|
|
120
120
|
ref: dropzoneRef,
|
|
121
121
|
"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 const tonePreviewTestId = 'tone-preview';
|
|
9
10
|
const emojiButton = null;
|
|
@@ -19,7 +20,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
19
20
|
isVisible = true
|
|
20
21
|
} = props;
|
|
21
22
|
const fitToHeight = fg('platform_twemoji_removal_unicode_emojis') ? 24 : undefined;
|
|
22
|
-
return
|
|
23
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("button", {
|
|
23
24
|
ref: ref,
|
|
24
25
|
onClick: onSelected,
|
|
25
26
|
"aria-label": ariaLabelText,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./ToneSelector.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
5
|
-
import
|
|
5
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
6
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
7
|
import { createAndFireEventInElementsChannel, toneSelectedEvent, toneSelectorOpenedEvent } from '../../util/analytics';
|
|
8
8
|
import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
|
|
@@ -92,7 +92,7 @@ export const ToneSelectorInternal = props => {
|
|
|
92
92
|
"aria-label": formatMessage(messages.emojiSelectSkinToneListAriaLabelText),
|
|
93
93
|
className: ax([!isVisible && "_tzy4idpf _3um015vq _1e0cglyw"])
|
|
94
94
|
}, emojiToneCollection.map((tone, renderIndex) => {
|
|
95
|
-
return
|
|
95
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement(EmojiRadioButton, {
|
|
96
96
|
ref: el => {
|
|
97
97
|
radioRefs.current[renderIndex] = el;
|
|
98
98
|
if (tone.isSelected && selectedToneRadioRef) {
|
|
@@ -4,11 +4,11 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
6
|
import { cx } from '@atlaskit/css';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { useIntl } from 'react-intl';
|
|
9
8
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
10
|
import { CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED, defaultCategories, KeyboardKeys } from '../../util/constants';
|
|
11
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
12
12
|
import { messages } from '../i18n';
|
|
13
13
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
14
14
|
import { usePrevious } from '../../hooks/usePrevious';
|
|
@@ -32,7 +32,7 @@ const addNewCategories = (oldCategories, newCategories) => {
|
|
|
32
32
|
if (!newCategories) {
|
|
33
33
|
return oldCategories;
|
|
34
34
|
}
|
|
35
|
-
return oldCategories.concat(newCategories.filter(category => !!(
|
|
35
|
+
return oldCategories.concat(newCategories.filter(category => !!(FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew : CategoryDescriptionMap)[category])).sort(FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? sortCategoriesNew : sortCategories);
|
|
36
36
|
};
|
|
37
37
|
export const categorySelectorComponentTestId = 'category-selector-component';
|
|
38
38
|
export const categorySelectorCategoryTestId = categoryId => `category-selector-${categoryId}`;
|
|
@@ -103,14 +103,14 @@ const CategorySelector = props => {
|
|
|
103
103
|
};
|
|
104
104
|
let categoriesSection;
|
|
105
105
|
if (categories) {
|
|
106
|
-
categoriesSection =
|
|
106
|
+
categoriesSection = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
107
107
|
role: "tablist",
|
|
108
108
|
"aria-label": formatMessage(messages.categoriesSelectorLabel),
|
|
109
109
|
"data-testid": categorySelectorComponentTestId,
|
|
110
110
|
ref: categoryRef,
|
|
111
111
|
className: ax(["_ca0qze3t _n3tdze3t _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1fhb"])
|
|
112
112
|
}, categories.map((categoryId, index) => {
|
|
113
|
-
const category =
|
|
113
|
+
const category = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew[categoryId] : CategoryDescriptionMap[categoryId];
|
|
114
114
|
const Icon = category.icon;
|
|
115
115
|
const categoryName = formatMessage(messages[category.name]);
|
|
116
116
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -140,7 +140,7 @@ const CategorySelector = props => {
|
|
|
140
140
|
ref: categoryRef,
|
|
141
141
|
className: ax(["_ca0q12x7 _n3td12x7 _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1h6o"])
|
|
142
142
|
}, categories.map((categoryId, index) => {
|
|
143
|
-
const category =
|
|
143
|
+
const category = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew[categoryId] : CategoryDescriptionMap[categoryId];
|
|
144
144
|
const Icon = category.icon;
|
|
145
145
|
const categoryName = formatMessage(messages[category.name]);
|
|
146
146
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -165,7 +165,7 @@ const CategorySelector = props => {
|
|
|
165
165
|
})));
|
|
166
166
|
}));
|
|
167
167
|
}
|
|
168
|
-
return
|
|
168
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
169
169
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkvuon _ca0qze3t _n3tdze3t _1doce4h9 _1il9nqa1 _1o3i1l7x _dpd31txw"])
|
|
170
170
|
}, categoriesSection) : /*#__PURE__*/React.createElement("div", {
|
|
171
171
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkhfxm _dpd31txw"])
|
|
@@ -3,9 +3,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import "./EmojiPicker.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
7
|
import { ufoExperiences } from '../../util/analytics';
|
|
8
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
9
|
import LoadingEmojiComponent from '../common/LoadingEmojiComponent';
|
|
10
10
|
import { LoadingItem } from './EmojiPickerVirtualItems';
|
|
11
11
|
import { UfoErrorBoundary } from '../common/UfoErrorBoundary';
|
|
@@ -42,7 +42,7 @@ export class EmojiPickerInternal extends LoadingEmojiComponent {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
ufoExperiences['emoji-picker-opened'].markFMP();
|
|
45
|
-
return
|
|
45
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
46
46
|
ref: handlePickerRef,
|
|
47
47
|
className: ax(["_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iixjv _1bsb1edt _1ul91edt _1tke5x59 _c71l1y6z"])
|
|
48
48
|
}, item.renderItem()) : /*#__PURE__*/React.createElement("div", {
|
|
@@ -3,7 +3,7 @@ import "./EmojiPickerComponent.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useCallback, useEffect, useMemo, useRef, useState, createRef, memo } from 'react';
|
|
6
|
-
import
|
|
6
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
7
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
8
8
|
import { dropTargetForExternal, monitorForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
|
|
9
9
|
import { containsFiles } from '@atlaskit/pragmatic-drag-and-drop/external/file';
|
|
@@ -100,7 +100,7 @@ const EmojiPickerComponent = ({
|
|
|
100
100
|
const isProgrammaticScroll = useRef(false);
|
|
101
101
|
const pickerRef = useRef(null);
|
|
102
102
|
const setPickerRef = useCallback(el => {
|
|
103
|
-
if (
|
|
103
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
104
104
|
pickerRef.current = el;
|
|
105
105
|
}
|
|
106
106
|
onPickerRef === null || onPickerRef === void 0 ? void 0 : onPickerRef(el);
|
|
@@ -120,7 +120,7 @@ const EmojiPickerComponent = ({
|
|
|
120
120
|
}
|
|
121
121
|
}, [selectedEmoji]);
|
|
122
122
|
const onEmojiLeave = useCallback(() => {
|
|
123
|
-
if (
|
|
123
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
124
124
|
setSelectedEmoji(undefined);
|
|
125
125
|
}
|
|
126
126
|
}, []);
|
|
@@ -128,16 +128,16 @@ const EmojiPickerComponent = ({
|
|
|
128
128
|
// Ignore scroll-driven category changes while a programmatic reveal()
|
|
129
129
|
// scroll is in progress — they would flicker the indicator through
|
|
130
130
|
// intermediate categories before landing on the correct one.
|
|
131
|
-
if (isProgrammaticScroll.current &&
|
|
131
|
+
if (isProgrammaticScroll.current && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
// Ignore scroll-driven category changes while the upload or delete screen is open
|
|
135
|
-
if ((uploading || emojiToDelete) &&
|
|
135
|
+
if ((uploading || emojiToDelete) && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
if (activeCategory !== category) {
|
|
139
139
|
setActiveCategory(category);
|
|
140
|
-
if (!query &&
|
|
140
|
+
if (!query && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
141
141
|
lastNonSearchCategory.current = category;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -154,7 +154,7 @@ const EmojiPickerComponent = ({
|
|
|
154
154
|
setUploadErrorMessage(undefined);
|
|
155
155
|
});
|
|
156
156
|
fireAnalytics(uploadCancelButton());
|
|
157
|
-
if (
|
|
157
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
158
158
|
setTimeout(() => {
|
|
159
159
|
var _getDocument, _getDocument$getEleme;
|
|
160
160
|
(_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : (_getDocument$getEleme = _getDocument.getElementById('add-custom-emoji')) === null || _getDocument$getEleme === void 0 ? void 0 : _getDocument$getEleme.focus();
|
|
@@ -300,7 +300,7 @@ const EmojiPickerComponent = ({
|
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
// If the upload or delete screen is open, close it when a category is selected
|
|
303
|
-
if (
|
|
303
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
304
304
|
if (uploading) {
|
|
305
305
|
setUploading(false);
|
|
306
306
|
setUploadErrorMessage(undefined);
|
|
@@ -318,11 +318,11 @@ const EmojiPickerComponent = ({
|
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
320
|
if (emojiPickerList.current) {
|
|
321
|
-
if (
|
|
321
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
322
322
|
isProgrammaticScroll.current = true;
|
|
323
323
|
}
|
|
324
324
|
emojiPickerList.current.reveal(categoryId);
|
|
325
|
-
if (
|
|
325
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
326
326
|
// Clear the flag after the scroll animation has settled.
|
|
327
327
|
setTimeout(() => {
|
|
328
328
|
isProgrammaticScroll.current = false;
|
|
@@ -355,7 +355,7 @@ const EmojiPickerComponent = ({
|
|
|
355
355
|
};
|
|
356
356
|
if (searchQuery !== query) {
|
|
357
357
|
// Capture the active category before entering search so we can keep it highlighted
|
|
358
|
-
if (!query && searchQuery &&
|
|
358
|
+
if (!query && searchQuery && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
359
359
|
lastNonSearchCategory.current = activeCategory;
|
|
360
360
|
}
|
|
361
361
|
setQuery(searchQuery);
|
|
@@ -371,7 +371,7 @@ const EmojiPickerComponent = ({
|
|
|
371
371
|
// cannot reach underlying page drop handlers (e.g. the Confluence editor).
|
|
372
372
|
useEffect(() => {
|
|
373
373
|
var _getDocument2;
|
|
374
|
-
if (!uploading || !
|
|
374
|
+
if (!uploading || !FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
375
375
|
return;
|
|
376
376
|
}
|
|
377
377
|
const body = (_getDocument2 = getDocument()) === null || _getDocument2 === void 0 ? void 0 : _getDocument2.body;
|
|
@@ -431,7 +431,7 @@ const EmojiPickerComponent = ({
|
|
|
431
431
|
});
|
|
432
432
|
scrollToUploadedEmoji(emojiDescription);
|
|
433
433
|
};
|
|
434
|
-
if (
|
|
434
|
+
if (FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
435
435
|
const uploadShortName = `:${upload.name.toLowerCase()}:`;
|
|
436
436
|
const existing = await emojiProvider.findByShortName(uploadShortName);
|
|
437
437
|
if (existing) {
|
|
@@ -550,14 +550,14 @@ const EmojiPickerComponent = ({
|
|
|
550
550
|
emojiProvider.unsubscribe(onProviderChange);
|
|
551
551
|
};
|
|
552
552
|
}, [emojiProvider, onProviderChange]);
|
|
553
|
-
const showPreview =
|
|
553
|
+
const showPreview = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? !uploading : selectedEmoji && !uploading;
|
|
554
554
|
return /*#__PURE__*/React.createElement("div", {
|
|
555
555
|
ref: setPickerRef,
|
|
556
556
|
"data-emoji-picker-container": true,
|
|
557
557
|
role: "dialog",
|
|
558
558
|
"aria-label": formatMessage(messages.emojiPickerTitle),
|
|
559
559
|
"aria-modal": true,
|
|
560
|
-
className: ax([
|
|
560
|
+
className: ax([FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? "_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iaq3k _1bsb1edt _1ul91edt _c71l1y6z _kqswh2mm" : "_19itahnd _2rkofajl _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iaq3k _1bsb1edt _1ul91edt _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]])
|
|
561
561
|
}, /*#__PURE__*/React.createElement("div", {
|
|
562
562
|
role: "presentation",
|
|
563
563
|
onKeyPress: suppressKeyPress,
|
|
@@ -565,7 +565,7 @@ const EmojiPickerComponent = ({
|
|
|
565
565
|
onKeyDown: suppressKeyPress,
|
|
566
566
|
className: ax(["_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo15vq _18m915vq _1e0c1txw _2lx21bp4 _1bah1yb4 _1tkeidpf"])
|
|
567
567
|
}, /*#__PURE__*/React.createElement(CategorySelector, {
|
|
568
|
-
activeCategoryId: (uploading || emojiToDelete) &&
|
|
568
|
+
activeCategoryId: (uploading || emojiToDelete) && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? null : activeCategory,
|
|
569
569
|
dynamicCategories: dynamicCategories,
|
|
570
570
|
disableCategories: disableCategories,
|
|
571
571
|
onCategorySelected: onCategorySelected
|
|
@@ -598,7 +598,7 @@ const EmojiPickerComponent = ({
|
|
|
598
598
|
onOpenUpload: onOpenUpload,
|
|
599
599
|
size: size,
|
|
600
600
|
activeCategoryId: activeCategory
|
|
601
|
-
}), showPreview && !(emojiToDelete &&
|
|
601
|
+
}), 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, {
|
|
602
602
|
selectedEmoji: selectedEmoji,
|
|
603
603
|
uploadEnabled: isUploadSupported && !uploading,
|
|
604
604
|
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
|
const emojiPickerFooter = null;
|
|
@@ -21,7 +21,7 @@ const EmojiPickerFooter = ({
|
|
|
21
21
|
uploadEnabled
|
|
22
22
|
}) => {
|
|
23
23
|
const intl = useIntl();
|
|
24
|
-
return
|
|
24
|
+
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
25
25
|
"data-testid": emojiPickerFooterTestId,
|
|
26
26
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug", "_x3doia51"])
|
|
27
27
|
}, selectedEmoji ? /*#__PURE__*/React.createElement(Box, {
|