@atlaskit/emoji 70.3.4 → 70.4.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/afm-cc/tsconfig.json +0 -1
  3. package/afm-products/tsconfig.json +0 -1
  4. package/dist/cjs/components/common/EmojiActions.js +8 -2
  5. package/dist/cjs/components/common/EmojiUploadPicker.js +2 -1
  6. package/dist/cjs/components/common/messages.js +14 -0
  7. package/dist/cjs/components/picker/CategorySelector.compiled.css +16 -0
  8. package/dist/cjs/components/picker/CategorySelector.js +42 -4
  9. package/dist/cjs/components/picker/EmojiPickerComponent.js +16 -0
  10. package/dist/cjs/components/picker/EmojiPickerList.js +2 -1
  11. package/dist/cjs/components/picker/categories.js +83 -1
  12. package/dist/cjs/util/analytics/analytics.js +1 -1
  13. package/dist/es2019/components/common/EmojiActions.js +10 -3
  14. package/dist/es2019/components/common/EmojiUploadPicker.js +2 -1
  15. package/dist/es2019/components/common/messages.js +8 -0
  16. package/dist/es2019/components/picker/CategorySelector.compiled.css +16 -0
  17. package/dist/es2019/components/picker/CategorySelector.js +43 -5
  18. package/dist/es2019/components/picker/EmojiPickerComponent.js +16 -0
  19. package/dist/es2019/components/picker/EmojiPickerList.js +3 -2
  20. package/dist/es2019/components/picker/categories.js +82 -0
  21. package/dist/es2019/util/analytics/analytics.js +1 -1
  22. package/dist/esm/components/common/EmojiActions.js +9 -3
  23. package/dist/esm/components/common/EmojiUploadPicker.js +2 -1
  24. package/dist/esm/components/common/messages.js +8 -0
  25. package/dist/esm/components/picker/CategorySelector.compiled.css +16 -0
  26. package/dist/esm/components/picker/CategorySelector.js +43 -5
  27. package/dist/esm/components/picker/EmojiPickerComponent.js +16 -0
  28. package/dist/esm/components/picker/EmojiPickerList.js +3 -2
  29. package/dist/esm/components/picker/categories.js +82 -0
  30. package/dist/esm/util/analytics/analytics.js +1 -1
  31. package/dist/types/components/common/messages.d.ts +7 -0
  32. package/dist/types/components/picker/categories.d.ts +1 -0
  33. package/dist/types-ts4.5/components/common/messages.d.ts +7 -0
  34. package/dist/types-ts4.5/components/picker/categories.d.ts +1 -0
  35. package/package.json +7 -4
  36. package/afm-jira/tsconfig.json +0 -78
@@ -1,6 +1,7 @@
1
1
  import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { customCategory, defaultEmojiPickerSize, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
3
- import { CategoryDescriptionMap } from './categories';
4
+ import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
4
5
  import CategoryTracker from './CategoryTracker';
5
6
  import { sizes } from './EmojiPickerSizes';
6
7
  import { CategoryHeadingItem, EmojisRowItem, LoadingItem, virtualItemRenderer } from './EmojiPickerVirtualItems';
@@ -107,7 +108,7 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
107
108
  }, [groupByCategory]);
108
109
  const addToCategoryMap = (categoryToGroupMap, emoji, category) => {
109
110
  if (!categoryToGroupMap[category]) {
110
- const categoryDefinition = CategoryDescriptionMap[category];
111
+ const categoryDefinition = fg('platform_emoji_picker_refresh') ? CategoryDescriptionMapNew[category] : CategoryDescriptionMap[category];
111
112
  categoryToGroupMap[category] = {
112
113
  emojis: [],
113
114
  title: categoryDefinition.name,
@@ -1,5 +1,6 @@
1
1
  import BasketballIcon from '@atlaskit/icon/core/basketball';
2
2
  import AddIcon from '@atlaskit/icon/core/add';
3
+ import EmojiAddIcon from '@atlaskit/icon/core/emoji-add';
3
4
  import FlagIcon from '@atlaskit/icon/core/flag';
4
5
  import TakeoutFoodIcon from '@atlaskit/icon/core/takeout-food';
5
6
  import ClockIcon from '@atlaskit/icon/core/clock';
@@ -90,4 +91,85 @@ export const CategoryDescriptionMap = {
90
91
  icon: AddIcon,
91
92
  order: 12
92
93
  }
94
+ };
95
+ export const CategoryDescriptionMapNew = {
96
+ SEARCH: {
97
+ id: 'SEARCH',
98
+ name: 'categoriesSearchResults',
99
+ // refers to i18n categoriesSearchResults key
100
+ icon: undefined,
101
+ order: 0
102
+ },
103
+ FREQUENT: {
104
+ id: 'FREQUENT',
105
+ name: 'frequentCategory',
106
+ icon: ClockIcon,
107
+ order: 1
108
+ },
109
+ PEOPLE: {
110
+ id: 'PEOPLE',
111
+ name: 'peopleCategory',
112
+ icon: EmojiIcon,
113
+ order: 2
114
+ },
115
+ NATURE: {
116
+ id: 'NATURE',
117
+ name: 'natureCategory',
118
+ icon: TreeIcon,
119
+ order: 3
120
+ },
121
+ FOODS: {
122
+ id: 'FOODS',
123
+ name: 'foodsCategory',
124
+ icon: TakeoutFoodIcon,
125
+ order: 4
126
+ },
127
+ ACTIVITY: {
128
+ id: 'ACTIVITY',
129
+ name: 'activityCategory',
130
+ icon: BasketballIcon,
131
+ order: 5
132
+ },
133
+ PLACES: {
134
+ id: 'PLACES',
135
+ name: 'placesCategory',
136
+ icon: VehicleCarIcon,
137
+ order: 6
138
+ },
139
+ OBJECTS: {
140
+ id: 'OBJECTS',
141
+ name: 'objectsCategory',
142
+ icon: LightbulbIcon,
143
+ order: 7
144
+ },
145
+ SYMBOLS: {
146
+ id: 'SYMBOLS',
147
+ name: 'symbolsCategory',
148
+ icon: HeartIcon,
149
+ order: 8
150
+ },
151
+ FLAGS: {
152
+ id: 'FLAGS',
153
+ name: 'flagsCategory',
154
+ icon: FlagIcon,
155
+ order: 9
156
+ },
157
+ ATLASSIAN: {
158
+ id: 'ATLASSIAN',
159
+ name: 'productivityCategory',
160
+ icon: CheckCircleIcon,
161
+ order: 10
162
+ },
163
+ USER_CUSTOM: {
164
+ id: customCategory,
165
+ name: userCustomTitle,
166
+ icon: AddIcon,
167
+ order: 11
168
+ },
169
+ CUSTOM: {
170
+ id: customCategory,
171
+ name: customTitle,
172
+ icon: EmojiAddIcon,
173
+ order: 12
174
+ }
93
175
  };
@@ -9,7 +9,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
9
9
  actionSubjectId,
10
10
  attributes: {
11
11
  packageName: "@atlaskit/emoji",
12
- packageVersion: "70.3.3",
12
+ packageVersion: "0.0.0-development",
13
13
  ...attributes
14
14
  }
15
15
  });
@@ -6,7 +6,7 @@ import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
7
  import { Fragment, useState, useRef, memo, useLayoutEffect, useCallback } from 'react';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
- import { FormattedMessage, injectIntl } from 'react-intl';
9
+ import { FormattedMessage, injectIntl, useIntl } from 'react-intl';
10
10
  import EmojiDeletePreview from './EmojiDeletePreview';
11
11
  import EmojiUploadPicker from './EmojiUploadPicker';
12
12
  import TonePreviewButton from './TonePreviewButton';
@@ -15,6 +15,7 @@ import { EmojiPickerListSearch } from '../picker/EmojiPickerListSearch';
15
15
  import { messages } from '../i18n';
16
16
  import AkButton from '@atlaskit/button/standard-button';
17
17
  import AddIcon from '@atlaskit/icon/core/add';
18
+ import EmojiAddIcon from '@atlaskit/icon/core/emoji-add';
18
19
  import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
19
20
  import { emojiPickerAddEmoji } from './styles';
20
21
  import { DEFAULT_TONE } from '../../util/constants';
@@ -35,15 +36,20 @@ export var uploadEmojiTestId = 'upload-emoji';
35
36
  var AddOwnEmoji = function AddOwnEmoji(props) {
36
37
  var onOpenUpload = props.onOpenUpload,
37
38
  uploadEnabled = props.uploadEnabled;
39
+ var _useIntl = useIntl(),
40
+ formatMessage = _useIntl.formatMessage;
38
41
  return /*#__PURE__*/React.createElement(Fragment, null, uploadEnabled && /*#__PURE__*/React.createElement("div", {
39
42
  "data-testid": uploadEmojiTestId,
40
43
  className: ax(["_1wpz1h6o _18u019bv _otyr19bv"])
41
- }, /*#__PURE__*/React.createElement(FormattedMessage, messages.addCustomEmojiLabel, function (label) {
44
+ }, /*#__PURE__*/React.createElement(FormattedMessage, fg('platform_emoji_picker_refresh') ? messages.addEmojiLabel : messages.addCustomEmojiLabel, function (label) {
42
45
  return /*#__PURE__*/React.createElement(AkButton, {
43
46
  onClick: onOpenUpload,
44
47
  iconBefore: /*#__PURE__*/React.createElement(Box, {
45
48
  xcss: styles.icon
46
- }, /*#__PURE__*/React.createElement(AddIcon, {
49
+ }, fg('platform_emoji_picker_refresh') ? /*#__PURE__*/React.createElement(EmojiAddIcon, {
50
+ color: "currentColor",
51
+ label: formatMessage(messages.addCustomEmojiLabel)
52
+ }) : /*#__PURE__*/React.createElement(AddIcon, {
47
53
  color: "currentColor",
48
54
  label: ""
49
55
  })),
@@ -19,6 +19,7 @@ import EmojiErrorMessage from './EmojiErrorMessage';
19
19
  import EmojiUploadPreview from './EmojiUploadPreview';
20
20
  import FileChooser from './FileChooser';
21
21
  import { UploadStatus } from './internal-types';
22
+ import { fg } from '@atlaskit/platform-feature-flags';
22
23
  var closeEmojiUploadButton = null;
23
24
  var emojiUpload = null;
24
25
  var emojiUploadTop = null;
@@ -78,7 +79,7 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
78
79
  }, /*#__PURE__*/React.createElement("label", {
79
80
  htmlFor: "new-emoji-name-input",
80
81
  className: ax(["_1w90azsu", "_11c8wadc _k48p1pd9"])
81
- }, /*#__PURE__*/React.createElement(FormattedMessage, messages.addCustomEmojiLabel)), /*#__PURE__*/React.createElement("div", {
82
+ }, /*#__PURE__*/React.createElement(FormattedMessage, fg('platform_emoji_picker_refresh') ? messages.addEmojiLabel : messages.addCustomEmojiLabel)), /*#__PURE__*/React.createElement("div", {
82
83
  className: ax(["_1e0c1txw"])
83
84
  }, /*#__PURE__*/React.createElement(AkButton, {
84
85
  onClick: onUploadCancelled,
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl';
2
+ export var messages = defineMessages({
3
+ addCustomEmojiLabel: {
4
+ id: 'addCustomEmojiLabel',
5
+ defaultMessage: 'Add custom emoji',
6
+ description: 'Accessible label for add custom emoji button'
7
+ }
8
+ });
@@ -2,23 +2,39 @@
2
2
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
3
3
  ._v564h5h4{transition:color .2s ease}
4
4
  ._189eidpf{border-width:0}._16jlidpf{flex-grow:0}
5
+ ._19bv12x7{padding-left:var(--ds-space-075,6px)}
5
6
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
6
7
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
7
8
  ._1bah1b1v{justify-content:space-around}
9
+ ._1bah1h6o{justify-content:center}
10
+ ._1doc1dm9{border-bottom-width:var(--ds-border-width-selected,2px)}
11
+ ._1doce4h9{border-bottom-width:var(--ds-border-width,1px)}
8
12
  ._1e0c1txw{display:flex}
13
+ ._1il9nqa1{border-bottom-style:solid}
14
+ ._1o3i1j28{border-bottom-color:transparent}
15
+ ._1o3i1l7x{border-bottom-color:var(--ds-border,#0b120e24)}
16
+ ._1o3ia755{border-bottom-color:var(--ds-border-brand,#1868db)}
9
17
  ._1o9zidpf{flex-shrink:0}
10
18
  ._2lx2vrvc{flex-direction:row}
19
+ ._4cvr1fhb{align-items:stretch}
11
20
  ._4cvr1h6o{align-items:center}
12
21
  ._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
13
22
  ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
23
+ ._bfhkvuon{background-color:var(--ds-surface,#fff)}
14
24
  ._ca0q12x7{padding-top:var(--ds-space-075,6px)}
25
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
15
26
  ._ca0qze3t{padding-top:var(--ds-space-0,0)}
16
27
  ._dpd31txw button{display:flex}
17
28
  ._i0dl1wug{flex-basis:auto}
18
29
  ._n3td12x7{padding-bottom:var(--ds-space-075,6px)}
30
+ ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
19
31
  ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
20
32
  ._syaz1rpy{color:var(--ds-text-subtlest,#6b6e76)}
21
33
  ._syaz6x5g{color:var(--ds-text-selected,#1868db)}
34
+ ._u5f312x7{padding-right:var(--ds-space-075,6px)}
22
35
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
23
36
  ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
37
+ ._1jc41ihb:hover{border-bottom-color:var(--ds-border-bold,#7d818a)}
38
+ ._1jc4a755:hover{border-bottom-color:var(--ds-border-brand,#1868db)}
39
+ ._30l31rpy:hover{color:var(--ds-text-subtlest,#6b6e76)}
24
40
  ._30l36x5g:hover{color:var(--ds-text-selected,#1868db)}
@@ -5,22 +5,28 @@ import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { useCallback, useEffect, useRef, useState } from 'react';
7
7
  import { cx } from '@atlaskit/css';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
8
9
  import { useIntl } from 'react-intl';
9
10
  import { Pressable } from '@atlaskit/primitives/compiled';
10
11
  import Tooltip from '@atlaskit/tooltip';
11
12
  import { CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED, defaultCategories, KeyboardKeys } from '../../util/constants';
12
13
  import { messages } from '../i18n';
13
- import { CategoryDescriptionMap } from './categories';
14
+ import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
14
15
  import { usePrevious } from '../../hooks/usePrevious';
15
16
  import { RENDER_EMOJI_PICKER_LIST_TESTID } from './EmojiPickerList';
16
17
  var styles = {
17
18
  commonCategory: "_2rko12b0 _v564h5h4 _189eidpf _bfhksm61 _ca0qze3t _n3tdze3t _19bvze3t _u5f3ze3t",
19
+ commonCategoryNew: "_v564h5h4 _189eidpf _bfhksm61 _ca0qpxbi _n3tdpxbi _19bv12x7 _u5f312x7 _1e0c1txw _4cvr1h6o _1bah1h6o",
18
20
  defaultCategory: "_syaz1rpy _30l36x5g",
21
+ defaultCategoryNew: "_syaz1rpy _1doc1dm9 _1il9nqa1 _1o3i1j28 _30l31rpy _1jc41ihb",
19
22
  activeCategory: "_syaz6x5g _30l36x5g",
23
+ activeCategoryNew: "_syaz6x5g _1doc1dm9 _1il9nqa1 _1o3ia755 _30l36x5g _1jc4a755",
20
24
  disabledCategory: "_syaz1rpy"
21
25
  };
22
26
  var categorySelector = null;
27
+ var categorySelectorNew = null;
23
28
  var categorySelectorTablist = null;
29
+ var categorySelectorTablistNew = null;
24
30
  export var sortCategories = function sortCategories(c1, c2) {
25
31
  return CategoryDescriptionMap[c1].order - CategoryDescriptionMap[c2].order;
26
32
  };
@@ -29,7 +35,7 @@ var addNewCategories = function addNewCategories(oldCategories, newCategories) {
29
35
  return oldCategories;
30
36
  }
31
37
  return oldCategories.concat(newCategories.filter(function (category) {
32
- return !!CategoryDescriptionMap[category];
38
+ return !!(fg('platform_emoji_picker_refresh') ? CategoryDescriptionMapNew : CategoryDescriptionMap)[category];
33
39
  })).sort(sortCategories);
34
40
  };
35
41
  export var categorySelectorComponentTestId = 'category-selector-component';
@@ -108,16 +114,46 @@ var CategorySelector = function CategorySelector(props) {
108
114
  };
109
115
  var categoriesSection;
110
116
  if (categories) {
111
- categoriesSection = /*#__PURE__*/React.createElement("div", {
117
+ categoriesSection = fg('platform_emoji_picker_refresh') ? /*#__PURE__*/React.createElement("div", {
112
118
  role: "tablist",
113
119
  "aria-label": formatMessage(messages.categoriesSelectorLabel),
114
120
  "data-testid": categorySelectorComponentTestId,
115
121
  ref: categoryRef,
116
- className: ax(["_ca0q12x7 _n3td12x7 _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1h6o"])
122
+ className: ax(["_ca0qze3t _n3tdze3t _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1fhb"])
117
123
  }, categories.map(function (categoryId, index) {
118
124
  var category = CategoryDescriptionMap[categoryId];
119
125
  var Icon = category.icon;
120
126
  var categoryName = formatMessage(messages[category.name]);
127
+ return /*#__PURE__*/React.createElement(Tooltip, {
128
+ content: categoryName,
129
+ position: "bottom",
130
+ key: category.id
131
+ }, /*#__PURE__*/React.createElement(Pressable, {
132
+ id: "category-selector-".concat(category.id),
133
+ "data-focus-index": index,
134
+ "aria-label": categoryName,
135
+ "aria-controls": currentFocus === index ? RENDER_EMOJI_PICKER_LIST_TESTID : undefined,
136
+ "aria-selected": categoryId === activeCategoryId,
137
+ xcss: cx(styles.commonCategoryNew, styles.defaultCategoryNew, categoryId === activeCategoryId && styles.activeCategoryNew, disableCategories && styles.disabledCategory),
138
+ isDisabled: disableCategories,
139
+ onClick: handleClick(categoryId, index),
140
+ testId: categorySelectorCategoryTestId(categoryId),
141
+ tabIndex: currentFocus === index ? 0 : -1,
142
+ onKeyDown: handleKeyDown,
143
+ role: "tab"
144
+ }, /*#__PURE__*/React.createElement(Icon, {
145
+ label: categoryName
146
+ })));
147
+ })) : /*#__PURE__*/React.createElement("div", {
148
+ role: "tablist",
149
+ "aria-label": formatMessage(messages.categoriesSelectorLabel),
150
+ "data-testid": categorySelectorComponentTestId,
151
+ ref: categoryRef,
152
+ className: ax(["_ca0q12x7 _n3td12x7 _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1h6o"])
153
+ }, categories.map(function (categoryId, index) {
154
+ var category = fg('platform_emoji_picker_refresh') ? CategoryDescriptionMapNew[categoryId] : CategoryDescriptionMap[categoryId];
155
+ var Icon = category.icon;
156
+ var categoryName = formatMessage(messages[category.name]);
121
157
  return /*#__PURE__*/React.createElement(Tooltip, {
122
158
  content: categoryName,
123
159
  position: "bottom",
@@ -140,7 +176,9 @@ var CategorySelector = function CategorySelector(props) {
140
176
  })));
141
177
  }));
142
178
  }
143
- return /*#__PURE__*/React.createElement("div", {
179
+ return fg('platform_emoji_picker_refresh') ? /*#__PURE__*/React.createElement("div", {
180
+ className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkvuon _ca0qze3t _n3tdze3t _1doce4h9 _1il9nqa1 _1o3i1l7x _dpd31txw"])
181
+ }, categoriesSection) : /*#__PURE__*/React.createElement("div", {
144
182
  className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkhfxm _dpd31txw"])
145
183
  }, categoriesSection);
146
184
  };
@@ -119,6 +119,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
119
119
  var openTime = useRef(0);
120
120
  var isMounting = useRef(true);
121
121
  var previousEmojiProvider = useRef(emojiProvider);
122
+ var isProgrammaticScroll = useRef(false);
122
123
  var currentUser = useMemo(function () {
123
124
  return emojiProvider.getCurrentUser();
124
125
  }, [emojiProvider]);
@@ -134,6 +135,12 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
134
135
  }
135
136
  }, [selectedEmoji]);
136
137
  var onCategoryActivated = useCallback(function (category) {
138
+ // Ignore scroll-driven category changes while a programmatic reveal()
139
+ // scroll is in progress — they would flicker the indicator through
140
+ // intermediate categories before landing on the correct one.
141
+ if (isProgrammaticScroll.current && fg('platform_emoji_picker_refresh')) {
142
+ return;
143
+ }
137
144
  if (activeCategory !== category) {
138
145
  setActiveCategory(category);
139
146
  }
@@ -295,7 +302,16 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
295
302
  });
296
303
  }
297
304
  if (emojiPickerList.current) {
305
+ if (fg('platform_emoji_picker_refresh')) {
306
+ isProgrammaticScroll.current = true;
307
+ }
298
308
  emojiPickerList.current.reveal(categoryId);
309
+ if (fg('platform_emoji_picker_refresh')) {
310
+ // Clear the flag after the scroll animation has settled.
311
+ setTimeout(function () {
312
+ isProgrammaticScroll.current = false;
313
+ }, 300);
314
+ }
299
315
  }
300
316
  batchedUpdates(function () {
301
317
  setActiveCategory(categoryId);
@@ -1,8 +1,9 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { customCategory, defaultEmojiPickerSize, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
5
- import { CategoryDescriptionMap } from './categories';
6
+ import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
6
7
  import CategoryTracker from './CategoryTracker';
7
8
  import { sizes } from './EmojiPickerSizes';
8
9
  import { CategoryHeadingItem, EmojisRowItem, LoadingItem, virtualItemRenderer } from './EmojiPickerVirtualItems';
@@ -131,7 +132,7 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
131
132
  }, [groupByCategory]);
132
133
  var addToCategoryMap = function addToCategoryMap(categoryToGroupMap, emoji, category) {
133
134
  if (!categoryToGroupMap[category]) {
134
- var categoryDefinition = CategoryDescriptionMap[category];
135
+ var categoryDefinition = fg('platform_emoji_picker_refresh') ? CategoryDescriptionMapNew[category] : CategoryDescriptionMap[category];
135
136
  categoryToGroupMap[category] = {
136
137
  emojis: [],
137
138
  title: categoryDefinition.name,
@@ -1,5 +1,6 @@
1
1
  import BasketballIcon from '@atlaskit/icon/core/basketball';
2
2
  import AddIcon from '@atlaskit/icon/core/add';
3
+ import EmojiAddIcon from '@atlaskit/icon/core/emoji-add';
3
4
  import FlagIcon from '@atlaskit/icon/core/flag';
4
5
  import TakeoutFoodIcon from '@atlaskit/icon/core/takeout-food';
5
6
  import ClockIcon from '@atlaskit/icon/core/clock';
@@ -90,4 +91,85 @@ export var CategoryDescriptionMap = {
90
91
  icon: AddIcon,
91
92
  order: 12
92
93
  }
94
+ };
95
+ export var CategoryDescriptionMapNew = {
96
+ SEARCH: {
97
+ id: 'SEARCH',
98
+ name: 'categoriesSearchResults',
99
+ // refers to i18n categoriesSearchResults key
100
+ icon: undefined,
101
+ order: 0
102
+ },
103
+ FREQUENT: {
104
+ id: 'FREQUENT',
105
+ name: 'frequentCategory',
106
+ icon: ClockIcon,
107
+ order: 1
108
+ },
109
+ PEOPLE: {
110
+ id: 'PEOPLE',
111
+ name: 'peopleCategory',
112
+ icon: EmojiIcon,
113
+ order: 2
114
+ },
115
+ NATURE: {
116
+ id: 'NATURE',
117
+ name: 'natureCategory',
118
+ icon: TreeIcon,
119
+ order: 3
120
+ },
121
+ FOODS: {
122
+ id: 'FOODS',
123
+ name: 'foodsCategory',
124
+ icon: TakeoutFoodIcon,
125
+ order: 4
126
+ },
127
+ ACTIVITY: {
128
+ id: 'ACTIVITY',
129
+ name: 'activityCategory',
130
+ icon: BasketballIcon,
131
+ order: 5
132
+ },
133
+ PLACES: {
134
+ id: 'PLACES',
135
+ name: 'placesCategory',
136
+ icon: VehicleCarIcon,
137
+ order: 6
138
+ },
139
+ OBJECTS: {
140
+ id: 'OBJECTS',
141
+ name: 'objectsCategory',
142
+ icon: LightbulbIcon,
143
+ order: 7
144
+ },
145
+ SYMBOLS: {
146
+ id: 'SYMBOLS',
147
+ name: 'symbolsCategory',
148
+ icon: HeartIcon,
149
+ order: 8
150
+ },
151
+ FLAGS: {
152
+ id: 'FLAGS',
153
+ name: 'flagsCategory',
154
+ icon: FlagIcon,
155
+ order: 9
156
+ },
157
+ ATLASSIAN: {
158
+ id: 'ATLASSIAN',
159
+ name: 'productivityCategory',
160
+ icon: CheckCircleIcon,
161
+ order: 10
162
+ },
163
+ USER_CUSTOM: {
164
+ id: customCategory,
165
+ name: userCustomTitle,
166
+ icon: AddIcon,
167
+ order: 11
168
+ },
169
+ CUSTOM: {
170
+ id: customCategory,
171
+ name: customTitle,
172
+ icon: EmojiAddIcon,
173
+ order: 12
174
+ }
93
175
  };
@@ -14,7 +14,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
14
14
  actionSubjectId: actionSubjectId,
15
15
  attributes: _objectSpread({
16
16
  packageName: "@atlaskit/emoji",
17
- packageVersion: "70.3.3"
17
+ packageVersion: "0.0.0-development"
18
18
  }, attributes)
19
19
  };
20
20
  };
@@ -0,0 +1,7 @@
1
+ export declare const messages: {
2
+ addCustomEmojiLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ };
@@ -5,4 +5,5 @@ type CategoryDescriptionRecord = {
5
5
  [key in CategoryGroupKey]: CategoryDescription;
6
6
  };
7
7
  export declare const CategoryDescriptionMap: CategoryDescriptionRecord;
8
+ export declare const CategoryDescriptionMapNew: CategoryDescriptionRecord;
8
9
  export {};
@@ -0,0 +1,7 @@
1
+ export declare const messages: {
2
+ addCustomEmojiLabel: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ };
@@ -5,4 +5,5 @@ type CategoryDescriptionRecord = {
5
5
  [key in CategoryGroupKey]: CategoryDescription;
6
6
  };
7
7
  export declare const CategoryDescriptionMap: CategoryDescriptionRecord;
8
+ export declare const CategoryDescriptionMapNew: CategoryDescriptionRecord;
8
9
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/emoji",
3
- "version": "70.3.4",
3
+ "version": "70.4.1",
4
4
  "description": "Fabric emoji React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,13 +43,13 @@
43
43
  "@atlaskit/css": "^0.19.0",
44
44
  "@atlaskit/heading": "^5.4.0",
45
45
  "@atlaskit/icon": "^34.4.0",
46
- "@atlaskit/media-client": "^36.1.0",
46
+ "@atlaskit/media-client": "^36.2.0",
47
47
  "@atlaskit/media-client-react": "^5.1.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/primitives": "^19.0.0",
50
50
  "@atlaskit/spinner": "^19.1.0",
51
51
  "@atlaskit/textfield": "^8.3.0",
52
- "@atlaskit/tmp-editor-statsig": "^77.0.0",
52
+ "@atlaskit/tmp-editor-statsig": "^77.3.0",
53
53
  "@atlaskit/tokens": "^13.0.0",
54
54
  "@atlaskit/tooltip": "^22.0.0",
55
55
  "@atlaskit/ufo": "^0.4.0",
@@ -79,7 +79,7 @@
79
79
  "@atlaskit/ssr": "workspace:^",
80
80
  "@atlaskit/theme": "^23.2.0",
81
81
  "@atlassian/a11y-jest-testing": "^0.11.0",
82
- "@atlassian/feature-flags-test-utils": "^1.0.0",
82
+ "@atlassian/feature-flags-test-utils": "^1.1.0",
83
83
  "@emotion/jest": "^11.8.0",
84
84
  "@testing-library/dom": "^10.1.0",
85
85
  "@testing-library/jest-dom": "^6.4.5",
@@ -139,6 +139,9 @@
139
139
  },
140
140
  "increase-emoji-client-upload-timeout": {
141
141
  "type": "boolean"
142
+ },
143
+ "platform_emoji_picker_refresh": {
144
+ "type": "boolean"
142
145
  }
143
146
  },
144
147
  "scripts": {
@@ -1,78 +0,0 @@
1
- {
2
- "extends": "../../../../tsconfig.local-consumption.json",
3
- "compilerOptions": {
4
- "target": "es5",
5
- "outDir": "../../../../../jira/tsDist/@atlaskit__emoji/app",
6
- "rootDir": "../",
7
- "composite": true,
8
- "noCheck": true
9
- },
10
- "include": [
11
- "../src/**/*.ts",
12
- "../src/**/*.tsx"
13
- ],
14
- "exclude": [
15
- "../src/**/__tests__/*",
16
- "../src/**/*.test.*",
17
- "../src/**/test.*",
18
- "../src/**/examples.*",
19
- "../src/**/examples/*",
20
- "../src/**/examples/**/*",
21
- "../src/**/*.stories.*",
22
- "../src/**/stories/*",
23
- "../src/**/stories/**/*"
24
- ],
25
- "references": [
26
- {
27
- "path": "../../../analytics/analytics-next/afm-jira/tsconfig.json"
28
- },
29
- {
30
- "path": "../../../design-system/button/afm-jira/tsconfig.json"
31
- },
32
- {
33
- "path": "../../../design-system/css/afm-jira/tsconfig.json"
34
- },
35
- {
36
- "path": "../../../design-system/heading/afm-jira/tsconfig.json"
37
- },
38
- {
39
- "path": "../../../design-system/icon/afm-jira/tsconfig.json"
40
- },
41
- {
42
- "path": "../../../media/media-client/afm-jira/tsconfig.json"
43
- },
44
- {
45
- "path": "../../../media/media-client-react/afm-jira/tsconfig.json"
46
- },
47
- {
48
- "path": "../../../platform/feature-flags/afm-jira/tsconfig.json"
49
- },
50
- {
51
- "path": "../../../design-system/primitives/afm-jira/tsconfig.json"
52
- },
53
- {
54
- "path": "../../../design-system/spinner/afm-jira/tsconfig.json"
55
- },
56
- {
57
- "path": "../../../design-system/textfield/afm-jira/tsconfig.json"
58
- },
59
- {
60
- "path": "../../../editor/tmp-editor-statsig/afm-jira/tsconfig.json"
61
- },
62
- {
63
- "path": "../../../design-system/tokens/afm-jira/tsconfig.json"
64
- },
65
- {
66
- "path": "../../../design-system/tooltip/afm-jira/tsconfig.json"
67
- },
68
- {
69
- "path": "../../../data/ufo-external/afm-jira/tsconfig.json"
70
- },
71
- {
72
- "path": "../../util-service-support/afm-jira/tsconfig.json"
73
- },
74
- {
75
- "path": "../../../design-system/visually-hidden/afm-jira/tsconfig.json"
76
- }
77
- ]
78
- }