@atlaskit/emoji 71.4.2 → 71.4.4
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 +19 -0
- package/dist/cjs/components/common/DeleteButton.js +2 -2
- package/dist/cjs/components/common/Emoji.js +15 -7
- package/dist/cjs/components/common/EmojiActions.js +6 -14
- 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 +2 -3
- package/dist/cjs/components/common/EmojiUploadPicker.js +9 -9
- package/dist/cjs/components/common/FileChooser.js +3 -3
- package/dist/cjs/components/common/TonePreviewButton.js +1 -2
- 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 +15 -15
- package/dist/cjs/components/picker/EmojiPickerEmojiRow.js +1 -3
- package/dist/cjs/components/picker/EmojiPickerFooter.js +2 -3
- package/dist/cjs/components/picker/EmojiPickerList.js +2 -2
- package/dist/cjs/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/cjs/components/picker/VirtualList.js +3 -3
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/cjs/util/emojiIdToEmoji.js +61 -49
- package/dist/es2019/components/common/DeleteButton.js +2 -2
- package/dist/es2019/components/common/Emoji.js +14 -6
- package/dist/es2019/components/common/EmojiActions.js +6 -14
- 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 +2 -3
- package/dist/es2019/components/common/EmojiUploadPicker.js +9 -9
- package/dist/es2019/components/common/FileChooser.js +3 -3
- package/dist/es2019/components/common/TonePreviewButton.js +1 -2
- 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 +15 -15
- package/dist/es2019/components/picker/EmojiPickerEmojiRow.js +1 -3
- package/dist/es2019/components/picker/EmojiPickerFooter.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerList.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/es2019/components/picker/VirtualList.js +3 -3
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/es2019/util/emojiIdToEmoji.js +46 -40
- package/dist/esm/components/common/DeleteButton.js +2 -2
- package/dist/esm/components/common/Emoji.js +15 -7
- package/dist/esm/components/common/EmojiActions.js +6 -14
- 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 +2 -3
- package/dist/esm/components/common/EmojiUploadPicker.js +9 -9
- package/dist/esm/components/common/FileChooser.js +3 -3
- package/dist/esm/components/common/TonePreviewButton.js +1 -2
- 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 +15 -15
- package/dist/esm/components/picker/EmojiPickerEmojiRow.js +1 -3
- package/dist/esm/components/picker/EmojiPickerFooter.js +2 -2
- package/dist/esm/components/picker/EmojiPickerList.js +2 -2
- package/dist/esm/components/picker/EmojiPickerListSearch.js +2 -2
- package/dist/esm/components/picker/VirtualList.js +3 -3
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/esm/util/emojiIdToEmoji.js +61 -49
- package/dist/types/components/picker/EmojiPickerComponent.d.ts +0 -4
- package/dist/types/util/emojiIdToEmoji.d.ts +2 -2
- package/package.json +6 -6
|
@@ -12,12 +12,12 @@ 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 { Component } from 'react';
|
|
15
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
15
16
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
16
17
|
import AkButton from '@atlaskit/button/new';
|
|
17
18
|
import Heading from '@atlaskit/heading';
|
|
18
19
|
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
19
20
|
import FocusLock from 'react-focus-lock';
|
|
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 (expVal('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", {
|
|
@@ -5,8 +5,8 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
6
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
7
7
|
import { ErrorMessage } from '@atlaskit/form';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
8
|
import { useIntl } from 'react-intl';
|
|
9
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
10
10
|
import { messages } from '../i18n';
|
|
11
11
|
var errorMessageStyles = {
|
|
12
12
|
chooseFile: "_1e0c1txw _syaz1tmw _u5f319bv _1bah1y6m",
|
|
@@ -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
|
+
}))) : expVal('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,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import "./EmojiRadioButton.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { memo, forwardRef } from 'react';
|
|
5
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
6
5
|
import Emoji from './Emoji';
|
|
7
6
|
import { TONESELECTOR_KEYBOARD_KEYS_SUPPORTED } from '../../util/constants';
|
|
8
7
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
@@ -12,7 +11,7 @@ var emojiRadio = {
|
|
|
12
11
|
default: "_tzy4idpf _kqswstnw _154i14id _1ltv14id _3y8mfajl _157z1r31 _1dzmglyw _1sqm1o36 _fh6w1y54 _1i1213zc"
|
|
13
12
|
};
|
|
14
13
|
var handleKeyDown = function handleKeyDown(props, event) {
|
|
15
|
-
if ((event.key === 'ArrowLeft' || event.key === 'ArrowRight') &&
|
|
14
|
+
if ((event.key === 'ArrowLeft' || event.key === 'ArrowRight') && expValEqualsNoExposure('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', true)) {
|
|
16
15
|
var _props$onArrowKey;
|
|
17
16
|
event.preventDefault();
|
|
18
17
|
event.stopPropagation();
|
|
@@ -49,7 +48,7 @@ export var EmojiRadioButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
49
48
|
onKeyDown: function onKeyDown(event) {
|
|
50
49
|
return handleKeyDown(props, event);
|
|
51
50
|
},
|
|
52
|
-
onChange:
|
|
51
|
+
onChange: expValEqualsNoExposure('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', true) ? function (e) {
|
|
53
52
|
return e.preventDefault();
|
|
54
53
|
} : undefined,
|
|
55
54
|
className: ax([emojiRadio.default])
|
|
@@ -12,7 +12,6 @@ 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';
|
|
16
15
|
import * as ImageUtil from '../../util/image';
|
|
17
16
|
import debug from '../../util/logger';
|
|
18
17
|
import { messages } from '../i18n';
|
|
@@ -21,6 +20,7 @@ import EmojiUploadPreview from './EmojiUploadPreview';
|
|
|
21
20
|
import FileChooser from './FileChooser';
|
|
22
21
|
import { UploadStatus } from './internal-types';
|
|
23
22
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
23
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
24
24
|
import Button from '@atlaskit/button/new';
|
|
25
25
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
26
26
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
@@ -59,7 +59,7 @@ var toDefaultUploadName = function toDefaultUploadName(fileName) {
|
|
|
59
59
|
return sanitizeName(nameWithoutExtension).slice(0, maxNameLength);
|
|
60
60
|
};
|
|
61
61
|
var isSupportedEmojiUploadFileType = function isSupportedEmojiUploadFileType(file) {
|
|
62
|
-
if (!
|
|
62
|
+
if (!expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
63
63
|
return true;
|
|
64
64
|
}
|
|
65
65
|
if (supportedEmojiUploadMimeTypes.has(file.type)) {
|
|
@@ -105,7 +105,7 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
105
105
|
var emojiChooseFileTitleNew = formatMessage(messages.emojiChooseFileDndTitle);
|
|
106
106
|
var isUploading = uploadStatus === UploadStatus.Uploading;
|
|
107
107
|
var addEmojiDisabled = !previewImage || !name || isUploading;
|
|
108
|
-
return
|
|
108
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
109
109
|
"data-testid": uploadEmojiComponentTestId,
|
|
110
110
|
className: ax(["_ca0qu2gc _u5f3pxbi _n3tdu2gc _19bvpxbi _1e0c1txw _2lx21bp4 _1bah1b1v"])
|
|
111
111
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -117,7 +117,7 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
117
117
|
className: ax(["_zulp12x7 _1e0c1txw _2lx21bp4 _1tker0r7"])
|
|
118
118
|
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, function () {
|
|
119
119
|
return /*#__PURE__*/React.createElement(FileChooser, {
|
|
120
|
-
label:
|
|
120
|
+
label: expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? emojiChooseFileTitleNew : emojiChooseFileTitle,
|
|
121
121
|
onChange: onChooseFile,
|
|
122
122
|
onClick: onClick,
|
|
123
123
|
accept: "image/png,image/jpeg,image/gif",
|
|
@@ -202,7 +202,7 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
202
202
|
"aria-required": true
|
|
203
203
|
})), /*#__PURE__*/React.createElement(Text, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiChooseFileScreenReaderDescription, function () {
|
|
204
204
|
return /*#__PURE__*/React.createElement(FileChooser, {
|
|
205
|
-
label:
|
|
205
|
+
label: expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? emojiChooseFileTitleNew : emojiChooseFileTitle,
|
|
206
206
|
onChange: onChooseFile,
|
|
207
207
|
onClick: onClick,
|
|
208
208
|
accept: "image/png,image/jpeg,image/gif",
|
|
@@ -325,7 +325,7 @@ var EmojiUploadPicker = function EmojiUploadPicker(props) {
|
|
|
325
325
|
case 0:
|
|
326
326
|
_context.prev = 0;
|
|
327
327
|
setFilename(file.name);
|
|
328
|
-
if (!name &&
|
|
328
|
+
if (!name && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
329
329
|
setName(toDefaultUploadName(file.name));
|
|
330
330
|
}
|
|
331
331
|
_context.next = 1;
|
|
@@ -393,8 +393,8 @@ var EmojiUploadPicker = function EmojiUploadPicker(props) {
|
|
|
393
393
|
var onChooseFileClicked = function onChooseFileClicked() {
|
|
394
394
|
onFileChooserClicked && onFileChooserClicked();
|
|
395
395
|
};
|
|
396
|
-
var isDuplicateNameError = errorMessage !== null && errorMessage !== undefined &&
|
|
397
|
-
var content = name && previewImage && !
|
|
396
|
+
var isDuplicateNameError = errorMessage !== null && errorMessage !== undefined && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
397
|
+
var content = name && previewImage && !expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement(EmojiUploadPreview, {
|
|
398
398
|
errorMessage: errorMessage,
|
|
399
399
|
name: name,
|
|
400
400
|
onAddEmoji: onAddEmoji,
|
|
@@ -414,7 +414,7 @@ var EmojiUploadPicker = function EmojiUploadPicker(props) {
|
|
|
414
414
|
nameErrorMessage: isDuplicateNameError ? errorMessage : undefined,
|
|
415
415
|
intl: intl
|
|
416
416
|
});
|
|
417
|
-
return disableFocusLock ||
|
|
417
|
+
return disableFocusLock || expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? content : /*#__PURE__*/React.createElement(FocusLock, {
|
|
418
418
|
noFocusGuards: true
|
|
419
419
|
}, content);
|
|
420
420
|
};
|
|
@@ -5,9 +5,9 @@ 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 FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
8
|
import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
|
|
10
9
|
import { containsFiles, getFiles } from '@atlaskit/pragmatic-drag-and-drop/external/file';
|
|
10
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
11
11
|
export var chooseFileButtonTestId = 'choose-file-button';
|
|
12
12
|
export var fileUploadInputTestId = 'file-upload';
|
|
13
13
|
export var dropzoneTestId = 'file-dropzone';
|
|
@@ -66,7 +66,7 @@ var FileChooser = function FileChooser(props) {
|
|
|
66
66
|
}, [onChange]);
|
|
67
67
|
useEffect(function () {
|
|
68
68
|
var element = dropzoneRef.current;
|
|
69
|
-
if (!element || !
|
|
69
|
+
if (!element || !expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
var suppressNativeFileDrop = function suppressNativeFileDrop(event) {
|
|
@@ -168,7 +168,7 @@ var FileChooser = function FileChooser(props) {
|
|
|
168
168
|
},
|
|
169
169
|
"data-testid": fileUploadInputTestId
|
|
170
170
|
});
|
|
171
|
-
if (
|
|
171
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
172
172
|
return /*#__PURE__*/React.createElement("div", {
|
|
173
173
|
ref: dropzoneRef,
|
|
174
174
|
"data-testid": dropzoneTestId,
|
|
@@ -3,7 +3,6 @@ import "./TonePreviewButton.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { forwardRef, memo } from 'react';
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
6
|
import Emoji from './Emoji';
|
|
8
7
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
8
|
export var tonePreviewTestId = 'tone-preview';
|
|
@@ -23,7 +22,7 @@ export var TonePreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
23
22
|
_props$isVisible = props.isVisible,
|
|
24
23
|
isVisible = _props$isVisible === void 0 ? true : _props$isVisible;
|
|
25
24
|
var fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
26
|
-
return
|
|
25
|
+
return expValEqualsNoExposure('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', true) ? /*#__PURE__*/React.createElement("button", {
|
|
27
26
|
ref: ref,
|
|
28
27
|
onClick: onSelected,
|
|
29
28
|
onKeyDown: onKeyDown,
|
|
@@ -5,8 +5,8 @@ import "./ToneSelector.compiled.css";
|
|
|
5
5
|
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
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
8
9
|
import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
|
|
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 expVal('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) {
|
|
@@ -8,8 +8,8 @@ import { cx } from '@atlaskit/css';
|
|
|
8
8
|
import { useIntl } from 'react-intl';
|
|
9
9
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
10
10
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
11
12
|
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 !!(expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? CategoryDescriptionMapNew : CategoryDescriptionMap)[category];
|
|
42
|
+
})).sort(expVal('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 = expVal('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 = expVal('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 = expVal('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 expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("div", {
|
|
183
183
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkvuon _13li1mok _qrwq1mok _ca0qze3t _n3tdze3t _1doce4h9 _1il9nqa1 _1o3i1l7x _dpd31txw"])
|
|
184
184
|
}, categoriesSection) : /*#__PURE__*/React.createElement("div", {
|
|
185
185
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkhfxm _dpd31txw"])
|
|
@@ -14,7 +14,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
16
16
|
import { ufoExperiences } from '../../util/analytics';
|
|
17
|
-
import
|
|
17
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
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 expVal('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", {
|
|
@@ -9,8 +9,8 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
9
9
|
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
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
12
13
|
import { useCallback, useEffect, useMemo, useRef, useState, createRef, memo } from 'react';
|
|
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';
|
|
@@ -85,7 +85,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
85
85
|
var _useEmoji = useEmoji(),
|
|
86
86
|
emojiProvider = _useEmoji.emojiProvider,
|
|
87
87
|
isUploadSupported = _useEmoji.isUploadSupported;
|
|
88
|
-
var isTeamojiExperimentEnabled =
|
|
88
|
+
var isTeamojiExperimentEnabled = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
89
89
|
var _useState = useState([]),
|
|
90
90
|
_useState2 = _slicedToArray(_useState, 2),
|
|
91
91
|
filteredEmojis = _useState2[0],
|
|
@@ -178,7 +178,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
178
178
|
}
|
|
179
179
|
}, [selectedEmoji]);
|
|
180
180
|
var onEmojiLeave = useCallback(function () {
|
|
181
|
-
if (
|
|
181
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
182
182
|
setSelectedEmoji(undefined);
|
|
183
183
|
}
|
|
184
184
|
}, []);
|
|
@@ -186,16 +186,16 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
186
186
|
// Ignore scroll-driven category changes while a programmatic reveal()
|
|
187
187
|
// scroll is in progress — they would flicker the indicator through
|
|
188
188
|
// intermediate categories before landing on the correct one.
|
|
189
|
-
if (isProgrammaticScroll.current &&
|
|
189
|
+
if (isProgrammaticScroll.current && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
192
|
// Ignore scroll-driven category changes while the upload or delete screen is open
|
|
193
|
-
if ((uploading || emojiToDelete) &&
|
|
193
|
+
if ((uploading || emojiToDelete) && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
194
194
|
return;
|
|
195
195
|
}
|
|
196
196
|
if (activeCategory !== category) {
|
|
197
197
|
setActiveCategory(category);
|
|
198
|
-
if (!query &&
|
|
198
|
+
if (!query && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
199
199
|
lastNonSearchCategory.current = category;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -212,7 +212,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
212
212
|
setUploadErrorMessage(undefined);
|
|
213
213
|
});
|
|
214
214
|
fireAnalytics(uploadCancelButton());
|
|
215
|
-
if (
|
|
215
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
216
216
|
setTimeout(function () {
|
|
217
217
|
var _getDocument;
|
|
218
218
|
(_getDocument = getDocument()) === null || _getDocument === void 0 || (_getDocument = _getDocument.getElementById('add-custom-emoji')) === null || _getDocument === void 0 || _getDocument.focus();
|
|
@@ -362,7 +362,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
// If the upload or delete screen is open, close it when a category is selected
|
|
365
|
-
if (
|
|
365
|
+
if (expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
366
366
|
if (uploading) {
|
|
367
367
|
setUploading(false);
|
|
368
368
|
setUploadErrorMessage(undefined);
|
|
@@ -424,7 +424,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
424
424
|
};
|
|
425
425
|
if (searchQuery !== query) {
|
|
426
426
|
// Capture the active category before entering search so we can keep it highlighted
|
|
427
|
-
if (!query && searchQuery &&
|
|
427
|
+
if (!query && searchQuery && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
428
428
|
lastNonSearchCategory.current = activeCategory;
|
|
429
429
|
}
|
|
430
430
|
setQuery(searchQuery);
|
|
@@ -440,7 +440,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
440
440
|
// cannot reach underlying page drop handlers (e.g. the Confluence editor).
|
|
441
441
|
useEffect(function () {
|
|
442
442
|
var _getDocument2;
|
|
443
|
-
if (!uploading || !
|
|
443
|
+
if (!uploading || !expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
446
446
|
var body = (_getDocument2 = getDocument()) === null || _getDocument2 === void 0 ? void 0 : _getDocument2.body;
|
|
@@ -509,7 +509,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
509
509
|
});
|
|
510
510
|
scrollToUploadedEmoji(emojiDescription);
|
|
511
511
|
};
|
|
512
|
-
if (!
|
|
512
|
+
if (!expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) {
|
|
513
513
|
_context.next = 2;
|
|
514
514
|
break;
|
|
515
515
|
}
|
|
@@ -647,14 +647,14 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
647
647
|
emojiProvider.unsubscribe(onProviderChange);
|
|
648
648
|
};
|
|
649
649
|
}, [emojiProvider, onProviderChange]);
|
|
650
|
-
var showPreview =
|
|
650
|
+
var showPreview = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? !uploading : selectedEmoji && !uploading;
|
|
651
651
|
return /*#__PURE__*/React.createElement("div", {
|
|
652
652
|
ref: setPickerRef,
|
|
653
653
|
"data-emoji-picker-container": true,
|
|
654
654
|
role: "dialog",
|
|
655
655
|
"aria-label": formatMessage(messages.emojiPickerTitle),
|
|
656
656
|
"aria-modal": true,
|
|
657
|
-
className: ax([
|
|
657
|
+
className: ax([expVal('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 && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withDeleteRefreshHeight[size] : uploading && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withUploadRefreshHeight[size] : query && filteredEmojis.length === 0 && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? withNoResultsRefreshHeight[size] : showPreview ? withPreviewHeight[size] : withoutPreviewHeight[size]]),
|
|
658
658
|
style: {
|
|
659
659
|
"--_19dn98e": ix("".concat(emojiPickerHeight, "px")),
|
|
660
660
|
"--_gsvyy7": ix("".concat(emojiPickerWidth, "px"))
|
|
@@ -666,7 +666,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
666
666
|
onKeyDown: suppressKeyPress,
|
|
667
667
|
className: ax(["_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo15vq _18m915vq _1e0c1txw _2lx21bp4 _1bah1yb4 _1tkeidpf"])
|
|
668
668
|
}, /*#__PURE__*/React.createElement(CategorySelector, {
|
|
669
|
-
activeCategoryId: (uploading || emojiToDelete) &&
|
|
669
|
+
activeCategoryId: (uploading || emojiToDelete) && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? null : activeCategory,
|
|
670
670
|
dynamicCategories: dynamicCategories,
|
|
671
671
|
disableCategories: disableCategories,
|
|
672
672
|
onCategorySelected: onCategorySelected
|
|
@@ -701,7 +701,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
701
701
|
onOpenUpload: onOpenUpload,
|
|
702
702
|
size: size,
|
|
703
703
|
activeCategoryId: activeCategory
|
|
704
|
-
}), showPreview && !(emojiToDelete &&
|
|
704
|
+
}), showPreview && !(emojiToDelete && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) && !(query && filteredEmojis.length === 0 && expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false)) && /*#__PURE__*/React.createElement(EmojiPickerFooter, {
|
|
705
705
|
selectedEmoji: selectedEmoji,
|
|
706
706
|
uploadEnabled: isUploadSupported && !uploading,
|
|
707
707
|
onOpenUpload: onOpenUpload
|
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
8
|
import { useIntl } from 'react-intl';
|
|
10
9
|
import CachingEmoji from '../common/CachingEmoji';
|
|
11
10
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
@@ -14,7 +13,6 @@ import { messages } from '../i18n';
|
|
|
14
13
|
var emojiItem = null;
|
|
15
14
|
var emojiPickerRow = null;
|
|
16
15
|
var emojiPickerRowList = null;
|
|
17
|
-
var teamojiRefreshExperimentName = 'platform_teamoji_26_refresh_emoji_picker';
|
|
18
16
|
var EmojiPickerEmojiRow = function EmojiPickerEmojiRow(_ref) {
|
|
19
17
|
var emojis = _ref.emojis,
|
|
20
18
|
onSelected = _ref.onSelected,
|
|
@@ -32,7 +30,7 @@ var EmojiPickerEmojiRow = function EmojiPickerEmojiRow(_ref) {
|
|
|
32
30
|
var _useIntl = useIntl(),
|
|
33
31
|
formatMessage = _useIntl.formatMessage;
|
|
34
32
|
var fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
35
|
-
var preventFocusOnMouseDown =
|
|
33
|
+
var preventFocusOnMouseDown = expValEqualsNoExposure('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', true);
|
|
36
34
|
var handleFocus = function handleFocus(index) {
|
|
37
35
|
return function (emojiId, emoji, event) {
|
|
38
36
|
setEmojisFocus({
|
|
@@ -5,9 +5,9 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
9
8
|
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
10
9
|
import { AddOwnEmoji } from '../common/AddEmoji';
|
|
10
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
11
11
|
var emojiPickerFooter = null;
|
|
12
12
|
var emojiPickerFooterWithTopShadow = null;
|
|
13
13
|
var emojiPickerFooterWithTopShadowNew = 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 expVal('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, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
4
5
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
5
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
6
6
|
import { customCategory, defaultEmojiPickerSize, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
7
7
|
import { filterProductivityEmojisByColor, getProductivityColorPreviewEmojis } from '../../util/productivity-colors';
|
|
8
8
|
import { filterHiddenEmojis } from '../../util/hidden-emojis';
|
|
@@ -98,7 +98,7 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
98
98
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
99
99
|
categoriesChanged = _useState8[0],
|
|
100
100
|
setCategoriesChanged = _useState8[1];
|
|
101
|
-
var isTeamojiExperimentEnabled =
|
|
101
|
+
var isTeamojiExperimentEnabled = expVal(teamojiRefreshExperimentName, 'isEnabled', false);
|
|
102
102
|
var visibleEmojis = useMemo(function () {
|
|
103
103
|
return isTeamojiExperimentEnabled ? filterHiddenEmojis(emojis) : emojis;
|
|
104
104
|
}, [emojis, isTeamojiExperimentEnabled]);
|
|
@@ -9,8 +9,8 @@ import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
|
9
9
|
import { useIntl } from 'react-intl';
|
|
10
10
|
import { useDebouncedCallback } from 'use-debounce';
|
|
11
11
|
import { EMOJI_SEARCH_DEBOUNCE } from '../../util/constants';
|
|
12
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
13
12
|
import { messages } from '../i18n';
|
|
13
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
14
14
|
var input = null;
|
|
15
15
|
var inputNew = null;
|
|
16
16
|
var textFieldWrapperNew = 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), expVal('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",
|
|
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
8
8
|
import React, { useCallback, useImperativeHandle } from 'react';
|
|
9
9
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
-
import
|
|
11
|
+
import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
|
|
12
12
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
13
13
|
import { EMOJIPICKERLIST_KEYBOARD_KEYS_SUPPORTED, EMOJI_LIST_COLUMNS, EMOJI_LIST_PAGE_COUNT, KeyboardNavigationDirection, KeyboardKeys } from '../../util/constants';
|
|
14
14
|
var virtualList = null;
|
|
@@ -56,7 +56,7 @@ export var VirtualList = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
56
56
|
var elemBottom = elementRect.bottom;
|
|
57
57
|
var parentTop = parentRect.top;
|
|
58
58
|
var parentBottom = parentRect.bottom;
|
|
59
|
-
var isVisible =
|
|
59
|
+
var isVisible = expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? elemTop >= parentTop && elemBottom <= parentBottom : elemBottom > parentTop && elemTop < parentBottom;
|
|
60
60
|
return isVisible;
|
|
61
61
|
};
|
|
62
62
|
var getFirstVisibleListElementIndex = useCallback(function () {
|
|
@@ -75,7 +75,7 @@ export var VirtualList = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
75
75
|
var _virtualList$firstVis;
|
|
76
76
|
return ((_virtualList$firstVis = virtualList[firstVisibleIndex]) === null || _virtualList$firstVis === void 0 ? void 0 : _virtualList$firstVis.index) || 0;
|
|
77
77
|
}
|
|
78
|
-
return
|
|
78
|
+
return expVal('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? ((_virtualList$ = virtualList[0]) === null || _virtualList$ === void 0 ? void 0 : _virtualList$.index) || 0 : 0;
|
|
79
79
|
}, [rowVirtualizer]);
|
|
80
80
|
|
|
81
81
|
/**
|
|
@@ -14,7 +14,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
14
14
|
actionSubjectId: actionSubjectId,
|
|
15
15
|
attributes: _objectSpread({
|
|
16
16
|
packageName: "@atlaskit/emoji",
|
|
17
|
-
packageVersion: "71.4.
|
|
17
|
+
packageVersion: "71.4.3"
|
|
18
18
|
}, attributes)
|
|
19
19
|
};
|
|
20
20
|
};
|