@atlaskit/emoji 72.2.7 → 72.3.1
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 +27 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/api/EmojiRepository.js +2 -9
- package/dist/cjs/api/EmojiResource.js +2 -11
- package/dist/cjs/api/media/SiteEmojiResource.js +10 -40
- package/dist/cjs/components/common/AddEmoji.js +2 -11
- package/dist/cjs/components/common/DeleteButton.js +2 -11
- package/dist/cjs/components/common/Emoji.js +15 -5
- package/dist/cjs/components/common/EmojiDeletePreview.js +3 -12
- package/dist/cjs/components/common/EmojiErrorMessage.js +2 -11
- package/dist/cjs/components/common/EmojiRadioButton.js +3 -2
- package/dist/cjs/components/common/EmojiUploadPicker.js +10 -19
- package/dist/cjs/components/common/FileChooser.js +3 -12
- package/dist/cjs/components/common/ImageEmoji.js +5 -2
- package/dist/cjs/components/common/TonePreviewButton.js +2 -1
- package/dist/cjs/components/common/ToneSelectorInternal.js +2 -11
- package/dist/cjs/components/common/isRefreshEmojiPickerEnabled.js +2 -14
- package/dist/cjs/components/picker/CategorySelector.js +7 -15
- package/dist/cjs/components/picker/EmojiPickerComponent.js +16 -25
- package/dist/cjs/components/picker/EmojiPickerEmojiRow.js +2 -1
- package/dist/cjs/components/picker/EmojiPickerFooter.js +2 -12
- package/dist/cjs/components/picker/EmojiPickerInternal.js +2 -8
- package/dist/cjs/components/picker/EmojiPickerList.js +2 -12
- package/dist/cjs/components/picker/EmojiPickerListSearch.js +2 -10
- package/dist/cjs/components/picker/VirtualList.js +3 -12
- package/dist/cjs/util/analytics/createEvent.js +1 -1
- package/dist/cjs/util/teamoji26RefreshEmojiPicker.js +17 -0
- package/dist/es2019/api/EmojiRepository.js +2 -9
- package/dist/es2019/api/EmojiResource.js +1 -10
- package/dist/es2019/api/media/SiteEmojiResource.js +9 -39
- package/dist/es2019/components/common/AddEmoji.js +1 -10
- package/dist/es2019/components/common/DeleteButton.js +1 -10
- package/dist/es2019/components/common/Emoji.js +14 -4
- package/dist/es2019/components/common/EmojiDeletePreview.js +1 -10
- package/dist/es2019/components/common/EmojiErrorMessage.js +1 -10
- package/dist/es2019/components/common/EmojiRadioButton.js +3 -2
- package/dist/es2019/components/common/EmojiUploadPicker.js +1 -10
- package/dist/es2019/components/common/FileChooser.js +1 -10
- package/dist/es2019/components/common/ImageEmoji.js +5 -2
- package/dist/es2019/components/common/TonePreviewButton.js +2 -1
- package/dist/es2019/components/common/ToneSelectorInternal.js +1 -10
- package/dist/es2019/components/common/isRefreshEmojiPickerEnabled.js +2 -13
- package/dist/es2019/components/picker/CategorySelector.js +1 -9
- package/dist/es2019/components/picker/EmojiPickerComponent.js +1 -10
- package/dist/es2019/components/picker/EmojiPickerEmojiRow.js +2 -1
- package/dist/es2019/components/picker/EmojiPickerFooter.js +1 -10
- package/dist/es2019/components/picker/EmojiPickerInternal.js +2 -8
- package/dist/es2019/components/picker/EmojiPickerList.js +1 -11
- package/dist/es2019/components/picker/EmojiPickerListSearch.js +1 -9
- package/dist/es2019/components/picker/VirtualList.js +1 -10
- package/dist/es2019/util/analytics/createEvent.js +1 -1
- package/dist/es2019/util/teamoji26RefreshEmojiPicker.js +11 -0
- package/dist/esm/api/EmojiRepository.js +2 -9
- package/dist/esm/api/EmojiResource.js +1 -10
- package/dist/esm/api/media/SiteEmojiResource.js +10 -40
- package/dist/esm/components/common/AddEmoji.js +1 -10
- package/dist/esm/components/common/DeleteButton.js +1 -10
- package/dist/esm/components/common/Emoji.js +15 -5
- package/dist/esm/components/common/EmojiDeletePreview.js +1 -10
- package/dist/esm/components/common/EmojiErrorMessage.js +1 -10
- package/dist/esm/components/common/EmojiRadioButton.js +3 -2
- package/dist/esm/components/common/EmojiUploadPicker.js +1 -10
- package/dist/esm/components/common/FileChooser.js +1 -10
- package/dist/esm/components/common/ImageEmoji.js +5 -2
- package/dist/esm/components/common/TonePreviewButton.js +2 -1
- package/dist/esm/components/common/ToneSelectorInternal.js +1 -10
- package/dist/esm/components/common/isRefreshEmojiPickerEnabled.js +2 -13
- package/dist/esm/components/picker/CategorySelector.js +1 -9
- package/dist/esm/components/picker/EmojiPickerComponent.js +1 -10
- package/dist/esm/components/picker/EmojiPickerEmojiRow.js +2 -1
- package/dist/esm/components/picker/EmojiPickerFooter.js +1 -10
- package/dist/esm/components/picker/EmojiPickerInternal.js +2 -8
- package/dist/esm/components/picker/EmojiPickerList.js +1 -11
- package/dist/esm/components/picker/EmojiPickerListSearch.js +1 -9
- package/dist/esm/components/picker/VirtualList.js +1 -10
- package/dist/esm/util/analytics/createEvent.js +1 -1
- package/dist/esm/util/teamoji26RefreshEmojiPicker.js +11 -0
- package/dist/types/components/common/Emoji.d.ts +5 -0
- package/dist/types/components/common/isRefreshEmojiPickerEnabled.d.ts +0 -4
- package/dist/types/util/teamoji26RefreshEmojiPicker.d.ts +4 -0
- package/package.json +9 -4
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import { getMediaClient } from '@atlaskit/media-client-react/get-media-client';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
3
|
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
5
4
|
import { buildEmojiDescriptionWithAltRepresentation } from '../../util/build-emoji-description-with-alt-representation';
|
|
6
5
|
import { convertImageToMediaRepresentation } from '../../util/convert-image-to-media-representation';
|
|
@@ -152,42 +151,11 @@ export default class SiteEmojiResource {
|
|
|
152
151
|
}),
|
|
153
152
|
useSha256ForUploads: true
|
|
154
153
|
});
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
collectionName
|
|
161
|
-
}).subscribe({
|
|
162
|
-
next: state => {
|
|
163
|
-
if (state.status === 'uploading' && progressCallback) {
|
|
164
|
-
progressCallback({
|
|
165
|
-
percent: state.progress * mediaProportionOfProgress
|
|
166
|
-
});
|
|
167
|
-
} else if (state.status === 'processing' || state.status === 'processed') {
|
|
168
|
-
subscription.unsubscribe();
|
|
169
|
-
const totalUploadTime = Date.now() - startTime;
|
|
170
|
-
const mediaUploadTime = totalUploadTime - tokenLoadTime;
|
|
171
|
-
debug('total upload / media upload times', totalUploadTime, mediaUploadTime);
|
|
172
|
-
this.postToEmojiService(upload, uploadableFileUpfrontIds.id).then(emoji => {
|
|
173
|
-
resolve(emoji);
|
|
174
|
-
}).catch(httpError => {
|
|
175
|
-
reject(httpError.reason || httpError);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
error(error) {
|
|
180
|
-
reject(error);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
}).catch(error => {
|
|
184
|
-
reject(error);
|
|
185
|
-
});
|
|
186
|
-
} else {
|
|
187
|
-
const subscription = mediaClient.file.upload({
|
|
188
|
-
content: upload.dataURL,
|
|
189
|
-
name: upload.filename,
|
|
190
|
-
collection: collectionName
|
|
154
|
+
mediaClient.file.uploadExternal(upload.dataURL, collectionName, undefined, true).then(({
|
|
155
|
+
uploadableFileUpfrontIds
|
|
156
|
+
}) => {
|
|
157
|
+
const subscription = mediaClient.file.getFileState(uploadableFileUpfrontIds.id, {
|
|
158
|
+
collectionName
|
|
191
159
|
}).subscribe({
|
|
192
160
|
next: state => {
|
|
193
161
|
if (state.status === 'uploading' && progressCallback) {
|
|
@@ -199,7 +167,7 @@ export default class SiteEmojiResource {
|
|
|
199
167
|
const totalUploadTime = Date.now() - startTime;
|
|
200
168
|
const mediaUploadTime = totalUploadTime - tokenLoadTime;
|
|
201
169
|
debug('total upload / media upload times', totalUploadTime, mediaUploadTime);
|
|
202
|
-
this.postToEmojiService(upload,
|
|
170
|
+
this.postToEmojiService(upload, uploadableFileUpfrontIds.id).then(emoji => {
|
|
203
171
|
resolve(emoji);
|
|
204
172
|
}).catch(httpError => {
|
|
205
173
|
reject(httpError.reason || httpError);
|
|
@@ -210,7 +178,9 @@ export default class SiteEmojiResource {
|
|
|
210
178
|
reject(error);
|
|
211
179
|
}
|
|
212
180
|
});
|
|
213
|
-
}
|
|
181
|
+
}).catch(error => {
|
|
182
|
+
reject(error);
|
|
183
|
+
});
|
|
214
184
|
});
|
|
215
185
|
});
|
|
216
186
|
}
|
|
@@ -4,21 +4,12 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Fragment, useCallback } from 'react';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
8
7
|
import { FormattedMessage } from 'react-intl';
|
|
9
8
|
import { messages } from '../i18n';
|
|
10
9
|
import Button from '@atlaskit/button/default/button';
|
|
10
|
+
import { isRefreshEmojiPickerEnabled } from './isRefreshEmojiPickerEnabled';
|
|
11
11
|
export const emojiActionsTestId = 'emoji-actions';
|
|
12
12
|
export const uploadEmojiTestId = 'upload-emoji';
|
|
13
|
-
const isRefreshEmojiPickerEnabled = () => {
|
|
14
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
19
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
20
|
-
return isEnabled;
|
|
21
|
-
};
|
|
22
13
|
const addCustomEmoji = null;
|
|
23
14
|
|
|
24
15
|
// Generic Type for the wrapped functional component
|
|
@@ -7,16 +7,7 @@ import CrossCircleIcon from '@atlaskit/icon/core/cross-circle';
|
|
|
7
7
|
import { deleteEmojiLabel } from '../../util/constants';
|
|
8
8
|
import { emojiDeleteButton } from './styles';
|
|
9
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import
|
|
11
|
-
const isRefreshEmojiPickerEnabled = () => {
|
|
12
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
17
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
18
|
-
return isEnabled;
|
|
19
|
-
};
|
|
10
|
+
import { isRefreshEmojiPickerEnabled } from './isRefreshEmojiPickerEnabled';
|
|
20
11
|
const styles = {
|
|
21
12
|
boxWrapperStyle: "_1bsbf6fq _4t3if6fq"
|
|
22
13
|
};
|
|
@@ -21,6 +21,7 @@ import { handleDelete } from './handleDelete';
|
|
|
21
21
|
import { ImageEmoji } from './ImageEmoji';
|
|
22
22
|
import { SpriteEmoji } from './SpriteEmoji';
|
|
23
23
|
import { UnicodeEmoji } from './UnicodeEmoji';
|
|
24
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
24
25
|
const emojiSpriteContainer = null;
|
|
25
26
|
const emojiImageContainer = null;
|
|
26
27
|
|
|
@@ -81,7 +82,6 @@ const handleFocus = (props, event) => {
|
|
|
81
82
|
}
|
|
82
83
|
};
|
|
83
84
|
export const EmojiNodeWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
84
|
-
var _emoji$name;
|
|
85
85
|
const {
|
|
86
86
|
emoji,
|
|
87
87
|
fitToHeight,
|
|
@@ -104,12 +104,22 @@ export const EmojiNodeWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
104
104
|
type,
|
|
105
105
|
editorEmoji,
|
|
106
106
|
renderUnicodeEmojiAsImage,
|
|
107
|
+
isDecorative,
|
|
107
108
|
...other
|
|
108
109
|
} = props;
|
|
109
110
|
const intl = useContext(IntlContext);
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
const isAriaLabelEmpty = editorEmoji || isDecorative && fg('emoji_decorative_label');
|
|
112
|
+
let ariaLabel;
|
|
113
|
+
if (isAriaLabelEmpty) {
|
|
114
|
+
ariaLabel = undefined;
|
|
115
|
+
} else if (intl) {
|
|
116
|
+
var _emoji$name;
|
|
117
|
+
ariaLabel = intl.formatMessage(messages.changeEmojiShortnameButtonLabel, {
|
|
118
|
+
shortName: (_emoji$name = emoji.name) !== null && _emoji$name !== void 0 ? _emoji$name : emoji.shortName
|
|
119
|
+
});
|
|
120
|
+
} else {
|
|
121
|
+
ariaLabel = emoji.shortName;
|
|
122
|
+
}
|
|
113
123
|
const tooltipContent = showTooltip && expValEquals('platform_editor_emoji_hover_show_tooltip', 'isEnabled', true) ? emoji.shortName || emoji.name || undefined : undefined;
|
|
114
124
|
const emojiSpan = /*#__PURE__*/React.createElement("span", _extends({
|
|
115
125
|
role: editorEmoji ? undefined : shouldBeInteractive ? 'button' : ariaLabel ? 'img' : 'presentation',
|
|
@@ -5,7 +5,6 @@ import "./EmojiDeletePreview.compiled.css";
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { Component } from 'react';
|
|
8
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
9
8
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
10
9
|
import AkButton from '@atlaskit/button/default/button';
|
|
11
10
|
import Heading from '@atlaskit/heading/heading';
|
|
@@ -16,15 +15,7 @@ import CachingEmoji from './CachingEmoji';
|
|
|
16
15
|
import EmojiErrorMessage, { emojiErrorScreenreaderTestId } from './EmojiErrorMessage';
|
|
17
16
|
import RetryableButton from './RetryableButton';
|
|
18
17
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
19
|
-
|
|
20
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
25
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
26
|
-
return isEnabled;
|
|
27
|
-
};
|
|
18
|
+
import { isRefreshEmojiPickerEnabled } from './isRefreshEmojiPickerEnabled';
|
|
28
19
|
const deleteFooter = null;
|
|
29
20
|
const deletePreview = null;
|
|
30
21
|
const deleteText = null;
|
|
@@ -6,17 +6,8 @@ import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
|
6
6
|
import ErrorIcon from '@atlaskit/icon/core/status-error';
|
|
7
7
|
import { ErrorMessage } from '@atlaskit/form/error-message';
|
|
8
8
|
import { useIntl } from 'react-intl';
|
|
9
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
10
9
|
import { messages } from '../i18n';
|
|
11
|
-
|
|
12
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
17
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
18
|
-
return isEnabled;
|
|
19
|
-
};
|
|
10
|
+
import { isRefreshEmojiPickerEnabled } from './isRefreshEmojiPickerEnabled';
|
|
20
11
|
const errorMessageStyles = {
|
|
21
12
|
chooseFile: "_1e0c1txw _syaz1tmw _u5f319bv _1bah1y6m",
|
|
22
13
|
delete: "_1e0c1txw _syaz1tmw _4cvr1h6o _1bahesu3 _u5f31b66",
|
|
@@ -4,6 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React, { memo, forwardRef } from 'react';
|
|
5
5
|
import Emoji from './Emoji';
|
|
6
6
|
import { TONESELECTOR_KEYBOARD_KEYS_SUPPORTED } from '../../util/constants';
|
|
7
|
+
import { isTeamoji26RefreshEmojiPickerEnabledNoExposure } from '../../util/teamoji26RefreshEmojiPicker';
|
|
7
8
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
8
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
10
|
const emojiButton = null;
|
|
@@ -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') && isTeamoji26RefreshEmojiPickerEnabledNoExposure()) {
|
|
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: isTeamoji26RefreshEmojiPickerEnabledNoExposure() ? e => e.preventDefault() : undefined,
|
|
54
55
|
className: ax([emojiRadio.default])
|
|
55
56
|
}), /*#__PURE__*/React.createElement(Emoji, {
|
|
56
57
|
emoji: emoji,
|
|
@@ -18,20 +18,11 @@ import EmojiUploadPreview from './EmojiUploadPreview';
|
|
|
18
18
|
import FileChooser from './FileChooser';
|
|
19
19
|
import { UploadStatus } from './internal-types';
|
|
20
20
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
21
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
22
21
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
22
|
import Button from '@atlaskit/button/default/button';
|
|
24
23
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
25
24
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
26
|
-
|
|
27
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
32
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
33
|
-
return isEnabled;
|
|
34
|
-
};
|
|
25
|
+
import { isRefreshEmojiPickerEnabled } from './isRefreshEmojiPickerEnabled';
|
|
35
26
|
const closeEmojiUploadButton = null;
|
|
36
27
|
const uploadAddRowNew = null;
|
|
37
28
|
const emojiUpload = null;
|
|
@@ -7,16 +7,7 @@ import UploadIcon from '@atlaskit/icon/core/upload';
|
|
|
7
7
|
import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/adapter/drop-target-for-external';
|
|
8
8
|
import { containsFiles } from '@atlaskit/pragmatic-drag-and-drop/utils/contains-files';
|
|
9
9
|
import { getFiles } from '@atlaskit/pragmatic-drag-and-drop/utils/get-files';
|
|
10
|
-
import
|
|
11
|
-
const isRefreshEmojiPickerEnabled = () => {
|
|
12
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
17
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
18
|
-
return isEnabled;
|
|
19
|
-
};
|
|
10
|
+
import { isRefreshEmojiPickerEnabled } from './isRefreshEmojiPickerEnabled';
|
|
20
11
|
export const chooseFileButtonTestId = 'choose-file-button';
|
|
21
12
|
export const fileUploadInputTestId = 'file-upload';
|
|
22
13
|
export const dropzoneTestId = 'file-dropzone';
|
|
@@ -19,6 +19,7 @@ import DeleteButton from './DeleteButton';
|
|
|
19
19
|
import { EmojiNodeWrapper } from './Emoji';
|
|
20
20
|
import { handleDelete } from './handleDelete';
|
|
21
21
|
import { emojiNodeStyles, commonSelectedStyles, selectOnHoverStyles, emojiMainStyle, emojiImage, deletableEmoji } from './styles';
|
|
22
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
23
|
const handleImageError = (props, event) => {
|
|
23
24
|
const {
|
|
24
25
|
emoji,
|
|
@@ -46,7 +47,8 @@ export const ImageEmoji = props => {
|
|
|
46
47
|
showDelete,
|
|
47
48
|
onLoadSuccess,
|
|
48
49
|
disableLazyLoad,
|
|
49
|
-
autoWidth
|
|
50
|
+
autoWidth,
|
|
51
|
+
isDecorative
|
|
50
52
|
} = props;
|
|
51
53
|
const [ref, inView] = useInView({
|
|
52
54
|
triggerOnce: true
|
|
@@ -125,11 +127,12 @@ export const ImageEmoji = props => {
|
|
|
125
127
|
onBeforeLoad();
|
|
126
128
|
}
|
|
127
129
|
}, [inView, onBeforeLoad]);
|
|
130
|
+
const imgAlt = isDecorative && fg('emoji_decorative_label') ? '' : emoji.name || emoji.shortName || '';
|
|
128
131
|
const emojiNode = /*#__PURE__*/React.createElement("img", _extends({
|
|
129
132
|
loading: disableLazyLoad ? 'eager' : 'lazy',
|
|
130
133
|
src: src,
|
|
131
134
|
key: src,
|
|
132
|
-
alt:
|
|
135
|
+
alt: imgAlt,
|
|
133
136
|
"data-emoji-short-name": emoji.shortName,
|
|
134
137
|
"data-emoji-id": emoji.id,
|
|
135
138
|
"data-emoji-text": emoji.fallback || emoji.shortName
|
|
@@ -3,6 +3,7 @@ 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 { isTeamoji26RefreshEmojiPickerEnabledNoExposure } from '../../util/teamoji26RefreshEmojiPicker';
|
|
6
7
|
import Emoji from './Emoji';
|
|
7
8
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
9
|
export const tonePreviewTestId = 'tone-preview';
|
|
@@ -22,7 +23,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
22
23
|
isVisible = true
|
|
23
24
|
} = props;
|
|
24
25
|
const fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
25
|
-
return
|
|
26
|
+
return isTeamoji26RefreshEmojiPickerEnabledNoExposure() ? /*#__PURE__*/React.createElement("button", {
|
|
26
27
|
ref: ref,
|
|
27
28
|
onClick: onSelected,
|
|
28
29
|
onKeyDown: onKeyDown,
|
|
@@ -3,7 +3,6 @@ import "./ToneSelectorInternal.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
7
6
|
import { createAndFireEventInElementsChannel } from '../../util/analytics/analytics';
|
|
8
7
|
import { toneSelectedEvent } from '../../util/analytics/toneSelectedEvent';
|
|
9
8
|
import { toneSelectorOpenedEvent } from '../../util/analytics/toneSelectorOpenedEvent';
|
|
@@ -11,15 +10,7 @@ import { messages } from '../i18n';
|
|
|
11
10
|
import EmojiRadioButton from './EmojiRadioButton';
|
|
12
11
|
import { toneSelectorTestId } from './ToneSelector';
|
|
13
12
|
import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
|
|
14
|
-
|
|
15
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
20
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
21
|
-
return isEnabled;
|
|
22
|
-
};
|
|
13
|
+
import { isRefreshEmojiPickerEnabled } from './isRefreshEmojiPickerEnabled';
|
|
23
14
|
const hidden = null;
|
|
24
15
|
const extractAllTones = emoji => {
|
|
25
16
|
if (emoji.skinVariations) {
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
1
|
+
import { isTeamoji26RefreshEmojiPickerEnabled } from '../../util/teamoji26RefreshEmojiPicker';
|
|
7
2
|
export const isRefreshEmojiPickerEnabled = () => {
|
|
8
|
-
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
13
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
14
|
-
return isEnabled;
|
|
3
|
+
return isTeamoji26RefreshEmojiPickerEnabled();
|
|
15
4
|
};
|
|
@@ -16,15 +16,7 @@ import { categorySelectorCategoryTestId } from './categorySelectorCategoryTestId
|
|
|
16
16
|
import { RENDER_EMOJI_PICKER_LIST_TESTID } from './EmojiPickerList';
|
|
17
17
|
import { sortCategories } from './sortCategories';
|
|
18
18
|
import { sortCategoriesNew } from './sortCategoriesNew';
|
|
19
|
-
|
|
20
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
25
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
26
|
-
return isEnabled;
|
|
27
|
-
};
|
|
19
|
+
import { isRefreshEmojiPickerEnabled } from '../common/isRefreshEmojiPickerEnabled';
|
|
28
20
|
const isEmojiPickerInitialFocusFixEnabled = () => {
|
|
29
21
|
if (!FeatureGates.initializeCompleted()) {
|
|
30
22
|
return false;
|
|
@@ -6,7 +6,6 @@ import { useCallback, useEffect, useMemo, useRef, useState, createRef, memo } fr
|
|
|
6
6
|
import { unstable_batchedUpdates as batchedUpdates } from 'react-dom';
|
|
7
7
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
8
8
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
9
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
10
9
|
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
11
10
|
import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/adapter/drop-target-for-external';
|
|
12
11
|
import { monitorForExternal } from '@atlaskit/pragmatic-drag-and-drop/adapter/monitor-for-external';
|
|
@@ -42,19 +41,11 @@ import { isPromise } from '../../util/is-promise';
|
|
|
42
41
|
import { defaultProductivityColor, getStoredProductivityColor, storeProductivityColor } from '../../util/productivity-colors';
|
|
43
42
|
import { createRecordSelectionDefault } from '../common/RecordSelectionDefault';
|
|
44
43
|
import { uploadEmoji } from '../common/UploadEmoji';
|
|
44
|
+
import { isRefreshEmojiPickerEnabled } from '../common/isRefreshEmojiPickerEnabled';
|
|
45
45
|
import { messages } from '../i18n';
|
|
46
46
|
import CategorySelector from './CategorySelector';
|
|
47
47
|
import EmojiPickerFooter from './EmojiPickerFooter';
|
|
48
48
|
import { EmojiPickerVirtualListInternal as EmojiPickerList } from './EmojiPickerList';
|
|
49
|
-
const isRefreshEmojiPickerEnabled = () => {
|
|
50
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
55
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
56
|
-
return isEnabled;
|
|
57
|
-
};
|
|
58
49
|
const emojiPickerBoxShadow = "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)";
|
|
59
50
|
const emojiPickerHeight = 295;
|
|
60
51
|
const emojiPickerHeightWithPreview = 349; // emojiPickerHeight + emojiPickerPreviewHeight;
|
|
@@ -6,6 +6,7 @@ import { memo } from 'react';
|
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import CachingEmoji from '../common/CachingEmoji';
|
|
8
8
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
9
|
+
import { isTeamoji26RefreshEmojiPickerEnabledNoExposure } from '../../util/teamoji26RefreshEmojiPicker';
|
|
9
10
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
10
11
|
import { messages } from '../i18n';
|
|
11
12
|
const emojiItem = null;
|
|
@@ -30,7 +31,7 @@ const EmojiPickerEmojiRow = ({
|
|
|
30
31
|
formatMessage
|
|
31
32
|
} = useIntl();
|
|
32
33
|
const fitToHeight = expValEqualsNoExposure('platform_use_unicode_emojis', 'isEnabled', true) ? 24 : undefined;
|
|
33
|
-
const preventFocusOnMouseDown =
|
|
34
|
+
const preventFocusOnMouseDown = isTeamoji26RefreshEmojiPickerEnabledNoExposure();
|
|
34
35
|
const handleFocus = index => (emojiId, emoji, event) => {
|
|
35
36
|
setEmojisFocus({
|
|
36
37
|
rowIndex,
|
|
@@ -7,16 +7,7 @@ import { useIntl } from 'react-intl';
|
|
|
7
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
9
9
|
import { AddOwnEmoji } from '../common/AddEmoji';
|
|
10
|
-
import
|
|
11
|
-
const isRefreshEmojiPickerEnabled = () => {
|
|
12
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
17
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
18
|
-
return isEnabled;
|
|
19
|
-
};
|
|
10
|
+
import { isRefreshEmojiPickerEnabled } from '../common/isRefreshEmojiPickerEnabled';
|
|
20
11
|
const emojiPickerFooter = null;
|
|
21
12
|
const emojiPickerFooterWithTopShadow = null;
|
|
22
13
|
const emojiPickerFooterWithTopShadowNew = null;
|
|
@@ -3,22 +3,16 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
import "./EmojiPickerInternal.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
7
6
|
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
8
7
|
import { ufoExperiences } from '../../util/analytics/ufoExperiences';
|
|
9
8
|
import { defaultEmojiPickerSize } from '../../util/constants';
|
|
9
|
+
import { isTeamoji26RefreshEmojiPickerEnabled } from '../../util/teamoji26RefreshEmojiPicker';
|
|
10
10
|
import LoadingEmojiComponent from '../common/LoadingEmojiComponent';
|
|
11
11
|
import { UfoErrorBoundary } from '../common/UfoErrorBoundary';
|
|
12
12
|
import { LoadingItem } from './LoadingItem';
|
|
13
13
|
import { emojiPickerLoader } from './emojiPickerLoader';
|
|
14
14
|
const isRefreshEmojiPickerEnabled = () => {
|
|
15
|
-
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
20
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
21
|
-
return isEnabled;
|
|
15
|
+
return isTeamoji26RefreshEmojiPickerEnabled();
|
|
22
16
|
};
|
|
23
17
|
const emojiPicker = null;
|
|
24
18
|
const emojiPickerNew = null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
4
3
|
import { EmojiPickerListContextProvider } from '../../context/EmojiPickerListContext';
|
|
5
4
|
import { customCategory, defaultEmojiPickerSize, emojiPickerPreviewHeight, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
6
5
|
import { filterHiddenEmojis } from '../../util/filter-hidden-emojis';
|
|
7
6
|
import { filterProductivityEmojisByColor, getProductivityColorPreviewEmojis } from '../../util/productivity-colors';
|
|
8
7
|
import EmojiActions from '../common/EmojiActions';
|
|
8
|
+
import { isRefreshEmojiPickerEnabled } from '../common/isRefreshEmojiPickerEnabled';
|
|
9
9
|
import { messages } from '../i18n';
|
|
10
10
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
11
11
|
import { CategoryHeadingItem } from './CategoryHeadingItem';
|
|
@@ -25,16 +25,6 @@ import { virtualItemRenderer } from './virtualItemRenderer';
|
|
|
25
25
|
*/
|
|
26
26
|
export const RENDER_EMOJI_PICKER_LIST_TESTID = 'render-emoji-picker-list';
|
|
27
27
|
const categoryClassname = 'emoji-category';
|
|
28
|
-
const teamojiRefreshExperimentName = 'platform_teamoji_26_refresh_emoji_picker';
|
|
29
|
-
const isRefreshEmojiPickerEnabled = () => {
|
|
30
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
35
|
-
const isEnabled = FeatureGates.getExperimentValue(teamojiRefreshExperimentName, 'isEnabled', false);
|
|
36
|
-
return isEnabled;
|
|
37
|
-
};
|
|
38
28
|
const atlassianCategory = 'ATLASSIAN';
|
|
39
29
|
const productivityAtlassianSubcategory = 'Productivity';
|
|
40
30
|
const atlassianSubcategoryOrder = ['Faces', 'Hands', 'Reactions', 'Objects', productivityAtlassianSubcategory, 'Logos'];
|
|
@@ -10,15 +10,7 @@ import { useDebouncedCallback } from 'use-debounce';
|
|
|
10
10
|
import { EMOJI_SEARCH_DEBOUNCE } from '../../util/constants';
|
|
11
11
|
import { messages } from '../i18n';
|
|
12
12
|
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
13
|
-
|
|
14
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
19
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
20
|
-
return isEnabled;
|
|
21
|
-
};
|
|
13
|
+
import { isRefreshEmojiPickerEnabled } from '../common/isRefreshEmojiPickerEnabled';
|
|
22
14
|
const isEmojiPickerInitialFocusFixEnabled = () => {
|
|
23
15
|
if (!FeatureGates.initializeCompleted()) {
|
|
24
16
|
return false;
|
|
@@ -3,18 +3,9 @@ import "./VirtualList.compiled.css";
|
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useImperativeHandle } from 'react';
|
|
5
5
|
import { useVirtualizer } from '@tanstack/react-virtual';
|
|
6
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
7
6
|
import { useEmojiPickerListContext } from '../../hooks/useEmojiPickerListContext';
|
|
8
7
|
import { EMOJIPICKERLIST_KEYBOARD_KEYS_SUPPORTED, EMOJI_LIST_COLUMNS, EMOJI_LIST_PAGE_COUNT, KeyboardNavigationDirection, KeyboardKeys } from '../../util/constants';
|
|
9
|
-
|
|
10
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
15
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
16
|
-
return isEnabled;
|
|
17
|
-
};
|
|
8
|
+
import { isRefreshEmojiPickerEnabled } from '../common/isRefreshEmojiPickerEnabled';
|
|
18
9
|
const virtualList = null;
|
|
19
10
|
const virtualRowStyle = null;
|
|
20
11
|
export const virtualListScrollContainerTestId = 'virtual-list-scroll-container';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
2
|
+
import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
+
export const teamoji26RefreshEmojiPickerExperimentName = 'platform_teamoji_26_refresh_emoji_picker';
|
|
5
|
+
export const teamoji26RefreshEmojiPickerUserIdGateName = 'platform_teamoji_26_refresh_emoji_picker_user_id';
|
|
6
|
+
export const isTeamoji26RefreshEmojiPickerEnabled = () => {
|
|
7
|
+
return isExperimentEnabled(teamoji26RefreshEmojiPickerExperimentName) || fg(teamoji26RefreshEmojiPickerUserIdGateName);
|
|
8
|
+
};
|
|
9
|
+
export const isTeamoji26RefreshEmojiPickerEnabledNoExposure = () => {
|
|
10
|
+
return UNSAFE_expValNoExposure(teamoji26RefreshEmojiPickerExperimentName, 'isEnabled', false) === true || fg(teamoji26RefreshEmojiPickerUserIdGateName);
|
|
11
|
+
};
|
|
@@ -7,7 +7,6 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
7
7
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
8
8
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
9
9
|
import { Search, UnorderedSearchIndex } from 'js-search';
|
|
10
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
11
10
|
import { SearchSort } from '../types';
|
|
12
11
|
import { defaultCategories, frequentCategory } from '../util/constants';
|
|
13
12
|
import { getCategoryId } from '../util/get-category-id';
|
|
@@ -17,6 +16,7 @@ import { getEmojiVariation } from './getEmojiVariation';
|
|
|
17
16
|
import { UsageFrequencyTracker } from './internal/UsageFrequencyTracker';
|
|
18
17
|
import { createSearchEmojiComparator } from './internal/createSearchEmojiComparator';
|
|
19
18
|
import { createUsageOnlyEmojiComparator } from './internal/createUsageOnlyEmojiComparator';
|
|
19
|
+
import { isTeamoji26RefreshEmojiPickerEnabled } from '../util/teamoji26RefreshEmojiPicker';
|
|
20
20
|
// FS-1097 - duplicated in mentions - extract at some point into a shared library
|
|
21
21
|
var Tokenizer = /*#__PURE__*/function () {
|
|
22
22
|
function Tokenizer() {
|
|
@@ -129,15 +129,8 @@ var findEmojiIndex = function findEmojiIndex(emojis, toFind) {
|
|
|
129
129
|
});
|
|
130
130
|
return match;
|
|
131
131
|
};
|
|
132
|
-
var teamojiRefreshExperimentName = 'platform_teamoji_26_refresh_emoji_picker';
|
|
133
132
|
var isRefreshEmojiPickerEnabled = function isRefreshEmojiPickerEnabled() {
|
|
134
|
-
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
139
|
-
var isEnabled = FeatureGates.getExperimentValue(teamojiRefreshExperimentName, 'isEnabled', false);
|
|
140
|
-
return isEnabled;
|
|
133
|
+
return isTeamoji26RefreshEmojiPickerEnabled();
|
|
141
134
|
};
|
|
142
135
|
var EmojiRepository = /*#__PURE__*/function () {
|
|
143
136
|
// protected to allow subclasses to access (for testing and storybooks).
|
|
@@ -13,7 +13,6 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
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
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
15
15
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
16
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client/feature-gates';
|
|
17
16
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
18
17
|
import { AbstractResource, utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
19
18
|
import { ProviderTypes } from '../types';
|
|
@@ -26,19 +25,11 @@ import debug from '../util/logger';
|
|
|
26
25
|
import storageAvailable from '../util/storage-available';
|
|
27
26
|
import { promiseWithTimeout } from '../util/timed-promise';
|
|
28
27
|
import { toEmojiId } from '../util/to-emoji-id';
|
|
28
|
+
import { isTeamoji26RefreshEmojiPickerEnabled } from '../util/teamoji26RefreshEmojiPicker';
|
|
29
29
|
import EmojiLoader from './EmojiLoader';
|
|
30
30
|
import EmojiRepository from './EmojiRepository';
|
|
31
31
|
import SiteEmojiResource from './media/SiteEmojiResource';
|
|
32
|
-
var teamoji26RefreshEmojiPickerExperimentName = 'platform_teamoji_26_refresh_emoji_picker';
|
|
33
32
|
var teamoji26QueryParam = 'useTeamoji26=true';
|
|
34
|
-
var isTeamoji26RefreshEmojiPickerEnabled = function isTeamoji26RefreshEmojiPickerEnabled() {
|
|
35
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
40
|
-
return FeatureGates.getExperimentValue(teamoji26RefreshEmojiPickerExperimentName, 'isEnabled', false);
|
|
41
|
-
};
|
|
42
33
|
var addTeamoji26QueryParam = function addTeamoji26QueryParam(url) {
|
|
43
34
|
if (!url.includes('/atlassian') || /[?&]useTeamoji26=/.test(url)) {
|
|
44
35
|
return url;
|