@atlaskit/emoji 71.17.0 → 72.0.0
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 +52 -0
- package/dist/cjs/api/EmojiLoader.js +4 -3
- package/dist/cjs/api/EmojiRepository.js +25 -24
- package/dist/cjs/api/EmojiResource.js +31 -30
- package/dist/cjs/api/EmojiUtils.js +72 -167
- package/dist/cjs/api/calculateScale.js +34 -0
- package/dist/cjs/api/denormaliseEmojiServiceResponse.js +43 -0
- package/dist/cjs/api/denormaliseServiceAltRepresentation.js +11 -0
- package/dist/cjs/api/denormaliseServiceRepresentation.js +50 -0
- package/dist/cjs/api/denormaliseSkinEmoji.js +31 -0
- package/dist/cjs/api/denormaliseStandardRepresentation.js +17 -0
- package/dist/cjs/api/emojiRequest.js +32 -0
- package/dist/cjs/api/getAltRepresentation.js +12 -0
- package/dist/cjs/api/getEmojiVariation.js +19 -0
- package/dist/cjs/api/getPixelRatio.js +12 -0
- package/dist/cjs/api/internal/AlphabeticalShortnameComparator.js +25 -0
- package/dist/cjs/api/internal/AsciiMatchComparator.js +32 -0
- package/dist/cjs/api/internal/ChainedEmojiComparator.js +37 -0
- package/dist/cjs/api/internal/Comparators.js +1 -275
- package/dist/cjs/api/internal/EmojiTypeComparator.js +40 -0
- package/dist/cjs/api/internal/ExactShortNameMatchComparator.js +34 -0
- package/dist/cjs/api/internal/Gateway.js +52 -0
- package/dist/cjs/api/internal/OrderComparator.js +28 -0
- package/dist/cjs/api/internal/QueryStringPositionMatchComparator.js +43 -0
- package/dist/cjs/api/internal/UsageFrequencyComparator.js +59 -0
- package/dist/cjs/api/internal/UsageFrequencyTracker.js +7 -49
- package/dist/cjs/api/internal/createSearchEmojiComparator.js +46 -0
- package/dist/cjs/api/internal/createUsageOnlyEmojiComparator.js +15 -0
- package/dist/cjs/api/isMediaApiUrl.js +9 -0
- package/dist/cjs/api/media/BrowserCacheStrategy.js +87 -0
- package/dist/cjs/api/media/MediaEmojiCache.js +24 -148
- package/dist/cjs/api/media/MemoryCacheStrategy.js +67 -0
- package/dist/cjs/api/media/SiteEmojiResource.js +21 -15
- package/dist/cjs/api/media/getRequiredRepresentation.js +9 -0
- package/dist/cjs/api/shouldUseAltRepresentation.js +13 -0
- package/dist/cjs/api/supportsUploadFeature.js +17 -0
- package/dist/cjs/components/common/AddOwnEmoji.compiled.css +6 -0
- package/dist/cjs/components/common/AddOwnEmoji.js +62 -0
- package/dist/cjs/components/common/CachingEmoji.js +15 -93
- package/dist/cjs/components/common/CachingMediaEmoji.js +95 -0
- package/dist/cjs/components/common/CreateEmojiWithRovo.js +6 -4
- package/dist/cjs/components/common/DeletableEmojiTooltipContent.js +2 -14
- package/dist/cjs/components/common/DeletableEmojiTooltipContentForScreenReader.js +22 -0
- package/dist/cjs/components/common/Emoji.js +32 -374
- package/dist/cjs/components/common/EmojiActions.compiled.css +0 -6
- package/dist/cjs/components/common/EmojiActions.js +15 -69
- package/dist/cjs/components/common/EmojiPlaceholder.js +14 -6
- package/dist/cjs/components/common/ImageEmoji.js +198 -0
- package/dist/cjs/components/common/RecordSelectionDefault.js +10 -8
- package/dist/cjs/components/common/ResourcedEmoji.js +7 -6
- package/dist/cjs/components/common/ResourcedEmojiComponent.js +21 -19
- package/dist/cjs/components/common/SpriteEmoji.js +66 -0
- package/dist/cjs/components/common/ToneSelector.js +8 -134
- package/dist/cjs/components/common/ToneSelectorInternal.js +142 -0
- package/dist/cjs/components/common/ToolTipContentWithKeymap.js +2 -2
- package/dist/cjs/components/common/UnicodeEmoji.js +137 -0
- package/dist/cjs/components/common/UploadEmoji.js +9 -8
- package/dist/cjs/components/common/emojiPlaceholderTestId.js +14 -0
- package/dist/cjs/components/common/handleDelete.js +19 -0
- package/dist/cjs/components/common/isRefreshEmojiPickerEnabled.js +22 -0
- package/dist/cjs/components/picker/AbstractItem.js +14 -0
- package/dist/cjs/components/picker/CategoryHeadingItem.js +36 -0
- package/dist/cjs/components/picker/CategorySelector.js +10 -16
- package/dist/cjs/components/picker/EmojiPicker.js +48 -110
- package/dist/cjs/components/picker/EmojiPickerCategoryHeading.js +3 -3
- package/dist/cjs/components/picker/EmojiPickerComponent.js +58 -42
- package/dist/cjs/components/picker/EmojiPickerInternal.js +99 -0
- package/dist/cjs/components/picker/EmojiPickerList.js +35 -30
- package/dist/cjs/components/picker/EmojiPickerVirtualItems.js +1 -95
- package/dist/cjs/components/picker/EmojisRowItem.js +39 -0
- package/dist/cjs/components/picker/LoadingItem.js +42 -0
- package/dist/cjs/components/picker/NoResultsItem.js +36 -0
- package/dist/cjs/components/picker/categorySelectorCategoryTestId.js +14 -0
- package/dist/cjs/components/picker/{utils.js → emojiPickerHeightOffset.js} +1 -7
- package/dist/cjs/components/picker/emojiPickerLoader.js +17 -0
- package/dist/cjs/components/picker/emojiPickerModuleLoader.js +19 -0
- package/dist/cjs/components/picker/preloadEmojiPicker.js +18 -0
- package/dist/cjs/components/picker/scrollToRow.js +11 -0
- package/dist/cjs/components/picker/sortCategories.js +15 -0
- package/dist/cjs/components/picker/sortCategoriesNew.js +15 -0
- package/dist/cjs/components/picker/virtualItemRenderer.js +19 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadComponent.js +11 -8
- package/dist/cjs/components/typeahead/EmojiTypeAheadItem.js +17 -53
- package/dist/cjs/components/typeahead/EmojiTypeAheadItemInternal.js +58 -0
- package/dist/cjs/components/typeahead/EmojiTypeAheadList.js +7 -6
- package/dist/cjs/components/uploader/EmojiUploadComponent.js +11 -8
- package/dist/cjs/components/uploader/EmojiUploader.js +16 -63
- package/dist/cjs/components/uploader/EmojiUploaderInternal.js +66 -0
- package/dist/cjs/index.js +21 -18
- package/dist/cjs/util/actual-mouse-move.js +14 -0
- package/dist/cjs/util/analytics/Attributes.js +1 -0
- package/dist/cjs/util/analytics/CommonAttributes.js +1 -0
- package/dist/cjs/util/analytics/Duration.js +1 -0
- package/dist/cjs/util/analytics/aiGenerationCompletedEvent.js +12 -0
- package/dist/cjs/util/analytics/aiGenerationFailedEvent.js +12 -0
- package/dist/cjs/util/analytics/aiGenerationStartedEvent.js +15 -0
- package/dist/cjs/util/analytics/analytics.js +422 -228
- package/dist/cjs/util/analytics/categoryClickedEvent.js +12 -0
- package/dist/cjs/util/analytics/clearSampled.js +24 -0
- package/dist/cjs/util/analytics/closedPickerEvent.js +12 -0
- package/dist/cjs/util/analytics/createEvent.js +25 -0
- package/dist/cjs/util/analytics/deleteBeginEvent.js +12 -0
- package/dist/cjs/util/analytics/deleteCancelEvent.js +12 -0
- package/dist/cjs/util/analytics/deleteConfirmEvent.js +12 -0
- package/dist/cjs/util/analytics/emojiPickerEvent.js +12 -0
- package/dist/cjs/util/analytics/emojiUploaderEvent.js +10 -0
- package/dist/cjs/util/analytics/extractCommonAttributes.js +15 -0
- package/dist/cjs/util/analytics/extractErrorInfo.js +20 -0
- package/dist/cjs/util/analytics/getSkinTone.js +35 -0
- package/dist/cjs/util/analytics/hasUfoMarked.js +11 -0
- package/dist/cjs/util/analytics/isExperienceSampled.js +23 -0
- package/dist/cjs/util/analytics/openedPickerEvent.js +12 -0
- package/dist/cjs/util/analytics/pickerClickedEvent.js +15 -0
- package/dist/cjs/util/analytics/pickerSearchedEvent.js +12 -0
- package/dist/cjs/util/analytics/recordFailed.js +12 -0
- package/dist/cjs/util/analytics/recordFailedEmoji.js +19 -0
- package/dist/cjs/util/analytics/recordSelectionFailedSli.js +20 -0
- package/dist/cjs/util/analytics/recordSelectionSucceededSli.js +19 -0
- package/dist/cjs/util/analytics/recordSucceeded.js +12 -0
- package/dist/cjs/util/analytics/recordSucceededEmoji.js +19 -0
- package/dist/cjs/util/analytics/sampledUfoEmojiResourceFetched.js +11 -0
- package/dist/cjs/util/analytics/sampledUfoRenderedEmoji.js +11 -0
- package/dist/cjs/util/analytics/samplingUfo.js +30 -204
- package/dist/cjs/util/analytics/selectedFileEvent.js +12 -0
- package/dist/cjs/util/analytics/skinTones.js +22 -0
- package/dist/cjs/util/analytics/skintoneSelectorEvent.js +11 -0
- package/dist/cjs/util/analytics/toneSelectedEvent.js +12 -0
- package/dist/cjs/util/analytics/toneSelectorClosedEvent.js +12 -0
- package/dist/cjs/util/analytics/toneSelectorOpenedEvent.js +12 -0
- package/dist/cjs/util/analytics/typeaheadCancelledEvent.js +17 -0
- package/dist/cjs/util/analytics/typeaheadRenderedEvent.js +17 -0
- package/dist/cjs/util/analytics/typeaheadSelectedEvent.js +31 -0
- package/dist/cjs/util/analytics/ufoExperiences.js +37 -14
- package/dist/cjs/util/analytics/uploadBeginButton.js +12 -0
- package/dist/cjs/util/analytics/uploadCancelButton.js +12 -0
- package/dist/cjs/util/analytics/uploadConfirmButton.js +12 -0
- package/dist/cjs/util/analytics/uploadFailedEvent.js +12 -0
- package/dist/cjs/util/analytics/uploadSucceededEvent.js +12 -0
- package/dist/cjs/util/analytics/useSampledUFOComponentExperience.js +3 -3
- package/dist/cjs/util/analytics/withSampling.js +182 -0
- package/dist/cjs/util/build-emoji-description-with-alt-representation.js +19 -0
- package/dist/cjs/util/contains-emoji-id.js +18 -0
- package/dist/cjs/util/convert-image-to-media-representation.js +13 -0
- package/dist/cjs/util/convert-media-to-image-emoji.js +28 -0
- package/dist/cjs/util/convert-media-to-image-representation.js +13 -0
- package/dist/cjs/util/filter-hidden-emojis.js +12 -0
- package/dist/cjs/util/filters.js +2 -5
- package/dist/cjs/util/format-shortcut.js +30 -0
- package/dist/cjs/util/get-category-id.js +9 -0
- package/dist/cjs/util/get-tone-emoji.js +10 -0
- package/dist/cjs/util/has-data-url-image.js +11 -0
- package/dist/cjs/util/is-emoji-description-with-variations.js +9 -0
- package/dist/cjs/util/is-emoji-description.js +9 -0
- package/dist/cjs/util/is-emoji-id-equal.js +9 -0
- package/dist/cjs/util/is-emoji-variation-description.js +9 -0
- package/dist/cjs/util/{hidden-emojis.js → is-hidden-emoji.js} +1 -6
- package/dist/cjs/util/is-image-representation.js +9 -0
- package/dist/cjs/util/is-loaded-media-emoji.js +11 -0
- package/dist/cjs/util/is-media-emoji.js +10 -0
- package/dist/cjs/util/is-media-representation.js +9 -0
- package/dist/cjs/util/is-messages-key.js +10 -0
- package/dist/cjs/util/is-promise.js +9 -0
- package/dist/cjs/util/is-sprite-representation.js +9 -0
- package/dist/cjs/util/is-sprite-service-representation.js +9 -0
- package/dist/cjs/util/is-unicode-representation.js +9 -0
- package/dist/cjs/util/keymaps.js +3 -37
- package/dist/cjs/util/left-click.js +9 -0
- package/dist/cjs/util/make-key-map-with-common.js +16 -0
- package/dist/cjs/util/make-keymap.js +18 -0
- package/dist/cjs/util/mouse-location.js +12 -0
- package/dist/cjs/util/mouse.js +1 -26
- package/dist/cjs/util/to-emoji-id.js +13 -0
- package/dist/cjs/util/to-optional-emoji-id.js +13 -0
- package/dist/cjs/util/type-helpers.js +154 -115
- package/dist/cjs/utils.js +6 -5
- package/dist/es2019/admin.js +4 -0
- package/dist/es2019/api/EmojiLoader.js +2 -1
- package/dist/es2019/api/EmojiRepository.js +14 -18
- package/dist/es2019/api/EmojiResource.js +15 -17
- package/dist/es2019/api/EmojiUtils.js +43 -166
- package/dist/es2019/api/calculateScale.js +28 -0
- package/dist/es2019/api/denormaliseEmojiServiceResponse.js +35 -0
- package/dist/es2019/api/denormaliseServiceAltRepresentation.js +5 -0
- package/dist/es2019/api/denormaliseServiceRepresentation.js +46 -0
- package/dist/es2019/api/denormaliseSkinEmoji.js +22 -0
- package/dist/es2019/api/denormaliseStandardRepresentation.js +11 -0
- package/dist/es2019/api/emojiRequest.js +23 -0
- package/dist/es2019/api/getAltRepresentation.js +6 -0
- package/dist/es2019/api/getEmojiVariation.js +13 -0
- package/dist/es2019/api/getPixelRatio.js +6 -0
- package/dist/es2019/api/internal/AlphabeticalShortnameComparator.js +9 -0
- package/dist/es2019/api/internal/AsciiMatchComparator.js +19 -0
- package/dist/es2019/api/internal/ChainedEmojiComparator.js +21 -0
- package/dist/es2019/api/internal/Comparators.js +1 -222
- package/dist/es2019/api/internal/EmojiTypeComparator.js +25 -0
- package/dist/es2019/api/internal/ExactShortNameMatchComparator.js +22 -0
- package/dist/es2019/api/internal/Gateway.js +36 -0
- package/dist/es2019/api/internal/OrderComparator.js +12 -0
- package/dist/es2019/api/internal/QueryStringPositionMatchComparator.js +28 -0
- package/dist/es2019/api/internal/UsageFrequencyComparator.js +41 -0
- package/dist/es2019/api/internal/UsageFrequencyTracker.js +4 -39
- package/dist/es2019/api/internal/createSearchEmojiComparator.js +39 -0
- package/dist/es2019/api/internal/createUsageOnlyEmojiComparator.js +9 -0
- package/dist/es2019/api/isMediaApiUrl.js +1 -0
- package/dist/es2019/api/media/BrowserCacheStrategy.js +66 -0
- package/dist/es2019/api/media/MediaEmojiCache.js +8 -114
- package/dist/es2019/api/media/MemoryCacheStrategy.js +54 -0
- package/dist/es2019/api/media/SiteEmojiResource.js +10 -4
- package/dist/es2019/api/media/getRequiredRepresentation.js +1 -0
- package/dist/es2019/api/shouldUseAltRepresentation.js +3 -0
- package/dist/es2019/api/supportsUploadFeature.js +11 -0
- package/dist/es2019/components/common/AddOwnEmoji.compiled.css +6 -0
- package/dist/es2019/components/common/AddOwnEmoji.js +53 -0
- package/dist/es2019/components/common/CachingEmoji.js +7 -84
- package/dist/es2019/components/common/CachingMediaEmoji.js +84 -0
- package/dist/es2019/components/common/CreateEmojiWithRovo.js +3 -1
- package/dist/es2019/components/common/DeletableEmojiTooltipContent.js +2 -15
- package/dist/es2019/components/common/DeletableEmojiTooltipContentForScreenReader.js +16 -0
- package/dist/es2019/components/common/Emoji.js +16 -353
- package/dist/es2019/components/common/EmojiActions.compiled.css +0 -6
- package/dist/es2019/components/common/EmojiActions.js +9 -63
- package/dist/es2019/components/common/EmojiPlaceholder.js +8 -2
- package/dist/es2019/components/common/ImageEmoji.js +181 -0
- package/dist/es2019/components/common/RecordSelectionDefault.js +4 -2
- package/dist/es2019/components/common/ResourcedEmoji.js +3 -2
- package/dist/es2019/components/common/ResourcedEmojiComponent.js +10 -8
- package/dist/es2019/components/common/SpriteEmoji.js +58 -0
- package/dist/es2019/components/common/ToneSelector.js +8 -127
- package/dist/es2019/components/common/ToneSelectorInternal.js +129 -0
- package/dist/es2019/components/common/ToolTipContentWithKeymap.js +1 -1
- package/dist/es2019/components/common/UnicodeEmoji.js +125 -0
- package/dist/es2019/components/common/UploadEmoji.js +5 -4
- package/dist/es2019/components/common/emojiPlaceholderTestId.js +6 -0
- package/dist/es2019/components/common/handleDelete.js +15 -0
- package/dist/es2019/components/common/isRefreshEmojiPickerEnabled.js +15 -0
- package/dist/es2019/components/picker/AbstractItem.js +6 -0
- package/dist/es2019/components/picker/CategoryHeadingItem.js +13 -0
- package/dist/es2019/components/picker/CategorySelector.js +6 -6
- package/dist/es2019/components/picker/EmojiPicker.js +25 -78
- package/dist/es2019/components/picker/EmojiPickerCategoryHeading.js +2 -2
- package/dist/es2019/components/picker/EmojiPickerComponent.js +33 -17
- package/dist/es2019/components/picker/EmojiPickerInternal.js +71 -0
- package/dist/es2019/components/picker/EmojiPickerList.js +13 -8
- package/dist/es2019/components/picker/EmojiPickerVirtualItems.js +1 -58
- package/dist/es2019/components/picker/EmojisRowItem.js +16 -0
- package/dist/es2019/components/picker/LoadingItem.js +19 -0
- package/dist/es2019/components/picker/NoResultsItem.js +13 -0
- package/dist/es2019/components/picker/categorySelectorCategoryTestId.js +6 -0
- package/dist/es2019/components/picker/emojiPickerHeightOffset.js +9 -0
- package/dist/es2019/components/picker/emojiPickerLoader.js +7 -0
- package/dist/es2019/components/picker/emojiPickerModuleLoader.js +6 -0
- package/dist/es2019/components/picker/preloadEmojiPicker.js +12 -0
- package/dist/es2019/components/picker/{utils.js → scrollToRow.js} +0 -10
- package/dist/es2019/components/picker/sortCategories.js +7 -0
- package/dist/es2019/components/picker/sortCategoriesNew.js +7 -0
- package/dist/es2019/components/picker/virtualItemRenderer.js +13 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadComponent.js +5 -2
- package/dist/es2019/components/typeahead/EmojiTypeAheadItem.js +11 -49
- package/dist/es2019/components/typeahead/EmojiTypeAheadItemInternal.js +50 -0
- package/dist/es2019/components/typeahead/EmojiTypeAheadList.js +4 -3
- package/dist/es2019/components/uploader/EmojiUploadComponent.js +6 -3
- package/dist/es2019/components/uploader/EmojiUploader.js +10 -33
- package/dist/es2019/components/uploader/EmojiUploaderInternal.js +31 -0
- package/dist/es2019/element.js +10 -0
- package/dist/es2019/index.js +12 -8
- package/dist/es2019/picker.js +4 -0
- package/dist/es2019/resource.js +18 -0
- package/dist/es2019/typeahead.js +7 -0
- package/dist/es2019/util/actual-mouse-move.js +8 -0
- package/dist/es2019/util/analytics/Attributes.js +0 -0
- package/dist/es2019/util/analytics/CommonAttributes.js +0 -0
- package/dist/es2019/util/analytics/Duration.js +0 -0
- package/dist/es2019/util/analytics/aiGenerationCompletedEvent.js +4 -0
- package/dist/es2019/util/analytics/aiGenerationFailedEvent.js +4 -0
- package/dist/es2019/util/analytics/aiGenerationStartedEvent.js +5 -0
- package/dist/es2019/util/analytics/analytics.js +157 -155
- package/dist/es2019/util/analytics/categoryClickedEvent.js +4 -0
- package/dist/es2019/util/analytics/clearSampled.js +6 -0
- package/dist/es2019/util/analytics/closedPickerEvent.js +4 -0
- package/dist/es2019/util/analytics/createEvent.js +13 -0
- package/dist/es2019/util/analytics/deleteBeginEvent.js +4 -0
- package/dist/es2019/util/analytics/deleteCancelEvent.js +4 -0
- package/dist/es2019/util/analytics/deleteConfirmEvent.js +4 -0
- package/dist/es2019/util/analytics/emojiPickerEvent.js +2 -0
- package/dist/es2019/util/analytics/emojiUploaderEvent.js +2 -0
- package/dist/es2019/util/analytics/extractCommonAttributes.js +7 -0
- package/dist/es2019/util/analytics/extractErrorInfo.js +14 -0
- package/dist/es2019/util/analytics/getSkinTone.js +18 -0
- package/dist/es2019/util/analytics/hasUfoMarked.js +3 -0
- package/dist/es2019/util/analytics/isExperienceSampled.js +17 -0
- package/dist/es2019/util/analytics/openedPickerEvent.js +4 -0
- package/dist/es2019/util/analytics/pickerClickedEvent.js +8 -0
- package/dist/es2019/util/analytics/pickerSearchedEvent.js +4 -0
- package/dist/es2019/util/analytics/recordFailed.js +6 -0
- package/dist/es2019/util/analytics/recordFailedEmoji.js +11 -0
- package/dist/es2019/util/analytics/recordSelectionFailedSli.js +12 -0
- package/dist/es2019/util/analytics/recordSelectionSucceededSli.js +11 -0
- package/dist/es2019/util/analytics/recordSucceeded.js +6 -0
- package/dist/es2019/util/analytics/recordSucceededEmoji.js +11 -0
- package/dist/es2019/util/analytics/sampledUfoEmojiResourceFetched.js +5 -0
- package/dist/es2019/util/analytics/sampledUfoRenderedEmoji.js +5 -0
- package/dist/es2019/util/analytics/samplingUfo.js +10 -121
- package/dist/es2019/util/analytics/selectedFileEvent.js +4 -0
- package/dist/es2019/util/analytics/skinTones.js +16 -0
- package/dist/es2019/util/analytics/skintoneSelectorEvent.js +2 -0
- package/dist/es2019/util/analytics/toneSelectedEvent.js +4 -0
- package/dist/es2019/util/analytics/toneSelectorClosedEvent.js +4 -0
- package/dist/es2019/util/analytics/toneSelectorOpenedEvent.js +4 -0
- package/dist/es2019/util/analytics/typeaheadCancelledEvent.js +8 -0
- package/dist/es2019/util/analytics/typeaheadRenderedEvent.js +8 -0
- package/dist/es2019/util/analytics/typeaheadSelectedEvent.js +20 -0
- package/dist/es2019/util/analytics/ufoExperiences.js +15 -11
- package/dist/es2019/util/analytics/uploadBeginButton.js +4 -0
- package/dist/es2019/util/analytics/uploadCancelButton.js +4 -0
- package/dist/es2019/util/analytics/uploadConfirmButton.js +4 -0
- package/dist/es2019/util/analytics/uploadFailedEvent.js +4 -0
- package/dist/es2019/util/analytics/uploadSucceededEvent.js +4 -0
- package/dist/es2019/util/analytics/useSampledUFOComponentExperience.js +1 -1
- package/dist/es2019/util/analytics/withSampling.js +104 -0
- package/dist/es2019/util/build-emoji-description-with-alt-representation.js +10 -0
- package/dist/es2019/util/contains-emoji-id.js +12 -0
- package/dist/es2019/util/convert-image-to-media-representation.js +5 -0
- package/dist/es2019/util/convert-media-to-image-emoji.js +19 -0
- package/dist/es2019/util/convert-media-to-image-representation.js +5 -0
- package/dist/es2019/util/filter-hidden-emojis.js +2 -0
- package/dist/es2019/util/filters.js +1 -2
- package/dist/es2019/util/format-shortcut.js +23 -0
- package/dist/es2019/util/get-category-id.js +1 -0
- package/dist/es2019/util/get-tone-emoji.js +2 -0
- package/dist/es2019/util/has-data-url-image.js +3 -0
- package/dist/es2019/util/is-emoji-description-with-variations.js +1 -0
- package/dist/es2019/util/is-emoji-description.js +1 -0
- package/dist/es2019/util/is-emoji-id-equal.js +1 -0
- package/dist/es2019/util/is-emoji-variation-description.js +3 -0
- package/dist/es2019/util/{hidden-emojis.js → is-hidden-emoji.js} +1 -2
- package/dist/es2019/util/is-image-representation.js +1 -0
- package/dist/es2019/util/is-loaded-media-emoji.js +3 -0
- package/dist/es2019/util/is-media-emoji.js +2 -0
- package/dist/es2019/util/is-media-representation.js +1 -0
- package/dist/es2019/util/is-messages-key.js +2 -0
- package/dist/es2019/util/is-promise.js +1 -0
- package/dist/es2019/util/is-sprite-representation.js +1 -0
- package/dist/es2019/util/is-sprite-service-representation.js +1 -0
- package/dist/es2019/util/is-unicode-representation.js +1 -0
- package/dist/es2019/util/keymaps.js +2 -32
- package/dist/es2019/util/left-click.js +3 -0
- package/dist/es2019/util/make-key-map-with-common.js +10 -0
- package/dist/es2019/util/make-keymap.js +12 -0
- package/dist/es2019/util/mouse-location.js +6 -0
- package/dist/es2019/util/mouse.js +0 -18
- package/dist/es2019/util/to-emoji-id.js +5 -0
- package/dist/es2019/util/to-optional-emoji-id.js +7 -0
- package/dist/es2019/util/type-helpers.js +89 -78
- package/dist/es2019/utils.js +16 -2
- package/dist/esm/admin.js +4 -0
- package/dist/esm/api/EmojiLoader.js +2 -1
- package/dist/esm/api/EmojiRepository.js +14 -18
- package/dist/esm/api/EmojiResource.js +14 -17
- package/dist/esm/api/EmojiUtils.js +43 -167
- package/dist/esm/api/calculateScale.js +28 -0
- package/dist/esm/api/denormaliseEmojiServiceResponse.js +37 -0
- package/dist/esm/api/denormaliseServiceAltRepresentation.js +5 -0
- package/dist/esm/api/denormaliseServiceRepresentation.js +43 -0
- package/dist/esm/api/denormaliseSkinEmoji.js +24 -0
- package/dist/esm/api/denormaliseStandardRepresentation.js +11 -0
- package/dist/esm/api/emojiRequest.js +25 -0
- package/dist/esm/api/getAltRepresentation.js +6 -0
- package/dist/esm/api/getEmojiVariation.js +13 -0
- package/dist/esm/api/getPixelRatio.js +6 -0
- package/dist/esm/api/internal/AlphabeticalShortnameComparator.js +18 -0
- package/dist/esm/api/internal/AsciiMatchComparator.js +25 -0
- package/dist/esm/api/internal/ChainedEmojiComparator.js +30 -0
- package/dist/esm/api/internal/Comparators.js +1 -275
- package/dist/esm/api/internal/EmojiTypeComparator.js +33 -0
- package/dist/esm/api/internal/ExactShortNameMatchComparator.js +28 -0
- package/dist/esm/api/internal/Gateway.js +45 -0
- package/dist/esm/api/internal/OrderComparator.js +21 -0
- package/dist/esm/api/internal/QueryStringPositionMatchComparator.js +36 -0
- package/dist/esm/api/internal/UsageFrequencyComparator.js +52 -0
- package/dist/esm/api/internal/UsageFrequencyTracker.js +4 -46
- package/dist/esm/api/internal/createSearchEmojiComparator.js +40 -0
- package/dist/esm/api/internal/createUsageOnlyEmojiComparator.js +9 -0
- package/dist/esm/api/isMediaApiUrl.js +3 -0
- package/dist/esm/api/media/BrowserCacheStrategy.js +80 -0
- package/dist/esm/api/media/MediaEmojiCache.js +18 -143
- package/dist/esm/api/media/MemoryCacheStrategy.js +61 -0
- package/dist/esm/api/media/SiteEmojiResource.js +10 -4
- package/dist/esm/api/media/getRequiredRepresentation.js +3 -0
- package/dist/esm/api/shouldUseAltRepresentation.js +7 -0
- package/dist/esm/api/supportsUploadFeature.js +11 -0
- package/dist/esm/components/common/AddOwnEmoji.compiled.css +6 -0
- package/dist/esm/components/common/AddOwnEmoji.js +53 -0
- package/dist/esm/components/common/CachingEmoji.js +8 -87
- package/dist/esm/components/common/CachingMediaEmoji.js +88 -0
- package/dist/esm/components/common/CreateEmojiWithRovo.js +3 -1
- package/dist/esm/components/common/DeletableEmojiTooltipContent.js +2 -14
- package/dist/esm/components/common/DeletableEmojiTooltipContentForScreenReader.js +15 -0
- package/dist/esm/components/common/Emoji.js +17 -359
- package/dist/esm/components/common/EmojiActions.compiled.css +0 -6
- package/dist/esm/components/common/EmojiActions.js +9 -63
- package/dist/esm/components/common/EmojiPlaceholder.js +8 -4
- package/dist/esm/components/common/ImageEmoji.js +189 -0
- package/dist/esm/components/common/RecordSelectionDefault.js +4 -2
- package/dist/esm/components/common/ResourcedEmoji.js +3 -2
- package/dist/esm/components/common/ResourcedEmojiComponent.js +10 -8
- package/dist/esm/components/common/SpriteEmoji.js +58 -0
- package/dist/esm/components/common/ToneSelector.js +8 -131
- package/dist/esm/components/common/ToneSelectorInternal.js +133 -0
- package/dist/esm/components/common/ToolTipContentWithKeymap.js +1 -1
- package/dist/esm/components/common/UnicodeEmoji.js +128 -0
- package/dist/esm/components/common/UploadEmoji.js +5 -4
- package/dist/esm/components/common/emojiPlaceholderTestId.js +8 -0
- package/dist/esm/components/common/handleDelete.js +13 -0
- package/dist/esm/components/common/isRefreshEmojiPickerEnabled.js +15 -0
- package/dist/esm/components/picker/AbstractItem.js +7 -0
- package/dist/esm/components/picker/CategoryHeadingItem.js +27 -0
- package/dist/esm/components/picker/CategorySelector.js +6 -12
- package/dist/esm/components/picker/EmojiPicker.js +25 -105
- package/dist/esm/components/picker/EmojiPickerCategoryHeading.js +2 -2
- package/dist/esm/components/picker/EmojiPickerComponent.js +33 -17
- package/dist/esm/components/picker/EmojiPickerInternal.js +92 -0
- package/dist/esm/components/picker/EmojiPickerList.js +13 -8
- package/dist/esm/components/picker/EmojiPickerVirtualItems.js +1 -90
- package/dist/esm/components/picker/EmojisRowItem.js +30 -0
- package/dist/esm/components/picker/LoadingItem.js +33 -0
- package/dist/esm/components/picker/NoResultsItem.js +27 -0
- package/dist/esm/components/picker/categorySelectorCategoryTestId.js +8 -0
- package/dist/esm/components/picker/emojiPickerHeightOffset.js +9 -0
- package/dist/esm/components/picker/emojiPickerLoader.js +11 -0
- package/dist/esm/components/picker/emojiPickerModuleLoader.js +8 -0
- package/dist/esm/components/picker/preloadEmojiPicker.js +12 -0
- package/dist/esm/components/picker/{utils.js → scrollToRow.js} +0 -10
- package/dist/esm/components/picker/sortCategories.js +9 -0
- package/dist/esm/components/picker/sortCategoriesNew.js +9 -0
- package/dist/esm/components/picker/virtualItemRenderer.js +11 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadComponent.js +5 -2
- package/dist/esm/components/typeahead/EmojiTypeAheadItem.js +11 -50
- package/dist/esm/components/typeahead/EmojiTypeAheadItemInternal.js +51 -0
- package/dist/esm/components/typeahead/EmojiTypeAheadList.js +4 -3
- package/dist/esm/components/uploader/EmojiUploadComponent.js +6 -3
- package/dist/esm/components/uploader/EmojiUploader.js +10 -57
- package/dist/esm/components/uploader/EmojiUploaderInternal.js +55 -0
- package/dist/esm/element.js +10 -0
- package/dist/esm/index.js +12 -8
- package/dist/esm/picker.js +4 -0
- package/dist/esm/resource.js +18 -0
- package/dist/esm/typeahead.js +7 -0
- package/dist/esm/util/actual-mouse-move.js +8 -0
- package/dist/esm/util/analytics/Attributes.js +0 -0
- package/dist/esm/util/analytics/CommonAttributes.js +0 -0
- package/dist/esm/util/analytics/Duration.js +0 -0
- package/dist/esm/util/analytics/aiGenerationCompletedEvent.js +6 -0
- package/dist/esm/util/analytics/aiGenerationFailedEvent.js +6 -0
- package/dist/esm/util/analytics/aiGenerationStartedEvent.js +9 -0
- package/dist/esm/util/analytics/analytics.js +157 -223
- package/dist/esm/util/analytics/categoryClickedEvent.js +6 -0
- package/dist/esm/util/analytics/clearSampled.js +18 -0
- package/dist/esm/util/analytics/closedPickerEvent.js +6 -0
- package/dist/esm/util/analytics/createEvent.js +18 -0
- package/dist/esm/util/analytics/deleteBeginEvent.js +6 -0
- package/dist/esm/util/analytics/deleteCancelEvent.js +6 -0
- package/dist/esm/util/analytics/deleteConfirmEvent.js +6 -0
- package/dist/esm/util/analytics/emojiPickerEvent.js +6 -0
- package/dist/esm/util/analytics/emojiUploaderEvent.js +4 -0
- package/dist/esm/util/analytics/extractCommonAttributes.js +9 -0
- package/dist/esm/util/analytics/extractErrorInfo.js +14 -0
- package/dist/esm/util/analytics/getSkinTone.js +29 -0
- package/dist/esm/util/analytics/hasUfoMarked.js +5 -0
- package/dist/esm/util/analytics/isExperienceSampled.js +17 -0
- package/dist/esm/util/analytics/openedPickerEvent.js +6 -0
- package/dist/esm/util/analytics/pickerClickedEvent.js +10 -0
- package/dist/esm/util/analytics/pickerSearchedEvent.js +6 -0
- package/dist/esm/util/analytics/recordFailed.js +6 -0
- package/dist/esm/util/analytics/recordFailedEmoji.js +13 -0
- package/dist/esm/util/analytics/recordSelectionFailedSli.js +14 -0
- package/dist/esm/util/analytics/recordSelectionSucceededSli.js +13 -0
- package/dist/esm/util/analytics/recordSucceeded.js +6 -0
- package/dist/esm/util/analytics/recordSucceededEmoji.js +13 -0
- package/dist/esm/util/analytics/sampledUfoEmojiResourceFetched.js +5 -0
- package/dist/esm/util/analytics/sampledUfoRenderedEmoji.js +5 -0
- package/dist/esm/util/analytics/samplingUfo.js +10 -204
- package/dist/esm/util/analytics/selectedFileEvent.js +6 -0
- package/dist/esm/util/analytics/skinTones.js +16 -0
- package/dist/esm/util/analytics/skintoneSelectorEvent.js +5 -0
- package/dist/esm/util/analytics/toneSelectedEvent.js +6 -0
- package/dist/esm/util/analytics/toneSelectorClosedEvent.js +6 -0
- package/dist/esm/util/analytics/toneSelectorOpenedEvent.js +6 -0
- package/dist/esm/util/analytics/typeaheadCancelledEvent.js +12 -0
- package/dist/esm/util/analytics/typeaheadRenderedEvent.js +12 -0
- package/dist/esm/util/analytics/typeaheadSelectedEvent.js +26 -0
- package/dist/esm/util/analytics/ufoExperiences.js +15 -13
- package/dist/esm/util/analytics/uploadBeginButton.js +6 -0
- package/dist/esm/util/analytics/uploadCancelButton.js +6 -0
- package/dist/esm/util/analytics/uploadConfirmButton.js +6 -0
- package/dist/esm/util/analytics/uploadFailedEvent.js +6 -0
- package/dist/esm/util/analytics/uploadSucceededEvent.js +6 -0
- package/dist/esm/util/analytics/useSampledUFOComponentExperience.js +1 -1
- package/dist/esm/util/analytics/withSampling.js +175 -0
- package/dist/esm/util/build-emoji-description-with-alt-representation.js +12 -0
- package/dist/esm/util/contains-emoji-id.js +12 -0
- package/dist/esm/util/convert-image-to-media-representation.js +7 -0
- package/dist/esm/util/convert-media-to-image-emoji.js +21 -0
- package/dist/esm/util/convert-media-to-image-representation.js +7 -0
- package/dist/esm/util/filter-hidden-emojis.js +6 -0
- package/dist/esm/util/filters.js +1 -4
- package/dist/esm/util/format-shortcut.js +23 -0
- package/dist/esm/util/get-category-id.js +3 -0
- package/dist/esm/util/get-tone-emoji.js +4 -0
- package/dist/esm/util/has-data-url-image.js +5 -0
- package/dist/esm/util/is-emoji-description-with-variations.js +3 -0
- package/dist/esm/util/is-emoji-description.js +3 -0
- package/dist/esm/util/is-emoji-id-equal.js +3 -0
- package/dist/esm/util/is-emoji-variation-description.js +3 -0
- package/dist/esm/util/{hidden-emojis.js → is-hidden-emoji.js} +0 -5
- package/dist/esm/util/is-image-representation.js +3 -0
- package/dist/esm/util/is-loaded-media-emoji.js +5 -0
- package/dist/esm/util/is-media-emoji.js +4 -0
- package/dist/esm/util/is-media-representation.js +3 -0
- package/dist/esm/util/is-messages-key.js +4 -0
- package/dist/esm/util/is-promise.js +3 -0
- package/dist/esm/util/is-sprite-representation.js +3 -0
- package/dist/esm/util/is-sprite-service-representation.js +3 -0
- package/dist/esm/util/is-unicode-representation.js +3 -0
- package/dist/esm/util/keymaps.js +2 -32
- package/dist/esm/util/left-click.js +3 -0
- package/dist/esm/util/make-key-map-with-common.js +10 -0
- package/dist/esm/util/make-keymap.js +12 -0
- package/dist/esm/util/mouse-location.js +6 -0
- package/dist/esm/util/mouse.js +0 -18
- package/dist/esm/util/to-emoji-id.js +7 -0
- package/dist/esm/util/to-optional-emoji-id.js +7 -0
- package/dist/esm/util/type-helpers.js +89 -113
- package/dist/esm/utils.js +16 -2
- package/dist/types/admin.d.ts +3 -0
- package/dist/types/api/EmojiLoader.d.ts +1 -1
- package/dist/types/api/EmojiRepository.d.ts +4 -1
- package/dist/types/api/EmojiResource.d.ts +5 -9
- package/dist/types/api/EmojiUtils.d.ts +46 -15
- package/dist/types/api/calculateScale.d.ts +2 -0
- package/dist/types/api/denormaliseEmojiServiceResponse.d.ts +6 -0
- package/dist/types/api/denormaliseServiceAltRepresentation.d.ts +2 -0
- package/dist/types/api/denormaliseServiceRepresentation.d.ts +2 -0
- package/dist/types/api/denormaliseSkinEmoji.d.ts +2 -0
- package/dist/types/api/denormaliseStandardRepresentation.d.ts +2 -0
- package/dist/types/api/emojiRequest.d.ts +4 -0
- package/dist/types/api/getAltRepresentation.d.ts +2 -0
- package/dist/types/api/getEmojiVariation.d.ts +2 -0
- package/dist/types/api/getPixelRatio.d.ts +1 -0
- package/dist/types/api/internal/AlphabeticalShortnameComparator.d.ts +8 -0
- package/dist/types/api/internal/AsciiMatchComparator.d.ts +11 -0
- package/dist/types/api/internal/ChainedEmojiComparator.d.ts +14 -0
- package/dist/types/api/internal/Comparators.d.ts +0 -98
- package/dist/types/api/internal/EmojiTypeComparator.d.ts +14 -0
- package/dist/types/api/internal/ExactShortNameMatchComparator.d.ts +12 -0
- package/dist/types/api/internal/Gateway.d.ts +13 -0
- package/dist/types/api/internal/OrderComparator.d.ts +8 -0
- package/dist/types/api/internal/QueryStringPositionMatchComparator.d.ts +21 -0
- package/dist/types/api/internal/UsageFrequencyComparator.d.ts +17 -0
- package/dist/types/api/internal/UsageFrequencyTracker.d.ts +0 -13
- package/dist/types/api/internal/createSearchEmojiComparator.d.ts +9 -0
- package/dist/types/api/internal/createUsageOnlyEmojiComparator.d.ts +2 -0
- package/dist/types/api/isMediaApiUrl.d.ts +2 -0
- package/dist/types/api/media/BrowserCacheStrategy.d.ts +15 -0
- package/dist/types/api/media/MediaEmojiCache.d.ts +2 -29
- package/dist/types/api/media/MemoryCacheStrategy.d.ts +19 -0
- package/dist/types/api/media/getRequiredRepresentation.d.ts +2 -0
- package/dist/types/api/shouldUseAltRepresentation.d.ts +2 -0
- package/dist/types/api/supportsUploadFeature.d.ts +9 -0
- package/dist/types/components/common/AddOwnEmoji.d.ts +9 -0
- package/dist/types/components/common/CachingEmoji.d.ts +0 -5
- package/dist/types/components/common/CachingMediaEmoji.d.ts +7 -0
- package/dist/types/components/common/DeletableEmojiTooltipContent.d.ts +0 -4
- package/dist/types/components/common/DeletableEmojiTooltipContentForScreenReader.d.ts +1 -0
- package/dist/types/components/common/Emoji.d.ts +1 -3
- package/dist/types/components/common/EmojiActions.d.ts +4 -6
- package/dist/types/components/common/EmojiPlaceholder.d.ts +8 -1
- package/dist/types/components/common/ImageEmoji.d.ts +6 -0
- package/dist/types/components/common/RecordSelectionDefault.d.ts +2 -2
- package/dist/types/components/common/SpriteEmoji.d.ts +6 -0
- package/dist/types/components/common/ToneSelector.d.ts +6 -3
- package/dist/types/components/common/ToneSelectorInternal.d.ts +9 -0
- package/dist/types/components/common/ToolTipContentWithKeymap.d.ts +1 -1
- package/dist/types/components/common/UnicodeEmoji.d.ts +6 -0
- package/dist/types/components/common/UploadEmoji.d.ts +2 -2
- package/dist/types/components/common/emojiPlaceholderTestId.d.ts +5 -0
- package/dist/types/components/common/handleDelete.d.ts +5 -0
- package/dist/types/components/common/isRefreshEmojiPickerEnabled.d.ts +5 -0
- package/dist/types/components/picker/AbstractItem.d.ts +7 -0
- package/dist/types/components/picker/CategoryHeadingItem.d.ts +10 -0
- package/dist/types/components/picker/CategorySelector.d.ts +5 -4
- package/dist/types/components/picker/EmojiPicker.d.ts +19 -19
- package/dist/types/components/picker/EmojiPickerCategoryHeading.d.ts +4 -0
- package/dist/types/components/picker/EmojiPickerComponent.d.ts +6 -2
- package/dist/types/components/picker/EmojiPickerInternal.d.ts +24 -0
- package/dist/types/components/picker/EmojiPickerList.d.ts +5 -5
- package/dist/types/components/picker/EmojiPickerVirtualItems.d.ts +0 -26
- package/dist/types/components/picker/EmojisRowItem.d.ts +11 -0
- package/dist/types/components/picker/LoadingItem.d.ts +9 -0
- package/dist/types/components/picker/NoResultsItem.d.ts +10 -0
- package/dist/types/components/picker/categorySelectorCategoryTestId.d.ts +5 -0
- package/dist/types/components/picker/{utils.d.ts → emojiPickerHeightOffset.d.ts} +0 -1
- package/dist/types/components/picker/emojiPickerLoader.d.ts +7 -0
- package/dist/types/components/picker/emojiPickerModuleLoader.d.ts +5 -0
- package/dist/types/components/picker/preloadEmojiPicker.d.ts +5 -0
- package/dist/types/components/picker/scrollToRow.d.ts +1 -0
- package/dist/types/components/picker/sortCategories.d.ts +6 -0
- package/dist/types/components/picker/sortCategoriesNew.d.ts +6 -0
- package/dist/types/components/picker/virtualItemRenderer.d.ts +10 -0
- package/dist/types/components/typeahead/EmojiTypeAheadComponent.d.ts +3 -3
- package/dist/types/components/typeahead/EmojiTypeAheadItem.d.ts +7 -2
- package/dist/types/components/typeahead/EmojiTypeAheadItemInternal.d.ts +6 -0
- package/dist/types/components/uploader/EmojiUploadComponent.d.ts +3 -3
- package/dist/types/components/uploader/EmojiUploader.d.ts +8 -14
- package/dist/types/components/uploader/EmojiUploaderInternal.d.ts +14 -0
- package/dist/types/element.d.ts +9 -0
- package/dist/types/index.d.ts +13 -8
- package/dist/types/picker.d.ts +3 -0
- package/dist/types/resource.d.ts +15 -0
- package/dist/types/typeahead.d.ts +6 -0
- package/dist/types/util/actual-mouse-move.d.ts +2 -0
- package/dist/types/util/analytics/Attributes.d.ts +3 -0
- package/dist/types/util/analytics/CommonAttributes.d.ts +5 -0
- package/dist/types/util/analytics/Duration.d.ts +3 -0
- package/dist/types/util/analytics/aiGenerationCompletedEvent.d.ts +3 -0
- package/dist/types/util/analytics/aiGenerationFailedEvent.d.ts +4 -0
- package/dist/types/util/analytics/aiGenerationStartedEvent.d.ts +4 -0
- package/dist/types/util/analytics/analytics.d.ts +162 -74
- package/dist/types/util/analytics/categoryClickedEvent.d.ts +4 -0
- package/dist/types/util/analytics/clearSampled.d.ts +1 -0
- package/dist/types/util/analytics/closedPickerEvent.d.ts +3 -0
- package/dist/types/util/analytics/createEvent.d.ts +2 -0
- package/dist/types/util/analytics/deleteBeginEvent.d.ts +3 -0
- package/dist/types/util/analytics/deleteCancelEvent.d.ts +3 -0
- package/dist/types/util/analytics/deleteConfirmEvent.d.ts +3 -0
- package/dist/types/util/analytics/emojiPickerEvent.d.ts +1 -0
- package/dist/types/util/analytics/emojiUploaderEvent.d.ts +1 -0
- package/dist/types/util/analytics/extractCommonAttributes.d.ts +3 -0
- package/dist/types/util/analytics/extractErrorInfo.d.ts +6 -0
- package/dist/types/util/analytics/getSkinTone.d.ts +1 -0
- package/dist/types/util/analytics/hasUfoMarked.d.ts +3 -0
- package/dist/types/util/analytics/isExperienceSampled.d.ts +8 -0
- package/dist/types/util/analytics/openedPickerEvent.d.ts +2 -0
- package/dist/types/util/analytics/pickerClickedEvent.d.ts +13 -0
- package/dist/types/util/analytics/pickerSearchedEvent.d.ts +5 -0
- package/dist/types/util/analytics/recordFailed.d.ts +2 -0
- package/dist/types/util/analytics/recordFailedEmoji.d.ts +1 -0
- package/dist/types/util/analytics/recordSelectionFailedSli.d.ts +1 -0
- package/dist/types/util/analytics/recordSelectionSucceededSli.d.ts +1 -0
- package/dist/types/util/analytics/recordSucceeded.d.ts +2 -0
- package/dist/types/util/analytics/recordSucceededEmoji.d.ts +1 -0
- package/dist/types/util/analytics/sampledUfoEmojiResourceFetched.d.ts +3 -0
- package/dist/types/util/analytics/sampledUfoRenderedEmoji.d.ts +3 -0
- package/dist/types/util/analytics/samplingUfo.d.ts +9 -15
- package/dist/types/util/analytics/selectedFileEvent.d.ts +2 -0
- package/dist/types/util/analytics/skinTones.d.ts +1 -0
- package/dist/types/util/analytics/skintoneSelectorEvent.d.ts +1 -0
- package/dist/types/util/analytics/toneSelectedEvent.d.ts +4 -0
- package/dist/types/util/analytics/toneSelectorClosedEvent.d.ts +2 -0
- package/dist/types/util/analytics/toneSelectorOpenedEvent.d.ts +4 -0
- package/dist/types/util/analytics/typeaheadCancelledEvent.d.ts +3 -0
- package/dist/types/util/analytics/typeaheadRenderedEvent.d.ts +3 -0
- package/dist/types/util/analytics/typeaheadSelectedEvent.d.ts +3 -0
- package/dist/types/util/analytics/ufoExperiences.d.ts +14 -7
- package/dist/types/util/analytics/uploadBeginButton.d.ts +2 -0
- package/dist/types/util/analytics/uploadCancelButton.d.ts +2 -0
- package/dist/types/util/analytics/uploadConfirmButton.d.ts +4 -0
- package/dist/types/util/analytics/uploadFailedEvent.d.ts +5 -0
- package/dist/types/util/analytics/uploadSucceededEvent.d.ts +3 -0
- package/dist/types/util/analytics/withSampling.d.ts +8 -0
- package/dist/types/util/build-emoji-description-with-alt-representation.d.ts +2 -0
- package/dist/types/util/contains-emoji-id.d.ts +2 -0
- package/dist/types/util/convert-image-to-media-representation.d.ts +2 -0
- package/dist/types/util/convert-media-to-image-emoji.d.ts +2 -0
- package/dist/types/util/convert-media-to-image-representation.d.ts +2 -0
- package/dist/types/util/{hidden-emojis.d.ts → filter-hidden-emojis.d.ts} +0 -1
- package/dist/types/util/filters.d.ts +2 -3
- package/dist/types/util/format-shortcut.d.ts +5 -0
- package/dist/types/util/get-category-id.d.ts +3 -0
- package/dist/types/util/get-tone-emoji.d.ts +3 -0
- package/dist/types/util/has-data-url-image.d.ts +2 -0
- package/dist/types/util/is-emoji-description-with-variations.d.ts +2 -0
- package/dist/types/util/is-emoji-description.d.ts +2 -0
- package/dist/types/util/is-emoji-id-equal.d.ts +2 -0
- package/dist/types/util/is-emoji-variation-description.d.ts +2 -0
- package/dist/types/util/is-hidden-emoji.d.ts +2 -0
- package/dist/types/util/is-image-representation.d.ts +2 -0
- package/dist/types/util/is-loaded-media-emoji.d.ts +2 -0
- package/dist/types/util/is-media-emoji.d.ts +2 -0
- package/dist/types/util/is-media-representation.d.ts +2 -0
- package/dist/types/util/is-messages-key.d.ts +2 -0
- package/dist/types/util/is-promise.d.ts +1 -0
- package/dist/types/util/is-sprite-representation.d.ts +2 -0
- package/dist/types/util/is-sprite-service-representation.d.ts +2 -0
- package/dist/types/util/is-unicode-representation.d.ts +2 -0
- package/dist/types/util/keymaps.d.ts +0 -3
- package/dist/types/util/left-click.d.ts +2 -0
- package/dist/types/util/make-key-map-with-common.d.ts +5 -0
- package/dist/types/util/make-keymap.d.ts +5 -0
- package/dist/types/util/mouse-location.d.ts +3 -0
- package/dist/types/util/mouse.d.ts +0 -4
- package/dist/types/util/to-emoji-id.d.ts +2 -0
- package/dist/types/util/to-optional-emoji-id.d.ts +2 -0
- package/dist/types/util/type-helpers.d.ts +88 -25
- package/dist/types/utils.d.ts +15 -2
- package/package.json +2 -2
- package/dist/cjs/i18n/index.js +0 -216
- package/dist/cjs/util/analytics/index.js +0 -231
- package/dist/es2019/i18n/index.js +0 -37
- package/dist/es2019/util/analytics/index.js +0 -4
- package/dist/esm/i18n/index.js +0 -37
- package/dist/esm/util/analytics/index.js +0 -4
- package/dist/types/i18n/index.d.ts +0 -37
- package/dist/types/util/analytics/index.d.ts +0 -6
- /package/dist/cjs/components/common/{ToneSelector.compiled.css → ToneSelectorInternal.compiled.css} +0 -0
- /package/dist/cjs/components/picker/{EmojiPicker.compiled.css → EmojiPickerInternal.compiled.css} +0 -0
- /package/dist/cjs/components/picker/{EmojiPickerVirtualItems.compiled.css → LoadingItem.compiled.css} +0 -0
- /package/dist/cjs/components/typeahead/{EmojiTypeAheadItem.compiled.css → EmojiTypeAheadItemInternal.compiled.css} +0 -0
- /package/dist/es2019/components/common/{ToneSelector.compiled.css → ToneSelectorInternal.compiled.css} +0 -0
- /package/dist/es2019/components/picker/{EmojiPicker.compiled.css → EmojiPickerInternal.compiled.css} +0 -0
- /package/dist/es2019/components/picker/{EmojiPickerVirtualItems.compiled.css → LoadingItem.compiled.css} +0 -0
- /package/dist/es2019/components/typeahead/{EmojiTypeAheadItem.compiled.css → EmojiTypeAheadItemInternal.compiled.css} +0 -0
- /package/dist/esm/components/common/{ToneSelector.compiled.css → ToneSelectorInternal.compiled.css} +0 -0
- /package/dist/esm/components/picker/{EmojiPicker.compiled.css → EmojiPickerInternal.compiled.css} +0 -0
- /package/dist/esm/components/picker/{EmojiPickerVirtualItems.compiled.css → LoadingItem.compiled.css} +0 -0
- /package/dist/esm/components/typeahead/{EmojiTypeAheadItem.compiled.css → EmojiTypeAheadItemInternal.compiled.css} +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/* UnicodeEmoji.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
|
+
import { defaultEmojiHeight } from '../../util/constants';
|
|
6
|
+
import { isSSR } from '../../util/is-ssr';
|
|
7
|
+
import { renderUnicodeEmojiToImagePath } from '../../util/renderUnicodeEmojiToImagePath';
|
|
8
|
+
import { EmojiNodeWrapper, unicodeEmojiCanvasSize } from './Emoji';
|
|
9
|
+
import EmojiPlaceholder from './EmojiPlaceholder';
|
|
10
|
+
import { ImageEmoji } from './ImageEmoji';
|
|
11
|
+
import { emojiNodeStyles, commonSelectedStyles, selectOnHoverStyles } from './styles';
|
|
12
|
+
const useUnicodeEmojiImage = unicodeEmoji => {
|
|
13
|
+
const [state, setState] = useState({
|
|
14
|
+
status: 'loading'
|
|
15
|
+
});
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
let cancelled = false;
|
|
18
|
+
let imagePathToRevoke;
|
|
19
|
+
setState({
|
|
20
|
+
status: 'loading',
|
|
21
|
+
unicodeEmoji
|
|
22
|
+
});
|
|
23
|
+
void renderUnicodeEmojiToImagePath(unicodeEmoji).then(imagePath => {
|
|
24
|
+
if (cancelled) {
|
|
25
|
+
if (imagePath) {
|
|
26
|
+
URL.revokeObjectURL(imagePath);
|
|
27
|
+
}
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
imagePathToRevoke = imagePath;
|
|
31
|
+
setState(imagePath ? {
|
|
32
|
+
status: 'ready',
|
|
33
|
+
unicodeEmoji,
|
|
34
|
+
imagePath
|
|
35
|
+
} : {
|
|
36
|
+
status: 'failed',
|
|
37
|
+
unicodeEmoji
|
|
38
|
+
});
|
|
39
|
+
}).catch(() => {
|
|
40
|
+
if (!cancelled) {
|
|
41
|
+
setState({
|
|
42
|
+
status: 'failed',
|
|
43
|
+
unicodeEmoji
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return () => {
|
|
48
|
+
cancelled = true;
|
|
49
|
+
if (imagePathToRevoke) {
|
|
50
|
+
URL.revokeObjectURL(imagePathToRevoke);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}, [unicodeEmoji]);
|
|
54
|
+
return state;
|
|
55
|
+
};
|
|
56
|
+
const UnicodeEmojiImage = props => {
|
|
57
|
+
const {
|
|
58
|
+
emoji,
|
|
59
|
+
fitToHeight,
|
|
60
|
+
showTooltip
|
|
61
|
+
} = props;
|
|
62
|
+
const emojiText = emoji.representation.unicodeEmoji;
|
|
63
|
+
const unicodeEmojiImage = useUnicodeEmojiImage(emojiText);
|
|
64
|
+
const hasCurrentEmojiImage = unicodeEmojiImage.unicodeEmoji === emojiText;
|
|
65
|
+
if (isSSR() || !hasCurrentEmojiImage || unicodeEmojiImage.status === 'loading') {
|
|
66
|
+
return /*#__PURE__*/React.createElement(EmojiPlaceholder, {
|
|
67
|
+
shortName: emoji.shortName,
|
|
68
|
+
showTooltip: showTooltip,
|
|
69
|
+
size: fitToHeight,
|
|
70
|
+
loading: true
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (unicodeEmojiImage.status === 'ready') {
|
|
74
|
+
return /*#__PURE__*/React.createElement(ImageEmoji, _extends({}, props, {
|
|
75
|
+
emoji: {
|
|
76
|
+
...emoji,
|
|
77
|
+
altRepresentation: undefined,
|
|
78
|
+
representation: {
|
|
79
|
+
imagePath: unicodeEmojiImage.imagePath,
|
|
80
|
+
width: unicodeEmojiCanvasSize,
|
|
81
|
+
height: unicodeEmojiCanvasSize
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
return /*#__PURE__*/React.createElement(EmojiPlaceholder, {
|
|
87
|
+
shortName: emoji.shortName,
|
|
88
|
+
showTooltip: showTooltip,
|
|
89
|
+
size: fitToHeight
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
export const UnicodeEmoji = props => {
|
|
93
|
+
const {
|
|
94
|
+
emoji,
|
|
95
|
+
selected,
|
|
96
|
+
selectOnHover,
|
|
97
|
+
className,
|
|
98
|
+
fitToHeight,
|
|
99
|
+
renderUnicodeEmojiAsImage = true
|
|
100
|
+
} = props;
|
|
101
|
+
if (renderUnicodeEmojiAsImage) {
|
|
102
|
+
return /*#__PURE__*/React.createElement(UnicodeEmojiImage, props);
|
|
103
|
+
}
|
|
104
|
+
const classes = `${emojiNodeStyles} ${selected ? commonSelectedStyles : ''} ${selectOnHover ? selectOnHoverStyles : ''} ${className ? className : ''}`;
|
|
105
|
+
const emojiText = emoji.representation.unicodeEmoji;
|
|
106
|
+
const defaultSize = `${fitToHeight !== null && fitToHeight !== void 0 ? fitToHeight : defaultEmojiHeight}px`;
|
|
107
|
+
const emojiSize = `var(--emoji-common-unicode-size, ${defaultSize})`;
|
|
108
|
+
const style = {
|
|
109
|
+
display: 'inline-flex',
|
|
110
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
111
|
+
fontSize: emojiSize,
|
|
112
|
+
alignItems: 'center',
|
|
113
|
+
aspectRatio: '1/1'
|
|
114
|
+
};
|
|
115
|
+
return (
|
|
116
|
+
/*#__PURE__*/
|
|
117
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
118
|
+
React.createElement(EmojiNodeWrapper, _extends({}, props, {
|
|
119
|
+
type: "unicode",
|
|
120
|
+
className: classes
|
|
121
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
122
|
+
style: style
|
|
123
|
+
}, emojiText))
|
|
124
|
+
);
|
|
125
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { supportsUploadFeature } from '../../api/
|
|
2
|
-
import {
|
|
3
|
-
import { messages } from '../i18n';
|
|
1
|
+
import { supportsUploadFeature } from '../../api/supportsUploadFeature';
|
|
2
|
+
import { extractErrorInfo } from '../../util/analytics/extractErrorInfo';
|
|
4
3
|
import { ufoExperiences } from '../../util/analytics/ufoExperiences';
|
|
5
|
-
import {
|
|
4
|
+
import { uploadFailedEvent } from '../../util/analytics/uploadFailedEvent';
|
|
5
|
+
import { uploadSucceededEvent } from '../../util/analytics/uploadSucceededEvent';
|
|
6
|
+
import { messages } from '../i18n';
|
|
6
7
|
export const uploadEmoji = (upload, emojiProvider, errorSetter, onSuccess, fireAnalytics, retry) => {
|
|
7
8
|
const startTime = Date.now();
|
|
8
9
|
errorSetter(undefined);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { toEmojiId } from '../../util/to-emoji-id';
|
|
7
|
+
export const handleDelete = (props, event) => {
|
|
8
|
+
const {
|
|
9
|
+
emoji,
|
|
10
|
+
onDelete
|
|
11
|
+
} = props;
|
|
12
|
+
if (onDelete) {
|
|
13
|
+
onDelete(toEmojiId(emoji), emoji, event);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
|
+
export const isRefreshEmojiPickerEnabled = () => {
|
|
8
|
+
if (!FeatureGates.initializeCompleted()) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
13
|
+
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
14
|
+
return isEnabled;
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* CategoryHeadingItem.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { AbstractItem } from './AbstractItem';
|
|
6
|
+
import EmojiPickerCategoryHeading from './EmojiPickerCategoryHeading';
|
|
7
|
+
import { sizes } from './EmojiPickerSizes';
|
|
8
|
+
export class CategoryHeadingItem extends AbstractItem {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props, sizes.categoryHeadingHeight);
|
|
11
|
+
_defineProperty(this, "renderItem", () => /*#__PURE__*/React.createElement(EmojiPickerCategoryHeading, this.props));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -3,16 +3,19 @@ import "./CategorySelector.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
6
|
-
import { cx } from '@atlaskit/css';
|
|
7
6
|
import { useIntl } from 'react-intl';
|
|
7
|
+
import { cx } from '@atlaskit/css';
|
|
8
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
8
9
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
9
10
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
|
-
import
|
|
11
|
+
import { usePrevious } from '../../hooks/usePrevious';
|
|
11
12
|
import { CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED, defaultCategories, KeyboardKeys } from '../../util/constants';
|
|
12
13
|
import { messages } from '../i18n';
|
|
13
14
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
14
|
-
import {
|
|
15
|
+
import { categorySelectorCategoryTestId } from './categorySelectorCategoryTestId';
|
|
15
16
|
import { RENDER_EMOJI_PICKER_LIST_TESTID } from './EmojiPickerList';
|
|
17
|
+
import { sortCategories } from './sortCategories';
|
|
18
|
+
import { sortCategoriesNew } from './sortCategoriesNew';
|
|
16
19
|
const isRefreshEmojiPickerEnabled = () => {
|
|
17
20
|
if (!FeatureGates.initializeCompleted()) {
|
|
18
21
|
return false;
|
|
@@ -43,8 +46,6 @@ const categorySelector = null;
|
|
|
43
46
|
const categorySelectorNew = null;
|
|
44
47
|
const categorySelectorTablist = null;
|
|
45
48
|
const categorySelectorTablistNew = null;
|
|
46
|
-
export const sortCategories = (c1, c2) => CategoryDescriptionMap[c1].order - CategoryDescriptionMap[c2].order;
|
|
47
|
-
export const sortCategoriesNew = (c1, c2) => CategoryDescriptionMapNew[c1].order - CategoryDescriptionMapNew[c2].order;
|
|
48
49
|
const addNewCategories = (oldCategories, newCategories) => {
|
|
49
50
|
if (!newCategories) {
|
|
50
51
|
return oldCategories;
|
|
@@ -52,7 +53,6 @@ const addNewCategories = (oldCategories, newCategories) => {
|
|
|
52
53
|
return oldCategories.concat(newCategories.filter(category => !!(isRefreshEmojiPickerEnabled() ? CategoryDescriptionMapNew : CategoryDescriptionMap)[category])).sort(isRefreshEmojiPickerEnabled() ? sortCategoriesNew : sortCategories);
|
|
53
54
|
};
|
|
54
55
|
export const categorySelectorComponentTestId = 'category-selector-component';
|
|
55
|
-
export const categorySelectorCategoryTestId = categoryId => `category-selector-${categoryId}`;
|
|
56
56
|
const CategorySelector = props => {
|
|
57
57
|
const {
|
|
58
58
|
disableCategories,
|
|
@@ -1,80 +1,27 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
|
|
6
7
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import { LoadingItem } from './EmojiPickerVirtualItems';
|
|
11
|
-
import { UfoErrorBoundary } from '../common/UfoErrorBoundary';
|
|
12
|
-
import { defaultEmojiPickerSize } from '../../util/constants';
|
|
13
|
-
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
14
|
-
const isRefreshEmojiPickerEnabled = () => {
|
|
15
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
8
|
+
import { EmojiPickerInternal } from './EmojiPickerInternal';
|
|
9
|
+
export const EmojiPicker = withAnalyticsEvents()(EmojiPickerInternal);
|
|
10
|
+
export default EmojiPicker;
|
|
18
11
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
_defineProperty(this, "state", {
|
|
36
|
-
asyncLoadedComponent: EmojiPickerInternal.AsyncLoadedComponent
|
|
37
|
-
});
|
|
38
|
-
ufoExperiences['emoji-picker-opened'].start();
|
|
39
|
-
}
|
|
40
|
-
asyncLoadComponent() {
|
|
41
|
-
emojiPickerLoader().then(component => {
|
|
42
|
-
EmojiPickerInternal.AsyncLoadedComponent = component;
|
|
43
|
-
this.setAsyncState(component);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
renderLoading() {
|
|
47
|
-
const item = new LoadingItem();
|
|
48
|
-
const handlePickerRef = ref => {
|
|
49
|
-
if (this.props.onPickerRef) {
|
|
50
|
-
this.props.onPickerRef(ref);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
ufoExperiences['emoji-picker-opened'].markFMP();
|
|
54
|
-
return isRefreshEmojiPickerEnabled() ? /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
ref: handlePickerRef,
|
|
56
|
-
className: ax(["_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iixjv _1bsb1edt _1ul91edt _1tke5x59 _c71l1y6z"])
|
|
57
|
-
}, item.renderItem()) : /*#__PURE__*/React.createElement("div", {
|
|
58
|
-
ref: handlePickerRef,
|
|
59
|
-
className: ax(["_19itahnd _2rkofajl _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iixjv _1bsb1edt _1ul91edt _1tke5x59 _c71l1y6z"])
|
|
60
|
-
}, item.renderItem());
|
|
61
|
-
}
|
|
62
|
-
renderLoaded(loadedEmojiProvider, EmojiPickerComponent) {
|
|
63
|
-
const {
|
|
64
|
-
emojiProvider,
|
|
65
|
-
...otherProps
|
|
66
|
-
} = this.props;
|
|
67
|
-
return /*#__PURE__*/React.createElement(UfoErrorBoundary, {
|
|
68
|
-
experiences: [ufoExperiences['emoji-picker-opened']]
|
|
69
|
-
}, /*#__PURE__*/React.createElement(EmojiCommonProvider, {
|
|
70
|
-
emojiProvider: loadedEmojiProvider
|
|
71
|
-
}, /*#__PURE__*/React.createElement(EmojiPickerComponent, otherProps)));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
// state initialised with static component to prevent
|
|
75
|
-
// rerender when the module has already been loaded
|
|
76
|
-
_defineProperty(EmojiPickerInternal, "defaultProps", {
|
|
77
|
-
size: defaultEmojiPickerSize
|
|
78
|
-
});
|
|
79
|
-
const EmojiPicker = withAnalyticsEvents()(EmojiPickerInternal);
|
|
80
|
-
export default EmojiPicker;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use `import { preloadEmojiPicker } from '@atlaskit/emoji/emoji-picker'` instead.
|
|
14
|
+
*/
|
|
15
|
+
export { preloadEmojiPicker } from './preloadEmojiPicker';
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use `import { EmojiPickerInternal } from '@atlaskit/emoji/emoji-picker'` instead.
|
|
18
|
+
*/
|
|
19
|
+
export { EmojiPickerInternal } from './EmojiPickerInternal';
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated Use `import { emojiPickerModuleLoader } from '@atlaskit/emoji/emoji-picker'` instead.
|
|
22
|
+
*/
|
|
23
|
+
export { emojiPickerModuleLoader } from './emojiPickerModuleLoader';
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated Use `import { emojiPickerLoader } from '@atlaskit/emoji/emoji-picker'` instead.
|
|
26
|
+
*/
|
|
27
|
+
export { emojiPickerLoader } from './emojiPickerLoader';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import "./EmojiPickerCategoryHeading.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import Heading from '@atlaskit/heading';
|
|
6
5
|
import { FormattedMessage } from 'react-intl';
|
|
7
|
-
import
|
|
6
|
+
import Heading from '@atlaskit/heading';
|
|
7
|
+
import { isMessagesKey } from '../../util/is-messages-key';
|
|
8
8
|
import { messages } from '../i18n';
|
|
9
9
|
const emojiCategoryTitle = null;
|
|
10
10
|
|
|
@@ -2,33 +2,49 @@
|
|
|
2
2
|
import "./EmojiPickerComponent.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
6
5
|
import { useCallback, useEffect, useMemo, useRef, useState, createRef, memo } from 'react';
|
|
6
|
+
import { unstable_batchedUpdates as batchedUpdates } from 'react-dom';
|
|
7
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
7
8
|
import { getDocument } from '@atlaskit/browser-apis';
|
|
9
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
10
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
8
11
|
import { dropTargetForExternal, monitorForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
|
|
9
12
|
import { containsFiles } from '@atlaskit/pragmatic-drag-and-drop/external/file';
|
|
10
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
11
13
|
import { preventUnhandled } from '@atlaskit/pragmatic-drag-and-drop/prevent-unhandled';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { containsEmojiId, isPromise /*, isEmojiIdEqual, isEmojiLoaded*/, isEmojiDescription } from '../../util/type-helpers';
|
|
14
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
|
+
import { getEmojiVariation } from '../../api/getEmojiVariation';
|
|
16
|
+
import { supportsUploadFeature } from '../../api/supportsUploadFeature';
|
|
17
|
+
import { useEmoji } from '../../hooks/useEmoji';
|
|
18
|
+
import { useIsMounted } from '../../hooks/useIsMounted';
|
|
18
19
|
import { SearchSort, SearchSourceTypes } from '../../types';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
20
|
+
import { createAndFireEventInElementsChannel } from '../../util/analytics/analytics';
|
|
21
|
+
import { categoryClickedEvent } from '../../util/analytics/categoryClickedEvent';
|
|
22
|
+
import { closedPickerEvent } from '../../util/analytics/closedPickerEvent';
|
|
23
|
+
import { deleteBeginEvent } from '../../util/analytics/deleteBeginEvent';
|
|
24
|
+
import { deleteCancelEvent } from '../../util/analytics/deleteCancelEvent';
|
|
25
|
+
import { deleteConfirmEvent } from '../../util/analytics/deleteConfirmEvent';
|
|
26
|
+
import { openedPickerEvent } from '../../util/analytics/openedPickerEvent';
|
|
27
|
+
import { pickerClickedEvent } from '../../util/analytics/pickerClickedEvent';
|
|
28
|
+
import { pickerSearchedEvent } from '../../util/analytics/pickerSearchedEvent';
|
|
29
|
+
import { selectedFileEvent } from '../../util/analytics/selectedFileEvent';
|
|
30
|
+
import { toneSelectorClosedEvent } from '../../util/analytics/toneSelectorClosedEvent';
|
|
31
|
+
import { ufoExperiences } from '../../util/analytics/ufoExperiences';
|
|
32
|
+
import { uploadBeginButton } from '../../util/analytics/uploadBeginButton';
|
|
33
|
+
import { uploadCancelButton } from '../../util/analytics/uploadCancelButton';
|
|
34
|
+
import { uploadConfirmButton } from '../../util/analytics/uploadConfirmButton';
|
|
35
|
+
import { KeyboardKeys, customCategory, defaultEmojiPickerSize, frequentCategory } from '../../util/constants';
|
|
36
|
+
import { containsEmojiId } from '../../util/contains-emoji-id';
|
|
37
|
+
import { filterHiddenEmojis } from '../../util/filter-hidden-emojis';
|
|
38
|
+
import { getToneEmoji } from '../../util/get-tone-emoji';
|
|
39
|
+
import { isEmojiDescription } from '../../util/is-emoji-description';
|
|
40
|
+
import { isPromise } from '../../util/is-promise';
|
|
41
|
+
import { defaultProductivityColor, getStoredProductivityColor, storeProductivityColor } from '../../util/productivity-colors';
|
|
21
42
|
import { createRecordSelectionDefault } from '../common/RecordSelectionDefault';
|
|
43
|
+
import { uploadEmoji } from '../common/UploadEmoji';
|
|
44
|
+
import { messages } from '../i18n';
|
|
22
45
|
import CategorySelector from './CategorySelector';
|
|
23
46
|
import EmojiPickerFooter from './EmojiPickerFooter';
|
|
24
47
|
import { EmojiPickerVirtualListInternal as EmojiPickerList } from './EmojiPickerList';
|
|
25
|
-
import { createAndFireEventInElementsChannel, categoryClickedEvent, closedPickerEvent, deleteBeginEvent, deleteCancelEvent, deleteConfirmEvent, openedPickerEvent, pickerClickedEvent, pickerSearchedEvent, selectedFileEvent, uploadBeginButton, uploadCancelButton, uploadConfirmButton, toneSelectorClosedEvent, ufoExperiences } from '../../util/analytics';
|
|
26
|
-
import { useEmoji } from '../../hooks/useEmoji';
|
|
27
|
-
import { useIsMounted } from '../../hooks/useIsMounted';
|
|
28
|
-
import { messages } from '../i18n';
|
|
29
|
-
import { defaultProductivityColor, getStoredProductivityColor, storeProductivityColor } from '../../util/productivity-colors';
|
|
30
|
-
import { filterHiddenEmojis } from '../../util/hidden-emojis';
|
|
31
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
32
48
|
const isRefreshEmojiPickerEnabled = () => {
|
|
33
49
|
if (!FeatureGates.initializeCompleted()) {
|
|
34
50
|
return false;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* EmojiPickerInternal.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import "./EmojiPickerInternal.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
|
+
import { EmojiCommonProvider } from '../../context/EmojiCommonProvider';
|
|
8
|
+
import { ufoExperiences } from '../../util/analytics/ufoExperiences';
|
|
9
|
+
import { defaultEmojiPickerSize } from '../../util/constants';
|
|
10
|
+
import LoadingEmojiComponent from '../common/LoadingEmojiComponent';
|
|
11
|
+
import { UfoErrorBoundary } from '../common/UfoErrorBoundary';
|
|
12
|
+
import { LoadingItem } from './LoadingItem';
|
|
13
|
+
import { emojiPickerLoader } from './emojiPickerLoader';
|
|
14
|
+
const isRefreshEmojiPickerEnabled = () => {
|
|
15
|
+
if (!FeatureGates.initializeCompleted()) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
20
|
+
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
21
|
+
return isEnabled;
|
|
22
|
+
};
|
|
23
|
+
const emojiPicker = null;
|
|
24
|
+
const emojiPickerNew = null;
|
|
25
|
+
export class EmojiPickerInternal extends LoadingEmojiComponent {
|
|
26
|
+
constructor(props) {
|
|
27
|
+
super(props, {});
|
|
28
|
+
_defineProperty(this, "state", {
|
|
29
|
+
asyncLoadedComponent: EmojiPickerInternal.AsyncLoadedComponent
|
|
30
|
+
});
|
|
31
|
+
ufoExperiences['emoji-picker-opened'].start();
|
|
32
|
+
}
|
|
33
|
+
asyncLoadComponent() {
|
|
34
|
+
emojiPickerLoader().then(component => {
|
|
35
|
+
EmojiPickerInternal.AsyncLoadedComponent = component;
|
|
36
|
+
this.setAsyncState(component);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
renderLoading() {
|
|
40
|
+
const item = new LoadingItem();
|
|
41
|
+
const handlePickerRef = ref => {
|
|
42
|
+
if (this.props.onPickerRef) {
|
|
43
|
+
this.props.onPickerRef(ref);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
ufoExperiences['emoji-picker-opened'].markFMP();
|
|
47
|
+
return isRefreshEmojiPickerEnabled() ? /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
ref: handlePickerRef,
|
|
49
|
+
className: ax(["_19itahnd _2rko1mok _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iixjv _1bsb1edt _1ul91edt _1tke5x59 _c71l1y6z"])
|
|
50
|
+
}, item.renderItem()) : /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
ref: handlePickerRef,
|
|
52
|
+
className: ax(["_19itahnd _2rkofajl _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qs130s _4t3iixjv _1bsb1edt _1ul91edt _1tke5x59 _c71l1y6z"])
|
|
53
|
+
}, item.renderItem());
|
|
54
|
+
}
|
|
55
|
+
renderLoaded(loadedEmojiProvider, EmojiPickerComponent) {
|
|
56
|
+
const {
|
|
57
|
+
emojiProvider,
|
|
58
|
+
...otherProps
|
|
59
|
+
} = this.props;
|
|
60
|
+
return /*#__PURE__*/React.createElement(UfoErrorBoundary, {
|
|
61
|
+
experiences: [ufoExperiences['emoji-picker-opened']]
|
|
62
|
+
}, /*#__PURE__*/React.createElement(EmojiCommonProvider, {
|
|
63
|
+
emojiProvider: loadedEmojiProvider
|
|
64
|
+
}, /*#__PURE__*/React.createElement(EmojiPickerComponent, otherProps)));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
// state initialised with static component to prevent
|
|
68
|
+
// rerender when the module has already been loaded
|
|
69
|
+
_defineProperty(EmojiPickerInternal, "defaultProps", {
|
|
70
|
+
size: defaultEmojiPickerSize
|
|
71
|
+
});
|
|
@@ -1,19 +1,24 @@
|
|
|
1
|
+
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
1
2
|
import { useIntl } from 'react-intl';
|
|
2
3
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
3
|
-
import
|
|
4
|
+
import { EmojiPickerListContextProvider } from '../../context/EmojiPickerListContext';
|
|
4
5
|
import { customCategory, defaultEmojiPickerSize, emojiPickerPreviewHeight, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
6
|
+
import { filterHiddenEmojis } from '../../util/filter-hidden-emojis';
|
|
5
7
|
import { filterProductivityEmojisByColor, getProductivityColorPreviewEmojis } from '../../util/productivity-colors';
|
|
6
|
-
import
|
|
8
|
+
import EmojiActions from '../common/EmojiActions';
|
|
9
|
+
import { messages } from '../i18n';
|
|
7
10
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
11
|
+
import { CategoryHeadingItem } from './CategoryHeadingItem';
|
|
8
12
|
import CategoryTracker from './CategoryTracker';
|
|
9
13
|
import { sizes } from './EmojiPickerSizes';
|
|
10
|
-
import { CategoryHeadingItem, EmojisRowItem, LoadingItem, NoResultsItem, virtualItemRenderer } from './EmojiPickerVirtualItems';
|
|
11
|
-
import EmojiActions from '../common/EmojiActions';
|
|
12
|
-
import { emojiPickerHeightOffset, scrollToRow } from './utils';
|
|
13
|
-
import { VirtualList } from './VirtualList';
|
|
14
|
-
import { EmojiPickerListContextProvider } from '../../context/EmojiPickerListContext';
|
|
15
14
|
import EmojiPickerTabPanel from './EmojiPickerTabPanel';
|
|
16
|
-
import {
|
|
15
|
+
import { EmojisRowItem } from './EmojisRowItem';
|
|
16
|
+
import { LoadingItem } from './LoadingItem';
|
|
17
|
+
import { NoResultsItem } from './NoResultsItem';
|
|
18
|
+
import { VirtualList } from './VirtualList';
|
|
19
|
+
import { emojiPickerHeightOffset } from './emojiPickerHeightOffset';
|
|
20
|
+
import { scrollToRow } from './scrollToRow';
|
|
21
|
+
import { virtualItemRenderer } from './virtualItemRenderer';
|
|
17
22
|
|
|
18
23
|
/**
|
|
19
24
|
* Test id for wrapper Emoji Picker List div
|
|
@@ -1,58 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
import "./EmojiPickerVirtualItems.compiled.css";
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
-
import Spinner from '@atlaskit/spinner';
|
|
8
|
-
import EmojiPickerCategoryHeading from './EmojiPickerCategoryHeading';
|
|
9
|
-
import EmojiPickerEmojiRow from './EmojiPickerEmojiRow';
|
|
10
|
-
import EmojiPickerNoResults from './EmojiPickerNoResults';
|
|
11
|
-
import { sizes } from './EmojiPickerSizes';
|
|
12
|
-
const emojiPickerSpinner = null;
|
|
13
|
-
export class AbstractItem {
|
|
14
|
-
constructor(props, height) {
|
|
15
|
-
this.props = props;
|
|
16
|
-
this.height = height;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
export class EmojisRowItem extends AbstractItem {
|
|
20
|
-
constructor(props) {
|
|
21
|
-
super(props, sizes.emojiRowHeight);
|
|
22
|
-
_defineProperty(this, "renderItem", context => /*#__PURE__*/React.createElement(EmojiPickerEmojiRow, _extends({}, this.props, {
|
|
23
|
-
virtualItemContext: context
|
|
24
|
-
})));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export class LoadingItem extends AbstractItem {
|
|
28
|
-
constructor() {
|
|
29
|
-
super({}, sizes.loadingRowHeight);
|
|
30
|
-
_defineProperty(this, "renderItem", () => /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: ax(["_1e0c1txw _1bsb1osq _4t3i1w81 _1bah1h6o _4cvr1h6o _nphsidpf _t1edidpf _1t3b1wug"])
|
|
32
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Spinner, {
|
|
33
|
-
size: "medium"
|
|
34
|
-
}))));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export class CategoryHeadingItem extends AbstractItem {
|
|
38
|
-
constructor(props) {
|
|
39
|
-
super(props, sizes.categoryHeadingHeight);
|
|
40
|
-
_defineProperty(this, "renderItem", () => /*#__PURE__*/React.createElement(EmojiPickerCategoryHeading, this.props));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export class NoResultsItem extends AbstractItem {
|
|
44
|
-
constructor(props) {
|
|
45
|
-
super(props, sizes.noResultsHeight);
|
|
46
|
-
_defineProperty(this, "renderItem", () => /*#__PURE__*/React.createElement(EmojiPickerNoResults, this.props));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
export const virtualItemRenderer = (rows, context) => {
|
|
50
|
-
const {
|
|
51
|
-
index,
|
|
52
|
-
key
|
|
53
|
-
} = context;
|
|
54
|
-
const row = rows[index];
|
|
55
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
key: key
|
|
57
|
-
}, row && row.renderItem(context));
|
|
58
|
-
};
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* EmojisRowItem.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { AbstractItem } from './AbstractItem';
|
|
7
|
+
import EmojiPickerEmojiRow from './EmojiPickerEmojiRow';
|
|
8
|
+
import { sizes } from './EmojiPickerSizes';
|
|
9
|
+
export class EmojisRowItem extends AbstractItem {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props, sizes.emojiRowHeight);
|
|
12
|
+
_defineProperty(this, "renderItem", context => /*#__PURE__*/React.createElement(EmojiPickerEmojiRow, _extends({}, this.props, {
|
|
13
|
+
virtualItemContext: context
|
|
14
|
+
})));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* LoadingItem.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import "./LoadingItem.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import Spinner from '@atlaskit/spinner';
|
|
7
|
+
import { AbstractItem } from './AbstractItem';
|
|
8
|
+
import { sizes } from './EmojiPickerSizes';
|
|
9
|
+
const emojiPickerSpinner = null;
|
|
10
|
+
export class LoadingItem extends AbstractItem {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({}, sizes.loadingRowHeight);
|
|
13
|
+
_defineProperty(this, "renderItem", () => /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: ax(["_1e0c1txw _1bsb1osq _4t3i1w81 _1bah1h6o _4cvr1h6o _nphsidpf _t1edidpf _1t3b1wug"])
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Spinner, {
|
|
16
|
+
size: "medium"
|
|
17
|
+
}))));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* NoResultsItem.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { AbstractItem } from './AbstractItem';
|
|
6
|
+
import EmojiPickerNoResults from './EmojiPickerNoResults';
|
|
7
|
+
import { sizes } from './EmojiPickerSizes';
|
|
8
|
+
export class NoResultsItem extends AbstractItem {
|
|
9
|
+
constructor(props) {
|
|
10
|
+
super(props, sizes.noResultsHeight);
|
|
11
|
+
_defineProperty(this, "renderItem", () => /*#__PURE__*/React.createElement(EmojiPickerNoResults, this.props));
|
|
12
|
+
}
|
|
13
|
+
}
|