@atlaskit/emoji 71.7.1 → 71.7.2
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 +8 -0
- package/dist/cjs/api/EmojiRepository.js +6 -6
- package/dist/cjs/components/picker/EmojiPickerList.js +4 -2
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/api/EmojiRepository.js +6 -6
- package/dist/es2019/components/picker/EmojiPickerList.js +4 -2
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/api/EmojiRepository.js +6 -6
- package/dist/esm/components/picker/EmojiPickerList.js +4 -2
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 71.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`209d9185455f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/209d9185455f8) -
|
|
8
|
+
Ensure Atlassian emoji category lookups include new backend metadata format
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 71.7.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -214,9 +214,9 @@ var EmojiRepository = exports.default = /*#__PURE__*/function () {
|
|
|
214
214
|
value: function findInCategory(categoryId) {
|
|
215
215
|
if (categoryId === _constants.frequentCategory) {
|
|
216
216
|
return this.getFrequentlyUsed();
|
|
217
|
-
} else if (
|
|
217
|
+
} else if (categoryId === 'ATLASSIAN') {
|
|
218
218
|
return this.all().emojis.filter(function (emoji) {
|
|
219
|
-
return emoji.type === 'ATLASSIAN';
|
|
219
|
+
return emoji.category === categoryId || emoji.type === 'ATLASSIAN';
|
|
220
220
|
});
|
|
221
221
|
} else {
|
|
222
222
|
return this.all().emojis.filter(function (emoji) {
|
|
@@ -367,7 +367,7 @@ var EmojiRepository = exports.default = /*#__PURE__*/function () {
|
|
|
367
367
|
this.asciiMap = new Map();
|
|
368
368
|
var categorySet = new Set();
|
|
369
369
|
this.emojis.forEach(function (emoji) {
|
|
370
|
-
categorySet.add(_this3.getDynamicCategoryForEmoji(emoji
|
|
370
|
+
categorySet.add(_this3.getDynamicCategoryForEmoji(emoji));
|
|
371
371
|
_this3.addToMaps(emoji);
|
|
372
372
|
});
|
|
373
373
|
if (this.usageTracker.getOrder().length) {
|
|
@@ -432,16 +432,16 @@ var EmojiRepository = exports.default = /*#__PURE__*/function () {
|
|
|
432
432
|
}, {
|
|
433
433
|
key: "addToDynamicCategories",
|
|
434
434
|
value: function addToDynamicCategories(emoji) {
|
|
435
|
-
var category = this.getDynamicCategoryForEmoji(emoji
|
|
435
|
+
var category = this.getDynamicCategoryForEmoji(emoji);
|
|
436
436
|
if (_constants.defaultCategories.indexOf(category) === -1 && this.dynamicCategoryList.indexOf(category) === -1) {
|
|
437
437
|
this.dynamicCategoryList.push(category);
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
}, {
|
|
441
441
|
key: "getDynamicCategoryForEmoji",
|
|
442
|
-
value: function getDynamicCategoryForEmoji(emoji
|
|
442
|
+
value: function getDynamicCategoryForEmoji(emoji) {
|
|
443
443
|
var category = (0, _typeHelpers.getCategoryId)(emoji);
|
|
444
|
-
if (
|
|
444
|
+
if (emoji.type === 'ATLASSIAN' && category !== _constants.frequentCategory) {
|
|
445
445
|
return 'ATLASSIAN';
|
|
446
446
|
}
|
|
447
447
|
return category;
|
|
@@ -134,7 +134,7 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
134
134
|
var _categoryToGroupMap$c;
|
|
135
135
|
if (!categoryToGroupMap[category]) {
|
|
136
136
|
var categoryDefinition = isTeamojiExperimentEnabled ? _categories.CategoryDescriptionMapNew[category] : _categories.CategoryDescriptionMap[category];
|
|
137
|
-
if (!categoryDefinition
|
|
137
|
+
if (!categoryDefinition) {
|
|
138
138
|
return categoryToGroupMap;
|
|
139
139
|
}
|
|
140
140
|
categoryToGroupMap[category] = {
|
|
@@ -169,6 +169,8 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
169
169
|
}
|
|
170
170
|
subcategory.emojis.push(emoji);
|
|
171
171
|
}
|
|
172
|
+
} else if (emoji.type === 'ATLASSIAN' && emoji.category !== _constants.frequentCategory) {
|
|
173
|
+
addToCategoryMap(categoryToGroupMap, emoji, atlassianCategory);
|
|
172
174
|
} else {
|
|
173
175
|
addToCategoryMap(categoryToGroupMap, emoji, emoji.category);
|
|
174
176
|
}
|
|
@@ -343,7 +345,7 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
343
345
|
allEmojiGroups.forEach(function (group) {
|
|
344
346
|
// Optimisation - avoid re-rendering unaffected groups for the current selectedShortcut
|
|
345
347
|
// by not passing it to irrelevant groups
|
|
346
|
-
categoryTracker.add(isTeamojiExperimentEnabled ? group.category : group.emojis[0].category, items.length);
|
|
348
|
+
categoryTracker.add(isTeamojiExperimentEnabled || group.category === atlassianCategory ? group.category : group.emojis[0].category, items.length);
|
|
347
349
|
items = [].concat((0, _toConsumableArray2.default)(items), (0, _toConsumableArray2.default)(buildVirtualItemFromGroup(group)));
|
|
348
350
|
if (group.category === _constants.yourUploadsCategory) {
|
|
349
351
|
setLastYourUploadsRow(items.length - 1);
|
|
@@ -20,7 +20,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
20
20
|
actionSubjectId: actionSubjectId,
|
|
21
21
|
attributes: _objectSpread({
|
|
22
22
|
packageName: "@atlaskit/emoji",
|
|
23
|
-
packageVersion: "71.7.
|
|
23
|
+
packageVersion: "71.7.1"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -177,8 +177,8 @@ export default class EmojiRepository {
|
|
|
177
177
|
findInCategory(categoryId) {
|
|
178
178
|
if (categoryId === frequentCategory) {
|
|
179
179
|
return this.getFrequentlyUsed();
|
|
180
|
-
} else if (
|
|
181
|
-
return this.all().emojis.filter(emoji => emoji.type === 'ATLASSIAN');
|
|
180
|
+
} else if (categoryId === 'ATLASSIAN') {
|
|
181
|
+
return this.all().emojis.filter(emoji => emoji.category === categoryId || emoji.type === 'ATLASSIAN');
|
|
182
182
|
} else {
|
|
183
183
|
return this.all().emojis.filter(emoji => emoji.category === categoryId);
|
|
184
184
|
}
|
|
@@ -297,7 +297,7 @@ export default class EmojiRepository {
|
|
|
297
297
|
this.asciiMap = new Map();
|
|
298
298
|
const categorySet = new Set();
|
|
299
299
|
this.emojis.forEach(emoji => {
|
|
300
|
-
categorySet.add(this.getDynamicCategoryForEmoji(emoji
|
|
300
|
+
categorySet.add(this.getDynamicCategoryForEmoji(emoji));
|
|
301
301
|
this.addToMaps(emoji);
|
|
302
302
|
});
|
|
303
303
|
if (this.usageTracker.getOrder().length) {
|
|
@@ -341,14 +341,14 @@ export default class EmojiRepository {
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
addToDynamicCategories(emoji) {
|
|
344
|
-
const category = this.getDynamicCategoryForEmoji(emoji
|
|
344
|
+
const category = this.getDynamicCategoryForEmoji(emoji);
|
|
345
345
|
if (defaultCategories.indexOf(category) === -1 && this.dynamicCategoryList.indexOf(category) === -1) {
|
|
346
346
|
this.dynamicCategoryList.push(category);
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
getDynamicCategoryForEmoji(emoji
|
|
349
|
+
getDynamicCategoryForEmoji(emoji) {
|
|
350
350
|
const category = getCategoryId(emoji);
|
|
351
|
-
if (
|
|
351
|
+
if (emoji.type === 'ATLASSIAN' && category !== frequentCategory) {
|
|
352
352
|
return 'ATLASSIAN';
|
|
353
353
|
}
|
|
354
354
|
return category;
|
|
@@ -98,7 +98,7 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
98
98
|
var _categoryToGroupMap$c;
|
|
99
99
|
if (!categoryToGroupMap[category]) {
|
|
100
100
|
const categoryDefinition = isTeamojiExperimentEnabled ? CategoryDescriptionMapNew[category] : CategoryDescriptionMap[category];
|
|
101
|
-
if (!categoryDefinition
|
|
101
|
+
if (!categoryDefinition) {
|
|
102
102
|
return categoryToGroupMap;
|
|
103
103
|
}
|
|
104
104
|
categoryToGroupMap[category] = {
|
|
@@ -130,6 +130,8 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
130
130
|
}
|
|
131
131
|
subcategory.emojis.push(emoji);
|
|
132
132
|
}
|
|
133
|
+
} else if (emoji.type === 'ATLASSIAN' && emoji.category !== frequentCategory) {
|
|
134
|
+
addToCategoryMap(categoryToGroupMap, emoji, atlassianCategory);
|
|
133
135
|
} else {
|
|
134
136
|
addToCategoryMap(categoryToGroupMap, emoji, emoji.category);
|
|
135
137
|
}
|
|
@@ -301,7 +303,7 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
301
303
|
allEmojiGroups.forEach(group => {
|
|
302
304
|
// Optimisation - avoid re-rendering unaffected groups for the current selectedShortcut
|
|
303
305
|
// by not passing it to irrelevant groups
|
|
304
|
-
categoryTracker.add(isTeamojiExperimentEnabled ? group.category : group.emojis[0].category, items.length);
|
|
306
|
+
categoryTracker.add(isTeamojiExperimentEnabled || group.category === atlassianCategory ? group.category : group.emojis[0].category, items.length);
|
|
305
307
|
items = [...items, ...buildVirtualItemFromGroup(group)];
|
|
306
308
|
if (group.category === yourUploadsCategory) {
|
|
307
309
|
setLastYourUploadsRow(items.length - 1);
|
|
@@ -207,9 +207,9 @@ var EmojiRepository = /*#__PURE__*/function () {
|
|
|
207
207
|
value: function findInCategory(categoryId) {
|
|
208
208
|
if (categoryId === frequentCategory) {
|
|
209
209
|
return this.getFrequentlyUsed();
|
|
210
|
-
} else if (
|
|
210
|
+
} else if (categoryId === 'ATLASSIAN') {
|
|
211
211
|
return this.all().emojis.filter(function (emoji) {
|
|
212
|
-
return emoji.type === 'ATLASSIAN';
|
|
212
|
+
return emoji.category === categoryId || emoji.type === 'ATLASSIAN';
|
|
213
213
|
});
|
|
214
214
|
} else {
|
|
215
215
|
return this.all().emojis.filter(function (emoji) {
|
|
@@ -360,7 +360,7 @@ var EmojiRepository = /*#__PURE__*/function () {
|
|
|
360
360
|
this.asciiMap = new Map();
|
|
361
361
|
var categorySet = new Set();
|
|
362
362
|
this.emojis.forEach(function (emoji) {
|
|
363
|
-
categorySet.add(_this3.getDynamicCategoryForEmoji(emoji
|
|
363
|
+
categorySet.add(_this3.getDynamicCategoryForEmoji(emoji));
|
|
364
364
|
_this3.addToMaps(emoji);
|
|
365
365
|
});
|
|
366
366
|
if (this.usageTracker.getOrder().length) {
|
|
@@ -425,16 +425,16 @@ var EmojiRepository = /*#__PURE__*/function () {
|
|
|
425
425
|
}, {
|
|
426
426
|
key: "addToDynamicCategories",
|
|
427
427
|
value: function addToDynamicCategories(emoji) {
|
|
428
|
-
var category = this.getDynamicCategoryForEmoji(emoji
|
|
428
|
+
var category = this.getDynamicCategoryForEmoji(emoji);
|
|
429
429
|
if (defaultCategories.indexOf(category) === -1 && this.dynamicCategoryList.indexOf(category) === -1) {
|
|
430
430
|
this.dynamicCategoryList.push(category);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
}, {
|
|
434
434
|
key: "getDynamicCategoryForEmoji",
|
|
435
|
-
value: function getDynamicCategoryForEmoji(emoji
|
|
435
|
+
value: function getDynamicCategoryForEmoji(emoji) {
|
|
436
436
|
var category = getCategoryId(emoji);
|
|
437
|
-
if (
|
|
437
|
+
if (emoji.type === 'ATLASSIAN' && category !== frequentCategory) {
|
|
438
438
|
return 'ATLASSIAN';
|
|
439
439
|
}
|
|
440
440
|
return category;
|
|
@@ -126,7 +126,7 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
126
126
|
var _categoryToGroupMap$c;
|
|
127
127
|
if (!categoryToGroupMap[category]) {
|
|
128
128
|
var categoryDefinition = isTeamojiExperimentEnabled ? CategoryDescriptionMapNew[category] : CategoryDescriptionMap[category];
|
|
129
|
-
if (!categoryDefinition
|
|
129
|
+
if (!categoryDefinition) {
|
|
130
130
|
return categoryToGroupMap;
|
|
131
131
|
}
|
|
132
132
|
categoryToGroupMap[category] = {
|
|
@@ -161,6 +161,8 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
161
161
|
}
|
|
162
162
|
subcategory.emojis.push(emoji);
|
|
163
163
|
}
|
|
164
|
+
} else if (emoji.type === 'ATLASSIAN' && emoji.category !== frequentCategory) {
|
|
165
|
+
addToCategoryMap(categoryToGroupMap, emoji, atlassianCategory);
|
|
164
166
|
} else {
|
|
165
167
|
addToCategoryMap(categoryToGroupMap, emoji, emoji.category);
|
|
166
168
|
}
|
|
@@ -335,7 +337,7 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
335
337
|
allEmojiGroups.forEach(function (group) {
|
|
336
338
|
// Optimisation - avoid re-rendering unaffected groups for the current selectedShortcut
|
|
337
339
|
// by not passing it to irrelevant groups
|
|
338
|
-
categoryTracker.add(isTeamojiExperimentEnabled ? group.category : group.emojis[0].category, items.length);
|
|
340
|
+
categoryTracker.add(isTeamojiExperimentEnabled || group.category === atlassianCategory ? group.category : group.emojis[0].category, items.length);
|
|
339
341
|
items = [].concat(_toConsumableArray(items), _toConsumableArray(buildVirtualItemFromGroup(group)));
|
|
340
342
|
if (group.category === yourUploadsCategory) {
|
|
341
343
|
setLastYourUploadsRow(items.length - 1);
|
|
@@ -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.7.
|
|
17
|
+
packageVersion: "71.7.1"
|
|
18
18
|
}, attributes)
|
|
19
19
|
};
|
|
20
20
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "71.7.
|
|
3
|
+
"version": "71.7.2",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/spinner": "^20.1.0",
|
|
51
51
|
"@atlaskit/textfield": "^9.1.0",
|
|
52
52
|
"@atlaskit/theme": "^26.1.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^120.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^120.1.0",
|
|
54
54
|
"@atlaskit/tokens": "^15.3.0",
|
|
55
55
|
"@atlaskit/tooltip": "^23.1.0",
|
|
56
56
|
"@atlaskit/ufo": "^1.0.0",
|