@atlaskit/emoji 71.17.1 → 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 +46 -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 -373
- 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 -352
- 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 -358
- 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 +1 -1
- 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
|
@@ -2,34 +2,32 @@
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./Emoji.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import React, { useEffect,
|
|
5
|
+
import React, { useEffect, useContext, forwardRef } from 'react';
|
|
6
6
|
import { IntlContext } from 'react-intl';
|
|
7
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
8
|
-
import { shouldUseAltRepresentation } from '../../api/EmojiUtils';
|
|
9
|
-
import { defaultEmojiHeight, deleteEmojiLabel, EMOJI_KEYBOARD_KEYS_SUPPORTED, KeyboardKeys, SAMPLING_RATE_EMOJI_RENDERED_EXP } from '../../util/constants';
|
|
10
|
-
import { isImageRepresentation, isMediaRepresentation, isSpriteRepresentation, isUnicodeRepresentation, toEmojiId } from '../../util/type-helpers';
|
|
11
9
|
import { ProviderTypes, UfoEmojiTimings } from '../../types';
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { getDocument } from '@atlaskit/browser-apis';
|
|
10
|
+
import { hasUfoMarked } from '../../util/analytics/hasUfoMarked';
|
|
11
|
+
import { sampledUfoRenderedEmoji } from '../../util/analytics/sampledUfoRenderedEmoji';
|
|
12
|
+
import { ufoExperiences } from '../../util/analytics/ufoExperiences';
|
|
13
|
+
import { useSampledUFOComponentExperience } from '../../util/analytics/useSampledUFOComponentExperience';
|
|
14
|
+
import { deleteEmojiLabel, EMOJI_KEYBOARD_KEYS_SUPPORTED, KeyboardKeys, SAMPLING_RATE_EMOJI_RENDERED_EXP } from '../../util/constants';
|
|
15
|
+
import { isSpriteRepresentation } from '../../util/is-sprite-representation';
|
|
16
|
+
import { isUnicodeRepresentation } from '../../util/is-unicode-representation';
|
|
17
|
+
import { leftClick } from '../../util/left-click';
|
|
18
|
+
import { toEmojiId } from '../../util/to-emoji-id';
|
|
22
19
|
import { messages } from '../i18n';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import
|
|
20
|
+
import { handleDelete } from './handleDelete';
|
|
21
|
+
import { ImageEmoji } from './ImageEmoji';
|
|
22
|
+
import { SpriteEmoji } from './SpriteEmoji';
|
|
23
|
+
import { UnicodeEmoji } from './UnicodeEmoji';
|
|
26
24
|
const emojiSpriteContainer = null;
|
|
27
25
|
const emojiImageContainer = null;
|
|
28
26
|
|
|
29
27
|
// Unicode emojis render as text inside a <span>, not an <img>, so they do not need
|
|
30
28
|
// borderRadius (which would clip a background on hover) or the img { display: block } rule.
|
|
31
29
|
const emojiUnicodeContainer = null;
|
|
32
|
-
const unicodeEmojiCanvasSize = 128;
|
|
30
|
+
export const unicodeEmojiCanvasSize = 128;
|
|
33
31
|
const handleMouseDown = (props, event) => {
|
|
34
32
|
// Clicked emoji delete button
|
|
35
33
|
if (event.target instanceof Element && event.target.getAttribute('aria-label') === deleteEmojiLabel) {
|
|
@@ -82,340 +80,6 @@ const handleFocus = (props, event) => {
|
|
|
82
80
|
onFocus(toEmojiId(emoji), emoji, event);
|
|
83
81
|
}
|
|
84
82
|
};
|
|
85
|
-
const handleDelete = (props, event) => {
|
|
86
|
-
const {
|
|
87
|
-
emoji,
|
|
88
|
-
onDelete
|
|
89
|
-
} = props;
|
|
90
|
-
if (onDelete) {
|
|
91
|
-
onDelete(toEmojiId(emoji), emoji, event);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
const handleImageError = (props, event) => {
|
|
95
|
-
const {
|
|
96
|
-
emoji,
|
|
97
|
-
onLoadError
|
|
98
|
-
} = props;
|
|
99
|
-
|
|
100
|
-
// Hide error state (but keep space for it)
|
|
101
|
-
if (event.target) {
|
|
102
|
-
const target = event.target;
|
|
103
|
-
target.style.visibility = 'hidden';
|
|
104
|
-
}
|
|
105
|
-
if (onLoadError) {
|
|
106
|
-
onLoadError(toEmojiId(emoji), emoji, event);
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// Pure functional components are used in favour of class based components, due to the performance!
|
|
111
|
-
// When rendering 1500+ emoji using class based components had a significant impact.
|
|
112
|
-
// TODO: add UFO tracking for sprite emoji
|
|
113
|
-
export const SpriteEmoji = props => {
|
|
114
|
-
const {
|
|
115
|
-
emoji,
|
|
116
|
-
fitToHeight,
|
|
117
|
-
selected,
|
|
118
|
-
selectOnHover,
|
|
119
|
-
className
|
|
120
|
-
} = props;
|
|
121
|
-
const representation = emoji.representation;
|
|
122
|
-
const sprite = representation.sprite;
|
|
123
|
-
const classes = `${emojiNodeStyles} ${selected ? commonSelectedStyles : ''} ${selectOnHover ? selectOnHoverStyles : ''} ${className ? className : ''}`;
|
|
124
|
-
let sizing = {};
|
|
125
|
-
if (fitToHeight) {
|
|
126
|
-
if (expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true)) {
|
|
127
|
-
sizing = {
|
|
128
|
-
minHeight: `${fitToHeight}px`,
|
|
129
|
-
minWidth: `${fitToHeight}px`
|
|
130
|
-
};
|
|
131
|
-
} else {
|
|
132
|
-
sizing = {
|
|
133
|
-
width: `${fitToHeight}px`,
|
|
134
|
-
height: `${fitToHeight}px`,
|
|
135
|
-
minHeight: `${fitToHeight}px`,
|
|
136
|
-
minWidth: `${fitToHeight}px`
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const xPositionInPercent = 100 / (sprite.column - 1) * (representation.xIndex - 0);
|
|
141
|
-
const yPositionInPercent = 100 / (sprite.row - 1) * (representation.yIndex - 0);
|
|
142
|
-
const style = {
|
|
143
|
-
backgroundImage: `url(${sprite.url})`,
|
|
144
|
-
backgroundPosition: `${xPositionInPercent}% ${yPositionInPercent}%`,
|
|
145
|
-
backgroundSize: `${sprite.column * 100}% ${sprite.row * 100}%`,
|
|
146
|
-
...sizing
|
|
147
|
-
};
|
|
148
|
-
return (
|
|
149
|
-
/*#__PURE__*/
|
|
150
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
151
|
-
React.createElement(EmojiNodeWrapper, _extends({}, props, {
|
|
152
|
-
type: "sprite",
|
|
153
|
-
className: classes
|
|
154
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
155
|
-
className: emojiSprite,
|
|
156
|
-
style: style
|
|
157
|
-
}))
|
|
158
|
-
);
|
|
159
|
-
};
|
|
160
|
-
const useUnicodeEmojiImage = unicodeEmoji => {
|
|
161
|
-
const [state, setState] = useState({
|
|
162
|
-
status: 'loading'
|
|
163
|
-
});
|
|
164
|
-
useEffect(() => {
|
|
165
|
-
let cancelled = false;
|
|
166
|
-
let imagePathToRevoke;
|
|
167
|
-
setState({
|
|
168
|
-
status: 'loading',
|
|
169
|
-
unicodeEmoji
|
|
170
|
-
});
|
|
171
|
-
void renderUnicodeEmojiToImagePath(unicodeEmoji).then(imagePath => {
|
|
172
|
-
if (cancelled) {
|
|
173
|
-
if (imagePath) {
|
|
174
|
-
URL.revokeObjectURL(imagePath);
|
|
175
|
-
}
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
imagePathToRevoke = imagePath;
|
|
179
|
-
setState(imagePath ? {
|
|
180
|
-
status: 'ready',
|
|
181
|
-
unicodeEmoji,
|
|
182
|
-
imagePath
|
|
183
|
-
} : {
|
|
184
|
-
status: 'failed',
|
|
185
|
-
unicodeEmoji
|
|
186
|
-
});
|
|
187
|
-
}).catch(() => {
|
|
188
|
-
if (!cancelled) {
|
|
189
|
-
setState({
|
|
190
|
-
status: 'failed',
|
|
191
|
-
unicodeEmoji
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
return () => {
|
|
196
|
-
cancelled = true;
|
|
197
|
-
if (imagePathToRevoke) {
|
|
198
|
-
URL.revokeObjectURL(imagePathToRevoke);
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
}, [unicodeEmoji]);
|
|
202
|
-
return state;
|
|
203
|
-
};
|
|
204
|
-
const UnicodeEmojiImage = props => {
|
|
205
|
-
const {
|
|
206
|
-
emoji,
|
|
207
|
-
fitToHeight,
|
|
208
|
-
showTooltip
|
|
209
|
-
} = props;
|
|
210
|
-
const emojiText = emoji.representation.unicodeEmoji;
|
|
211
|
-
const unicodeEmojiImage = useUnicodeEmojiImage(emojiText);
|
|
212
|
-
const hasCurrentEmojiImage = unicodeEmojiImage.unicodeEmoji === emojiText;
|
|
213
|
-
if (isSSR() || !hasCurrentEmojiImage || unicodeEmojiImage.status === 'loading') {
|
|
214
|
-
return /*#__PURE__*/React.createElement(EmojiPlaceholder, {
|
|
215
|
-
shortName: emoji.shortName,
|
|
216
|
-
showTooltip: showTooltip,
|
|
217
|
-
size: fitToHeight,
|
|
218
|
-
loading: true
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
if (unicodeEmojiImage.status === 'ready') {
|
|
222
|
-
return /*#__PURE__*/React.createElement(ImageEmoji, _extends({}, props, {
|
|
223
|
-
emoji: {
|
|
224
|
-
...emoji,
|
|
225
|
-
altRepresentation: undefined,
|
|
226
|
-
representation: {
|
|
227
|
-
imagePath: unicodeEmojiImage.imagePath,
|
|
228
|
-
width: unicodeEmojiCanvasSize,
|
|
229
|
-
height: unicodeEmojiCanvasSize
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}));
|
|
233
|
-
}
|
|
234
|
-
return /*#__PURE__*/React.createElement(EmojiPlaceholder, {
|
|
235
|
-
shortName: emoji.shortName,
|
|
236
|
-
showTooltip: showTooltip,
|
|
237
|
-
size: fitToHeight
|
|
238
|
-
});
|
|
239
|
-
};
|
|
240
|
-
export const UnicodeEmoji = props => {
|
|
241
|
-
const {
|
|
242
|
-
emoji,
|
|
243
|
-
selected,
|
|
244
|
-
selectOnHover,
|
|
245
|
-
className,
|
|
246
|
-
fitToHeight,
|
|
247
|
-
renderUnicodeEmojiAsImage = true
|
|
248
|
-
} = props;
|
|
249
|
-
if (renderUnicodeEmojiAsImage) {
|
|
250
|
-
return /*#__PURE__*/React.createElement(UnicodeEmojiImage, props);
|
|
251
|
-
}
|
|
252
|
-
const classes = `${emojiNodeStyles} ${selected ? commonSelectedStyles : ''} ${selectOnHover ? selectOnHoverStyles : ''} ${className ? className : ''}`;
|
|
253
|
-
const emojiText = emoji.representation.unicodeEmoji;
|
|
254
|
-
const defaultSize = `${fitToHeight !== null && fitToHeight !== void 0 ? fitToHeight : defaultEmojiHeight}px`;
|
|
255
|
-
const emojiSize = `var(--emoji-common-unicode-size, ${defaultSize})`;
|
|
256
|
-
const style = {
|
|
257
|
-
display: 'inline-flex',
|
|
258
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
259
|
-
fontSize: emojiSize,
|
|
260
|
-
alignItems: 'center',
|
|
261
|
-
aspectRatio: '1/1'
|
|
262
|
-
};
|
|
263
|
-
return (
|
|
264
|
-
/*#__PURE__*/
|
|
265
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
266
|
-
React.createElement(EmojiNodeWrapper, _extends({}, props, {
|
|
267
|
-
type: "unicode",
|
|
268
|
-
className: classes
|
|
269
|
-
}), /*#__PURE__*/React.createElement("span", {
|
|
270
|
-
style: style
|
|
271
|
-
}, emojiText))
|
|
272
|
-
);
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
// Keep as pure functional component, see renderAsSprite.
|
|
276
|
-
export const ImageEmoji = props => {
|
|
277
|
-
const {
|
|
278
|
-
emoji,
|
|
279
|
-
fitToHeight,
|
|
280
|
-
selected,
|
|
281
|
-
selectOnHover,
|
|
282
|
-
className,
|
|
283
|
-
showDelete,
|
|
284
|
-
onLoadSuccess,
|
|
285
|
-
disableLazyLoad,
|
|
286
|
-
autoWidth
|
|
287
|
-
} = props;
|
|
288
|
-
const [ref, inView] = useInView({
|
|
289
|
-
triggerOnce: true
|
|
290
|
-
});
|
|
291
|
-
const ufoExp = useMemo(() => sampledUfoRenderedEmoji(emoji), [emoji]);
|
|
292
|
-
const classes = `${emojiMainStyle} ${emojiNodeStyles} ${selected ? commonSelectedStyles : ''} ${selectOnHover ? selectOnHoverStyles : ''} ${emojiImage} ${className ? className : ''} ${showDelete ? deletableEmoji : ''}`;
|
|
293
|
-
let width;
|
|
294
|
-
let height;
|
|
295
|
-
let src;
|
|
296
|
-
const representation = shouldUseAltRepresentation(emoji, fitToHeight) ? emoji.altRepresentation : emoji.representation;
|
|
297
|
-
if (isImageRepresentation(representation)) {
|
|
298
|
-
src = representation.imagePath;
|
|
299
|
-
width = representation.width;
|
|
300
|
-
height = representation.height;
|
|
301
|
-
} else if (isMediaRepresentation(representation)) {
|
|
302
|
-
src = representation.mediaPath;
|
|
303
|
-
width = representation.width;
|
|
304
|
-
height = representation.height;
|
|
305
|
-
}
|
|
306
|
-
let sizing = {};
|
|
307
|
-
if (fitToHeight && width && height) {
|
|
308
|
-
const sizingWidth = autoWidth ? 'auto' : fitToHeight / height * width;
|
|
309
|
-
// Presize image, to prevent reflow due to size changes after loading
|
|
310
|
-
sizing = {
|
|
311
|
-
width: sizingWidth,
|
|
312
|
-
height: fitToHeight
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
const onError = useCallback(event => {
|
|
316
|
-
handleImageError({
|
|
317
|
-
emoji: props.emoji,
|
|
318
|
-
onLoadError: props.onLoadError
|
|
319
|
-
}, event);
|
|
320
|
-
}, [props.emoji, props.onLoadError]);
|
|
321
|
-
const onLoad = useCallback(() => {
|
|
322
|
-
const mountedMark = ufoExp.metrics.marks.find(mark => mark.name === UfoEmojiTimings.MOUNTED_END);
|
|
323
|
-
// onload could trigger before onBeforeLoad when emojis in viewport at start, so we need to mark onload start manually.
|
|
324
|
-
if (!hasUfoMarked(ufoExp, UfoEmojiTimings.ONLOAD_START)) {
|
|
325
|
-
ufoExp.mark(UfoEmojiTimings.ONLOAD_START, mountedMark === null || mountedMark === void 0 ? void 0 : mountedMark.time);
|
|
326
|
-
}
|
|
327
|
-
const loadedStartMark = ufoExp.metrics.marks.find(mark => mark.name === UfoEmojiTimings.ONLOAD_START);
|
|
328
|
-
if (mountedMark && loadedStartMark) {
|
|
329
|
-
ufoExp.addMetadata({
|
|
330
|
-
lazyLoad: loadedStartMark.time > mountedMark.time
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
// onload_start
|
|
334
|
-
if (!hasUfoMarked(ufoExp, UfoEmojiTimings.ONLOAD_END)) {
|
|
335
|
-
ufoExp.mark(UfoEmojiTimings.ONLOAD_END);
|
|
336
|
-
}
|
|
337
|
-
ufoExp.success({
|
|
338
|
-
metadata: {
|
|
339
|
-
IBSupported: browserSupport.supportsIntersectionObserver
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
if (onLoadSuccess) {
|
|
343
|
-
onLoadSuccess(emoji);
|
|
344
|
-
}
|
|
345
|
-
}, [emoji, onLoadSuccess, ufoExp]);
|
|
346
|
-
const onBeforeLoad = useCallback(() => {
|
|
347
|
-
if (!hasUfoMarked(ufoExp, UfoEmojiTimings.ONLOAD_START)) {
|
|
348
|
-
ufoExp.mark(UfoEmojiTimings.ONLOAD_START);
|
|
349
|
-
}
|
|
350
|
-
}, [ufoExp]);
|
|
351
|
-
const onMouseOver = useCallback(e => {
|
|
352
|
-
var _getDocument, _getDocument$activeEl;
|
|
353
|
-
// only disable tooltip when not on focus
|
|
354
|
-
if (!((_getDocument = getDocument()) !== null && _getDocument !== void 0 && (_getDocument$activeEl = _getDocument.activeElement) !== null && _getDocument$activeEl !== void 0 && _getDocument$activeEl.contains(e.target))) {
|
|
355
|
-
e.stopPropagation();
|
|
356
|
-
}
|
|
357
|
-
}, []);
|
|
358
|
-
|
|
359
|
-
// because of the lack of browser support of on before load natively, used IntersectionObserver helper hook to mimic the before load time mark for UFO.
|
|
360
|
-
useEffect(() => {
|
|
361
|
-
if (inView) {
|
|
362
|
-
onBeforeLoad();
|
|
363
|
-
}
|
|
364
|
-
}, [inView, onBeforeLoad]);
|
|
365
|
-
const emojiNode = /*#__PURE__*/React.createElement("img", _extends({
|
|
366
|
-
loading: disableLazyLoad ? 'eager' : 'lazy',
|
|
367
|
-
src: src,
|
|
368
|
-
key: src,
|
|
369
|
-
alt: emoji.name || emoji.shortName || '',
|
|
370
|
-
"data-emoji-short-name": emoji.shortName,
|
|
371
|
-
"data-emoji-id": emoji.id,
|
|
372
|
-
"data-emoji-text": emoji.fallback || emoji.shortName
|
|
373
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
374
|
-
,
|
|
375
|
-
className: "emoji"
|
|
376
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
377
|
-
,
|
|
378
|
-
style: {
|
|
379
|
-
visibility: 'visible'
|
|
380
|
-
},
|
|
381
|
-
onError: onError,
|
|
382
|
-
onLoad: onLoad
|
|
383
|
-
}, sizing, {
|
|
384
|
-
"data-vc": "emoji"
|
|
385
|
-
}));
|
|
386
|
-
|
|
387
|
-
// show a tooltip for deletable emoji only on focus
|
|
388
|
-
if (showDelete) {
|
|
389
|
-
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
390
|
-
content: /*#__PURE__*/React.createElement(DeletableEmojiTooltipContent, null),
|
|
391
|
-
position: "right-start",
|
|
392
|
-
tag: "span"
|
|
393
|
-
}, /*#__PURE__*/React.createElement(EmojiNodeWrapper, _extends({}, props, {
|
|
394
|
-
"aria-labelledby": `screenreader-emoji-${emoji.id}`,
|
|
395
|
-
type: "image"
|
|
396
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
397
|
-
,
|
|
398
|
-
className: classes,
|
|
399
|
-
ref: ref,
|
|
400
|
-
showTooltip: false // avoid showing both tooltip and title
|
|
401
|
-
,
|
|
402
|
-
onMouseOver: onMouseOver
|
|
403
|
-
}), emojiNode, /*#__PURE__*/React.createElement(DeleteButton, {
|
|
404
|
-
onClick: event => handleDelete(props, event)
|
|
405
|
-
}), /*#__PURE__*/React.createElement(DeletableEmojiTooltipContentForScreenReader, {
|
|
406
|
-
emoji: emoji
|
|
407
|
-
})));
|
|
408
|
-
}
|
|
409
|
-
return (
|
|
410
|
-
/*#__PURE__*/
|
|
411
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
412
|
-
React.createElement(EmojiNodeWrapper, _extends({}, props, {
|
|
413
|
-
type: "image",
|
|
414
|
-
className: classes,
|
|
415
|
-
ref: ref
|
|
416
|
-
}), emojiNode)
|
|
417
|
-
);
|
|
418
|
-
};
|
|
419
83
|
export const EmojiNodeWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
420
84
|
var _emoji$name;
|
|
421
85
|
const {
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
._16jlkb7n{flex-grow:1}
|
|
6
6
|
._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
|
|
7
7
|
._16qsjgpa{box-shadow:0 1px 1px 0 var(--ds-border,#0b120e24)}
|
|
8
|
-
._18u019bv{margin-left:10px}
|
|
9
|
-
._18u0r5cr{margin-left:var(--ds-space-negative-050,-4px)}
|
|
10
8
|
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
11
9
|
._19bvidpf{padding-left:0}
|
|
12
10
|
._1bahesu3{justify-content:flex-end}
|
|
@@ -15,9 +13,7 @@
|
|
|
15
13
|
._1o9zidpf{flex-shrink:0}
|
|
16
14
|
._1o9zkb7n{flex-shrink:1}
|
|
17
15
|
._1pbydx66{z-index:9999}
|
|
18
|
-
._1wpz1h6o{align-self:center}
|
|
19
16
|
._1xi2idpf{right:0}
|
|
20
|
-
._2hwx1i6y{margin-right:var(--ds-space-negative-025,-2px)}
|
|
21
17
|
._4cvr1h6o{align-items:center}
|
|
22
18
|
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
23
19
|
._ca0q12x7{padding-top:var(--ds-space-075,6px)}
|
|
@@ -28,7 +24,5 @@
|
|
|
28
24
|
._kqswstnw{position:absolute}
|
|
29
25
|
._n3td12x7{padding-bottom:var(--ds-space-075,6px)}
|
|
30
26
|
._n3td1crf{padding-bottom:9pt}
|
|
31
|
-
._otyr19bv{margin-bottom:10px}
|
|
32
|
-
._p12f3sup{max-width:285px}
|
|
33
27
|
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
34
28
|
._u5f319bv{padding-right:10px}
|
|
@@ -3,37 +3,20 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./EmojiActions.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import {
|
|
6
|
+
import { useState, useRef, memo, useLayoutEffect, useCallback, useEffect } from 'react';
|
|
7
|
+
import { injectIntl } from 'react-intl';
|
|
7
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
9
|
+
import { DEFAULT_TONE } from '../../util/constants';
|
|
10
|
+
import { messages } from '../i18n';
|
|
11
|
+
import { EmojiPickerListSearch } from '../picker/EmojiPickerListSearch';
|
|
12
|
+
import { AddOwnEmoji } from './AddOwnEmoji';
|
|
10
13
|
import EmojiDeletePreview from './EmojiDeletePreview';
|
|
11
14
|
import EmojiUploadPicker from './EmojiUploadPicker';
|
|
12
|
-
import
|
|
13
|
-
import ToneSelector from './ToneSelector';
|
|
15
|
+
import { isRefreshEmojiPickerEnabled } from './isRefreshEmojiPickerEnabled';
|
|
14
16
|
import ProductivityColorSelector, { productivityColorSelectorId } from './ProductivityColorSelector';
|
|
15
|
-
import { EmojiPickerListSearch } from '../picker/EmojiPickerListSearch';
|
|
16
|
-
import { messages } from '../i18n';
|
|
17
|
-
import AkButton from '@atlaskit/button/standard-button';
|
|
18
|
-
import AddIcon from '@atlaskit/icon/core/add';
|
|
19
17
|
import { setSkinToneAriaLabelText } from './setSkinToneAriaLabelText';
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
23
|
-
const isRefreshEmojiPickerEnabled = () => {
|
|
24
|
-
if (!FeatureGates.initializeCompleted()) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
|
|
29
|
-
const isEnabled = FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false);
|
|
30
|
-
return isEnabled;
|
|
31
|
-
};
|
|
32
|
-
const styles = {
|
|
33
|
-
icon: "_18u0r5cr _2hwx1i6y"
|
|
34
|
-
};
|
|
35
|
-
const addCustomEmoji = null;
|
|
36
|
-
const addCustomEmojiButton = null;
|
|
18
|
+
import TonePreviewButton from './TonePreviewButton';
|
|
19
|
+
import ToneSelector from './ToneSelector';
|
|
37
20
|
const emojiActionsWrapper = null;
|
|
38
21
|
const emojiToneSelectorContainer = null;
|
|
39
22
|
const productivityColorPopup = null;
|
|
@@ -97,43 +80,6 @@ const ProductivityColorPopupContent = ({
|
|
|
97
80
|
};
|
|
98
81
|
export const emojiActionsTestId = 'emoji-actions';
|
|
99
82
|
export const uploadEmojiTestId = 'upload-emoji';
|
|
100
|
-
|
|
101
|
-
// Generic Type for the wrapped functional component
|
|
102
|
-
|
|
103
|
-
export const AddOwnEmoji = props => {
|
|
104
|
-
const {
|
|
105
|
-
onOpenUpload,
|
|
106
|
-
uploadEnabled
|
|
107
|
-
} = props;
|
|
108
|
-
const handleOpenUpload = useCallback(event => {
|
|
109
|
-
if (fg('platform_emoji_keep_picker_open_on_upload') || isRefreshEmojiPickerEnabled()) {
|
|
110
|
-
event.preventDefault();
|
|
111
|
-
event.stopPropagation();
|
|
112
|
-
}
|
|
113
|
-
onOpenUpload();
|
|
114
|
-
}, [onOpenUpload]);
|
|
115
|
-
return /*#__PURE__*/React.createElement(Fragment, null, uploadEnabled && /*#__PURE__*/React.createElement("div", {
|
|
116
|
-
"data-testid": uploadEmojiTestId,
|
|
117
|
-
className: ax(["_1wpz1h6o _18u019bv _otyr19bv"])
|
|
118
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.addCustomEmojiLabel, label => /*#__PURE__*/React.createElement(AkButton, {
|
|
119
|
-
onClick: handleOpenUpload,
|
|
120
|
-
iconBefore: /*#__PURE__*/React.createElement(Box, {
|
|
121
|
-
xcss: styles.icon
|
|
122
|
-
}, /*#__PURE__*/React.createElement(AddIcon, {
|
|
123
|
-
color: "currentColor",
|
|
124
|
-
label: ""
|
|
125
|
-
})),
|
|
126
|
-
appearance: "subtle"
|
|
127
|
-
// TODO: (from codemod) Buttons with "component", "css" or "style" prop can't be automatically migrated with codemods. Please migrate it manually.
|
|
128
|
-
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
129
|
-
,
|
|
130
|
-
|
|
131
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
132
|
-
className: ax(["_p12f3sup", emojiPickerAddEmoji]),
|
|
133
|
-
tabIndex: 0,
|
|
134
|
-
id: "add-custom-emoji"
|
|
135
|
-
}, label))));
|
|
136
|
-
};
|
|
137
83
|
const TonesWrapper = props => {
|
|
138
84
|
const {
|
|
139
85
|
activeCategoryId,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/* EmojiPlaceholder.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
|
+
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
2
3
|
import "./EmojiPlaceholder.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
7
|
import { defaultEmojiHeight, defaultDenseEmojiHeight } from '../../util/constants';
|
|
8
|
+
import { emojiPlaceholderTestId } from './emojiPlaceholderTestId';
|
|
7
9
|
import { placeholder } from './styles';
|
|
8
10
|
const placeholderContainer = null;
|
|
9
|
-
export const emojiPlaceholderTestId = shortName => `emoji-placeholder-${shortName}`;
|
|
10
11
|
const EmojiPlaceholder = props => {
|
|
11
12
|
const {
|
|
12
13
|
shortName,
|
|
@@ -51,4 +52,9 @@ const EmojiPlaceholder = props => {
|
|
|
51
52
|
title: showTooltip ? shortName : ''
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
|
-
export default EmojiPlaceholder;
|
|
55
|
+
export default EmojiPlaceholder;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated Use `import { emojiPlaceholderTestId } from '@atlaskit/emoji/emoji-placeholder'` instead.
|
|
59
|
+
*/
|
|
60
|
+
export { emojiPlaceholderTestId } from './emojiPlaceholderTestId';
|