@atlaskit/emoji 67.4.1 → 67.4.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.
Files changed (139) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/components/picker/styles.js +11 -11
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/es2019/components/picker/styles.js +11 -11
  5. package/dist/es2019/version.json +1 -1
  6. package/dist/esm/components/picker/styles.js +11 -11
  7. package/dist/esm/version.json +1 -1
  8. package/dist/types-ts4.5/admin.d.ts +1 -0
  9. package/dist/types-ts4.5/api/EmojiLoader.d.ts +13 -0
  10. package/dist/types-ts4.5/api/EmojiRepository.d.ts +72 -0
  11. package/dist/types-ts4.5/api/EmojiRepositoryRegex.d.ts +1 -0
  12. package/dist/types-ts4.5/api/EmojiResource.d.ts +139 -0
  13. package/dist/types-ts4.5/api/EmojiUtils.d.ts +24 -0
  14. package/dist/types-ts4.5/api/internal/Comparators.d.ts +109 -0
  15. package/dist/types-ts4.5/api/internal/UsageFrequencyTracker.d.ts +46 -0
  16. package/dist/types-ts4.5/api/media/MediaEmojiCache.d.ts +53 -0
  17. package/dist/types-ts4.5/api/media/MediaImageLoader.d.ts +21 -0
  18. package/dist/types-ts4.5/api/media/SiteEmojiResource.d.ts +46 -0
  19. package/dist/types-ts4.5/api/media/TokenManager.d.ts +13 -0
  20. package/dist/types-ts4.5/components/common/CachingEmoji.d.ts +21 -0
  21. package/dist/types-ts4.5/components/common/DeletableEmojiTooltipContent.d.ts +6 -0
  22. package/dist/types-ts4.5/components/common/DeleteButton.d.ts +9 -0
  23. package/dist/types-ts4.5/components/common/Emoji.d.ts +87 -0
  24. package/dist/types-ts4.5/components/common/EmojiActions.d.ts +35 -0
  25. package/dist/types-ts4.5/components/common/EmojiDeletePreview.d.ts +21 -0
  26. package/dist/types-ts4.5/components/common/EmojiErrorMessage.d.ts +15 -0
  27. package/dist/types-ts4.5/components/common/EmojiPlaceholder.d.ts +13 -0
  28. package/dist/types-ts4.5/components/common/EmojiPreviewComponent.d.ts +8 -0
  29. package/dist/types-ts4.5/components/common/EmojiRadioButton.d.ts +13 -0
  30. package/dist/types-ts4.5/components/common/EmojiUploadPicker.d.ts +21 -0
  31. package/dist/types-ts4.5/components/common/EmojiUploadPreview.d.ts +18 -0
  32. package/dist/types-ts4.5/components/common/FileChooser.d.ts +14 -0
  33. package/dist/types-ts4.5/components/common/LoadingEmojiComponent.d.ts +32 -0
  34. package/dist/types-ts4.5/components/common/Popup.d.ts +12 -0
  35. package/dist/types-ts4.5/components/common/RecordSelectionDefault.d.ts +12 -0
  36. package/dist/types-ts4.5/components/common/ResourcedEmoji.d.ts +6 -0
  37. package/dist/types-ts4.5/components/common/ResourcedEmojiComponent.d.ts +48 -0
  38. package/dist/types-ts4.5/components/common/RetryableButton.d.ts +15 -0
  39. package/dist/types-ts4.5/components/common/Scrollable.d.ts +21 -0
  40. package/dist/types-ts4.5/components/common/TonePreviewButton.d.ts +14 -0
  41. package/dist/types-ts4.5/components/common/ToneSelector.d.ts +15 -0
  42. package/dist/types-ts4.5/components/common/ToolTipContentWithKeymap.d.ts +9 -0
  43. package/dist/types-ts4.5/components/common/UfoErrorBoundary.d.ts +8 -0
  44. package/dist/types-ts4.5/components/common/UploadEmoji.d.ts +5 -0
  45. package/dist/types-ts4.5/components/common/internal-types.d.ts +20 -0
  46. package/dist/types-ts4.5/components/common/setSkinToneAriaLabelText.d.ts +1 -0
  47. package/dist/types-ts4.5/components/common/styles.d.ts +56 -0
  48. package/dist/types-ts4.5/components/i18n.d.ts +227 -0
  49. package/dist/types-ts4.5/components/picker/CategorySelector.d.ts +17 -0
  50. package/dist/types-ts4.5/components/picker/CategoryTracker.d.ts +16 -0
  51. package/dist/types-ts4.5/components/picker/EmojiPicker.d.ts +43 -0
  52. package/dist/types-ts4.5/components/picker/EmojiPickerCategoryHeading.d.ts +14 -0
  53. package/dist/types-ts4.5/components/picker/EmojiPickerComponent.d.ts +25 -0
  54. package/dist/types-ts4.5/components/picker/EmojiPickerEmojiRow.d.ts +17 -0
  55. package/dist/types-ts4.5/components/picker/EmojiPickerFooter.d.ts +9 -0
  56. package/dist/types-ts4.5/components/picker/EmojiPickerList.d.ts +94 -0
  57. package/dist/types-ts4.5/components/picker/EmojiPickerListSearch.d.ts +11 -0
  58. package/dist/types-ts4.5/components/picker/EmojiPickerSizes.d.ts +11 -0
  59. package/dist/types-ts4.5/components/picker/EmojiPickerVirtualItems.d.ts +33 -0
  60. package/dist/types-ts4.5/components/picker/VirtualList.d.ts +42 -0
  61. package/dist/types-ts4.5/components/picker/categories.d.ts +7 -0
  62. package/dist/types-ts4.5/components/picker/styles.d.ts +19 -0
  63. package/dist/types-ts4.5/components/picker/utils.d.ts +2 -0
  64. package/dist/types-ts4.5/components/typeahead/EmojiTypeAhead.d.ts +27 -0
  65. package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadComponent.d.ts +74 -0
  66. package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadItem.d.ts +17 -0
  67. package/dist/types-ts4.5/components/typeahead/EmojiTypeAheadList.d.ts +37 -0
  68. package/dist/types-ts4.5/components/typeahead/styles.d.ts +10 -0
  69. package/dist/types-ts4.5/components/uploader/EmojiUploadComponent.d.ts +13 -0
  70. package/dist/types-ts4.5/components/uploader/EmojiUploader.d.ts +20 -0
  71. package/dist/types-ts4.5/components/uploader/styles.d.ts +2 -0
  72. package/dist/types-ts4.5/context/EmojiCommonProvider.d.ts +17 -0
  73. package/dist/types-ts4.5/context/EmojiContext.d.ts +4 -0
  74. package/dist/types-ts4.5/context/EmojiContextProvider.d.ts +7 -0
  75. package/dist/types-ts4.5/context/EmojiPickerListContext.d.ts +10 -0
  76. package/dist/types-ts4.5/element.d.ts +3 -0
  77. package/dist/types-ts4.5/hooks/useEmoji.d.ts +5 -0
  78. package/dist/types-ts4.5/hooks/useEmojiContext.d.ts +4 -0
  79. package/dist/types-ts4.5/hooks/useEmojiPickerListContext.d.ts +1 -0
  80. package/dist/types-ts4.5/hooks/useInView.d.ts +7 -0
  81. package/dist/types-ts4.5/hooks/useIsMounted.d.ts +1 -0
  82. package/dist/types-ts4.5/hooks/usePrevious.d.ts +1 -0
  83. package/dist/types-ts4.5/i18n/cs.d.ts +53 -0
  84. package/dist/types-ts4.5/i18n/da.d.ts +53 -0
  85. package/dist/types-ts4.5/i18n/de.d.ts +53 -0
  86. package/dist/types-ts4.5/i18n/en.d.ts +53 -0
  87. package/dist/types-ts4.5/i18n/en_GB.d.ts +53 -0
  88. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +43 -0
  89. package/dist/types-ts4.5/i18n/es.d.ts +53 -0
  90. package/dist/types-ts4.5/i18n/et.d.ts +39 -0
  91. package/dist/types-ts4.5/i18n/fi.d.ts +53 -0
  92. package/dist/types-ts4.5/i18n/fr.d.ts +53 -0
  93. package/dist/types-ts4.5/i18n/hu.d.ts +53 -0
  94. package/dist/types-ts4.5/i18n/index.d.ts +35 -0
  95. package/dist/types-ts4.5/i18n/is.d.ts +33 -0
  96. package/dist/types-ts4.5/i18n/it.d.ts +53 -0
  97. package/dist/types-ts4.5/i18n/ja.d.ts +53 -0
  98. package/dist/types-ts4.5/i18n/ko.d.ts +53 -0
  99. package/dist/types-ts4.5/i18n/languages.d.ts +27 -0
  100. package/dist/types-ts4.5/i18n/nb.d.ts +53 -0
  101. package/dist/types-ts4.5/i18n/nl.d.ts +53 -0
  102. package/dist/types-ts4.5/i18n/pl.d.ts +53 -0
  103. package/dist/types-ts4.5/i18n/pt_BR.d.ts +53 -0
  104. package/dist/types-ts4.5/i18n/pt_PT.d.ts +39 -0
  105. package/dist/types-ts4.5/i18n/ro.d.ts +33 -0
  106. package/dist/types-ts4.5/i18n/ru.d.ts +53 -0
  107. package/dist/types-ts4.5/i18n/sk.d.ts +39 -0
  108. package/dist/types-ts4.5/i18n/sv.d.ts +53 -0
  109. package/dist/types-ts4.5/i18n/th.d.ts +53 -0
  110. package/dist/types-ts4.5/i18n/tr.d.ts +53 -0
  111. package/dist/types-ts4.5/i18n/uk.d.ts +53 -0
  112. package/dist/types-ts4.5/i18n/vi.d.ts +53 -0
  113. package/dist/types-ts4.5/i18n/zh.d.ts +53 -0
  114. package/dist/types-ts4.5/i18n/zh_TW.d.ts +53 -0
  115. package/dist/types-ts4.5/index.d.ts +26 -0
  116. package/dist/types-ts4.5/picker.d.ts +1 -0
  117. package/dist/types-ts4.5/resource.d.ts +5 -0
  118. package/dist/types-ts4.5/typeahead.d.ts +2 -0
  119. package/dist/types-ts4.5/types.d.ts +363 -0
  120. package/dist/types-ts4.5/util/DuplicateLimitedQueue.d.ts +91 -0
  121. package/dist/types-ts4.5/util/StoredDuplicateLimitedQueue.d.ts +46 -0
  122. package/dist/types-ts4.5/util/analytics/analytics.d.ts +67 -0
  123. package/dist/types-ts4.5/util/analytics/index.d.ts +6 -0
  124. package/dist/types-ts4.5/util/analytics/samplingUfo.d.ts +38 -0
  125. package/dist/types-ts4.5/util/analytics/ufoExperiences.d.ts +14 -0
  126. package/dist/types-ts4.5/util/analytics/useSampledUFOComponentExperience.d.ts +8 -0
  127. package/dist/types-ts4.5/util/browser-support.d.ts +6 -0
  128. package/dist/types-ts4.5/util/constants.d.ts +60 -0
  129. package/dist/types-ts4.5/util/filters.d.ts +8 -0
  130. package/dist/types-ts4.5/util/image.d.ts +10 -0
  131. package/dist/types-ts4.5/util/keymaps.d.ts +14 -0
  132. package/dist/types-ts4.5/util/logger.d.ts +4 -0
  133. package/dist/types-ts4.5/util/mouse.d.ts +8 -0
  134. package/dist/types-ts4.5/util/shared-styles.d.ts +11 -0
  135. package/dist/types-ts4.5/util/storage-available.d.ts +3 -0
  136. package/dist/types-ts4.5/util/type-helpers.d.ts +23 -0
  137. package/dist/types-ts4.5/utils.d.ts +3 -0
  138. package/package.json +1 -1
  139. package/report.api.md +8 -16
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ import { EmojiDescriptionWithVariations, OnToneSelected, ToneSelection } from '../../types';
3
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
4
+ export interface Props {
5
+ emoji: EmojiDescriptionWithVariations;
6
+ isVisible: boolean;
7
+ onToneSelected: OnToneSelected;
8
+ onToneClose?: () => void;
9
+ selectedTone?: ToneSelection;
10
+ }
11
+ export declare const toneSelectorTestId = "tone-selector";
12
+ type PropsWithAnalyticsEventsPropsType = Props & WithAnalyticsEventsProps;
13
+ export declare const ToneSelectorInternal: FC<PropsWithAnalyticsEventsPropsType>;
14
+ declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<import("react").PropsWithChildren<PropsWithAnalyticsEventsPropsType>, keyof WithAnalyticsEventsProps> & import("react").RefAttributes<any>>>;
15
+ export default _default;
@@ -0,0 +1,9 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { Keymap } from '../../util/keymaps';
5
+ export declare const ToolTipContentWithKeymap: React.MemoExoticComponent<({ description, shortcutOverride, keymap, }: {
6
+ description?: string | React.ReactNode;
7
+ keymap?: Keymap | undefined;
8
+ shortcutOverride?: string | undefined;
9
+ }) => jsx.JSX.Element | null>;
@@ -0,0 +1,8 @@
1
+ import React, { ErrorInfo } from 'react';
2
+ import { UFOExperience } from '@atlaskit/ufo';
3
+ export declare class UfoErrorBoundary extends React.Component<{
4
+ experiences: UFOExperience[];
5
+ }> {
6
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
7
+ render(): React.ReactNode;
8
+ }
@@ -0,0 +1,5 @@
1
+ import { MessageDescriptor } from 'react-intl-next';
2
+ import { EmojiProvider } from '../../api/EmojiResource';
3
+ import { EmojiDescription, EmojiUpload } from '../../types';
4
+ import { AnalyticsEventPayload } from '@atlaskit/analytics-next';
5
+ export declare const uploadEmoji: (upload: EmojiUpload, emojiProvider: EmojiProvider, errorSetter: (message: MessageDescriptor | undefined) => void, onSuccess: (emojiDescription: EmojiDescription) => void, fireAnalytics: (event: AnalyticsEventPayload) => void, retry: boolean) => void;
@@ -0,0 +1,20 @@
1
+ import { EmojiProvider } from '../../api/EmojiResource';
2
+ export interface EmojiContext {
3
+ emoji: {
4
+ emojiProvider: EmojiProvider;
5
+ };
6
+ }
7
+ interface FocusIndexes {
8
+ rowIndex: number;
9
+ columnIndex: number;
10
+ }
11
+ export interface EmojiPickerListContextType {
12
+ currentEmojisFocus: FocusIndexes;
13
+ setEmojisFocus: (indexes: FocusIndexes) => void;
14
+ }
15
+ export declare enum UploadStatus {
16
+ Waiting = 0,
17
+ Uploading = 1,
18
+ Error = 2
19
+ }
20
+ export {};
@@ -0,0 +1 @@
1
+ export declare const setSkinToneAriaLabelText: (tone?: string) => string | undefined;
@@ -0,0 +1,56 @@
1
+ export declare const commonSelectedStyles = "emoji-common-selected";
2
+ export declare const selectOnHoverStyles = "emoji-common-select-on-hover";
3
+ export declare const emojiSprite = "emoji-common-emoji-sprite";
4
+ export declare const emojiNodeStyles = "emoji-common-node";
5
+ export declare const emojiImage = "emoji-common-emoji-image";
6
+ export declare const emojiDeleteButton = "emoji-common-deleteButton";
7
+ export declare const emojiMainStyle = "emoji-common-main-styles";
8
+ export declare const deletableEmoji = "emoji-common-deletable";
9
+ export declare const deleteButton: import("@emotion/react").SerializedStyles;
10
+ export declare const emojiToneSelectorContainer: import("@emotion/react").SerializedStyles;
11
+ export declare const emojiImageContainer: import("@emotion/react").SerializedStyles;
12
+ export declare const emojiSpriteContainer: import("@emotion/react").SerializedStyles;
13
+ export declare const placeholder = "emoji-common-placeholder";
14
+ export declare const placeholderContainer: import("@emotion/react").SerializedStyles;
15
+ export declare const placeholderContainerAnimated: import("@emotion/react").SerializedStyles;
16
+ export declare const hidden: import("@emotion/react").SerializedStyles;
17
+ export declare const emojiButton: import("@emotion/react").SerializedStyles;
18
+ export declare const emojiRadio: import("@emotion/react").SerializedStyles;
19
+ export declare const emojiPickerAddEmoji = "emoji-picker-add-emoji";
20
+ export declare const previewText: import("@emotion/react").SerializedStyles;
21
+ export declare const emojiName: import("@emotion/react").SerializedStyles;
22
+ export declare const emojiShortName: import("@emotion/react").SerializedStyles;
23
+ export declare const preview: import("@emotion/react").SerializedStyles;
24
+ export declare const previewImg: import("@emotion/react").SerializedStyles;
25
+ export declare const emojiScrollable: import("@emotion/react").SerializedStyles;
26
+ export declare const emojiUpload: import("@emotion/react").SerializedStyles;
27
+ export declare const emojiUploadTop: import("@emotion/react").SerializedStyles;
28
+ export declare const uploadChooseFileMessage: import("@emotion/react").SerializedStyles;
29
+ export declare const closeEmojiUploadButton: import("@emotion/react").SerializedStyles;
30
+ export declare const emojiUploadBottom: import("@emotion/react").SerializedStyles;
31
+ export declare const uploadChooseFileRow: import("@emotion/react").SerializedStyles;
32
+ export declare const uploadChooseFileEmojiName: import("@emotion/react").SerializedStyles;
33
+ export declare const uploadChooseFileBrowse: import("@emotion/react").SerializedStyles;
34
+ export declare const uploadPreviewFooter: import("@emotion/react").SerializedStyles;
35
+ export declare const uploadPreview: import("@emotion/react").SerializedStyles;
36
+ export declare const uploadPreviewText: import("@emotion/react").SerializedStyles;
37
+ export declare const bigEmojiPreview: import("@emotion/react").SerializedStyles;
38
+ export declare const uploadAddRow: import("@emotion/react").SerializedStyles;
39
+ export declare const addCustomEmoji: import("@emotion/react").SerializedStyles;
40
+ export declare const submitDelete = "emoji-submit-delete";
41
+ export declare const deletePreview: import("@emotion/react").SerializedStyles;
42
+ export declare const deleteText: import("@emotion/react").SerializedStyles;
43
+ export declare const headingH5: import("@emotion/react").SerializedStyles;
44
+ export declare const requiredSymbol: import("@emotion/react").SerializedStyles;
45
+ export declare const previewButtonGroup: import("@emotion/react").SerializedStyles;
46
+ export declare const deleteFooter: import("@emotion/react").SerializedStyles;
47
+ export declare const emojiDeleteErrorMessage: import("@emotion/react").SerializedStyles;
48
+ export declare const emojiChooseFileErrorMessage: import("@emotion/react").SerializedStyles;
49
+ export declare const emojiPreviewErrorMessage: import("@emotion/react").SerializedStyles;
50
+ export declare const addCustomEmojiButton: import("@emotion/react").SerializedStyles;
51
+ export declare const uploadRetryButton: import("@emotion/react").SerializedStyles;
52
+ export declare const uploadEmojiButton: import("@emotion/react").SerializedStyles;
53
+ export declare const cancelButton: import("@emotion/react").SerializedStyles;
54
+ export declare const buttonSpinner: import("@emotion/react").SerializedStyles;
55
+ export declare const emojiActionsWrapper: import("@emotion/react").SerializedStyles;
56
+ export declare const tooltipShortcutStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,227 @@
1
+ export declare const messages: {
2
+ deleteEmojiTooltip: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ deleteEmojiTooltipForScreenreader: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ deleteEmojiTitle: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ deleteEmojiDescription: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ deleteEmojiLabel: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
27
+ addCustomEmojiLabel: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ emojiPlaceholder: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ emojiNameAriaLabel: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ emojiChooseFileTitle: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
47
+ emojiChooseFileScreenReaderDescription: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ description: string;
51
+ };
52
+ emojiSelectSkinToneButtonAriaLabelText: {
53
+ id: string;
54
+ defaultMessage: string;
55
+ description: string;
56
+ };
57
+ emojiSelectSkinToneListAriaLabelText: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
62
+ emojiImageRequirements: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ description: string;
66
+ };
67
+ emojiPreviewTitle: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
72
+ emojiPreview: {
73
+ id: string;
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
77
+ addEmojiLabel: {
78
+ id: string;
79
+ defaultMessage: string;
80
+ description: string;
81
+ };
82
+ retryLabel: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ description: string;
86
+ };
87
+ cancelLabel: {
88
+ id: string;
89
+ defaultMessage: string;
90
+ description: string;
91
+ };
92
+ searchPlaceholder: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
97
+ searchLabel: {
98
+ id: string;
99
+ defaultMessage: string;
100
+ description: string;
101
+ };
102
+ searchResultsStatus: {
103
+ id: string;
104
+ defaultMessage: string;
105
+ description: string;
106
+ };
107
+ searchResultsStatusSeeAll: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ description: string;
111
+ };
112
+ categoriesSelectorLabel: {
113
+ id: string;
114
+ defaultMessage: string;
115
+ description: string;
116
+ };
117
+ categoriesSearchResults: {
118
+ id: string;
119
+ defaultMessage: string;
120
+ description: string;
121
+ };
122
+ frequentCategory: {
123
+ id: string;
124
+ defaultMessage: string;
125
+ description: string;
126
+ };
127
+ peopleCategory: {
128
+ id: string;
129
+ defaultMessage: string;
130
+ description: string;
131
+ };
132
+ natureCategory: {
133
+ id: string;
134
+ defaultMessage: string;
135
+ description: string;
136
+ };
137
+ foodsCategory: {
138
+ id: string;
139
+ defaultMessage: string;
140
+ description: string;
141
+ };
142
+ activityCategory: {
143
+ id: string;
144
+ defaultMessage: string;
145
+ description: string;
146
+ };
147
+ placesCategory: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
152
+ objectsCategory: {
153
+ id: string;
154
+ defaultMessage: string;
155
+ description: string;
156
+ };
157
+ symbolsCategory: {
158
+ id: string;
159
+ defaultMessage: string;
160
+ description: string;
161
+ };
162
+ flagsCategory: {
163
+ id: string;
164
+ defaultMessage: string;
165
+ description: string;
166
+ };
167
+ productivityCategory: {
168
+ id: string;
169
+ defaultMessage: string;
170
+ description: string;
171
+ };
172
+ userUploadsCustomCategory: {
173
+ id: string;
174
+ defaultMessage: string;
175
+ description: string;
176
+ };
177
+ allUploadsCustomCategory: {
178
+ id: string;
179
+ defaultMessage: string;
180
+ description: string;
181
+ };
182
+ deleteEmojiFailed: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
187
+ emojiInvalidImage: {
188
+ id: string;
189
+ defaultMessage: string;
190
+ description: string;
191
+ };
192
+ emojiUploadFailed: {
193
+ id: string;
194
+ defaultMessage: string;
195
+ description: string;
196
+ };
197
+ emojiImageTooBig: {
198
+ id: string;
199
+ defaultMessage: string;
200
+ description: string;
201
+ };
202
+ emojiPickerTitle: {
203
+ id: string;
204
+ defaultMessage: string;
205
+ description: string;
206
+ };
207
+ emojiPickerListPanel: {
208
+ id: string;
209
+ defaultMessage: string;
210
+ description: string;
211
+ };
212
+ emojiPickerGrid: {
213
+ id: string;
214
+ defaultMessage: string;
215
+ description: string;
216
+ };
217
+ emojiButtonRoleDescription: {
218
+ id: string;
219
+ defaultMessage: string;
220
+ description: string;
221
+ };
222
+ error: {
223
+ id: string;
224
+ defaultMessage: string;
225
+ description: string;
226
+ };
227
+ };
@@ -0,0 +1,17 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { CategoryDescription, OnCategory } from '../../types';
3
+ import { CategoryGroupKey, CategoryId } from './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.JSX.Element;
17
+ export default CategorySelector;
@@ -0,0 +1,16 @@
1
+ import { CategoryId } from './categories';
2
+ /**
3
+ * Mapping between CategoryId and row
4
+ *
5
+ * Tracks which category is visible based on
6
+ * scrollTop, and virtual rows.
7
+ */
8
+ export default class CategoryTracker {
9
+ private categoryToRow;
10
+ private rowToCategory;
11
+ constructor();
12
+ reset(): void;
13
+ add(category: CategoryId, row: number): void;
14
+ getRow(category: CategoryId): number | undefined;
15
+ getFirstCategory(): CategoryId | undefined;
16
+ }
@@ -0,0 +1,43 @@
1
+ /** @jsx jsx */
2
+ import { ComponentClass, FC } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
5
+ import { EmojiProvider } from '../../api/EmojiResource';
6
+ import { OnEmojiEvent, PickerSize } from '../../types';
7
+ import LoadingEmojiComponent, { Props as LoadingProps, State as LoadingState } from '../common/LoadingEmojiComponent';
8
+ import { PickerRefHandler, Props as ComponentProps } from './EmojiPickerComponent';
9
+ export interface Props extends LoadingProps {
10
+ /**
11
+ * Callback to be executed on emoji selection.
12
+ */
13
+ onSelection?: OnEmojiEvent;
14
+ /**
15
+ * Callback to handle picker reference.
16
+ */
17
+ onPickerRef?: PickerRefHandler;
18
+ /**
19
+ * Flag to disable tone selector.
20
+ */
21
+ hideToneSelector?: boolean;
22
+ /**
23
+ * Size of Emoji Picker. default value is 'medium'.
24
+ */
25
+ size?: PickerSize;
26
+ }
27
+ export declare class EmojiPickerInternal extends LoadingEmojiComponent<Props & WithAnalyticsEventsProps, LoadingState> {
28
+ static AsyncLoadedComponent?: FC<ComponentProps>;
29
+ static defaultProps: {
30
+ size: string;
31
+ };
32
+ state: {
33
+ asyncLoadedComponent: FC<ComponentProps> | undefined;
34
+ };
35
+ constructor(props: Props);
36
+ asyncLoadComponent(): void;
37
+ renderLoading(): JSX.Element | null;
38
+ renderLoaded(loadedEmojiProvider: EmojiProvider, EmojiPickerComponent: ComponentClass<ComponentProps>): jsx.JSX.Element;
39
+ }
40
+ declare const EmojiPicker: import("react").ForwardRefExoticComponent<Pick<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps>, "emojiProvider" | "onSelection" | "onPickerRef" | "hideToneSelector"> & Partial<Pick<Omit<Props & WithAnalyticsEventsProps, keyof WithAnalyticsEventsProps>, "size">> & Partial<Pick<{
41
+ size: string;
42
+ }, never>> & import("react").RefAttributes<any>>;
43
+ export default EmojiPicker;
@@ -0,0 +1,14 @@
1
+ /** @jsx jsx */
2
+ import { FC } from 'react';
3
+ import { CategoryGroupKey } from './categories';
4
+ /**
5
+ * Test id for wrapper Emoji Picker List div
6
+ */
7
+ export declare const RENDER_EMOJI_PICKER_CATEGORY_HEADING_TESTID = "render-emoji-picker-categorty-heading";
8
+ export interface Props {
9
+ id: CategoryGroupKey;
10
+ title: string;
11
+ className?: string;
12
+ }
13
+ declare const EmojiPickerCategoryHeading: FC<Props>;
14
+ export default EmojiPickerCategoryHeading;
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
3
+ import { OnEmojiEvent, PickerSize } from '../../types';
4
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
5
+ export interface PickerRefHandler {
6
+ (ref: any): any;
7
+ }
8
+ export interface Props {
9
+ /**
10
+ * Callback to be executed when user selects an emoji.
11
+ */
12
+ onSelection?: OnEmojiEvent;
13
+ /**
14
+ * Callback performed when picker reference is being set.
15
+ */
16
+ onPickerRef?: PickerRefHandler;
17
+ /**
18
+ * Flag to disable tone selector.
19
+ */
20
+ hideToneSelector?: boolean;
21
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
22
+ size?: PickerSize;
23
+ }
24
+ declare const _default: import("react").MemoExoticComponent<({ onSelection, onPickerRef, hideToneSelector, createAnalyticsEvent, size, }: Props) => jsx.JSX.Element>;
25
+ export default _default;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { EmojiDescription, OnEmojiEvent } from '../../types';
3
+ import { VirtualItem as VirtualItemContext } from '@tanstack/react-virtual';
4
+ import { CategoryGroupKey } from './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").NamedExoticComponent<Props>;
17
+ export default _default;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { jsx } from '@emotion/react';
3
+ import { EmojiDescription } from '../../types';
4
+ export interface Props {
5
+ selectedEmoji?: EmojiDescription;
6
+ }
7
+ export declare const emojiPickerFooterTestId = "emoji-picker-footer";
8
+ declare const _default: import("react").MemoExoticComponent<({ selectedEmoji }: Props) => jsx.JSX.Element>;
9
+ export default _default;
@@ -0,0 +1,94 @@
1
+ /** @jsx jsx */
2
+ import { PureComponent } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { EmojiDescription, EmojiDescriptionWithVariations, Message, OnCategory, OnEmojiEvent, OnToneSelected, OnToneSelectorCancelled, PickerSize, ToneSelection, User } from '../../types';
5
+ import { CategoryId } from './categories';
6
+ import { OnUploadEmoji } from '../common/EmojiUploadPicker';
7
+ import { OnDeleteEmoji } from '../common/EmojiDeletePreview';
8
+ /**
9
+ * Test id for wrapper Emoji Picker List div
10
+ */
11
+ export declare const RENDER_EMOJI_PICKER_LIST_TESTID = "render-emoji-picker-list";
12
+ export interface OnSearch {
13
+ (query: string): void;
14
+ }
15
+ export interface Props {
16
+ emojis: EmojiDescription[];
17
+ currentUser?: User;
18
+ onEmojiSelected?: OnEmojiEvent;
19
+ onEmojiActive?: OnEmojiEvent;
20
+ onEmojiDelete?: OnEmojiEvent;
21
+ onCategoryActivated?: OnCategory;
22
+ selectedTone?: ToneSelection;
23
+ onSearch?: OnSearch;
24
+ loading?: boolean;
25
+ query?: string;
26
+ initialUploadName?: string;
27
+ onToneSelected?: OnToneSelected;
28
+ onToneSelectorCancelled?: OnToneSelectorCancelled;
29
+ toneEmoji?: EmojiDescriptionWithVariations;
30
+ uploading: boolean;
31
+ emojiToDelete?: EmojiDescription;
32
+ uploadErrorMessage?: Message;
33
+ uploadEnabled: boolean;
34
+ onUploadEmoji: OnUploadEmoji;
35
+ onUploadCancelled: () => void;
36
+ onDeleteEmoji: OnDeleteEmoji;
37
+ onCloseDelete: () => void;
38
+ onFileChooserClicked?: () => void;
39
+ onOpenUpload: () => void;
40
+ size?: PickerSize;
41
+ activeCategoryId?: CategoryId | null;
42
+ }
43
+ export interface State {
44
+ }
45
+ export default class EmojiPickerVirtualListInternal extends PureComponent<Props, State> {
46
+ static defaultProps: {
47
+ onEmojiSelected: () => void;
48
+ onEmojiActive: () => void;
49
+ onEmojiDelete: () => void;
50
+ onCategoryActivated: () => void;
51
+ onSearch: () => void;
52
+ size: string;
53
+ };
54
+ private allEmojiGroups;
55
+ private virtualItems;
56
+ private categoryTracker;
57
+ private lastYourUploadsRow;
58
+ private listRef;
59
+ constructor(props: Props);
60
+ UNSAFE_componentWillUpdate(nextProps: Props, nextState: State): void;
61
+ private onEmojiActive;
62
+ private onSearch;
63
+ private findEmojiRowAndColumnById;
64
+ /**
65
+ * Scrolls to a category in the list view
66
+ */
67
+ reveal(category: CategoryId): void;
68
+ scrollToBottom(): void;
69
+ scrollToTop(): void;
70
+ scrollToRow(index?: number): void;
71
+ scrollToRecentlyUploaded(uploadedEmoji: EmojiDescription): void;
72
+ private buildVirtualItemFromGroup;
73
+ private buildVirtualItems;
74
+ private addToCategoryMap;
75
+ private groupByCategory;
76
+ private buildEmojiGroupedByCategory;
77
+ private findCategoryToActivate;
78
+ /**
79
+ * onRowsRendered callback function
80
+ *
81
+ * Check the category of top of rendered row and inform category selector to change active category
82
+ * Rove index of emoji picker list
83
+ */
84
+ private onRowsRendered;
85
+ private rowSize;
86
+ private renderRow;
87
+ /**
88
+ * After deleting emoji, we'll update the focus index to the first emoji of last row of your uploads, so when user navigate back focus will still work
89
+ * if last emoji in your uploads is deleted, the updated focus index will be outdated, as there will be no your uploads section
90
+ * however, it'll trigger onChange from VirtualList, which will update focus index automatically for us
91
+ */
92
+ private handleOnCloseDelete;
93
+ render(): jsx.JSX.Element;
94
+ }
@@ -0,0 +1,11 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { 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-serach";
11
+ export declare const EmojiPickerListSearch: (props: Props) => jsx.JSX.Element;
@@ -0,0 +1,11 @@
1
+ export declare const sizes: {
2
+ listHeight: number;
3
+ listWidth: number;
4
+ searchHeight: number;
5
+ categoryHeadingHeight: number;
6
+ emojiRowHeight: number;
7
+ addEmojiHeight: number;
8
+ loadingRowHeight: number;
9
+ uploadActionHeight: number;
10
+ emojiPerRow: number;
11
+ };
@@ -0,0 +1,33 @@
1
+ /** @jsx jsx */
2
+ import { ReactNode } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { Props as CategoryHeadingProps } from './EmojiPickerCategoryHeading';
5
+ import { Props as EmojiRowProps } from './EmojiPickerEmojiRow';
6
+ import { VirtualItem as VirtualItemContext } from '@tanstack/react-virtual';
7
+ export interface RenderItem {
8
+ (context?: VirtualItemContext): ReactNode;
9
+ }
10
+ export interface VirtualItem<P> {
11
+ height: number;
12
+ props: P;
13
+ renderItem: RenderItem;
14
+ }
15
+ export declare abstract class AbstractItem<P> implements VirtualItem<P> {
16
+ readonly height: number;
17
+ readonly props: P;
18
+ constructor(props: P, height: number);
19
+ abstract renderItem: RenderItem;
20
+ }
21
+ export declare class EmojisRowItem extends AbstractItem<EmojiRowProps> {
22
+ constructor(props: EmojiRowProps);
23
+ renderItem: (context?: VirtualItemContext) => jsx.JSX.Element;
24
+ }
25
+ export declare class LoadingItem extends AbstractItem<{}> {
26
+ constructor();
27
+ renderItem: () => jsx.JSX.Element;
28
+ }
29
+ export declare class CategoryHeadingItem extends AbstractItem<CategoryHeadingProps> {
30
+ constructor(props: CategoryHeadingProps);
31
+ renderItem: () => jsx.JSX.Element;
32
+ }
33
+ export declare const virtualItemRenderer: (rows: VirtualItem<CategoryHeadingProps | EmojiRowProps | {}>[], context: VirtualItemContext) => jsx.JSX.Element;