@atlaskit/emoji 69.0.3 → 69.0.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 +8 -0
- package/dist/cjs/components/picker/categories.js +23 -23
- package/dist/cjs/components/typeahead/EmojiTypeAheadItem.js +0 -1
- package/dist/cjs/components/typeahead/EmojiTypeAheadItemInternalCompiled.js +1 -1
- package/dist/cjs/components/typeahead/EmojiTypeAheadList.js +21 -7
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/components/picker/categories.js +23 -23
- package/dist/es2019/components/typeahead/EmojiTypeAheadItem.js +1 -1
- package/dist/es2019/components/typeahead/EmojiTypeAheadItemInternalCompiled.js +1 -1
- package/dist/es2019/components/typeahead/EmojiTypeAheadList.js +21 -7
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/components/picker/categories.js +23 -23
- package/dist/esm/components/typeahead/EmojiTypeAheadItem.js +1 -1
- package/dist/esm/components/typeahead/EmojiTypeAheadItemInternalCompiled.js +1 -1
- package/dist/esm/components/typeahead/EmojiTypeAheadList.js +21 -7
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/types/components/typeahead/EmojiTypeAheadList.d.ts +4 -2
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadList.d.ts +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 69.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#132688](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132688)
|
|
8
|
+
[`2ce9c474cca2d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2ce9c474cca2d) -
|
|
9
|
+
Updates typeahead imports to use compiled components under FG
|
|
10
|
+
|
|
3
11
|
## 69.0.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.CategoryDescriptionMap = void 0;
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
18
|
-
var
|
|
8
|
+
var _basketballEmojiActivity = _interopRequireDefault(require("@atlaskit/icon/core/migration/basketball--emoji-activity"));
|
|
9
|
+
var _addEmojiCustom = _interopRequireDefault(require("@atlaskit/icon/core/migration/add--emoji-custom"));
|
|
10
|
+
var _flagEmojiFlags = _interopRequireDefault(require("@atlaskit/icon/core/migration/flag--emoji-flags"));
|
|
11
|
+
var _takeoutFoodEmojiFood = _interopRequireDefault(require("@atlaskit/icon/core/migration/takeout-food--emoji-food"));
|
|
12
|
+
var _clockEmojiFrequent = _interopRequireDefault(require("@atlaskit/icon/core/migration/clock--emoji-frequent"));
|
|
13
|
+
var _treeEmojiNature = _interopRequireDefault(require("@atlaskit/icon/core/migration/tree--emoji-nature"));
|
|
14
|
+
var _lightbulbEmojiObjects = _interopRequireDefault(require("@atlaskit/icon/core/migration/lightbulb--emoji-objects"));
|
|
15
|
+
var _emojiEmojiPeople = _interopRequireDefault(require("@atlaskit/icon/core/migration/emoji--emoji-people"));
|
|
16
|
+
var _heartEmojiSymbols = _interopRequireDefault(require("@atlaskit/icon/core/migration/heart--emoji-symbols"));
|
|
17
|
+
var _vehicleCarEmojiTravel = _interopRequireDefault(require("@atlaskit/icon/core/migration/vehicle-car--emoji-travel"));
|
|
18
|
+
var _checkCircleEmojiProductivity = _interopRequireDefault(require("@atlaskit/icon/core/migration/check-circle--emoji-productivity"));
|
|
19
19
|
var _constants = require("../../util/constants");
|
|
20
20
|
var CategoryDescriptionMap = exports.CategoryDescriptionMap = {
|
|
21
21
|
SEARCH: {
|
|
@@ -28,73 +28,73 @@ var CategoryDescriptionMap = exports.CategoryDescriptionMap = {
|
|
|
28
28
|
FREQUENT: {
|
|
29
29
|
id: 'FREQUENT',
|
|
30
30
|
name: 'frequentCategory',
|
|
31
|
-
icon:
|
|
31
|
+
icon: _clockEmojiFrequent.default,
|
|
32
32
|
order: 1
|
|
33
33
|
},
|
|
34
34
|
PEOPLE: {
|
|
35
35
|
id: 'PEOPLE',
|
|
36
36
|
name: 'peopleCategory',
|
|
37
|
-
icon:
|
|
37
|
+
icon: _emojiEmojiPeople.default,
|
|
38
38
|
order: 2
|
|
39
39
|
},
|
|
40
40
|
NATURE: {
|
|
41
41
|
id: 'NATURE',
|
|
42
42
|
name: 'natureCategory',
|
|
43
|
-
icon:
|
|
43
|
+
icon: _treeEmojiNature.default,
|
|
44
44
|
order: 3
|
|
45
45
|
},
|
|
46
46
|
FOODS: {
|
|
47
47
|
id: 'FOODS',
|
|
48
48
|
name: 'foodsCategory',
|
|
49
|
-
icon:
|
|
49
|
+
icon: _takeoutFoodEmojiFood.default,
|
|
50
50
|
order: 4
|
|
51
51
|
},
|
|
52
52
|
ACTIVITY: {
|
|
53
53
|
id: 'ACTIVITY',
|
|
54
54
|
name: 'activityCategory',
|
|
55
|
-
icon:
|
|
55
|
+
icon: _basketballEmojiActivity.default,
|
|
56
56
|
order: 5
|
|
57
57
|
},
|
|
58
58
|
PLACES: {
|
|
59
59
|
id: 'PLACES',
|
|
60
60
|
name: 'placesCategory',
|
|
61
|
-
icon:
|
|
61
|
+
icon: _vehicleCarEmojiTravel.default,
|
|
62
62
|
order: 6
|
|
63
63
|
},
|
|
64
64
|
OBJECTS: {
|
|
65
65
|
id: 'OBJECTS',
|
|
66
66
|
name: 'objectsCategory',
|
|
67
|
-
icon:
|
|
67
|
+
icon: _lightbulbEmojiObjects.default,
|
|
68
68
|
order: 7
|
|
69
69
|
},
|
|
70
70
|
SYMBOLS: {
|
|
71
71
|
id: 'SYMBOLS',
|
|
72
72
|
name: 'symbolsCategory',
|
|
73
|
-
icon:
|
|
73
|
+
icon: _heartEmojiSymbols.default,
|
|
74
74
|
order: 8
|
|
75
75
|
},
|
|
76
76
|
FLAGS: {
|
|
77
77
|
id: 'FLAGS',
|
|
78
78
|
name: 'flagsCategory',
|
|
79
|
-
icon:
|
|
79
|
+
icon: _flagEmojiFlags.default,
|
|
80
80
|
order: 9
|
|
81
81
|
},
|
|
82
82
|
ATLASSIAN: {
|
|
83
83
|
id: 'ATLASSIAN',
|
|
84
84
|
name: 'productivityCategory',
|
|
85
|
-
icon:
|
|
85
|
+
icon: _checkCircleEmojiProductivity.default,
|
|
86
86
|
order: 10
|
|
87
87
|
},
|
|
88
88
|
USER_CUSTOM: {
|
|
89
89
|
id: _constants.customCategory,
|
|
90
90
|
name: _constants.userCustomTitle,
|
|
91
|
-
icon:
|
|
91
|
+
icon: _addEmojiCustom.default,
|
|
92
92
|
order: 11
|
|
93
93
|
},
|
|
94
94
|
CUSTOM: {
|
|
95
95
|
id: _constants.customCategory,
|
|
96
96
|
name: _constants.customTitle,
|
|
97
|
-
icon:
|
|
97
|
+
icon: _addEmojiCustom.default,
|
|
98
98
|
order: 12
|
|
99
99
|
}
|
|
100
100
|
};
|
|
@@ -29,7 +29,6 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
29
29
|
* @jsxRuntime classic
|
|
30
30
|
* @jsx jsx
|
|
31
31
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
32
|
-
// ED-26864: use compiled EmojiPreviewComponent when migrating typeahead to compiled css
|
|
33
32
|
var EmojiTypeAheadItemInternal = /*#__PURE__*/function (_PureComponent) {
|
|
34
33
|
function EmojiTypeAheadItemInternal() {
|
|
35
34
|
var _this;
|
|
@@ -13,7 +13,7 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
13
13
|
var _EmojiCommonProvider = require("../../context/EmojiCommonProvider");
|
|
14
14
|
var _mouse = require("../../util/mouse");
|
|
15
15
|
var _typeHelpers = require("../../util/type-helpers");
|
|
16
|
-
var _EmojiPreviewComponent = require("../common/EmojiPreviewComponent");
|
|
16
|
+
var _EmojiPreviewComponent = require("../compiled/common/EmojiPreviewComponent");
|
|
17
17
|
var _styles = require("./styles");
|
|
18
18
|
var typeAheadWidth = 350;
|
|
19
19
|
var typeAheadItem = null;
|
|
@@ -18,6 +18,7 @@ var _typeHelpers = require("../../util/type-helpers");
|
|
|
18
18
|
var _logger = _interopRequireDefault(require("../../util/logger"));
|
|
19
19
|
var _mouse = require("../../util/mouse");
|
|
20
20
|
var _Scrollable = _interopRequireDefault(require("../common/Scrollable"));
|
|
21
|
+
var _Scrollable2 = _interopRequireDefault(require("../compiled/common/Scrollable"));
|
|
21
22
|
var _EmojiTypeAheadItem = _interopRequireDefault(require("./EmojiTypeAheadItem"));
|
|
22
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
var _EmojiTypeAheadListContainer = require("./EmojiTypeAheadListContainer");
|
|
@@ -25,7 +26,7 @@ var _EmojiTypeAheadSpinner = require("./EmojiTypeAheadSpinner");
|
|
|
25
26
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
28
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
28
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
29
30
|
function wrapIndex(emojis, index) {
|
|
30
31
|
var len = emojis.length;
|
|
31
32
|
var newIndex = index;
|
|
@@ -85,8 +86,11 @@ var EmojiTypeAheadList = exports.default = /*#__PURE__*/function (_PureComponent
|
|
|
85
86
|
_this.chooseCurrentSelection();
|
|
86
87
|
});
|
|
87
88
|
});
|
|
88
|
-
(0, _defineProperty2.default)(_this, "
|
|
89
|
-
_this.
|
|
89
|
+
(0, _defineProperty2.default)(_this, "handleCompiledScrollableRef", function (ref) {
|
|
90
|
+
_this.compiledScrollable = ref;
|
|
91
|
+
});
|
|
92
|
+
(0, _defineProperty2.default)(_this, "handleEmotionScrollableRef", function (ref) {
|
|
93
|
+
_this.emotionScrollable = ref;
|
|
90
94
|
});
|
|
91
95
|
_this.state = {
|
|
92
96
|
selectedKey: getKeyByIndex(props.emojis, 0),
|
|
@@ -155,8 +159,14 @@ var EmojiTypeAheadList = exports.default = /*#__PURE__*/function (_PureComponent
|
|
|
155
159
|
// Internal
|
|
156
160
|
function revealItem(key) {
|
|
157
161
|
var item = this.items[key];
|
|
158
|
-
if (
|
|
159
|
-
this.
|
|
162
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_css_migrate_emoji')) {
|
|
163
|
+
if (item && this.compiledScrollable) {
|
|
164
|
+
this.compiledScrollable.reveal(item);
|
|
165
|
+
}
|
|
166
|
+
} else {
|
|
167
|
+
if (item && this.emotionScrollable) {
|
|
168
|
+
this.emotionScrollable.reveal(item);
|
|
169
|
+
}
|
|
160
170
|
}
|
|
161
171
|
}
|
|
162
172
|
}, {
|
|
@@ -239,13 +249,17 @@ var EmojiTypeAheadList = exports.default = /*#__PURE__*/function (_PureComponent
|
|
|
239
249
|
return /*#__PURE__*/_react.default.createElement(_EmojiTypeAheadListContainer.EmojiTypeAheadListContainer, {
|
|
240
250
|
hasEmoji: hasEmoji,
|
|
241
251
|
loading: loading
|
|
242
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
243
|
-
ref: this.
|
|
252
|
+
}, (0, _platformFeatureFlags.fg)('platform_editor_css_migrate_emoji') ? /*#__PURE__*/_react.default.createElement(_Scrollable2.default, {
|
|
253
|
+
ref: this.handleCompiledScrollableRef,
|
|
254
|
+
maxHeight: "".concat(_sharedStyles.emojiTypeAheadMaxHeight, "px")
|
|
255
|
+
}, listBody) : /*#__PURE__*/_react.default.createElement(_Scrollable.default, {
|
|
256
|
+
ref: this.handleEmotionScrollableRef,
|
|
244
257
|
maxHeight: "".concat(_sharedStyles.emojiTypeAheadMaxHeight, "px")
|
|
245
258
|
}, listBody));
|
|
246
259
|
}
|
|
247
260
|
}]);
|
|
248
261
|
}(_react.PureComponent);
|
|
262
|
+
// cleanup `platform_editor_css_migrate_emoji` - rename compiledScrollable back to scrollable and delete emotionScrollable
|
|
249
263
|
(0, _defineProperty2.default)(EmojiTypeAheadList, "defaultProps", {
|
|
250
264
|
onEmojiSelected: function onEmojiSelected() {}
|
|
251
265
|
});
|
|
@@ -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: "69.0.
|
|
23
|
+
packageVersion: "69.0.4"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import BasketballIcon from '@atlaskit/icon/core/migration/basketball--emoji-activity';
|
|
2
|
+
import AddIcon from '@atlaskit/icon/core/migration/add--emoji-custom';
|
|
3
|
+
import FlagIcon from '@atlaskit/icon/core/migration/flag--emoji-flags';
|
|
4
|
+
import TakeoutFoodIcon from '@atlaskit/icon/core/migration/takeout-food--emoji-food';
|
|
5
|
+
import ClockIcon from '@atlaskit/icon/core/migration/clock--emoji-frequent';
|
|
6
|
+
import TreeIcon from '@atlaskit/icon/core/migration/tree--emoji-nature';
|
|
7
|
+
import LightbulbIcon from '@atlaskit/icon/core/migration/lightbulb--emoji-objects';
|
|
8
|
+
import EmojiIcon from '@atlaskit/icon/core/migration/emoji--emoji-people';
|
|
9
|
+
import HeartIcon from '@atlaskit/icon/core/migration/heart--emoji-symbols';
|
|
10
|
+
import VehicleCarIcon from '@atlaskit/icon/core/migration/vehicle-car--emoji-travel';
|
|
11
|
+
import CheckCircleIcon from '@atlaskit/icon/core/migration/check-circle--emoji-productivity';
|
|
12
12
|
import { customCategory, userCustomTitle, customTitle } from '../../util/constants';
|
|
13
13
|
export const CategoryDescriptionMap = {
|
|
14
14
|
SEARCH: {
|
|
@@ -21,73 +21,73 @@ export const CategoryDescriptionMap = {
|
|
|
21
21
|
FREQUENT: {
|
|
22
22
|
id: 'FREQUENT',
|
|
23
23
|
name: 'frequentCategory',
|
|
24
|
-
icon:
|
|
24
|
+
icon: ClockIcon,
|
|
25
25
|
order: 1
|
|
26
26
|
},
|
|
27
27
|
PEOPLE: {
|
|
28
28
|
id: 'PEOPLE',
|
|
29
29
|
name: 'peopleCategory',
|
|
30
|
-
icon:
|
|
30
|
+
icon: EmojiIcon,
|
|
31
31
|
order: 2
|
|
32
32
|
},
|
|
33
33
|
NATURE: {
|
|
34
34
|
id: 'NATURE',
|
|
35
35
|
name: 'natureCategory',
|
|
36
|
-
icon:
|
|
36
|
+
icon: TreeIcon,
|
|
37
37
|
order: 3
|
|
38
38
|
},
|
|
39
39
|
FOODS: {
|
|
40
40
|
id: 'FOODS',
|
|
41
41
|
name: 'foodsCategory',
|
|
42
|
-
icon:
|
|
42
|
+
icon: TakeoutFoodIcon,
|
|
43
43
|
order: 4
|
|
44
44
|
},
|
|
45
45
|
ACTIVITY: {
|
|
46
46
|
id: 'ACTIVITY',
|
|
47
47
|
name: 'activityCategory',
|
|
48
|
-
icon:
|
|
48
|
+
icon: BasketballIcon,
|
|
49
49
|
order: 5
|
|
50
50
|
},
|
|
51
51
|
PLACES: {
|
|
52
52
|
id: 'PLACES',
|
|
53
53
|
name: 'placesCategory',
|
|
54
|
-
icon:
|
|
54
|
+
icon: VehicleCarIcon,
|
|
55
55
|
order: 6
|
|
56
56
|
},
|
|
57
57
|
OBJECTS: {
|
|
58
58
|
id: 'OBJECTS',
|
|
59
59
|
name: 'objectsCategory',
|
|
60
|
-
icon:
|
|
60
|
+
icon: LightbulbIcon,
|
|
61
61
|
order: 7
|
|
62
62
|
},
|
|
63
63
|
SYMBOLS: {
|
|
64
64
|
id: 'SYMBOLS',
|
|
65
65
|
name: 'symbolsCategory',
|
|
66
|
-
icon:
|
|
66
|
+
icon: HeartIcon,
|
|
67
67
|
order: 8
|
|
68
68
|
},
|
|
69
69
|
FLAGS: {
|
|
70
70
|
id: 'FLAGS',
|
|
71
71
|
name: 'flagsCategory',
|
|
72
|
-
icon:
|
|
72
|
+
icon: FlagIcon,
|
|
73
73
|
order: 9
|
|
74
74
|
},
|
|
75
75
|
ATLASSIAN: {
|
|
76
76
|
id: 'ATLASSIAN',
|
|
77
77
|
name: 'productivityCategory',
|
|
78
|
-
icon:
|
|
78
|
+
icon: CheckCircleIcon,
|
|
79
79
|
order: 10
|
|
80
80
|
},
|
|
81
81
|
USER_CUSTOM: {
|
|
82
82
|
id: customCategory,
|
|
83
83
|
name: userCustomTitle,
|
|
84
|
-
icon:
|
|
84
|
+
icon: AddIcon,
|
|
85
85
|
order: 11
|
|
86
86
|
},
|
|
87
87
|
CUSTOM: {
|
|
88
88
|
id: customCategory,
|
|
89
89
|
name: customTitle,
|
|
90
|
-
icon:
|
|
90
|
+
icon: AddIcon,
|
|
91
91
|
order: 12
|
|
92
92
|
}
|
|
93
93
|
};
|
|
@@ -11,7 +11,7 @@ import { PureComponent } from 'react';
|
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { toEmojiId } from '../../util/type-helpers';
|
|
13
13
|
import { leftClick } from '../../util/mouse';
|
|
14
|
-
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
14
|
+
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
15
15
|
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
16
16
|
import { typeAheadItem, selected as selectedStyles, typeAheadItemRow, typeaheadSelected } from './styles';
|
|
17
17
|
import { EmojiTypeAheadItemInternalCompiled } from './EmojiTypeAheadItemInternalCompiled';
|
|
@@ -6,7 +6,7 @@ import { N30 } from '@atlaskit/theme/colors';
|
|
|
6
6
|
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
7
7
|
import { leftClick } from '../../util/mouse';
|
|
8
8
|
import { toEmojiId } from '../../util/type-helpers';
|
|
9
|
-
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
9
|
+
import { EmojiPreviewComponent } from '../compiled/common/EmojiPreviewComponent';
|
|
10
10
|
import { typeaheadSelected } from './styles';
|
|
11
11
|
const typeAheadWidth = 350;
|
|
12
12
|
const typeAheadItem = null;
|
|
@@ -4,7 +4,8 @@ import { emojiTypeAheadMaxHeight } from '../../util/shared-styles';
|
|
|
4
4
|
import { toEmojiId } from '../../util/type-helpers';
|
|
5
5
|
import debug from '../../util/logger';
|
|
6
6
|
import { actualMouseMove, mouseLocation } from '../../util/mouse';
|
|
7
|
-
import
|
|
7
|
+
import { default as EmotionScrollable } from '../common/Scrollable';
|
|
8
|
+
import { default as CompiledScrollable } from '../compiled/common/Scrollable';
|
|
8
9
|
import EmojiItem from './EmojiTypeAheadItem';
|
|
9
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { EmojiTypeAheadListContainer } from './EmojiTypeAheadListContainer';
|
|
@@ -69,8 +70,11 @@ export default class EmojiTypeAheadList extends PureComponent {
|
|
|
69
70
|
this.chooseCurrentSelection();
|
|
70
71
|
});
|
|
71
72
|
});
|
|
72
|
-
_defineProperty(this, "
|
|
73
|
-
this.
|
|
73
|
+
_defineProperty(this, "handleCompiledScrollableRef", ref => {
|
|
74
|
+
this.compiledScrollable = ref;
|
|
75
|
+
});
|
|
76
|
+
_defineProperty(this, "handleEmotionScrollableRef", ref => {
|
|
77
|
+
this.emotionScrollable = ref;
|
|
74
78
|
});
|
|
75
79
|
this.state = {
|
|
76
80
|
selectedKey: getKeyByIndex(props.emojis, 0),
|
|
@@ -137,8 +141,14 @@ export default class EmojiTypeAheadList extends PureComponent {
|
|
|
137
141
|
// Internal
|
|
138
142
|
revealItem(key) {
|
|
139
143
|
const item = this.items[key];
|
|
140
|
-
if (
|
|
141
|
-
this.
|
|
144
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
145
|
+
if (item && this.compiledScrollable) {
|
|
146
|
+
this.compiledScrollable.reveal(item);
|
|
147
|
+
}
|
|
148
|
+
} else {
|
|
149
|
+
if (item && this.emotionScrollable) {
|
|
150
|
+
this.emotionScrollable.reveal(item);
|
|
151
|
+
}
|
|
142
152
|
}
|
|
143
153
|
}
|
|
144
154
|
selectIndexNewEmoji(index, emojis) {
|
|
@@ -215,12 +225,16 @@ export default class EmojiTypeAheadList extends PureComponent {
|
|
|
215
225
|
return /*#__PURE__*/React.createElement(EmojiTypeAheadListContainer, {
|
|
216
226
|
hasEmoji: hasEmoji,
|
|
217
227
|
loading: loading
|
|
218
|
-
}, /*#__PURE__*/React.createElement(
|
|
219
|
-
ref: this.
|
|
228
|
+
}, fg('platform_editor_css_migrate_emoji') ? /*#__PURE__*/React.createElement(CompiledScrollable, {
|
|
229
|
+
ref: this.handleCompiledScrollableRef,
|
|
230
|
+
maxHeight: `${emojiTypeAheadMaxHeight}px`
|
|
231
|
+
}, listBody) : /*#__PURE__*/React.createElement(EmotionScrollable, {
|
|
232
|
+
ref: this.handleEmotionScrollableRef,
|
|
220
233
|
maxHeight: `${emojiTypeAheadMaxHeight}px`
|
|
221
234
|
}, listBody));
|
|
222
235
|
}
|
|
223
236
|
}
|
|
237
|
+
// cleanup `platform_editor_css_migrate_emoji` - rename compiledScrollable back to scrollable and delete emotionScrollable
|
|
224
238
|
_defineProperty(EmojiTypeAheadList, "defaultProps", {
|
|
225
239
|
onEmojiSelected: () => {}
|
|
226
240
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import BasketballIcon from '@atlaskit/icon/core/migration/basketball--emoji-activity';
|
|
2
|
+
import AddIcon from '@atlaskit/icon/core/migration/add--emoji-custom';
|
|
3
|
+
import FlagIcon from '@atlaskit/icon/core/migration/flag--emoji-flags';
|
|
4
|
+
import TakeoutFoodIcon from '@atlaskit/icon/core/migration/takeout-food--emoji-food';
|
|
5
|
+
import ClockIcon from '@atlaskit/icon/core/migration/clock--emoji-frequent';
|
|
6
|
+
import TreeIcon from '@atlaskit/icon/core/migration/tree--emoji-nature';
|
|
7
|
+
import LightbulbIcon from '@atlaskit/icon/core/migration/lightbulb--emoji-objects';
|
|
8
|
+
import EmojiIcon from '@atlaskit/icon/core/migration/emoji--emoji-people';
|
|
9
|
+
import HeartIcon from '@atlaskit/icon/core/migration/heart--emoji-symbols';
|
|
10
|
+
import VehicleCarIcon from '@atlaskit/icon/core/migration/vehicle-car--emoji-travel';
|
|
11
|
+
import CheckCircleIcon from '@atlaskit/icon/core/migration/check-circle--emoji-productivity';
|
|
12
12
|
import { customCategory, userCustomTitle, customTitle } from '../../util/constants';
|
|
13
13
|
export var CategoryDescriptionMap = {
|
|
14
14
|
SEARCH: {
|
|
@@ -21,73 +21,73 @@ export var CategoryDescriptionMap = {
|
|
|
21
21
|
FREQUENT: {
|
|
22
22
|
id: 'FREQUENT',
|
|
23
23
|
name: 'frequentCategory',
|
|
24
|
-
icon:
|
|
24
|
+
icon: ClockIcon,
|
|
25
25
|
order: 1
|
|
26
26
|
},
|
|
27
27
|
PEOPLE: {
|
|
28
28
|
id: 'PEOPLE',
|
|
29
29
|
name: 'peopleCategory',
|
|
30
|
-
icon:
|
|
30
|
+
icon: EmojiIcon,
|
|
31
31
|
order: 2
|
|
32
32
|
},
|
|
33
33
|
NATURE: {
|
|
34
34
|
id: 'NATURE',
|
|
35
35
|
name: 'natureCategory',
|
|
36
|
-
icon:
|
|
36
|
+
icon: TreeIcon,
|
|
37
37
|
order: 3
|
|
38
38
|
},
|
|
39
39
|
FOODS: {
|
|
40
40
|
id: 'FOODS',
|
|
41
41
|
name: 'foodsCategory',
|
|
42
|
-
icon:
|
|
42
|
+
icon: TakeoutFoodIcon,
|
|
43
43
|
order: 4
|
|
44
44
|
},
|
|
45
45
|
ACTIVITY: {
|
|
46
46
|
id: 'ACTIVITY',
|
|
47
47
|
name: 'activityCategory',
|
|
48
|
-
icon:
|
|
48
|
+
icon: BasketballIcon,
|
|
49
49
|
order: 5
|
|
50
50
|
},
|
|
51
51
|
PLACES: {
|
|
52
52
|
id: 'PLACES',
|
|
53
53
|
name: 'placesCategory',
|
|
54
|
-
icon:
|
|
54
|
+
icon: VehicleCarIcon,
|
|
55
55
|
order: 6
|
|
56
56
|
},
|
|
57
57
|
OBJECTS: {
|
|
58
58
|
id: 'OBJECTS',
|
|
59
59
|
name: 'objectsCategory',
|
|
60
|
-
icon:
|
|
60
|
+
icon: LightbulbIcon,
|
|
61
61
|
order: 7
|
|
62
62
|
},
|
|
63
63
|
SYMBOLS: {
|
|
64
64
|
id: 'SYMBOLS',
|
|
65
65
|
name: 'symbolsCategory',
|
|
66
|
-
icon:
|
|
66
|
+
icon: HeartIcon,
|
|
67
67
|
order: 8
|
|
68
68
|
},
|
|
69
69
|
FLAGS: {
|
|
70
70
|
id: 'FLAGS',
|
|
71
71
|
name: 'flagsCategory',
|
|
72
|
-
icon:
|
|
72
|
+
icon: FlagIcon,
|
|
73
73
|
order: 9
|
|
74
74
|
},
|
|
75
75
|
ATLASSIAN: {
|
|
76
76
|
id: 'ATLASSIAN',
|
|
77
77
|
name: 'productivityCategory',
|
|
78
|
-
icon:
|
|
78
|
+
icon: CheckCircleIcon,
|
|
79
79
|
order: 10
|
|
80
80
|
},
|
|
81
81
|
USER_CUSTOM: {
|
|
82
82
|
id: customCategory,
|
|
83
83
|
name: userCustomTitle,
|
|
84
|
-
icon:
|
|
84
|
+
icon: AddIcon,
|
|
85
85
|
order: 11
|
|
86
86
|
},
|
|
87
87
|
CUSTOM: {
|
|
88
88
|
id: customCategory,
|
|
89
89
|
name: customTitle,
|
|
90
|
-
icon:
|
|
90
|
+
icon: AddIcon,
|
|
91
91
|
order: 12
|
|
92
92
|
}
|
|
93
93
|
};
|
|
@@ -18,7 +18,7 @@ import { PureComponent } from 'react';
|
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
19
|
import { toEmojiId } from '../../util/type-helpers';
|
|
20
20
|
import { leftClick } from '../../util/mouse';
|
|
21
|
-
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
21
|
+
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
22
22
|
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
23
23
|
import { typeAheadItem, selected as selectedStyles, typeAheadItemRow, typeaheadSelected } from './styles';
|
|
24
24
|
import { EmojiTypeAheadItemInternalCompiled } from './EmojiTypeAheadItemInternalCompiled';
|
|
@@ -6,7 +6,7 @@ import { N30 } from '@atlaskit/theme/colors';
|
|
|
6
6
|
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
7
7
|
import { leftClick } from '../../util/mouse';
|
|
8
8
|
import { toEmojiId } from '../../util/type-helpers';
|
|
9
|
-
import { EmojiPreviewComponent } from '../common/EmojiPreviewComponent';
|
|
9
|
+
import { EmojiPreviewComponent } from '../compiled/common/EmojiPreviewComponent';
|
|
10
10
|
import { typeaheadSelected } from './styles';
|
|
11
11
|
var typeAheadWidth = 350;
|
|
12
12
|
var typeAheadItem = null;
|
|
@@ -11,7 +11,8 @@ import { emojiTypeAheadMaxHeight } from '../../util/shared-styles';
|
|
|
11
11
|
import { toEmojiId } from '../../util/type-helpers';
|
|
12
12
|
import debug from '../../util/logger';
|
|
13
13
|
import { actualMouseMove, mouseLocation } from '../../util/mouse';
|
|
14
|
-
import
|
|
14
|
+
import { default as EmotionScrollable } from '../common/Scrollable';
|
|
15
|
+
import { default as CompiledScrollable } from '../compiled/common/Scrollable';
|
|
15
16
|
import EmojiItem from './EmojiTypeAheadItem';
|
|
16
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { EmojiTypeAheadListContainer } from './EmojiTypeAheadListContainer';
|
|
@@ -75,8 +76,11 @@ var EmojiTypeAheadList = /*#__PURE__*/function (_PureComponent) {
|
|
|
75
76
|
_this.chooseCurrentSelection();
|
|
76
77
|
});
|
|
77
78
|
});
|
|
78
|
-
_defineProperty(_this, "
|
|
79
|
-
_this.
|
|
79
|
+
_defineProperty(_this, "handleCompiledScrollableRef", function (ref) {
|
|
80
|
+
_this.compiledScrollable = ref;
|
|
81
|
+
});
|
|
82
|
+
_defineProperty(_this, "handleEmotionScrollableRef", function (ref) {
|
|
83
|
+
_this.emotionScrollable = ref;
|
|
80
84
|
});
|
|
81
85
|
_this.state = {
|
|
82
86
|
selectedKey: getKeyByIndex(props.emojis, 0),
|
|
@@ -145,8 +149,14 @@ var EmojiTypeAheadList = /*#__PURE__*/function (_PureComponent) {
|
|
|
145
149
|
// Internal
|
|
146
150
|
function revealItem(key) {
|
|
147
151
|
var item = this.items[key];
|
|
148
|
-
if (
|
|
149
|
-
this.
|
|
152
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
153
|
+
if (item && this.compiledScrollable) {
|
|
154
|
+
this.compiledScrollable.reveal(item);
|
|
155
|
+
}
|
|
156
|
+
} else {
|
|
157
|
+
if (item && this.emotionScrollable) {
|
|
158
|
+
this.emotionScrollable.reveal(item);
|
|
159
|
+
}
|
|
150
160
|
}
|
|
151
161
|
}
|
|
152
162
|
}, {
|
|
@@ -229,13 +239,17 @@ var EmojiTypeAheadList = /*#__PURE__*/function (_PureComponent) {
|
|
|
229
239
|
return /*#__PURE__*/React.createElement(EmojiTypeAheadListContainer, {
|
|
230
240
|
hasEmoji: hasEmoji,
|
|
231
241
|
loading: loading
|
|
232
|
-
}, /*#__PURE__*/React.createElement(
|
|
233
|
-
ref: this.
|
|
242
|
+
}, fg('platform_editor_css_migrate_emoji') ? /*#__PURE__*/React.createElement(CompiledScrollable, {
|
|
243
|
+
ref: this.handleCompiledScrollableRef,
|
|
244
|
+
maxHeight: "".concat(emojiTypeAheadMaxHeight, "px")
|
|
245
|
+
}, listBody) : /*#__PURE__*/React.createElement(EmotionScrollable, {
|
|
246
|
+
ref: this.handleEmotionScrollableRef,
|
|
234
247
|
maxHeight: "".concat(emojiTypeAheadMaxHeight, "px")
|
|
235
248
|
}, listBody));
|
|
236
249
|
}
|
|
237
250
|
}]);
|
|
238
251
|
}(PureComponent);
|
|
252
|
+
// cleanup `platform_editor_css_migrate_emoji` - rename compiledScrollable back to scrollable and delete emotionScrollable
|
|
239
253
|
_defineProperty(EmojiTypeAheadList, "defaultProps", {
|
|
240
254
|
onEmojiSelected: function onEmojiSelected() {}
|
|
241
255
|
});
|
|
@@ -13,7 +13,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
|
|
|
13
13
|
actionSubjectId: actionSubjectId,
|
|
14
14
|
attributes: _objectSpread({
|
|
15
15
|
packageName: "@atlaskit/emoji",
|
|
16
|
-
packageVersion: "69.0.
|
|
16
|
+
packageVersion: "69.0.4"
|
|
17
17
|
}, attributes)
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -11,7 +11,8 @@ export interface State {
|
|
|
11
11
|
}
|
|
12
12
|
export default class EmojiTypeAheadList extends PureComponent<Props, State> {
|
|
13
13
|
private lastMousePosition?;
|
|
14
|
-
private
|
|
14
|
+
private compiledScrollable?;
|
|
15
|
+
private emotionScrollable?;
|
|
15
16
|
private items;
|
|
16
17
|
static defaultProps: {
|
|
17
18
|
onEmojiSelected: () => void;
|
|
@@ -31,5 +32,6 @@ export default class EmojiTypeAheadList extends PureComponent<Props, State> {
|
|
|
31
32
|
private renderItems;
|
|
32
33
|
private isSelectedEmoji;
|
|
33
34
|
render(): React.JSX.Element;
|
|
34
|
-
private
|
|
35
|
+
private handleCompiledScrollableRef;
|
|
36
|
+
private handleEmotionScrollableRef;
|
|
35
37
|
}
|
|
@@ -11,7 +11,8 @@ export interface State {
|
|
|
11
11
|
}
|
|
12
12
|
export default class EmojiTypeAheadList extends PureComponent<Props, State> {
|
|
13
13
|
private lastMousePosition?;
|
|
14
|
-
private
|
|
14
|
+
private compiledScrollable?;
|
|
15
|
+
private emotionScrollable?;
|
|
15
16
|
private items;
|
|
16
17
|
static defaultProps: {
|
|
17
18
|
onEmojiSelected: () => void;
|
|
@@ -31,5 +32,6 @@ export default class EmojiTypeAheadList extends PureComponent<Props, State> {
|
|
|
31
32
|
private renderItems;
|
|
32
33
|
private isSelectedEmoji;
|
|
33
34
|
render(): React.JSX.Element;
|
|
34
|
-
private
|
|
35
|
+
private handleCompiledScrollableRef;
|
|
36
|
+
private handleEmotionScrollableRef;
|
|
35
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "69.0.
|
|
3
|
+
"version": "69.0.4",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/button": "^21.1.0",
|
|
40
40
|
"@atlaskit/css": "^0.10.0",
|
|
41
41
|
"@atlaskit/heading": "^5.1.0",
|
|
42
|
-
"@atlaskit/icon": "^25.
|
|
42
|
+
"@atlaskit/icon": "^25.2.0",
|
|
43
43
|
"@atlaskit/media-client": "^32.0.0",
|
|
44
44
|
"@atlaskit/media-client-react": "^4.0.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|