@atlaskit/emoji 69.0.1 → 69.0.3
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 +17 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/dist/cjs/components/compiled/common/EmojiActions.js +1 -1
- package/dist/cjs/components/compiled/common/EmojiPreviewComponent.compiled.css +0 -1
- package/dist/cjs/components/compiled/common/EmojiPreviewComponent.js +1 -1
- package/dist/cjs/components/compiled/picker/CategorySelector.compiled.css +24 -0
- package/dist/cjs/components/compiled/picker/CategorySelector.js +161 -0
- package/dist/cjs/components/compiled/picker/EmojiPicker.compiled.css +12 -0
- package/dist/cjs/components/compiled/picker/EmojiPicker.js +109 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerCategoryHeading.compiled.css +9 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerCategoryHeading.js +43 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerComponent.compiled.css +20 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerComponent.js +574 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerEmojiRow.compiled.css +35 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerEmojiRow.js +76 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerFooter.compiled.css +5 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerFooter.js +33 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerListSearch.compiled.css +23 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerListSearch.js +93 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerTabPanel.compiled.css +6 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerTabPanel.js +60 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerVirtualItems.compiled.css +8 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerVirtualItems.js +86 -0
- package/dist/cjs/components/compiled/picker/VirtualList.compiled.css +10 -0
- package/dist/cjs/components/compiled/picker/VirtualList.js +303 -0
- package/dist/cjs/components/picker/EmojiPickerFooter.js +0 -2
- package/dist/cjs/components/picker/EmojiPickerList.js +219 -145
- package/dist/cjs/components/picker/EmojiPickerTabPanel.js +67 -0
- package/dist/cjs/components/picker/styles.js +1 -10
- package/dist/cjs/index.js +4 -6
- package/dist/cjs/picker.js +5 -7
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/components/compiled/common/EmojiActions.js +1 -1
- package/dist/es2019/components/compiled/common/EmojiPreviewComponent.compiled.css +0 -1
- package/dist/es2019/components/compiled/common/EmojiPreviewComponent.js +1 -1
- package/dist/es2019/components/compiled/picker/CategorySelector.compiled.css +24 -0
- package/dist/es2019/components/compiled/picker/CategorySelector.js +136 -0
- package/dist/es2019/components/compiled/picker/EmojiPicker.compiled.css +12 -0
- package/dist/es2019/components/compiled/picker/EmojiPicker.js +67 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerCategoryHeading.compiled.css +9 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerCategoryHeading.js +30 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerComponent.compiled.css +19 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerComponent.js +506 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerEmojiRow.compiled.css +35 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerEmojiRow.js +69 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerFooter.compiled.css +5 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerFooter.js +19 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerListSearch.compiled.css +23 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerListSearch.js +79 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerTabPanel.compiled.css +6 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerTabPanel.js +39 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerVirtualItems.compiled.css +8 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerVirtualItems.js +51 -0
- package/dist/es2019/components/compiled/picker/VirtualList.compiled.css +10 -0
- package/dist/es2019/components/compiled/picker/VirtualList.js +288 -0
- package/dist/es2019/components/picker/EmojiPickerFooter.js +1 -1
- package/dist/es2019/components/picker/EmojiPickerList.js +186 -114
- package/dist/es2019/components/picker/EmojiPickerTabPanel.js +48 -0
- package/dist/es2019/components/picker/styles.js +0 -9
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/picker.js +5 -1
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/components/compiled/common/EmojiActions.js +1 -1
- package/dist/esm/components/compiled/common/EmojiPreviewComponent.compiled.css +0 -1
- package/dist/esm/components/compiled/common/EmojiPreviewComponent.js +1 -1
- package/dist/esm/components/compiled/picker/CategorySelector.compiled.css +24 -0
- package/dist/esm/components/compiled/picker/CategorySelector.js +151 -0
- package/dist/esm/components/compiled/picker/EmojiPicker.compiled.css +12 -0
- package/dist/esm/components/compiled/picker/EmojiPicker.js +97 -0
- package/dist/esm/components/compiled/picker/EmojiPickerCategoryHeading.compiled.css +9 -0
- package/dist/esm/components/compiled/picker/EmojiPickerCategoryHeading.js +34 -0
- package/dist/esm/components/compiled/picker/EmojiPickerComponent.compiled.css +20 -0
- package/dist/esm/components/compiled/picker/EmojiPickerComponent.js +564 -0
- package/dist/esm/components/compiled/picker/EmojiPickerEmojiRow.compiled.css +35 -0
- package/dist/esm/components/compiled/picker/EmojiPickerEmojiRow.js +66 -0
- package/dist/esm/components/compiled/picker/EmojiPickerFooter.compiled.css +5 -0
- package/dist/esm/components/compiled/picker/EmojiPickerFooter.js +24 -0
- package/dist/esm/components/compiled/picker/EmojiPickerListSearch.compiled.css +23 -0
- package/dist/esm/components/compiled/picker/EmojiPickerListSearch.js +83 -0
- package/dist/esm/components/compiled/picker/EmojiPickerTabPanel.compiled.css +6 -0
- package/dist/esm/components/compiled/picker/EmojiPickerTabPanel.js +50 -0
- package/dist/esm/components/compiled/picker/EmojiPickerVirtualItems.compiled.css +8 -0
- package/dist/esm/components/compiled/picker/EmojiPickerVirtualItems.js +76 -0
- package/dist/esm/components/compiled/picker/VirtualList.compiled.css +10 -0
- package/dist/esm/components/compiled/picker/VirtualList.js +293 -0
- package/dist/esm/components/picker/EmojiPickerFooter.js +1 -1
- package/dist/esm/components/picker/EmojiPickerList.js +219 -147
- package/dist/esm/components/picker/EmojiPickerTabPanel.js +59 -0
- package/dist/esm/components/picker/styles.js +0 -9
- package/dist/esm/index.js +2 -1
- package/dist/esm/picker.js +5 -1
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/types/components/compiled/picker/CategorySelector.d.ts +17 -0
- package/dist/types/components/compiled/picker/EmojiPicker.d.ts +44 -0
- package/dist/types/components/compiled/picker/EmojiPickerCategoryHeading.d.ts +13 -0
- package/dist/types/components/compiled/picker/EmojiPickerComponent.d.ts +24 -0
- package/dist/types/components/compiled/picker/EmojiPickerEmojiRow.d.ts +17 -0
- package/dist/types/components/compiled/picker/EmojiPickerFooter.d.ts +8 -0
- package/dist/types/components/compiled/picker/EmojiPickerListSearch.d.ts +11 -0
- package/dist/types/components/compiled/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types/components/compiled/picker/EmojiPickerVirtualItems.d.ts +35 -0
- package/dist/types/components/compiled/picker/VirtualList.d.ts +42 -0
- package/dist/types/components/picker/EmojiPickerList.d.ts +1 -6
- package/dist/types/components/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types/components/picker/styles.d.ts +0 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/picker.d.ts +3 -1
- package/dist/types-ts4.5/components/compiled/picker/CategorySelector.d.ts +17 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPicker.d.ts +44 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerCategoryHeading.d.ts +13 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerComponent.d.ts +24 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerEmojiRow.d.ts +17 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerFooter.d.ts +8 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerListSearch.d.ts +11 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerVirtualItems.d.ts +35 -0
- package/dist/types-ts4.5/components/compiled/picker/VirtualList.d.ts +42 -0
- package/dist/types-ts4.5/components/picker/EmojiPickerList.d.ts +1 -6
- package/dist/types-ts4.5/components/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types-ts4.5/components/picker/styles.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +2 -1
- package/dist/types-ts4.5/picker.d.ts +3 -1
- package/package.json +4 -3
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
7
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
-
/**
|
|
12
|
-
* @jsxRuntime classic
|
|
13
|
-
* @jsx jsx
|
|
14
|
-
*/
|
|
15
11
|
import React, { createRef, PureComponent, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
16
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
17
|
-
import { jsx } from '@emotion/react';
|
|
18
|
-
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
19
12
|
import { customCategory, defaultEmojiPickerSize, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
20
13
|
import { CategoryDescriptionMap } from './categories';
|
|
21
14
|
import CategoryTracker from './CategoryTracker';
|
|
22
15
|
import { sizes } from './EmojiPickerSizes';
|
|
23
|
-
import { CategoryHeadingItem, EmojisRowItem, LoadingItem, virtualItemRenderer } from './EmojiPickerVirtualItems';
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
import {
|
|
16
|
+
import { CategoryHeadingItem as EmotionCategoryHeadingItem, EmojisRowItem as EmotionEmojisRowItem, LoadingItem as EmotionLoadingItem, virtualItemRenderer as virtualItemRendererEmotion } from './EmojiPickerVirtualItems';
|
|
17
|
+
import { CategoryHeadingItem as CompiledCategoryHeadingItem, EmojisRowItem as CompiledEmojisRowItem, LoadingItem as CompiledLoadingItem, virtualItemRenderer as virtualItemRendererCompiled } from '../compiled/picker/EmojiPickerVirtualItems';
|
|
18
|
+
import { default as EmotionEmojiActions } from '../common/EmojiActions';
|
|
19
|
+
import { default as CompiledEmojiActions } from '../compiled/common/EmojiActions';
|
|
27
20
|
import { emojiPickerHeightOffset, scrollToRow as _scrollToRow } from './utils';
|
|
28
|
-
import { VirtualList } from './VirtualList';
|
|
29
|
-
import {
|
|
30
|
-
import { messages } from '../i18n';
|
|
21
|
+
import { VirtualList as EmotionVirtualList } from './VirtualList';
|
|
22
|
+
import { VirtualList as CompiledVirtualList } from '../compiled/picker/VirtualList';
|
|
31
23
|
import { EmojiPickerListContextProvider } from '../../context/EmojiPickerListContext';
|
|
24
|
+
import { default as EmotionEmojiPickerTabPanel } from './EmojiPickerTabPanel';
|
|
25
|
+
import { default as CompiledEmojiPickerTabPanel } from '../compiled/picker/EmojiPickerTabPanel';
|
|
26
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
27
|
+
import { componentWithFG, functionWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
28
|
+
|
|
29
|
+
// when cleaning up `platform_editor_css_migrate_emoji`, delete these consts and rename the import
|
|
30
|
+
var EmojiActions = componentWithFG('platform_editor_css_migrate_emoji', CompiledEmojiActions, EmotionEmojiActions);
|
|
31
|
+
var EmojiPickerTabPanel = componentWithFG('platform_editor_css_migrate_emoji', CompiledEmojiPickerTabPanel, EmotionEmojiPickerTabPanel);
|
|
32
|
+
var VirtualList = componentWithFG('platform_editor_css_migrate_emoji', CompiledVirtualList, EmotionVirtualList);
|
|
33
|
+
var virtualItemRenderer = functionWithFG('platform_editor_css_migrate_emoji', virtualItemRendererCompiled, virtualItemRendererEmotion);
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
36
|
* Test id for wrapper Emoji Picker List div
|
|
@@ -43,43 +45,7 @@ var categoryClassname = 'emoji-category';
|
|
|
43
45
|
var byOrder = function byOrder(orderableA, orderableB) {
|
|
44
46
|
return (orderableA.order || 0) - (orderableB.order || 0);
|
|
45
47
|
};
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* TODO: have to use class component here as unit test is relying on ref.root. Will refactor this whole file to functional component in future
|
|
49
|
-
* ticket: COLLAB-2317
|
|
50
|
-
*/
|
|
51
|
-
var EmojiPickerTabPanelInternal = /*#__PURE__*/function (_PureComponent) {
|
|
52
|
-
function EmojiPickerTabPanelInternal() {
|
|
53
|
-
_classCallCheck(this, EmojiPickerTabPanelInternal);
|
|
54
|
-
return _callSuper(this, EmojiPickerTabPanelInternal, arguments);
|
|
55
|
-
}
|
|
56
|
-
_inherits(EmojiPickerTabPanelInternal, _PureComponent);
|
|
57
|
-
return _createClass(EmojiPickerTabPanelInternal, [{
|
|
58
|
-
key: "render",
|
|
59
|
-
value: function render() {
|
|
60
|
-
var _this$props = this.props,
|
|
61
|
-
formatMessage = _this$props.intl.formatMessage,
|
|
62
|
-
children = _this$props.children,
|
|
63
|
-
showSearchResults = _this$props.showSearchResults;
|
|
64
|
-
return jsx("div", {
|
|
65
|
-
ref: "root"
|
|
66
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
67
|
-
,
|
|
68
|
-
css: emojiPickerList,
|
|
69
|
-
"data-testid": RENDER_EMOJI_PICKER_LIST_TESTID,
|
|
70
|
-
id: RENDER_EMOJI_PICKER_LIST_TESTID,
|
|
71
|
-
role: "tabpanel",
|
|
72
|
-
"aria-label": formatMessage(messages.emojiPickerListPanel)
|
|
73
|
-
}, jsx(VisuallyHidden, {
|
|
74
|
-
id: "emoji-picker-table-description"
|
|
75
|
-
}, formatMessage(messages.emojiPickerGrid, {
|
|
76
|
-
showSearchResults: showSearchResults
|
|
77
|
-
})), children);
|
|
78
|
-
}
|
|
79
|
-
}]);
|
|
80
|
-
}(PureComponent);
|
|
81
|
-
var EmojiPickerTabPanel = injectIntl(EmojiPickerTabPanelInternal);
|
|
82
|
-
export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureComponent2) {
|
|
48
|
+
export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureComponent) {
|
|
83
49
|
function EmojiPickerVirtualListInternalOld(_props) {
|
|
84
50
|
var _this;
|
|
85
51
|
_classCallCheck(this, EmojiPickerVirtualListInternalOld);
|
|
@@ -101,12 +67,22 @@ export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureCompo
|
|
|
101
67
|
var columnIndex = -1;
|
|
102
68
|
// for most of cases, it'd be in first emoji row, so should be quite fast to find in real world
|
|
103
69
|
var rowIndex = _this.virtualItems.findIndex(function (rowItem) {
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
70
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
71
|
+
if (rowItem instanceof CompiledEmojisRowItem) {
|
|
72
|
+
// find uploaded emoji in each emoji row
|
|
73
|
+
columnIndex = rowItem.props.emojis.findIndex(function (emoji) {
|
|
74
|
+
return emoji.id === emojiId;
|
|
75
|
+
});
|
|
76
|
+
return columnIndex !== -1;
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
if (rowItem instanceof EmotionEmojisRowItem) {
|
|
80
|
+
// find uploaded emoji in each emoji row
|
|
81
|
+
columnIndex = rowItem.props.emojis.findIndex(function (emoji) {
|
|
82
|
+
return emoji.id === emojiId;
|
|
83
|
+
});
|
|
84
|
+
return columnIndex !== -1;
|
|
85
|
+
}
|
|
110
86
|
}
|
|
111
87
|
return false;
|
|
112
88
|
});
|
|
@@ -116,29 +92,50 @@ export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureCompo
|
|
|
116
92
|
};
|
|
117
93
|
});
|
|
118
94
|
_defineProperty(_this, "buildVirtualItemFromGroup", function (group) {
|
|
119
|
-
var _this$
|
|
120
|
-
onEmojiSelected = _this$
|
|
121
|
-
onEmojiDelete = _this$
|
|
95
|
+
var _this$props = _this.props,
|
|
96
|
+
onEmojiSelected = _this$props.onEmojiSelected,
|
|
97
|
+
onEmojiDelete = _this$props.onEmojiDelete;
|
|
122
98
|
var items = [];
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
99
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
100
|
+
items.push(new CompiledCategoryHeadingItem({
|
|
101
|
+
id: group.category,
|
|
102
|
+
title: group.title,
|
|
103
|
+
className: categoryClassname
|
|
104
|
+
}));
|
|
105
|
+
} else {
|
|
106
|
+
items.push(new EmotionCategoryHeadingItem({
|
|
107
|
+
id: group.category,
|
|
108
|
+
title: group.title,
|
|
109
|
+
className: categoryClassname
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
128
112
|
var remainingEmojis = group.emojis;
|
|
129
113
|
while (remainingEmojis.length > 0) {
|
|
130
114
|
var rowEmojis = remainingEmojis.slice(0, sizes.emojiPerRow);
|
|
131
115
|
remainingEmojis = remainingEmojis.slice(sizes.emojiPerRow);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
116
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
117
|
+
items.push(new CompiledEmojisRowItem({
|
|
118
|
+
category: group.category,
|
|
119
|
+
emojis: rowEmojis,
|
|
120
|
+
title: group.title,
|
|
121
|
+
showDelete: group.title === userCustomTitle,
|
|
122
|
+
onSelected: onEmojiSelected,
|
|
123
|
+
onDelete: onEmojiDelete,
|
|
124
|
+
onMouseMove: _this.onEmojiActive,
|
|
125
|
+
onFocus: _this.onEmojiActive
|
|
126
|
+
}));
|
|
127
|
+
} else {
|
|
128
|
+
items.push(new EmotionEmojisRowItem({
|
|
129
|
+
category: group.category,
|
|
130
|
+
emojis: rowEmojis,
|
|
131
|
+
title: group.title,
|
|
132
|
+
showDelete: group.title === userCustomTitle,
|
|
133
|
+
onSelected: onEmojiSelected,
|
|
134
|
+
onDelete: onEmojiDelete,
|
|
135
|
+
onMouseMove: _this.onEmojiActive,
|
|
136
|
+
onFocus: _this.onEmojiActive
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
142
139
|
}
|
|
143
140
|
return items;
|
|
144
141
|
});
|
|
@@ -150,7 +147,11 @@ export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureCompo
|
|
|
150
147
|
var prevFirstCategory = _this.categoryTracker.getFirstCategory();
|
|
151
148
|
_this.categoryTracker.reset();
|
|
152
149
|
if (loading) {
|
|
153
|
-
|
|
150
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
151
|
+
items.push(new CompiledLoadingItem());
|
|
152
|
+
} else {
|
|
153
|
+
items.push(new EmotionLoadingItem());
|
|
154
|
+
}
|
|
154
155
|
} else {
|
|
155
156
|
if (query) {
|
|
156
157
|
var search = CategoryDescriptionMap.SEARCH;
|
|
@@ -223,10 +224,18 @@ export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureCompo
|
|
|
223
224
|
});
|
|
224
225
|
_defineProperty(_this, "findCategoryToActivate", function (row) {
|
|
225
226
|
var category = null;
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
228
|
+
if (row instanceof CompiledCategoryHeadingItem) {
|
|
229
|
+
category = row.props.id;
|
|
230
|
+
} else if (row instanceof CompiledEmojisRowItem) {
|
|
231
|
+
category = row.props.category;
|
|
232
|
+
}
|
|
233
|
+
} else {
|
|
234
|
+
if (row instanceof EmotionCategoryHeadingItem) {
|
|
235
|
+
category = row.props.id;
|
|
236
|
+
} else if (row instanceof EmotionEmojisRowItem) {
|
|
237
|
+
category = row.props.category;
|
|
238
|
+
}
|
|
230
239
|
}
|
|
231
240
|
// your uploads is rendered, take it as upload category, so could be highlighted in category selector
|
|
232
241
|
if (category === yourUploadsCategory) {
|
|
@@ -249,12 +258,22 @@ export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureCompo
|
|
|
249
258
|
var list = _this.listRef.current;
|
|
250
259
|
|
|
251
260
|
// update tabIndex manually, startIndex is not 0 based here
|
|
252
|
-
if (
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
261
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
262
|
+
if (rowItem instanceof CompiledCategoryHeadingItem) {
|
|
263
|
+
// if top of row rendered is category heading, update tabIndex for the next emoji row
|
|
264
|
+
list === null || list === void 0 || list.updateFocusIndex(startIndex + 1);
|
|
265
|
+
} else if (rowItem instanceof CompiledEmojisRowItem) {
|
|
266
|
+
// if top of row rendered is emoji row, update it's tabIndex.
|
|
267
|
+
list === null || list === void 0 || list.updateFocusIndex(startIndex);
|
|
268
|
+
}
|
|
269
|
+
} else {
|
|
270
|
+
if (rowItem instanceof EmotionCategoryHeadingItem) {
|
|
271
|
+
// if top of row rendered is category heading, update tabIndex for the next emoji row
|
|
272
|
+
list === null || list === void 0 || list.updateFocusIndex(startIndex + 1);
|
|
273
|
+
} else if (rowItem instanceof EmotionEmojisRowItem) {
|
|
274
|
+
// if top of row rendered is emoji row, update it's tabIndex.
|
|
275
|
+
list === null || list === void 0 || list.updateFocusIndex(startIndex);
|
|
276
|
+
}
|
|
258
277
|
}
|
|
259
278
|
if (!_this.props.query) {
|
|
260
279
|
// Calculate category in view - only relevant if categories shown, i.e. no query
|
|
@@ -288,7 +307,7 @@ export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureCompo
|
|
|
288
307
|
_this.buildVirtualItems(_props, _this.state);
|
|
289
308
|
return _this;
|
|
290
309
|
}
|
|
291
|
-
_inherits(EmojiPickerVirtualListInternalOld,
|
|
310
|
+
_inherits(EmojiPickerVirtualListInternalOld, _PureComponent);
|
|
292
311
|
return _createClass(EmojiPickerVirtualListInternalOld, [{
|
|
293
312
|
key: "UNSAFE_componentWillUpdate",
|
|
294
313
|
value: function UNSAFE_componentWillUpdate(nextProps, nextState) {
|
|
@@ -350,29 +369,29 @@ export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureCompo
|
|
|
350
369
|
}, {
|
|
351
370
|
key: "render",
|
|
352
371
|
value: function render() {
|
|
353
|
-
var _this$
|
|
354
|
-
query = _this$
|
|
355
|
-
selectedTone = _this$
|
|
356
|
-
onToneSelected = _this$
|
|
357
|
-
onToneSelectorCancelled = _this$
|
|
358
|
-
toneEmoji = _this$
|
|
359
|
-
uploading = _this$
|
|
360
|
-
uploadEnabled = _this$
|
|
361
|
-
emojiToDelete = _this$
|
|
362
|
-
initialUploadName = _this$
|
|
363
|
-
uploadErrorMessage = _this$
|
|
364
|
-
onUploadCancelled = _this$
|
|
365
|
-
onUploadEmoji = _this$
|
|
366
|
-
onDeleteEmoji = _this$
|
|
367
|
-
onFileChooserClicked = _this$
|
|
368
|
-
onOpenUpload = _this$
|
|
369
|
-
_this$
|
|
370
|
-
size = _this$
|
|
371
|
-
emojis = _this$
|
|
372
|
+
var _this$props2 = this.props,
|
|
373
|
+
query = _this$props2.query,
|
|
374
|
+
selectedTone = _this$props2.selectedTone,
|
|
375
|
+
onToneSelected = _this$props2.onToneSelected,
|
|
376
|
+
onToneSelectorCancelled = _this$props2.onToneSelectorCancelled,
|
|
377
|
+
toneEmoji = _this$props2.toneEmoji,
|
|
378
|
+
uploading = _this$props2.uploading,
|
|
379
|
+
uploadEnabled = _this$props2.uploadEnabled,
|
|
380
|
+
emojiToDelete = _this$props2.emojiToDelete,
|
|
381
|
+
initialUploadName = _this$props2.initialUploadName,
|
|
382
|
+
uploadErrorMessage = _this$props2.uploadErrorMessage,
|
|
383
|
+
onUploadCancelled = _this$props2.onUploadCancelled,
|
|
384
|
+
onUploadEmoji = _this$props2.onUploadEmoji,
|
|
385
|
+
onDeleteEmoji = _this$props2.onDeleteEmoji,
|
|
386
|
+
onFileChooserClicked = _this$props2.onFileChooserClicked,
|
|
387
|
+
onOpenUpload = _this$props2.onOpenUpload,
|
|
388
|
+
_this$props2$size = _this$props2.size,
|
|
389
|
+
size = _this$props2$size === void 0 ? defaultEmojiPickerSize : _this$props2$size,
|
|
390
|
+
emojis = _this$props2.emojis;
|
|
372
391
|
var virtualListHeight = sizes.listHeight + emojiPickerHeightOffset(size);
|
|
373
|
-
return
|
|
392
|
+
return /*#__PURE__*/React.createElement(EmojiPickerTabPanel, {
|
|
374
393
|
showSearchResults: !!query
|
|
375
|
-
},
|
|
394
|
+
}, /*#__PURE__*/React.createElement(EmojiActions, {
|
|
376
395
|
selectedTone: selectedTone,
|
|
377
396
|
onToneSelected: onToneSelected,
|
|
378
397
|
onToneSelectorCancelled: onToneSelectorCancelled,
|
|
@@ -391,12 +410,12 @@ export var EmojiPickerVirtualListInternalOld = /*#__PURE__*/function (_PureCompo
|
|
|
391
410
|
query: query,
|
|
392
411
|
onChange: this.onSearch,
|
|
393
412
|
resultsCount: emojis.length
|
|
394
|
-
}),
|
|
413
|
+
}), /*#__PURE__*/React.createElement(EmojiPickerListContextProvider, {
|
|
395
414
|
initialEmojisFocus: {
|
|
396
415
|
rowIndex: 1,
|
|
397
416
|
columnIndex: 0
|
|
398
417
|
}
|
|
399
|
-
},
|
|
418
|
+
}, /*#__PURE__*/React.createElement(VirtualList, {
|
|
400
419
|
ref: this.listRef,
|
|
401
420
|
height: virtualListHeight,
|
|
402
421
|
overscanRowCount: 10,
|
|
@@ -494,12 +513,22 @@ export var EmojiPickerVirtualListInternalNew = /*#__PURE__*/React.forwardRef(fun
|
|
|
494
513
|
var list = listRef.current;
|
|
495
514
|
|
|
496
515
|
// update tabIndex manually, startIndex is not 0 based here
|
|
497
|
-
if (
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
516
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
517
|
+
if (rowItem instanceof CompiledCategoryHeadingItem) {
|
|
518
|
+
// if top of row rendered is category heading, update tabIndex for the next emoji row
|
|
519
|
+
list === null || list === void 0 || list.updateFocusIndex(startIndex + 1);
|
|
520
|
+
} else if (rowItem instanceof CompiledEmojisRowItem) {
|
|
521
|
+
// if top of row rendered is emoji row, update it's tabIndex.
|
|
522
|
+
list === null || list === void 0 || list.updateFocusIndex(startIndex);
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
if (rowItem instanceof EmotionCategoryHeadingItem) {
|
|
526
|
+
// if top of row rendered is category heading, update tabIndex for the next emoji row
|
|
527
|
+
list === null || list === void 0 || list.updateFocusIndex(startIndex + 1);
|
|
528
|
+
} else if (rowItem instanceof EmotionEmojisRowItem) {
|
|
529
|
+
// if top of row rendered is emoji row, update it's tabIndex.
|
|
530
|
+
list === null || list === void 0 || list.updateFocusIndex(startIndex);
|
|
531
|
+
}
|
|
503
532
|
}
|
|
504
533
|
if (!query) {
|
|
505
534
|
// Calculate category in view - only relevant if categories shown, i.e. no query
|
|
@@ -537,25 +566,46 @@ export var EmojiPickerVirtualListInternalNew = /*#__PURE__*/React.forwardRef(fun
|
|
|
537
566
|
};
|
|
538
567
|
var buildVirtualItemFromGroup = useCallback(function (group) {
|
|
539
568
|
var items = [];
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
569
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
570
|
+
items.push(new CompiledCategoryHeadingItem({
|
|
571
|
+
id: group.category,
|
|
572
|
+
title: group.title,
|
|
573
|
+
className: categoryClassname
|
|
574
|
+
}));
|
|
575
|
+
} else {
|
|
576
|
+
items.push(new EmotionCategoryHeadingItem({
|
|
577
|
+
id: group.category,
|
|
578
|
+
title: group.title,
|
|
579
|
+
className: categoryClassname
|
|
580
|
+
}));
|
|
581
|
+
}
|
|
545
582
|
var remainingEmojis = group.emojis;
|
|
546
583
|
while (remainingEmojis.length > 0) {
|
|
547
584
|
var rowEmojis = remainingEmojis.slice(0, sizes.emojiPerRow);
|
|
548
585
|
remainingEmojis = remainingEmojis.slice(sizes.emojiPerRow);
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
586
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
587
|
+
items.push(new CompiledEmojisRowItem({
|
|
588
|
+
category: group.category,
|
|
589
|
+
emojis: rowEmojis,
|
|
590
|
+
title: group.title,
|
|
591
|
+
showDelete: group.title === userCustomTitle,
|
|
592
|
+
onSelected: onEmojiSelected,
|
|
593
|
+
onDelete: onEmojiDelete,
|
|
594
|
+
onMouseMove: onEmojiActive,
|
|
595
|
+
onFocus: onEmojiActive
|
|
596
|
+
}));
|
|
597
|
+
} else {
|
|
598
|
+
items.push(new EmotionEmojisRowItem({
|
|
599
|
+
category: group.category,
|
|
600
|
+
emojis: rowEmojis,
|
|
601
|
+
title: group.title,
|
|
602
|
+
showDelete: group.title === userCustomTitle,
|
|
603
|
+
onSelected: onEmojiSelected,
|
|
604
|
+
onDelete: onEmojiDelete,
|
|
605
|
+
onMouseMove: onEmojiActive,
|
|
606
|
+
onFocus: onEmojiActive
|
|
607
|
+
}));
|
|
608
|
+
}
|
|
559
609
|
}
|
|
560
610
|
return items;
|
|
561
611
|
}, [onEmojiSelected, onEmojiDelete, onEmojiActive]);
|
|
@@ -564,7 +614,11 @@ export var EmojiPickerVirtualListInternalNew = /*#__PURE__*/React.forwardRef(fun
|
|
|
564
614
|
var prevFirstCategory = categoryTracker.getFirstCategory();
|
|
565
615
|
categoryTracker.reset();
|
|
566
616
|
if (loading) {
|
|
567
|
-
|
|
617
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
618
|
+
items.push(new CompiledLoadingItem());
|
|
619
|
+
} else {
|
|
620
|
+
items.push(new EmotionLoadingItem());
|
|
621
|
+
}
|
|
568
622
|
} else {
|
|
569
623
|
if (query) {
|
|
570
624
|
var search = CategoryDescriptionMap.SEARCH;
|
|
@@ -602,10 +656,18 @@ export var EmojiPickerVirtualListInternalNew = /*#__PURE__*/React.forwardRef(fun
|
|
|
602
656
|
}, [allEmojiGroups, loading, query, emojis]);
|
|
603
657
|
var findCategoryToActivate = function findCategoryToActivate(row) {
|
|
604
658
|
var category = null;
|
|
605
|
-
if (
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
659
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
660
|
+
if (row instanceof CompiledCategoryHeadingItem) {
|
|
661
|
+
category = row.props.id;
|
|
662
|
+
} else if (row instanceof CompiledEmojisRowItem) {
|
|
663
|
+
category = row.props.category;
|
|
664
|
+
}
|
|
665
|
+
} else {
|
|
666
|
+
if (row instanceof EmotionCategoryHeadingItem) {
|
|
667
|
+
category = row.props.id;
|
|
668
|
+
} else if (row instanceof EmotionEmojisRowItem) {
|
|
669
|
+
category = row.props.category;
|
|
670
|
+
}
|
|
609
671
|
}
|
|
610
672
|
// your uploads is rendered, take it as upload category, so could be highlighted in category selector
|
|
611
673
|
if (category === yourUploadsCategory) {
|
|
@@ -638,12 +700,22 @@ export var EmojiPickerVirtualListInternalNew = /*#__PURE__*/React.forwardRef(fun
|
|
|
638
700
|
var columnIndex = -1;
|
|
639
701
|
// for most of cases, it'd be in first emoji row, so should be quite fast to find in real world
|
|
640
702
|
var rowIndex = virtualItems.findIndex(function (rowItem) {
|
|
641
|
-
if (
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
703
|
+
if (fg('platform_editor_css_migrate_emoji')) {
|
|
704
|
+
if (rowItem instanceof CompiledEmojisRowItem) {
|
|
705
|
+
// find uploaded emoji in each emoji row
|
|
706
|
+
columnIndex = rowItem.props.emojis.findIndex(function (emoji) {
|
|
707
|
+
return emoji.id === emojiId;
|
|
708
|
+
});
|
|
709
|
+
return columnIndex !== -1;
|
|
710
|
+
}
|
|
711
|
+
} else {
|
|
712
|
+
if (rowItem instanceof EmotionEmojisRowItem) {
|
|
713
|
+
// find uploaded emoji in each emoji row
|
|
714
|
+
columnIndex = rowItem.props.emojis.findIndex(function (emoji) {
|
|
715
|
+
return emoji.id === emojiId;
|
|
716
|
+
});
|
|
717
|
+
return columnIndex !== -1;
|
|
718
|
+
}
|
|
647
719
|
}
|
|
648
720
|
return false;
|
|
649
721
|
});
|
|
@@ -711,9 +783,9 @@ export var EmojiPickerVirtualListInternalNew = /*#__PURE__*/React.forwardRef(fun
|
|
|
711
783
|
var virtualListHeight = useMemo(function () {
|
|
712
784
|
return sizes.listHeight + emojiPickerHeightOffset(size);
|
|
713
785
|
}, [size]);
|
|
714
|
-
return
|
|
786
|
+
return /*#__PURE__*/React.createElement(EmojiPickerTabPanel, {
|
|
715
787
|
showSearchResults: !!query
|
|
716
|
-
},
|
|
788
|
+
}, /*#__PURE__*/React.createElement(EmojiActions, {
|
|
717
789
|
selectedTone: selectedTone,
|
|
718
790
|
onToneSelected: onToneSelected,
|
|
719
791
|
onToneSelectorCancelled: onToneSelectorCancelled,
|
|
@@ -732,12 +804,12 @@ export var EmojiPickerVirtualListInternalNew = /*#__PURE__*/React.forwardRef(fun
|
|
|
732
804
|
query: query,
|
|
733
805
|
onChange: onSearch,
|
|
734
806
|
resultsCount: emojis.length
|
|
735
|
-
}),
|
|
807
|
+
}), /*#__PURE__*/React.createElement(EmojiPickerListContextProvider, {
|
|
736
808
|
initialEmojisFocus: {
|
|
737
809
|
rowIndex: 1,
|
|
738
810
|
columnIndex: 0
|
|
739
811
|
}
|
|
740
|
-
},
|
|
812
|
+
}, /*#__PURE__*/React.createElement(VirtualList, {
|
|
741
813
|
ref: listRef,
|
|
742
814
|
height: virtualListHeight,
|
|
743
815
|
overscanRowCount: 10,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
|
+
/**
|
|
9
|
+
* @jsxRuntime classic
|
|
10
|
+
* @jsx jsx
|
|
11
|
+
*/
|
|
12
|
+
import React, { PureComponent } from 'react';
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
|
+
import { css, jsx } from '@emotion/react';
|
|
15
|
+
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
16
|
+
import { injectIntl } from 'react-intl-next';
|
|
17
|
+
import { messages } from '../i18n';
|
|
18
|
+
import { RENDER_EMOJI_PICKER_LIST_TESTID } from './EmojiPickerList';
|
|
19
|
+
var emojiPickerList = css({
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
flex: '1 1 auto',
|
|
23
|
+
// To force Firefox/IE/Edge to shrink the list, if necessary (e.g. when upload panel in place)
|
|
24
|
+
height: '0'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* TODO: have to use class component here as unit test is relying on ref.root. Will refactor this whole file + EmojiPickerList to functional component in future
|
|
29
|
+
* ticket: COLLAB-2317
|
|
30
|
+
*/
|
|
31
|
+
var EmojiPickerTabPanelInternal = /*#__PURE__*/function (_PureComponent) {
|
|
32
|
+
function EmojiPickerTabPanelInternal() {
|
|
33
|
+
_classCallCheck(this, EmojiPickerTabPanelInternal);
|
|
34
|
+
return _callSuper(this, EmojiPickerTabPanelInternal, arguments);
|
|
35
|
+
}
|
|
36
|
+
_inherits(EmojiPickerTabPanelInternal, _PureComponent);
|
|
37
|
+
return _createClass(EmojiPickerTabPanelInternal, [{
|
|
38
|
+
key: "render",
|
|
39
|
+
value: function render() {
|
|
40
|
+
var _this$props = this.props,
|
|
41
|
+
formatMessage = _this$props.intl.formatMessage,
|
|
42
|
+
children = _this$props.children,
|
|
43
|
+
showSearchResults = _this$props.showSearchResults;
|
|
44
|
+
return jsx("div", {
|
|
45
|
+
ref: "root",
|
|
46
|
+
css: emojiPickerList,
|
|
47
|
+
"data-testid": RENDER_EMOJI_PICKER_LIST_TESTID,
|
|
48
|
+
id: RENDER_EMOJI_PICKER_LIST_TESTID,
|
|
49
|
+
role: "tabpanel",
|
|
50
|
+
"aria-label": formatMessage(messages.emojiPickerListPanel)
|
|
51
|
+
}, jsx(VisuallyHidden, {
|
|
52
|
+
id: "emoji-picker-table-description"
|
|
53
|
+
}, formatMessage(messages.emojiPickerGrid, {
|
|
54
|
+
showSearchResults: showSearchResults
|
|
55
|
+
})), children);
|
|
56
|
+
}
|
|
57
|
+
}]);
|
|
58
|
+
}(PureComponent);
|
|
59
|
+
export default injectIntl(EmojiPickerTabPanelInternal);
|
|
@@ -58,15 +58,6 @@ export var categorySelectorTablist = css({
|
|
|
58
58
|
|
|
59
59
|
/// EmojiPickerList
|
|
60
60
|
|
|
61
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
62
|
-
export var emojiPickerList = css({
|
|
63
|
-
display: 'flex',
|
|
64
|
-
flexDirection: 'column',
|
|
65
|
-
flex: '1 1 auto',
|
|
66
|
-
// To force Firefox/IE/Edge to shrink the list, if necessary (e.g. when upload panel in place)
|
|
67
|
-
height: '0'
|
|
68
|
-
});
|
|
69
|
-
|
|
70
61
|
// focus style is enabled by default - turn it off
|
|
71
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
72
63
|
export var virtualList = css({
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AbstractResource } from '@atlaskit/util-service-support';
|
|
2
2
|
import { Emoji, EmojiPlaceholder } from './element';
|
|
3
3
|
import ResourcedEmoji from './components/common/ResourcedEmoji';
|
|
4
|
-
import
|
|
4
|
+
import { EmojiPicker } from './picker';
|
|
5
|
+
import { preloadEmojiPicker } from './components/picker/EmojiPicker';
|
|
5
6
|
import EmojiUploader from './components/uploader/EmojiUploader';
|
|
6
7
|
import EmojiTypeAhead from './components/typeahead/EmojiTypeAhead';
|
|
7
8
|
import EmojiTypeAheadItem from './components/typeahead/EmojiTypeAheadItem';
|
package/dist/esm/picker.js
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
2
|
+
import { default as EmotionEmojiPicker } from './components/picker/EmojiPicker';
|
|
3
|
+
import { default as CompiledEmojiPicker } from './components/compiled/picker/EmojiPicker';
|
|
4
|
+
var EmojiPicker = componentWithFG('platform_editor_css_migrate_emoji', CompiledEmojiPicker, EmotionEmojiPicker);
|
|
5
|
+
export { EmojiPicker };
|
|
@@ -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.3"
|
|
17
17
|
}, attributes)
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CategoryDescription, OnCategory } from '../../../types';
|
|
3
|
+
import { type CategoryGroupKey, type CategoryId } from '../../picker/categories';
|
|
4
|
+
export interface Props {
|
|
5
|
+
dynamicCategories?: CategoryId[];
|
|
6
|
+
activeCategoryId?: CategoryId | null;
|
|
7
|
+
disableCategories?: boolean;
|
|
8
|
+
onCategorySelected?: OnCategory;
|
|
9
|
+
}
|
|
10
|
+
export type CategoryMap = {
|
|
11
|
+
[id: string]: CategoryDescription;
|
|
12
|
+
};
|
|
13
|
+
export declare const sortCategories: (c1: CategoryGroupKey, c2: CategoryGroupKey) => number;
|
|
14
|
+
export declare const categorySelectorComponentTestId = "category-selector-component";
|
|
15
|
+
export declare const categorySelectorCategoryTestId: (categoryId: string) => string;
|
|
16
|
+
declare const CategorySelector: (props: Props) => JSX.Element;
|
|
17
|
+
export default CategorySelector;
|