@atlaskit/emoji 69.0.0 → 69.0.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 +19 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +6 -0
- package/afm-post-office/tsconfig.json +6 -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/components/typeahead/EmojiTypeAheadComponent.js +10 -14
- package/dist/cjs/components/typeahead/EmojiTypeAheadItem.js +5 -1
- package/dist/cjs/components/typeahead/EmojiTypeAheadItemInternalCompiled.compiled.css +11 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadItemInternalCompiled.js +58 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadList.js +14 -39
- package/dist/cjs/components/typeahead/EmojiTypeAheadListContainer.js +10 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadListContainerCompiled.compiled.css +7 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadListContainerCompiled.js +30 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadListContainerEmotion.js +41 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadSpinner.js +10 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadSpinnerCompiled.compiled.css +5 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadSpinnerCompiled.js +32 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadSpinnerEmotion.js +35 -0
- package/dist/cjs/components/typeahead/styles.js +1 -35
- package/dist/cjs/components/uploader/EmojiUploadComponent.js +5 -130
- package/dist/cjs/components/uploader/EmojiUploadComponentCompiled.compiled.css +15 -0
- package/dist/cjs/components/uploader/EmojiUploadComponentCompiled.js +136 -0
- package/dist/cjs/components/uploader/EmojiUploadComponentEmotion.js +148 -0
- 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/components/typeahead/EmojiTypeAheadComponent.js +5 -14
- package/dist/es2019/components/typeahead/EmojiTypeAheadItem.js +5 -1
- package/dist/es2019/components/typeahead/EmojiTypeAheadItemInternalCompiled.compiled.css +11 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadItemInternalCompiled.js +49 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadList.js +13 -39
- package/dist/es2019/components/typeahead/EmojiTypeAheadListContainer.js +4 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadListContainerCompiled.compiled.css +7 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadListContainerCompiled.js +21 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadListContainerEmotion.js +35 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadSpinner.js +4 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadSpinnerCompiled.compiled.css +5 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadSpinnerCompiled.js +18 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadSpinnerEmotion.js +27 -0
- package/dist/es2019/components/typeahead/styles.js +1 -35
- package/dist/es2019/components/uploader/EmojiUploadComponent.js +5 -98
- package/dist/es2019/components/uploader/EmojiUploadComponentCompiled.compiled.css +15 -0
- package/dist/es2019/components/uploader/EmojiUploadComponentCompiled.js +95 -0
- package/dist/es2019/components/uploader/EmojiUploadComponentEmotion.js +111 -0
- 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/components/typeahead/EmojiTypeAheadComponent.js +5 -14
- package/dist/esm/components/typeahead/EmojiTypeAheadItem.js +5 -1
- package/dist/esm/components/typeahead/EmojiTypeAheadItemInternalCompiled.compiled.css +11 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadItemInternalCompiled.js +51 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadList.js +13 -39
- package/dist/esm/components/typeahead/EmojiTypeAheadListContainer.js +4 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadListContainerCompiled.compiled.css +7 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadListContainerCompiled.js +23 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadListContainerEmotion.js +33 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadSpinner.js +4 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadSpinnerCompiled.compiled.css +5 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadSpinnerCompiled.js +22 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadSpinnerEmotion.js +27 -0
- package/dist/esm/components/typeahead/styles.js +1 -35
- package/dist/esm/components/uploader/EmojiUploadComponent.js +5 -126
- package/dist/esm/components/uploader/EmojiUploadComponentCompiled.compiled.css +15 -0
- package/dist/esm/components/uploader/EmojiUploadComponentCompiled.js +126 -0
- package/dist/esm/components/uploader/EmojiUploadComponentEmotion.js +139 -0
- 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/EmojiPickerSizes.d.ts +1 -1
- package/dist/types/components/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types/components/picker/styles.d.ts +0 -1
- package/dist/types/components/typeahead/EmojiTypeAheadComponent.d.ts +3 -7
- package/dist/types/components/typeahead/EmojiTypeAheadItemInternalCompiled.d.ts +15 -0
- package/dist/types/components/typeahead/EmojiTypeAheadList.d.ts +2 -7
- package/dist/types/components/typeahead/EmojiTypeAheadListContainer.d.ts +10 -0
- package/dist/types/components/typeahead/EmojiTypeAheadListContainerCompiled.d.ts +10 -0
- package/dist/types/components/typeahead/EmojiTypeAheadListContainerEmotion.d.ts +11 -0
- package/dist/types/components/typeahead/EmojiTypeAheadSpinner.d.ts +2 -0
- package/dist/types/components/typeahead/EmojiTypeAheadSpinnerCompiled.d.ts +2 -0
- package/dist/types/components/typeahead/EmojiTypeAheadSpinnerEmotion.d.ts +6 -0
- package/dist/types/components/typeahead/styles.d.ts +0 -4
- package/dist/types/components/uploader/EmojiUploadComponent.d.ts +2 -13
- package/dist/types/components/uploader/EmojiUploadComponentCompiled.d.ts +13 -0
- package/dist/types/components/uploader/EmojiUploadComponentEmotion.d.ts +14 -0
- package/dist/types/components/uploader/EmojiUploader.d.ts +1 -1
- package/dist/types/hooks/useInView.d.ts +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/picker.d.ts +3 -1
- package/dist/types/util/constants.d.ts +2 -1
- package/dist/types/util/shared-styles.d.ts +5 -3
- 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/EmojiPickerSizes.d.ts +1 -1
- 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/components/typeahead/EmojiTypeAheadComponent.d.ts +3 -7
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadItemInternalCompiled.d.ts +15 -0
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadList.d.ts +2 -7
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadListContainer.d.ts +10 -0
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadListContainerCompiled.d.ts +10 -0
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadListContainerEmotion.d.ts +11 -0
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadSpinner.d.ts +2 -0
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadSpinnerCompiled.d.ts +2 -0
- package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadSpinnerEmotion.d.ts +6 -0
- package/dist/types-ts4.5/components/typeahead/styles.d.ts +0 -4
- package/dist/types-ts4.5/components/uploader/EmojiUploadComponent.d.ts +2 -13
- package/dist/types-ts4.5/components/uploader/EmojiUploadComponentCompiled.d.ts +13 -0
- package/dist/types-ts4.5/components/uploader/EmojiUploadComponentEmotion.d.ts +14 -0
- package/dist/types-ts4.5/components/uploader/EmojiUploader.d.ts +1 -1
- package/dist/types-ts4.5/hooks/useInView.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +2 -1
- package/dist/types-ts4.5/picker.d.ts +3 -1
- package/dist/types-ts4.5/util/constants.d.ts +2 -1
- package/dist/types-ts4.5/util/shared-styles.d.ts +5 -3
- package/package.json +3 -2
- package/dist/cjs/components/uploader/styles.js +0 -34
- package/dist/es2019/components/uploader/styles.js +0 -28
- package/dist/esm/components/uploader/styles.js +0 -28
- package/dist/types/components/uploader/styles.d.ts +0 -2
- package/dist/types-ts4.5/components/uploader/styles.d.ts +0 -2
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
7
|
+
*/
|
|
8
|
+
import { useState, memo, useEffect } from 'react';
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
import { jsx, css } from '@emotion/react';
|
|
11
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
12
|
+
import { supportsUploadFeature } from '../../api/EmojiResource';
|
|
13
|
+
import EmojiUploadPickerWithIntl from '../common/EmojiUploadPicker';
|
|
14
|
+
import { uploadEmoji } from '../common/UploadEmoji';
|
|
15
|
+
import { createAndFireEventInElementsChannel, selectedFileEvent, uploadCancelButton, uploadConfirmButton } from '../../util/analytics';
|
|
16
|
+
import { ufoExperiences } from '../../util/analytics/ufoExperiences';
|
|
17
|
+
import { messages } from '../i18n';
|
|
18
|
+
var emojiPickerWidth = 350;
|
|
19
|
+
var emojiUploadWidget = css({
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
justifyContent: 'center',
|
|
23
|
+
alignItems: 'stretch',
|
|
24
|
+
background: "var(--ds-surface-overlay, white)",
|
|
25
|
+
height: "120px",
|
|
26
|
+
width: "".concat(emojiPickerWidth, "px"),
|
|
27
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
28
|
+
minWidth: "".concat(emojiPickerWidth, "px"),
|
|
29
|
+
margin: "var(--ds-space-negative-150, -12px)",
|
|
30
|
+
marginTop: "var(--ds-space-negative-200, -16px)"
|
|
31
|
+
});
|
|
32
|
+
var emojiUploadFooter = css({
|
|
33
|
+
flex: '0 0 auto'
|
|
34
|
+
});
|
|
35
|
+
var EmojiUploadComponent = function EmojiUploadComponent(props) {
|
|
36
|
+
var emojiProvider = props.emojiProvider,
|
|
37
|
+
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
38
|
+
onUploaderRef = props.onUploaderRef;
|
|
39
|
+
var _useState = useState(),
|
|
40
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
41
|
+
uploadErrorMessage = _useState2[0],
|
|
42
|
+
setUploadErrorMessage = _useState2[1];
|
|
43
|
+
useEffect(function () {
|
|
44
|
+
if (supportsUploadFeature(emojiProvider)) {
|
|
45
|
+
emojiProvider.prepareForUpload();
|
|
46
|
+
}
|
|
47
|
+
}, [emojiProvider]);
|
|
48
|
+
useEffect(function () {
|
|
49
|
+
return function () {
|
|
50
|
+
ufoExperiences['emoji-uploaded'].abort({
|
|
51
|
+
metadata: {
|
|
52
|
+
source: 'EmojiUploadComponent',
|
|
53
|
+
reason: 'unmount'
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
var onUploadEmoji = /*#__PURE__*/function () {
|
|
59
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(upload, retry, onSuccessHandler) {
|
|
60
|
+
var errorSetter, message;
|
|
61
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
62
|
+
while (1) switch (_context.prev = _context.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
ufoExperiences['emoji-uploaded'].start();
|
|
65
|
+
ufoExperiences['emoji-uploaded'].addMetadata({
|
|
66
|
+
retry: retry
|
|
67
|
+
});
|
|
68
|
+
if (!supportsUploadFeature(emojiProvider)) {
|
|
69
|
+
_context.next = 16;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
fireAnalytics(uploadConfirmButton({
|
|
73
|
+
retry: retry
|
|
74
|
+
}));
|
|
75
|
+
_context.prev = 4;
|
|
76
|
+
_context.next = 7;
|
|
77
|
+
return emojiProvider.prepareForUpload();
|
|
78
|
+
case 7:
|
|
79
|
+
errorSetter = function errorSetter(message) {
|
|
80
|
+
setUploadErrorMessage(message);
|
|
81
|
+
}; // internally handled error from upload callback
|
|
82
|
+
uploadEmoji(upload, emojiProvider, errorSetter, onUploaded(onSuccessHandler), fireAnalytics, retry);
|
|
83
|
+
_context.next = 16;
|
|
84
|
+
break;
|
|
85
|
+
case 11:
|
|
86
|
+
_context.prev = 11;
|
|
87
|
+
_context.t0 = _context["catch"](4);
|
|
88
|
+
// error from upload token generation
|
|
89
|
+
message = _context.t0 instanceof Error ? _context.t0.message : 'Issue with generating upload token';
|
|
90
|
+
ufoExperiences['emoji-uploaded'].failure({
|
|
91
|
+
metadata: {
|
|
92
|
+
source: 'EmojiUploadComponent',
|
|
93
|
+
error: message
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
setUploadErrorMessage(messages.emojiUploadFailed);
|
|
97
|
+
case 16:
|
|
98
|
+
case "end":
|
|
99
|
+
return _context.stop();
|
|
100
|
+
}
|
|
101
|
+
}, _callee, null, [[4, 11]]);
|
|
102
|
+
}));
|
|
103
|
+
return function onUploadEmoji(_x, _x2, _x3) {
|
|
104
|
+
return _ref.apply(this, arguments);
|
|
105
|
+
};
|
|
106
|
+
}();
|
|
107
|
+
var onUploaded = function onUploaded(onSuccessHandler) {
|
|
108
|
+
return function () {
|
|
109
|
+
setUploadErrorMessage(undefined);
|
|
110
|
+
if (onSuccessHandler) {
|
|
111
|
+
onSuccessHandler();
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
var onFileChooserClicked = function onFileChooserClicked() {
|
|
116
|
+
fireAnalytics(selectedFileEvent());
|
|
117
|
+
};
|
|
118
|
+
var onUploadCancelled = function onUploadCancelled() {
|
|
119
|
+
fireAnalytics(uploadCancelButton());
|
|
120
|
+
onUploaded();
|
|
121
|
+
};
|
|
122
|
+
var fireAnalytics = function fireAnalytics(analyticsEvent) {
|
|
123
|
+
if (createAnalyticsEvent) {
|
|
124
|
+
createAndFireEventInElementsChannel(analyticsEvent)(createAnalyticsEvent);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
return jsx("div", {
|
|
128
|
+
css: emojiUploadWidget,
|
|
129
|
+
ref: onUploaderRef
|
|
130
|
+
}, jsx("div", {
|
|
131
|
+
css: emojiUploadFooter
|
|
132
|
+
}, jsx(EmojiUploadPickerWithIntl, {
|
|
133
|
+
onFileChooserClicked: onFileChooserClicked,
|
|
134
|
+
onUploadCancelled: onUploadCancelled,
|
|
135
|
+
onUploadEmoji: onUploadEmoji,
|
|
136
|
+
errorMessage: uploadErrorMessage ? jsx(FormattedMessage, uploadErrorMessage) : null
|
|
137
|
+
})));
|
|
138
|
+
};
|
|
139
|
+
export default /*#__PURE__*/memo(EmojiUploadComponent);
|
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.2"
|
|
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;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import type { ComponentClass } from 'react';
|
|
6
|
+
import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
7
|
+
import type { EmojiProvider } from '../../../api/EmojiResource';
|
|
8
|
+
import type { OnEmojiEvent, PickerSize } from '../../../types';
|
|
9
|
+
import LoadingEmojiComponent, { type Props as LoadingProps, type State as LoadingState } from '../../common/LoadingEmojiComponent';
|
|
10
|
+
import type { PickerRefHandler, Props as ComponentProps } from './EmojiPickerComponent';
|
|
11
|
+
export declare const preloadEmojiPicker: () => void;
|
|
12
|
+
export interface Props extends LoadingProps {
|
|
13
|
+
/**
|
|
14
|
+
* Callback to be executed on emoji selection.
|
|
15
|
+
*/
|
|
16
|
+
onSelection?: OnEmojiEvent;
|
|
17
|
+
/**
|
|
18
|
+
* Callback to handle picker reference.
|
|
19
|
+
*/
|
|
20
|
+
onPickerRef?: PickerRefHandler;
|
|
21
|
+
/**
|
|
22
|
+
* Flag to disable tone selector.
|
|
23
|
+
*/
|
|
24
|
+
hideToneSelector?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Size of Emoji Picker. default value is 'medium'.
|
|
27
|
+
*/
|
|
28
|
+
size?: PickerSize;
|
|
29
|
+
}
|
|
30
|
+
export declare class EmojiPickerInternal extends LoadingEmojiComponent<Props & WithAnalyticsEventsProps, LoadingState> {
|
|
31
|
+
static AsyncLoadedComponent?: React.ComponentType<React.PropsWithChildren<ComponentProps>>;
|
|
32
|
+
static defaultProps: {
|
|
33
|
+
size: string;
|
|
34
|
+
};
|
|
35
|
+
state: {
|
|
36
|
+
asyncLoadedComponent: import("react").ComponentType<import("react").PropsWithChildren<ComponentProps>> | undefined;
|
|
37
|
+
};
|
|
38
|
+
constructor(props: Props);
|
|
39
|
+
asyncLoadComponent(): void;
|
|
40
|
+
renderLoading(): JSX.Element | null;
|
|
41
|
+
renderLoaded(loadedEmojiProvider: EmojiProvider, EmojiPickerComponent: ComponentClass<ComponentProps>): JSX.Element;
|
|
42
|
+
}
|
|
43
|
+
declare const EmojiPicker: import("react").ForwardRefExoticComponent<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any>>;
|
|
44
|
+
export default EmojiPicker;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CategoryGroupKey } from '../../picker/categories';
|
|
3
|
+
/**
|
|
4
|
+
* Test id for wrapper Emoji Picker List div
|
|
5
|
+
*/
|
|
6
|
+
export declare const RENDER_EMOJI_PICKER_CATEGORY_HEADING_TESTID = "render-emoji-picker-categorty-heading";
|
|
7
|
+
export interface Props {
|
|
8
|
+
id: CategoryGroupKey;
|
|
9
|
+
title: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const EmojiPickerCategoryHeading: ({ id, title, className }: Props) => JSX.Element;
|
|
13
|
+
export default EmojiPickerCategoryHeading;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type OnEmojiEvent, type PickerSize } from '../../../types';
|
|
3
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
export interface PickerRefHandler {
|
|
5
|
+
(ref: any): any;
|
|
6
|
+
}
|
|
7
|
+
export interface Props {
|
|
8
|
+
/**
|
|
9
|
+
* Callback to be executed when user selects an emoji.
|
|
10
|
+
*/
|
|
11
|
+
onSelection?: OnEmojiEvent;
|
|
12
|
+
/**
|
|
13
|
+
* Callback performed when picker reference is being set.
|
|
14
|
+
*/
|
|
15
|
+
onPickerRef?: PickerRefHandler;
|
|
16
|
+
/**
|
|
17
|
+
* Flag to disable tone selector.
|
|
18
|
+
*/
|
|
19
|
+
hideToneSelector?: boolean;
|
|
20
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
21
|
+
size?: PickerSize;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: import("react").MemoExoticComponent<({ onSelection, onPickerRef, hideToneSelector, createAnalyticsEvent, size, }: Props) => JSX.Element>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { EmojiDescription, OnEmojiEvent } from '../../../types';
|
|
3
|
+
import type { VirtualItem as VirtualItemContext } from '@tanstack/react-virtual';
|
|
4
|
+
import type { CategoryGroupKey } from '../../picker/categories';
|
|
5
|
+
export interface Props {
|
|
6
|
+
category: CategoryGroupKey;
|
|
7
|
+
emojis: EmojiDescription[];
|
|
8
|
+
title: string;
|
|
9
|
+
showDelete: boolean;
|
|
10
|
+
onSelected?: OnEmojiEvent;
|
|
11
|
+
onMouseMove?: OnEmojiEvent;
|
|
12
|
+
onFocus?: OnEmojiEvent;
|
|
13
|
+
onDelete?: OnEmojiEvent;
|
|
14
|
+
virtualItemContext?: VirtualItemContext;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: import("react").MemoExoticComponent<({ emojis, onSelected, onMouseMove, onFocus, title, showDelete, onDelete, virtualItemContext, }: Props) => JSX.Element>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { EmojiDescription } from '../../../types';
|
|
3
|
+
export interface Props {
|
|
4
|
+
selectedEmoji?: EmojiDescription;
|
|
5
|
+
}
|
|
6
|
+
export declare const emojiPickerFooterTestId = "emoji-picker-footer";
|
|
7
|
+
declare const _default: import("react").MemoExoticComponent<({ selectedEmoji }: Props) => JSX.Element>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Styles } from '../../../types';
|
|
3
|
+
export interface Props {
|
|
4
|
+
style?: Styles;
|
|
5
|
+
query?: string;
|
|
6
|
+
isVisible?: boolean;
|
|
7
|
+
onChange: (value: string) => void;
|
|
8
|
+
resultsCount: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const emojiPickerSearchTestId = "emoji-picker-search";
|
|
11
|
+
export declare const EmojiPickerListSearch: (props: Props) => JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { type WrappedComponentProps } from 'react-intl-next';
|
|
7
|
+
/**
|
|
8
|
+
* 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
|
|
9
|
+
* ticket: COLLAB-2317
|
|
10
|
+
*/
|
|
11
|
+
interface EmojiPickerTabPanelProps extends WrappedComponentProps {
|
|
12
|
+
/**
|
|
13
|
+
* Indicate whether the panel shows search results or full emojis list
|
|
14
|
+
*/
|
|
15
|
+
showSearchResults: boolean;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<React.PropsWithChildren<EmojiPickerTabPanelProps>>> & {
|
|
19
|
+
WrappedComponent: React.ComponentType<React.PropsWithChildren<EmojiPickerTabPanelProps>>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import { type Props as CategoryHeadingProps } from './EmojiPickerCategoryHeading';
|
|
7
|
+
import { type Props as EmojiRowProps } from './EmojiPickerEmojiRow';
|
|
8
|
+
import type { VirtualItem as VirtualItemContext } from '@tanstack/react-virtual';
|
|
9
|
+
export interface RenderItem {
|
|
10
|
+
(context?: VirtualItemContext): ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface VirtualItem<P> {
|
|
13
|
+
height: number;
|
|
14
|
+
props: P;
|
|
15
|
+
renderItem: RenderItem;
|
|
16
|
+
}
|
|
17
|
+
export declare abstract class AbstractItem<P> implements VirtualItem<P> {
|
|
18
|
+
readonly height: number;
|
|
19
|
+
readonly props: P;
|
|
20
|
+
constructor(props: P, height: number);
|
|
21
|
+
abstract renderItem: RenderItem;
|
|
22
|
+
}
|
|
23
|
+
export declare class EmojisRowItem extends AbstractItem<EmojiRowProps> {
|
|
24
|
+
constructor(props: EmojiRowProps);
|
|
25
|
+
renderItem: (context?: VirtualItemContext) => JSX.Element;
|
|
26
|
+
}
|
|
27
|
+
export declare class LoadingItem extends AbstractItem<{}> {
|
|
28
|
+
constructor();
|
|
29
|
+
renderItem: () => JSX.Element;
|
|
30
|
+
}
|
|
31
|
+
export declare class CategoryHeadingItem extends AbstractItem<CategoryHeadingProps> {
|
|
32
|
+
constructor(props: CategoryHeadingProps);
|
|
33
|
+
renderItem: () => JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
export declare const virtualItemRenderer: (rows: VirtualItem<CategoryHeadingProps | EmojiRowProps | {}>[], context: VirtualItemContext) => JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { VirtualItem as VirtualItemContext } from '@tanstack/react-virtual';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type Props = {
|
|
4
|
+
overscanRowCount: number;
|
|
5
|
+
rowHeight: (index: number) => number;
|
|
6
|
+
rowRenderer: (context: VirtualItemContext) => JSX.Element;
|
|
7
|
+
onRowsRendered: (indexes: {
|
|
8
|
+
startIndex: number;
|
|
9
|
+
}) => void;
|
|
10
|
+
rowCount: number;
|
|
11
|
+
scrollToAlignment: 'start' | 'end';
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
};
|
|
15
|
+
export type ListRef = {
|
|
16
|
+
/**
|
|
17
|
+
* Scroll to the row by row index
|
|
18
|
+
* @param index row index of virtual list
|
|
19
|
+
*/
|
|
20
|
+
scrollToRow: (index?: number) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Scroll to the row by row index, and focus on last emoji in that row
|
|
23
|
+
* @param index row index of virtual list
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
scrollToRowAndFocusLastEmoji: (index?: number) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Scroll to a emoji in virtual list and focus on it
|
|
29
|
+
* @param rIndex row index of virtual list
|
|
30
|
+
* @param cIndex column index of virtual list
|
|
31
|
+
*/
|
|
32
|
+
scrollToEmojiAndFocus: (rIndex: number, cIndex: number) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Update the focus index of virtual list, which will manage tabIndex via EmojiPickerListContext
|
|
35
|
+
* @param rIndex row index of virtual list
|
|
36
|
+
* @param cIndex column index of virtual list
|
|
37
|
+
*/
|
|
38
|
+
updateFocusIndex: (rIndex: number, cIndex?: number) => void;
|
|
39
|
+
};
|
|
40
|
+
export declare const virtualListScrollContainerTestId = "virtual-list-scroll-container";
|
|
41
|
+
export declare const VirtualList: React.ForwardRefExoticComponent<Props & React.RefAttributes<ListRef>>;
|
|
42
|
+
export {};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
1
|
import React, { PureComponent } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
2
|
import type { EmojiDescription, EmojiDescriptionWithVariations, Message, OnCategory, OnEmojiEvent, OnToneSelected, OnToneSelectorCancelled, PickerSize, ToneSelection, User } from '../../types';
|
|
8
3
|
import { type CategoryId } from './categories';
|
|
9
4
|
import type { OnUploadEmoji } from '../common/EmojiUploadPicker';
|
|
@@ -100,6 +95,6 @@ export declare class EmojiPickerVirtualListInternalOld extends PureComponent<Pro
|
|
|
100
95
|
* however, it'll trigger onChange from VirtualList, which will update focus index automatically for us
|
|
101
96
|
*/
|
|
102
97
|
private handleOnCloseDelete;
|
|
103
|
-
render():
|
|
98
|
+
render(): React.JSX.Element;
|
|
104
99
|
}
|
|
105
100
|
export declare const EmojiPickerVirtualListInternalNew: React.ForwardRefExoticComponent<Props & React.RefAttributes<PickerListRef>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { type WrappedComponentProps } from 'react-intl-next';
|
|
7
|
+
/**
|
|
8
|
+
* 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
|
|
9
|
+
* ticket: COLLAB-2317
|
|
10
|
+
*/
|
|
11
|
+
interface EmojiPickerTabPanelProps extends WrappedComponentProps {
|
|
12
|
+
/**
|
|
13
|
+
* Indicate whether the panel shows search results or full emojis list
|
|
14
|
+
*/
|
|
15
|
+
showSearchResults: boolean;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<React.PropsWithChildren<EmojiPickerTabPanelProps>>> & {
|
|
19
|
+
WrappedComponent: React.ComponentType<React.PropsWithChildren<EmojiPickerTabPanelProps>>;
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
|
@@ -2,7 +2,6 @@ import type { PickerSize } from '../../types';
|
|
|
2
2
|
export declare const emojiPicker: (hasPreview?: boolean, size?: PickerSize) => import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const categorySelector: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const categorySelectorTablist: import("@emotion/react").SerializedStyles;
|
|
5
|
-
export declare const emojiPickerList: import("@emotion/react").SerializedStyles;
|
|
6
5
|
export declare const virtualList: import("@emotion/react").SerializedStyles;
|
|
7
6
|
export declare const searchIcon: import("@emotion/react").SerializedStyles;
|
|
8
7
|
export declare const input: import("@emotion/react").SerializedStyles;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
7
2
|
import { PureComponent } from 'react';
|
|
3
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
4
|
import type { EmojiProvider } from '../../api/EmojiResource';
|
|
9
5
|
import { type EmojiDescription, type OnEmojiEvent } from '../../types';
|
|
10
6
|
export interface OnLifecycle {
|
|
@@ -74,5 +70,5 @@ export default class EmojiTypeAheadComponent extends PureComponent<Props, State>
|
|
|
74
70
|
private fireSelectionEvent;
|
|
75
71
|
private onProviderChange;
|
|
76
72
|
private onEmojiListRef;
|
|
77
|
-
render():
|
|
73
|
+
render(): React.JSX.Element;
|
|
78
74
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import type { EmojiDescription, EmojiProvider, OnEmojiEvent } from '../../types';
|
|
7
|
+
export interface Props {
|
|
8
|
+
onMouseMove: OnEmojiEvent;
|
|
9
|
+
onSelection: OnEmojiEvent;
|
|
10
|
+
selected: boolean;
|
|
11
|
+
emoji: EmojiDescription;
|
|
12
|
+
emojiProvider?: EmojiProvider;
|
|
13
|
+
forwardedRef?: React.Ref<HTMLDivElement>;
|
|
14
|
+
}
|
|
15
|
+
export declare function EmojiTypeAheadItemInternalCompiled(props: Props): JSX.Element;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { PureComponent } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
7
2
|
import type { EmojiDescription, OnEmojiEvent } from '../../types';
|
|
8
3
|
export interface Props {
|
|
9
4
|
emojis: EmojiDescription[];
|
|
@@ -35,6 +30,6 @@ export default class EmojiTypeAheadList extends PureComponent<Props, State> {
|
|
|
35
30
|
private itemSelected;
|
|
36
31
|
private renderItems;
|
|
37
32
|
private isSelectedEmoji;
|
|
38
|
-
render():
|
|
33
|
+
render(): React.JSX.Element;
|
|
39
34
|
private handleScrollableRef;
|
|
40
35
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const EmojiTypeAheadListContainer: import("react").FC<{
|
|
3
|
+
hasEmoji: boolean;
|
|
4
|
+
loading?: boolean | undefined;
|
|
5
|
+
children: import("react").ReactNode;
|
|
6
|
+
} & {
|
|
7
|
+
hasEmoji: boolean;
|
|
8
|
+
loading?: boolean | undefined;
|
|
9
|
+
children: import("react").ReactNode;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
export declare function EmojiTypeAheadListContainerEmotion(props: {
|
|
8
|
+
hasEmoji: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}): jsx.JSX.Element;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export declare const emojiTypeAhead = "emoji-typeahead-element";
|
|
2
2
|
export declare const typeAheadListContainer = "emoji-typeahead-list-container";
|
|
3
3
|
export declare const typeaheadSelected = "emoji-typeahead-selected";
|
|
4
|
-
export declare const typeAheadList: import("@emotion/react").SerializedStyles;
|
|
5
|
-
export declare const typeAheadEmpty: import("@emotion/react").SerializedStyles;
|
|
6
4
|
export declare const selected: import("@emotion/react").SerializedStyles;
|
|
7
5
|
export declare const typeAheadItem: import("@emotion/react").SerializedStyles;
|
|
8
6
|
export declare const typeAheadItemRow: import("@emotion/react").SerializedStyles;
|
|
9
|
-
export declare const emojiTypeAheadSpinnerContainer: import("@emotion/react").SerializedStyles;
|
|
10
|
-
export declare const emojiTypeAheadSpinner: import("@emotion/react").SerializedStyles;
|
|
@@ -1,14 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { type EmojiProvider } from '../../api/EmojiResource';
|
|
5
|
-
export interface UploadRefHandler {
|
|
6
|
-
(ref: HTMLDivElement): void;
|
|
7
|
-
}
|
|
8
|
-
export interface Props {
|
|
9
|
-
emojiProvider: EmojiProvider;
|
|
10
|
-
onUploaderRef?: UploadRefHandler;
|
|
11
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
12
|
-
}
|
|
13
|
-
declare const _default: import("react").MemoExoticComponent<(props: Props) => jsx.JSX.Element>;
|
|
14
|
-
export default _default;
|
|
2
|
+
declare const EmojiUploadComponent: import("react").FC<import("./EmojiUploadComponentCompiled").Props & import("./EmojiUploadComponentEmotion").Props>;
|
|
3
|
+
export default EmojiUploadComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import { type EmojiProvider } from '../../api/EmojiResource';
|
|
4
|
+
export interface UploadRefHandler {
|
|
5
|
+
(ref: HTMLDivElement): void;
|
|
6
|
+
}
|
|
7
|
+
export interface Props {
|
|
8
|
+
emojiProvider: EmojiProvider;
|
|
9
|
+
onUploaderRef?: UploadRefHandler;
|
|
10
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: import("react").MemoExoticComponent<(props: Props) => JSX.Element>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
import { type EmojiProvider } from '../../api/EmojiResource';
|
|
5
|
+
export interface UploadRefHandler {
|
|
6
|
+
(ref: HTMLDivElement): void;
|
|
7
|
+
}
|
|
8
|
+
export interface Props {
|
|
9
|
+
emojiProvider: EmojiProvider;
|
|
10
|
+
onUploaderRef?: UploadRefHandler;
|
|
11
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: import("react").MemoExoticComponent<(props: Props) => jsx.JSX.Element>;
|
|
14
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import LoadingEmojiComponent, { type Props as LoadingProps, type State as LoadingState } from '../common/LoadingEmojiComponent';
|
|
3
|
-
import type { Props as ComponentProps } from './
|
|
3
|
+
import type { Props as ComponentProps } from './EmojiUploadComponentCompiled';
|
|
4
4
|
import type { EmojiProvider } from '../../api/EmojiResource';
|
|
5
5
|
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
6
|
export interface Props extends LoadingProps {
|