@atlaskit/reactions 21.5.1 → 21.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/MockReactionsClient/package.json +14 -0
- package/dist/cjs/{client/MockReactionsClient.js → MockReactionsClient.js} +4 -6
- package/dist/cjs/analytics/analytics.js +141 -0
- package/dist/cjs/analytics/index.js +4 -134
- package/dist/cjs/client/ReactionServiceClient.js +29 -6
- package/dist/cjs/client/index.js +1 -33
- package/dist/cjs/components/{Counter.js → Counter/Counter.js} +32 -39
- package/dist/cjs/components/Counter/index.js +36 -0
- package/dist/cjs/components/Counter/styles.js +33 -0
- package/dist/cjs/components/EmojiButton/EmojiButton.js +58 -0
- package/dist/cjs/components/EmojiButton/index.js +19 -0
- package/dist/cjs/components/EmojiButton/styles.js +25 -0
- package/dist/cjs/components/FlashAnimation/FlashAnimation.js +42 -0
- package/dist/cjs/components/FlashAnimation/index.js +19 -0
- package/dist/cjs/components/{FlashAnimation.js → FlashAnimation/styles.js} +7 -26
- package/dist/cjs/components/Reaction/Reaction.js +163 -0
- package/dist/cjs/components/Reaction/index.js +19 -0
- package/dist/cjs/components/Reaction/styles.js +70 -0
- package/dist/cjs/components/ReactionPicker/ReactionPicker.js +272 -0
- package/dist/cjs/components/ReactionPicker/index.js +19 -0
- package/dist/cjs/components/ReactionPicker/styles.js +37 -0
- package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +71 -0
- package/dist/cjs/components/ReactionTooltip/index.js +19 -0
- package/dist/cjs/components/ReactionTooltip/styles.js +46 -0
- package/dist/cjs/components/Reactions/Reactions.js +200 -0
- package/dist/cjs/components/Reactions/index.js +25 -0
- package/dist/cjs/components/Reactions/styles.js +29 -0
- package/dist/cjs/components/Selector/Selector.js +132 -0
- package/dist/cjs/components/Selector/index.js +30 -0
- package/dist/cjs/components/Selector/styles.js +56 -0
- package/dist/cjs/components/ShowMore/ShowMore.js +71 -0
- package/dist/cjs/components/ShowMore/index.js +19 -0
- package/dist/cjs/components/ShowMore/styles.js +44 -0
- package/dist/cjs/components/Trigger/Trigger.js +59 -0
- package/dist/cjs/components/Trigger/index.js +13 -0
- package/dist/cjs/components/Trigger/styles.js +46 -0
- package/dist/cjs/components/{UfoErrorBoundary.js → UfoErrorBoundary/UfoErrorBoundary.js} +3 -0
- package/dist/cjs/components/UfoErrorBoundary/index.js +13 -0
- package/dist/cjs/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +62 -0
- package/dist/cjs/containers/ConnectedReactionPicker/index.js +13 -0
- package/dist/cjs/containers/ConnectedReactionsView/ConnectedReactionsView.js +258 -0
- package/dist/cjs/containers/ConnectedReactionsView/index.js +13 -0
- package/dist/cjs/containers/index.js +23 -13
- package/dist/cjs/hooks/index.js +13 -0
- package/dist/cjs/hooks/useClickAway.js +35 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/shared/constants.js +39 -8
- package/dist/cjs/{components → shared}/i18n.js +1 -1
- package/dist/cjs/shared/index.js +11 -3
- package/dist/cjs/shared/utils.js +54 -0
- package/dist/cjs/store/{ReactionsStore.js → MemoryReactionsStore.js} +37 -18
- package/dist/cjs/store/ReactionConsumer.js +43 -15
- package/dist/cjs/store/index.js +8 -2
- package/dist/cjs/store/utils.js +4 -10
- package/dist/cjs/{client/ReactionClient.js → types/client.js} +0 -0
- package/dist/cjs/types/index.js +2 -2
- package/dist/cjs/types/reaction.js +43 -0
- package/dist/cjs/types/{DetailedReaction.js → store.js} +0 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/{client/MockReactionsClient.js → MockReactionsClient.js} +4 -5
- package/dist/es2019/analytics/analytics.js +64 -0
- package/dist/es2019/analytics/index.js +3 -65
- package/dist/es2019/analytics/ufo.js +0 -1
- package/dist/es2019/client/ReactionServiceClient.js +31 -6
- package/dist/es2019/client/index.js +1 -2
- package/dist/es2019/components/{Counter.js → Counter/Counter.js} +26 -31
- package/dist/es2019/components/Counter/index.js +3 -0
- package/dist/es2019/components/Counter/styles.js +20 -0
- package/dist/es2019/components/EmojiButton/EmojiButton.js +35 -0
- package/dist/es2019/components/EmojiButton/index.js +1 -0
- package/dist/es2019/components/EmojiButton/styles.js +16 -0
- package/dist/es2019/components/FlashAnimation/FlashAnimation.js +18 -0
- package/dist/es2019/components/FlashAnimation/index.js +1 -0
- package/dist/es2019/components/{FlashAnimation.js → FlashAnimation/styles.js} +6 -17
- package/dist/es2019/components/Reaction/Reaction.js +104 -0
- package/dist/es2019/components/Reaction/index.js +1 -0
- package/dist/es2019/components/Reaction/styles.js +55 -0
- package/dist/es2019/components/ReactionPicker/ReactionPicker.js +208 -0
- package/dist/es2019/components/ReactionPicker/index.js +1 -0
- package/dist/es2019/components/ReactionPicker/styles.js +23 -0
- package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +46 -0
- package/dist/es2019/components/ReactionTooltip/index.js +1 -0
- package/dist/es2019/components/ReactionTooltip/styles.js +32 -0
- package/dist/es2019/components/Reactions/Reactions.js +156 -0
- package/dist/es2019/components/Reactions/index.js +1 -0
- package/dist/es2019/components/Reactions/styles.js +19 -0
- package/dist/es2019/components/Selector/Selector.js +98 -0
- package/dist/es2019/components/Selector/index.js +3 -0
- package/dist/es2019/components/Selector/styles.js +39 -0
- package/dist/es2019/components/ShowMore/ShowMore.js +43 -0
- package/dist/es2019/components/ShowMore/index.js +1 -0
- package/dist/es2019/components/ShowMore/styles.js +30 -0
- package/dist/es2019/components/{Trigger.js → Trigger/Trigger.js} +15 -20
- package/dist/es2019/components/Trigger/index.js +1 -0
- package/dist/es2019/components/Trigger/styles.js +24 -0
- package/dist/es2019/components/{UfoErrorBoundary.js → UfoErrorBoundary/UfoErrorBoundary.js} +4 -0
- package/dist/es2019/components/UfoErrorBoundary/index.js +1 -0
- package/dist/es2019/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +27 -0
- package/dist/es2019/containers/ConnectedReactionPicker/index.js +1 -0
- package/dist/es2019/containers/ConnectedReactionsView/ConnectedReactionsView.js +166 -0
- package/dist/es2019/containers/ConnectedReactionsView/index.js +1 -0
- package/dist/es2019/containers/index.js +2 -2
- package/dist/es2019/hooks/index.js +1 -0
- package/dist/es2019/hooks/useClickAway.js +27 -0
- package/dist/es2019/index.js +3 -1
- package/dist/es2019/shared/constants.js +32 -4
- package/dist/es2019/{components → shared}/i18n.js +1 -1
- package/dist/es2019/shared/index.js +6 -2
- package/dist/es2019/shared/utils.js +35 -0
- package/dist/es2019/store/{ReactionsStore.js → MemoryReactionsStore.js} +36 -17
- package/dist/es2019/store/ReactionConsumer.js +18 -12
- package/dist/es2019/store/index.js +1 -1
- package/dist/es2019/store/utils.js +8 -4
- package/dist/es2019/{client/ReactionClient.js → types/client.js} +0 -0
- package/dist/es2019/types/index.js +1 -1
- package/dist/es2019/types/reaction.js +34 -0
- package/dist/es2019/types/{DetailedReaction.js → store.js} +0 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/{client/MockReactionsClient.js → MockReactionsClient.js} +4 -5
- package/dist/esm/analytics/analytics.js +99 -0
- package/dist/esm/analytics/index.js +3 -99
- package/dist/esm/analytics/ufo.js +0 -1
- package/dist/esm/client/ReactionServiceClient.js +30 -6
- package/dist/esm/client/index.js +1 -2
- package/dist/esm/components/{Counter.js → Counter/Counter.js} +26 -31
- package/dist/esm/components/Counter/index.js +3 -0
- package/dist/esm/components/Counter/styles.js +20 -0
- package/dist/esm/components/EmojiButton/EmojiButton.js +35 -0
- package/dist/esm/components/EmojiButton/index.js +1 -0
- package/dist/esm/components/EmojiButton/styles.js +16 -0
- package/dist/esm/components/FlashAnimation/FlashAnimation.js +20 -0
- package/dist/esm/components/FlashAnimation/index.js +1 -0
- package/dist/esm/components/{FlashAnimation.js → FlashAnimation/styles.js} +6 -19
- package/dist/esm/components/Reaction/Reaction.js +131 -0
- package/dist/esm/components/Reaction/index.js +1 -0
- package/dist/esm/components/Reaction/styles.js +55 -0
- package/dist/esm/components/ReactionPicker/ReactionPicker.js +243 -0
- package/dist/esm/components/ReactionPicker/index.js +1 -0
- package/dist/esm/components/ReactionPicker/styles.js +23 -0
- package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +46 -0
- package/dist/esm/components/ReactionTooltip/index.js +1 -0
- package/dist/esm/components/ReactionTooltip/styles.js +32 -0
- package/dist/esm/components/Reactions/Reactions.js +166 -0
- package/dist/esm/components/Reactions/index.js +1 -0
- package/dist/esm/components/Reactions/styles.js +19 -0
- package/dist/esm/components/Selector/Selector.js +107 -0
- package/dist/esm/components/Selector/index.js +3 -0
- package/dist/esm/components/Selector/styles.js +41 -0
- package/dist/esm/components/ShowMore/ShowMore.js +46 -0
- package/dist/esm/components/ShowMore/index.js +1 -0
- package/dist/esm/components/ShowMore/styles.js +30 -0
- package/dist/esm/components/{Trigger.js → Trigger/Trigger.js} +15 -20
- package/dist/esm/components/Trigger/index.js +1 -0
- package/dist/esm/components/Trigger/styles.js +31 -0
- package/dist/esm/components/{UfoErrorBoundary.js → UfoErrorBoundary/UfoErrorBoundary.js} +4 -0
- package/dist/esm/components/UfoErrorBoundary/index.js +1 -0
- package/dist/esm/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +46 -0
- package/dist/esm/containers/ConnectedReactionPicker/index.js +1 -0
- package/dist/esm/containers/ConnectedReactionsView/ConnectedReactionsView.js +227 -0
- package/dist/esm/containers/ConnectedReactionsView/index.js +1 -0
- package/dist/esm/containers/index.js +2 -2
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/useClickAway.js +28 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/shared/constants.js +34 -4
- package/dist/esm/{components → shared}/i18n.js +1 -1
- package/dist/esm/shared/index.js +6 -2
- package/dist/esm/shared/utils.js +41 -0
- package/dist/esm/store/{ReactionsStore.js → MemoryReactionsStore.js} +36 -20
- package/dist/esm/store/ReactionConsumer.js +42 -15
- package/dist/esm/store/index.js +1 -1
- package/dist/esm/store/utils.js +8 -4
- package/dist/{es2019/types/ReactionSource.js → esm/types/client.js} +0 -0
- package/dist/esm/types/index.js +1 -1
- package/dist/esm/types/reaction.js +34 -0
- package/dist/{es2019/types/ReactionSummary.js → esm/types/store.js} +0 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/MockReactionsClient.d.ts +20 -0
- package/dist/types/analytics/analytics.d.ts +96 -0
- package/dist/types/analytics/index.d.ts +1 -96
- package/dist/types/client/ReactionServiceClient.d.ts +27 -10
- package/dist/types/client/index.d.ts +0 -2
- package/dist/types/components/Counter/Counter.d.ts +40 -0
- package/dist/types/components/Counter/index.d.ts +3 -0
- package/dist/types/components/Counter/styles.d.ts +3 -0
- package/dist/types/components/EmojiButton/EmojiButton.d.ts +22 -0
- package/dist/types/components/EmojiButton/index.d.ts +2 -0
- package/dist/types/components/EmojiButton/styles.d.ts +1 -0
- package/dist/types/components/FlashAnimation/FlashAnimation.d.ts +20 -0
- package/dist/types/components/FlashAnimation/index.d.ts +2 -0
- package/dist/types/components/FlashAnimation/styles.d.ts +3 -0
- package/dist/types/components/Reaction/Reaction.d.ts +38 -0
- package/dist/types/components/Reaction/index.d.ts +2 -0
- package/dist/types/components/Reaction/styles.d.ts +10 -0
- package/dist/types/components/ReactionPicker/ReactionPicker.d.ts +53 -0
- package/dist/types/components/ReactionPicker/index.d.ts +2 -0
- package/dist/types/components/ReactionPicker/styles.d.ts +3 -0
- package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +22 -0
- package/dist/types/components/ReactionTooltip/index.d.ts +2 -0
- package/dist/types/components/ReactionTooltip/styles.d.ts +4 -0
- package/dist/types/components/Reactions/Reactions.d.ts +64 -0
- package/dist/types/components/Reactions/index.d.ts +2 -0
- package/dist/types/components/Reactions/styles.d.ts +2 -0
- package/dist/types/components/Selector/Selector.d.ts +34 -0
- package/dist/types/components/Selector/index.d.ts +3 -0
- package/dist/types/components/Selector/styles.d.ts +10 -0
- package/dist/types/components/ShowMore/ShowMore.d.ts +34 -0
- package/dist/types/components/ShowMore/index.d.ts +2 -0
- package/dist/types/components/ShowMore/styles.d.ts +3 -0
- package/dist/types/components/Trigger/Trigger.d.ts +23 -0
- package/dist/types/components/Trigger/index.d.ts +2 -0
- package/dist/types/components/Trigger/styles.d.ts +5 -0
- package/dist/types/components/UfoErrorBoundary/UfoErrorBoundary.d.ts +16 -0
- package/dist/types/components/UfoErrorBoundary/index.d.ts +2 -0
- package/dist/types/components/index.d.ts +4 -1
- package/dist/types/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +27 -0
- package/dist/types/containers/ConnectedReactionPicker/index.d.ts +2 -0
- package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +52 -0
- package/dist/types/containers/ConnectedReactionsView/index.d.ts +2 -0
- package/dist/types/containers/index.d.ts +2 -2
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/useClickAway.d.ts +8 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/shared/constants.d.ts +13 -3
- package/dist/types/shared/i18n.d.ts +22 -0
- package/dist/types/shared/index.d.ts +3 -1
- package/dist/types/shared/utils.d.ts +11 -0
- package/dist/types/store/MemoryReactionsStore.d.ts +94 -0
- package/dist/types/store/ReactionConsumer.d.ts +47 -19
- package/dist/types/store/index.d.ts +2 -2
- package/dist/types/store/utils.d.ts +3 -7
- package/dist/types/types/Actions.d.ts +3 -0
- package/dist/types/types/User.d.ts +6 -0
- package/dist/types/types/client.d.ts +38 -0
- package/dist/types/types/index.d.ts +4 -6
- package/dist/types/types/reaction.d.ts +82 -0
- package/dist/types/types/store.d.ts +63 -0
- package/dist/{types/client → types-ts4.0}/MockReactionsClient.d.ts +4 -5
- package/dist/types-ts4.0/analytics/analytics.d.ts +96 -0
- package/dist/types-ts4.0/analytics/constants.d.ts +1 -0
- package/dist/types-ts4.0/analytics/index.d.ts +2 -0
- package/dist/types-ts4.0/analytics/ufo.d.ts +40 -0
- package/dist/types-ts4.0/client/ReactionServiceClient.d.ts +35 -0
- package/dist/types-ts4.0/client/index.d.ts +1 -0
- package/dist/{types/components → types-ts4.0/components/Counter}/Counter.d.ts +15 -7
- package/dist/types-ts4.0/components/Counter/index.d.ts +3 -0
- package/dist/types-ts4.0/components/Counter/styles.d.ts +3 -0
- package/dist/types-ts4.0/components/EmojiButton/EmojiButton.d.ts +22 -0
- package/dist/types-ts4.0/components/EmojiButton/index.d.ts +2 -0
- package/dist/types-ts4.0/components/EmojiButton/styles.d.ts +1 -0
- package/dist/types-ts4.0/components/FlashAnimation/FlashAnimation.d.ts +20 -0
- package/dist/types-ts4.0/components/FlashAnimation/index.d.ts +2 -0
- package/dist/types-ts4.0/components/FlashAnimation/styles.d.ts +3 -0
- package/dist/types-ts4.0/components/Reaction/Reaction.d.ts +38 -0
- package/dist/types-ts4.0/components/Reaction/index.d.ts +2 -0
- package/dist/types-ts4.0/components/Reaction/styles.d.ts +10 -0
- package/dist/{types/components → types-ts4.0/components/ReactionPicker}/ReactionPicker.d.ts +12 -33
- package/dist/types-ts4.0/components/ReactionPicker/index.d.ts +2 -0
- package/dist/types-ts4.0/components/ReactionPicker/styles.d.ts +3 -0
- package/dist/types-ts4.0/components/ReactionTooltip/ReactionTooltip.d.ts +22 -0
- package/dist/types-ts4.0/components/ReactionTooltip/index.d.ts +2 -0
- package/dist/types-ts4.0/components/ReactionTooltip/styles.d.ts +4 -0
- package/dist/types-ts4.0/components/Reactions/Reactions.d.ts +64 -0
- package/dist/types-ts4.0/components/Reactions/index.d.ts +2 -0
- package/dist/types-ts4.0/components/Reactions/styles.d.ts +2 -0
- package/dist/types-ts4.0/components/Selector/Selector.d.ts +34 -0
- package/dist/types-ts4.0/components/Selector/index.d.ts +3 -0
- package/dist/types-ts4.0/components/Selector/styles.d.ts +10 -0
- package/dist/{types/components → types-ts4.0/components/ShowMore}/ShowMore.d.ts +14 -13
- package/dist/types-ts4.0/components/ShowMore/index.d.ts +2 -0
- package/dist/types-ts4.0/components/ShowMore/styles.d.ts +3 -0
- package/dist/types-ts4.0/components/Trigger/Trigger.d.ts +23 -0
- package/dist/types-ts4.0/components/Trigger/index.d.ts +2 -0
- package/dist/types-ts4.0/components/Trigger/styles.d.ts +5 -0
- package/dist/types-ts4.0/components/UfoErrorBoundary/UfoErrorBoundary.d.ts +16 -0
- package/dist/types-ts4.0/components/UfoErrorBoundary/index.d.ts +2 -0
- package/dist/types-ts4.0/components/index.d.ts +8 -0
- package/dist/types-ts4.0/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +27 -0
- package/dist/types-ts4.0/containers/ConnectedReactionPicker/index.d.ts +2 -0
- package/dist/types-ts4.0/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +52 -0
- package/dist/types-ts4.0/containers/ConnectedReactionsView/index.d.ts +2 -0
- package/dist/types-ts4.0/containers/index.d.ts +2 -0
- package/dist/types-ts4.0/hooks/index.d.ts +1 -0
- package/dist/types-ts4.0/hooks/useClickAway.d.ts +8 -0
- package/dist/types-ts4.0/i18n/cs.d.ts +13 -0
- package/dist/types-ts4.0/i18n/da.d.ts +13 -0
- package/dist/types-ts4.0/i18n/de.d.ts +13 -0
- package/dist/types-ts4.0/i18n/en.d.ts +7 -0
- package/dist/types-ts4.0/i18n/en_GB.d.ts +7 -0
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +13 -0
- package/dist/types-ts4.0/i18n/es.d.ts +13 -0
- package/dist/types-ts4.0/i18n/et.d.ts +12 -0
- package/dist/types-ts4.0/i18n/fi.d.ts +13 -0
- package/dist/types-ts4.0/i18n/fr.d.ts +13 -0
- package/dist/types-ts4.0/i18n/hu.d.ts +13 -0
- package/dist/types-ts4.0/i18n/index.d.ts +35 -0
- package/dist/types-ts4.0/i18n/is.d.ts +6 -0
- package/dist/types-ts4.0/i18n/it.d.ts +13 -0
- package/dist/types-ts4.0/i18n/ja.d.ts +13 -0
- package/dist/types-ts4.0/i18n/ko.d.ts +13 -0
- package/dist/types-ts4.0/i18n/languages.d.ts +27 -0
- package/dist/types-ts4.0/i18n/nb.d.ts +13 -0
- package/dist/types-ts4.0/i18n/nl.d.ts +13 -0
- package/dist/types-ts4.0/i18n/pl.d.ts +13 -0
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +13 -0
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +12 -0
- package/dist/types-ts4.0/i18n/ro.d.ts +6 -0
- package/dist/types-ts4.0/i18n/ru.d.ts +13 -0
- package/dist/types-ts4.0/i18n/sk.d.ts +12 -0
- package/dist/types-ts4.0/i18n/sv.d.ts +13 -0
- package/dist/types-ts4.0/i18n/th.d.ts +13 -0
- package/dist/types-ts4.0/i18n/tr.d.ts +13 -0
- package/dist/types-ts4.0/i18n/uk.d.ts +13 -0
- package/dist/types-ts4.0/i18n/vi.d.ts +13 -0
- package/dist/types-ts4.0/i18n/zh.d.ts +13 -0
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +13 -0
- package/dist/types-ts4.0/index.d.ts +7 -0
- package/dist/types-ts4.0/shared/constants.d.ts +13 -0
- package/dist/{types/components → types-ts4.0/shared}/i18n.d.ts +0 -0
- package/dist/types-ts4.0/shared/index.d.ts +3 -0
- package/dist/types-ts4.0/shared/utils.d.ts +11 -0
- package/dist/{types/store/ReactionsStore.d.ts → types-ts4.0/store/MemoryReactionsStore.d.ts} +21 -61
- package/dist/types-ts4.0/store/ReactionConsumer.d.ts +57 -0
- package/dist/types-ts4.0/store/batched.d.ts +2 -0
- package/dist/types-ts4.0/store/index.d.ts +3 -0
- package/dist/types-ts4.0/store/utils.d.ts +11 -0
- package/dist/types-ts4.0/types/Actions.d.ts +27 -0
- package/dist/types-ts4.0/types/Updater.d.ts +1 -0
- package/dist/types-ts4.0/types/User.d.ts +10 -0
- package/dist/types-ts4.0/types/client.d.ts +38 -0
- package/dist/types-ts4.0/types/index.d.ts +7 -0
- package/dist/types-ts4.0/types/reaction.d.ts +82 -0
- package/dist/types-ts4.0/types/store.d.ts +63 -0
- package/extract-react-type/ConnectedReactionPicker.ts +2 -4
- package/extract-react-type/ConnectedReactionsView.ts +3 -5
- package/extract-react-type/Reaction.ts +2 -4
- package/extract-react-type/Reactions.ts +2 -4
- package/extract-react-type/actions.ts +1 -3
- package/extract-react-type/reactionClient.ts +3 -5
- package/extract-react-type/reactionsStore.ts +3 -5
- package/package.json +30 -7
- package/dist/cjs/components/EmojiButton.js +0 -100
- package/dist/cjs/components/Reaction.js +0 -229
- package/dist/cjs/components/ReactionPicker.js +0 -297
- package/dist/cjs/components/ReactionTooltip.js +0 -82
- package/dist/cjs/components/Reactions.js +0 -194
- package/dist/cjs/components/Selector.js +0 -189
- package/dist/cjs/components/ShowMore.js +0 -119
- package/dist/cjs/components/Trigger.js +0 -58
- package/dist/cjs/components/utils.js +0 -28
- package/dist/cjs/containers/ConnectedReactionPicker.js +0 -53
- package/dist/cjs/containers/ConnectedReactionsView.js +0 -139
- package/dist/cjs/types/ReactionSource.js +0 -5
- package/dist/cjs/types/ReactionStatus.js +0 -19
- package/dist/cjs/types/ReactionSummary.js +0 -5
- package/dist/cjs/types/Reactions.js +0 -5
- package/dist/cjs/types/ReactionsState.js +0 -5
- package/dist/es2019/components/EmojiButton.js +0 -50
- package/dist/es2019/components/Reaction.js +0 -183
- package/dist/es2019/components/ReactionPicker.js +0 -247
- package/dist/es2019/components/ReactionTooltip.js +0 -66
- package/dist/es2019/components/Reactions.js +0 -150
- package/dist/es2019/components/Selector.js +0 -127
- package/dist/es2019/components/ShowMore.js +0 -71
- package/dist/es2019/components/utils.js +0 -13
- package/dist/es2019/containers/ConnectedReactionPicker.js +0 -36
- package/dist/es2019/containers/ConnectedReactionsView.js +0 -118
- package/dist/es2019/types/ReactionStatus.js +0 -11
- package/dist/es2019/types/Reactions.js +0 -1
- package/dist/es2019/types/ReactionsState.js +0 -1
- package/dist/esm/client/ReactionClient.js +0 -1
- package/dist/esm/components/EmojiButton.js +0 -77
- package/dist/esm/components/Reaction.js +0 -207
- package/dist/esm/components/ReactionPicker.js +0 -274
- package/dist/esm/components/ReactionTooltip.js +0 -63
- package/dist/esm/components/Reactions.js +0 -180
- package/dist/esm/components/Selector.js +0 -160
- package/dist/esm/components/ShowMore.js +0 -95
- package/dist/esm/components/utils.js +0 -15
- package/dist/esm/containers/ConnectedReactionPicker.js +0 -38
- package/dist/esm/containers/ConnectedReactionsView.js +0 -116
- package/dist/esm/types/DetailedReaction.js +0 -1
- package/dist/esm/types/ReactionSource.js +0 -1
- package/dist/esm/types/ReactionStatus.js +0 -11
- package/dist/esm/types/ReactionSummary.js +0 -1
- package/dist/esm/types/Reactions.js +0 -1
- package/dist/esm/types/ReactionsState.js +0 -1
- package/dist/types/client/ReactionClient.d.ts +0 -28
- package/dist/types/components/EmojiButton.d.ts +0 -21
- package/dist/types/components/FlashAnimation.d.ts +0 -18
- package/dist/types/components/Reaction.d.ts +0 -44
- package/dist/types/components/ReactionTooltip.d.ts +0 -14
- package/dist/types/components/Reactions.d.ts +0 -83
- package/dist/types/components/Selector.d.ts +0 -39
- package/dist/types/components/Trigger.d.ts +0 -16
- package/dist/types/components/UfoErrorBoundary.d.ts +0 -9
- package/dist/types/components/utils.d.ts +0 -4
- package/dist/types/containers/ConnectedReactionPicker.d.ts +0 -16
- package/dist/types/containers/ConnectedReactionsView.d.ts +0 -31
- package/dist/types/types/DetailedReaction.d.ts +0 -7
- package/dist/types/types/ReactionSource.d.ts +0 -4
- package/dist/types/types/ReactionStatus.d.ts +0 -9
- package/dist/types/types/ReactionSummary.d.ts +0 -10
- package/dist/types/types/Reactions.d.ts +0 -4
- package/dist/types/types/ReactionsState.d.ts +0 -20
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ConnectedReactionsViewProps } from '../src/containers';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The props definition in
|
|
5
|
-
* because we had to typecast the component to make forwardRef work with generics
|
|
6
|
-
* (for the custom component props).
|
|
4
|
+
* The props definition in src/containers/ConnectedReactionsView.tsx breaks ERT unfortunately, hence this hack (for the custom component props).
|
|
7
5
|
*/
|
|
8
|
-
export default function (_:
|
|
6
|
+
export default function (_: ConnectedReactionsViewProps) {}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactionProps } from '../src/components';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The props definition in
|
|
5
|
-
* because we had to typecast the component to make forwardRef work with generics
|
|
6
|
-
* (for the custom component props).
|
|
4
|
+
* The props definition in src/components/Reaction/Reaction.ts breaks ERT unfortunately, hence this hack (for the custom component props).
|
|
7
5
|
*/
|
|
8
6
|
export default function (_: ReactionProps) {}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { ReactionsProps } from '../src/components
|
|
1
|
+
import type { ReactionsProps } from '../src/components';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The props definition in
|
|
5
|
-
* because we had to typecast the component to make forwardRef work with generics
|
|
6
|
-
* (for the custom component props).
|
|
4
|
+
* The props definition in src/components/Reactions/Reactions.tsx breaks ERT unfortunately, hence this hack (for the custom component props).
|
|
7
5
|
*/
|
|
8
6
|
export default function (_: ReactionsProps) {}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { Actions } from '../src/types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The props definition in
|
|
5
|
-
* because we had to typecast the component to make forwardRef work with generics
|
|
6
|
-
* (for the custom component props).
|
|
4
|
+
* The props definition in src/types/action.ts breaks ERT unfortunately, hence this hack (for the custom component props).
|
|
7
5
|
*/
|
|
8
6
|
export default function (_: Actions) {}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Client } from '../src/types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The props definition in
|
|
5
|
-
* because we had to typecast the component to make forwardRef work with generics
|
|
6
|
-
* (for the custom component props).
|
|
4
|
+
* The props definition in src/types/client.ts breaks ERT unfortunately, hence this hack (for the custom component props).
|
|
7
5
|
*/
|
|
8
|
-
export default function (_:
|
|
6
|
+
export default function (_: Client) {}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Store } from '../src/types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* The props definition in
|
|
5
|
-
* because we had to typecast the component to make forwardRef work with generics
|
|
6
|
-
* (for the custom component props).
|
|
4
|
+
* The props definition in src/types/store.ts breaks ERT unfortunately, hence this hack (for the custom component props).
|
|
7
5
|
*/
|
|
8
|
-
export default function (_:
|
|
6
|
+
export default function (_: Store) {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.6.1",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.0 <4.5": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.0/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"atlaskit:src": "src/index.ts",
|
|
16
23
|
"atlassian": {
|
|
17
24
|
"team": "TWP Collaboration Platform",
|
|
@@ -30,11 +37,11 @@
|
|
|
30
37
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
31
38
|
"@atlaskit/button": "^16.3.0",
|
|
32
39
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
33
|
-
"@atlaskit/emoji": "^65.
|
|
40
|
+
"@atlaskit/emoji": "^65.2.0",
|
|
34
41
|
"@atlaskit/icon": "^21.10.0",
|
|
35
42
|
"@atlaskit/motion": "^1.2.0",
|
|
36
43
|
"@atlaskit/popper": "^5.0.0",
|
|
37
|
-
"@atlaskit/theme": "^12.
|
|
44
|
+
"@atlaskit/theme": "^12.2.0",
|
|
38
45
|
"@atlaskit/tokens": "^0.10.0",
|
|
39
46
|
"@atlaskit/tooltip": "^17.5.0",
|
|
40
47
|
"@atlaskit/ufo": "^0.1.0",
|
|
@@ -50,21 +57,27 @@
|
|
|
50
57
|
"devDependencies": {
|
|
51
58
|
"@atlaskit/analytics-viewer": "^0.4.5",
|
|
52
59
|
"@atlaskit/docs": "^9.0.0",
|
|
53
|
-
"@atlaskit/editor-test-helpers": "^17.
|
|
60
|
+
"@atlaskit/editor-test-helpers": "^17.2.0",
|
|
54
61
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
55
|
-
"@atlaskit/section-message": "^6.
|
|
62
|
+
"@atlaskit/section-message": "^6.2.0",
|
|
56
63
|
"@atlaskit/tooltip": "^17.5.0",
|
|
57
64
|
"@atlaskit/util-data-test": "^17.5.0",
|
|
58
65
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
59
66
|
"@atlassian/ufo": "^0.1.0",
|
|
67
|
+
"@emotion/jest": "^11.8.0",
|
|
68
|
+
"@testing-library/dom": "^8.17.1",
|
|
69
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
70
|
+
"@testing-library/react": "^12.1.5",
|
|
71
|
+
"@testing-library/user-event": "^14.4.3",
|
|
60
72
|
"@types/webpack-dev-server": "^3.11.2",
|
|
73
|
+
"dotenv": "^8.2.0",
|
|
61
74
|
"enzyme": "^3.10.0",
|
|
62
75
|
"enzyme-adapter-react-16": "^1.15.1",
|
|
63
76
|
"es6-promise": "^4.0.5",
|
|
64
77
|
"fetch-mock": "^8.0.0",
|
|
65
78
|
"react": "^16.8.0",
|
|
66
79
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
67
|
-
"typescript": "4.
|
|
80
|
+
"typescript": "4.5.5",
|
|
68
81
|
"wait-for-expect": "^1.2.0",
|
|
69
82
|
"webpack-dev-server": "^3.11.2"
|
|
70
83
|
},
|
|
@@ -80,5 +93,15 @@
|
|
|
80
93
|
"tree-shaking": []
|
|
81
94
|
}
|
|
82
95
|
},
|
|
83
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
96
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
|
97
|
+
"scripts": {
|
|
98
|
+
"setup-first-time": "yarn run setup-local-config; yarn run setup-env",
|
|
99
|
+
"setup-local-config": "cp -nv local-config-template.ts local-config.ts",
|
|
100
|
+
"setup-env": "cp -nv .env-template .env",
|
|
101
|
+
"start": "cd ../../ && yarn start reactions",
|
|
102
|
+
"test": "cd ../../ && yarn test reactions",
|
|
103
|
+
"typecheck": "cd ../../ && yarn typecheck:package ./packages/elements/reactions",
|
|
104
|
+
"start:dev": "cd ../../ && yarn start reactions --proxy ./packages/elements/reactions/proxy.ts",
|
|
105
|
+
"start:edge": "cd ../../ && PROXY_TARGET_ENV=edge yarn start reactions --proxy ./packages/elements/reactions/proxy.ts"
|
|
106
|
+
}
|
|
84
107
|
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.EmojiButton = void 0;
|
|
11
|
-
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
-
|
|
20
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
21
|
-
|
|
22
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
|
-
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
|
-
var _core = require("@emotion/core");
|
|
27
|
-
|
|
28
|
-
var _element = require("@atlaskit/emoji/element");
|
|
29
|
-
|
|
30
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
31
|
-
|
|
32
|
-
var _utils = require("./utils");
|
|
33
|
-
|
|
34
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
|
-
|
|
36
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37
|
-
|
|
38
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
39
|
-
|
|
40
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
41
|
-
|
|
42
|
-
var emojiButtonStyle = (0, _core.css)({
|
|
43
|
-
outline: 'none',
|
|
44
|
-
display: 'flex',
|
|
45
|
-
backgroundColor: 'transparent',
|
|
46
|
-
border: 0,
|
|
47
|
-
borderRadius: '5px',
|
|
48
|
-
cursor: 'pointer',
|
|
49
|
-
margin: '0',
|
|
50
|
-
padding: '10px 8px',
|
|
51
|
-
'&:hover > span': {
|
|
52
|
-
transition: 'transform cubic-bezier(0.23, 1, 0.32, 1) 200ms',
|
|
53
|
-
transform: 'scale(1.33)'
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
var EmojiButton = /*#__PURE__*/function (_PureComponent) {
|
|
58
|
-
(0, _inherits2.default)(EmojiButton, _PureComponent);
|
|
59
|
-
|
|
60
|
-
var _super = _createSuper(EmojiButton);
|
|
61
|
-
|
|
62
|
-
function EmojiButton() {
|
|
63
|
-
var _this;
|
|
64
|
-
|
|
65
|
-
(0, _classCallCheck2.default)(this, EmojiButton);
|
|
66
|
-
|
|
67
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
68
|
-
args[_key] = arguments[_key];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
72
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMouseDown", function (event) {
|
|
73
|
-
event.preventDefault();
|
|
74
|
-
|
|
75
|
-
if (_this.props.onClick && (0, _utils.isLeftClick)(event)) {
|
|
76
|
-
_this.props.onClick(_this.props.emojiId, undefined, event);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
return _this;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
(0, _createClass2.default)(EmojiButton, [{
|
|
83
|
-
key: "render",
|
|
84
|
-
value: function render() {
|
|
85
|
-
var _this$props = this.props,
|
|
86
|
-
emojiId = _this$props.emojiId,
|
|
87
|
-
emojiProvider = _this$props.emojiProvider;
|
|
88
|
-
return (0, _core.jsx)("button", {
|
|
89
|
-
onMouseUp: this.handleMouseDown,
|
|
90
|
-
css: emojiButtonStyle
|
|
91
|
-
}, (0, _core.jsx)(_element.ResourcedEmoji, {
|
|
92
|
-
emojiProvider: emojiProvider,
|
|
93
|
-
emojiId: emojiId
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
}]);
|
|
97
|
-
return EmojiButton;
|
|
98
|
-
}(_react.PureComponent);
|
|
99
|
-
|
|
100
|
-
exports.EmojiButton = EmojiButton;
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.Reaction = void 0;
|
|
11
|
-
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
-
|
|
20
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
21
|
-
|
|
22
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
|
-
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
|
-
var _core = require("@emotion/core");
|
|
27
|
-
|
|
28
|
-
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
29
|
-
|
|
30
|
-
var _element = require("@atlaskit/emoji/element");
|
|
31
|
-
|
|
32
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
33
|
-
|
|
34
|
-
var _tokens = require("@atlaskit/tokens");
|
|
35
|
-
|
|
36
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
37
|
-
|
|
38
|
-
var _analytics = require("../analytics");
|
|
39
|
-
|
|
40
|
-
var _Counter = require("./Counter");
|
|
41
|
-
|
|
42
|
-
var _FlashAnimation = require("./FlashAnimation");
|
|
43
|
-
|
|
44
|
-
var _ReactionTooltip = require("./ReactionTooltip");
|
|
45
|
-
|
|
46
|
-
var _utils = require("./utils");
|
|
47
|
-
|
|
48
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
49
|
-
|
|
50
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
51
|
-
|
|
52
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
53
|
-
|
|
54
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Styling Note:
|
|
58
|
-
* Padding and line height are set within the child components
|
|
59
|
-
* of FlashAnimation b/c it otherwise throws off the flash styling
|
|
60
|
-
*/
|
|
61
|
-
var emojiStyle = (0, _core.css)({
|
|
62
|
-
transformOrigin: 'center center 0',
|
|
63
|
-
lineHeight: '12px',
|
|
64
|
-
padding: '4px 4px 4px 8px'
|
|
65
|
-
});
|
|
66
|
-
var reactionStyle = (0, _core.css)({
|
|
67
|
-
outline: 'none',
|
|
68
|
-
display: 'flex',
|
|
69
|
-
flexDirection: 'row',
|
|
70
|
-
alignItems: 'flex-start',
|
|
71
|
-
minWidth: '36px',
|
|
72
|
-
height: "".concat(_utils.akHeight, "px"),
|
|
73
|
-
background: 'transparent',
|
|
74
|
-
border: "1px solid ".concat((0, _tokens.token)('color.border', _colors.N40)),
|
|
75
|
-
boxSizing: 'border-box',
|
|
76
|
-
borderRadius: '20px',
|
|
77
|
-
color: "".concat((0, _tokens.token)('color.text.subtle', _colors.N400)),
|
|
78
|
-
cursor: 'pointer',
|
|
79
|
-
margin: 0,
|
|
80
|
-
padding: 0,
|
|
81
|
-
transition: '200ms ease-in-out',
|
|
82
|
-
'&:hover': {
|
|
83
|
-
background: "".concat((0, _tokens.token)('color.background.neutral.subtle.hovered', _colors.N20))
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
var reactedStyle = (0, _core.css)({
|
|
87
|
-
backgroundColor: (0, _tokens.token)('color.background.selected', _colors.B50),
|
|
88
|
-
borderColor: (0, _tokens.token)('color.border.selected', _colors.B300),
|
|
89
|
-
'&:hover': {
|
|
90
|
-
background: "".concat((0, _tokens.token)('color.background.selected.hovered', _colors.B75))
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
var flashHeight = _utils.akHeight - 2; // height without the 1px border
|
|
94
|
-
|
|
95
|
-
var flashStyle = (0, _core.css)({
|
|
96
|
-
display: 'flex',
|
|
97
|
-
flexDirection: 'row',
|
|
98
|
-
borderRadius: '10px',
|
|
99
|
-
height: "".concat(flashHeight, "px")
|
|
100
|
-
});
|
|
101
|
-
/**
|
|
102
|
-
* @param id give id for the emoji
|
|
103
|
-
* @param event selected mouse event proerties
|
|
104
|
-
*/
|
|
105
|
-
|
|
106
|
-
var ReactionWithoutAnalytics = /*#__PURE__*/function (_PureComponent) {
|
|
107
|
-
(0, _inherits2.default)(ReactionWithoutAnalytics, _PureComponent);
|
|
108
|
-
|
|
109
|
-
var _super = _createSuper(ReactionWithoutAnalytics);
|
|
110
|
-
|
|
111
|
-
function ReactionWithoutAnalytics(props) {
|
|
112
|
-
var _this;
|
|
113
|
-
|
|
114
|
-
(0, _classCallCheck2.default)(this, ReactionWithoutAnalytics);
|
|
115
|
-
_this = _super.call(this, props);
|
|
116
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mounted", false);
|
|
117
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMouseDown", function (event) {
|
|
118
|
-
event.preventDefault();
|
|
119
|
-
event.stopPropagation();
|
|
120
|
-
|
|
121
|
-
if (_this.props.onClick && (0, _utils.isLeftClick)(event)) {
|
|
122
|
-
var _this$props = _this.props,
|
|
123
|
-
_reaction = _this$props.reaction,
|
|
124
|
-
createAnalyticsEvent = _this$props.createAnalyticsEvent;
|
|
125
|
-
var reacted = _reaction.reacted,
|
|
126
|
-
emojiId = _reaction.emojiId;
|
|
127
|
-
(0, _analytics.createAndFireSafe)(createAnalyticsEvent, _analytics.createReactionClickedEvent, !reacted, emojiId);
|
|
128
|
-
|
|
129
|
-
_this.props.onClick(_this.props.reaction.emojiId, event);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMouseEnter", function (event) {
|
|
133
|
-
event.preventDefault();
|
|
134
|
-
var _this$props2 = _this.props,
|
|
135
|
-
onMouseEnter = _this$props2.onMouseEnter,
|
|
136
|
-
reaction = _this$props2.reaction;
|
|
137
|
-
|
|
138
|
-
if (!reaction.users || !reaction.users.length) {
|
|
139
|
-
_this.hoverStart = Date.now();
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
if (onMouseEnter) {
|
|
143
|
-
onMouseEnter(_this.props.reaction, event);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
_this.state = {};
|
|
147
|
-
return _this;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
(0, _createClass2.default)(ReactionWithoutAnalytics, [{
|
|
151
|
-
key: "componentDidUpdate",
|
|
152
|
-
value: function componentDidUpdate(_ref) {
|
|
153
|
-
var prevReaction = _ref.reaction;
|
|
154
|
-
|
|
155
|
-
if (!prevReaction.users && this.props.reaction.users) {
|
|
156
|
-
(0, _analytics.createAndFireSafe)(this.props.createAnalyticsEvent, _analytics.createReactionHoveredEvent, this.hoverStart);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}, {
|
|
160
|
-
key: "componentDidMount",
|
|
161
|
-
value: function componentDidMount() {
|
|
162
|
-
var _this2 = this;
|
|
163
|
-
|
|
164
|
-
this.mounted = true;
|
|
165
|
-
this.props.emojiProvider.then(function (emojiResource) {
|
|
166
|
-
return emojiResource.findByEmojiId({
|
|
167
|
-
shortName: '',
|
|
168
|
-
id: _this2.props.reaction.emojiId
|
|
169
|
-
});
|
|
170
|
-
}).then(function (foundEmoji) {
|
|
171
|
-
if (foundEmoji && _this2.mounted) {
|
|
172
|
-
_this2.setState({
|
|
173
|
-
emojiName: foundEmoji.name
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
}, {
|
|
179
|
-
key: "componentWillUnmount",
|
|
180
|
-
value: function componentWillUnmount() {
|
|
181
|
-
this.mounted = false;
|
|
182
|
-
}
|
|
183
|
-
}, {
|
|
184
|
-
key: "render",
|
|
185
|
-
value: function render() {
|
|
186
|
-
var _this$props3 = this.props,
|
|
187
|
-
emojiProvider = _this$props3.emojiProvider,
|
|
188
|
-
reaction = _this$props3.reaction,
|
|
189
|
-
classNameProp = _this$props3.className,
|
|
190
|
-
flash = _this$props3.flash;
|
|
191
|
-
var emojiName = this.state.emojiName;
|
|
192
|
-
var emojiId = {
|
|
193
|
-
id: reaction.emojiId,
|
|
194
|
-
shortName: ''
|
|
195
|
-
};
|
|
196
|
-
return (0, _core.jsx)(_ReactionTooltip.ReactionTooltip, {
|
|
197
|
-
emojiName: emojiName,
|
|
198
|
-
reaction: reaction
|
|
199
|
-
}, (0, _core.jsx)("button", {
|
|
200
|
-
className: classNameProp,
|
|
201
|
-
css: [reactionStyle, reaction.reacted && reactedStyle],
|
|
202
|
-
onMouseUp: this.handleMouseDown,
|
|
203
|
-
onMouseEnter: this.handleMouseEnter
|
|
204
|
-
}, (0, _core.jsx)(_FlashAnimation.FlashAnimation, {
|
|
205
|
-
flash: flash,
|
|
206
|
-
css: flashStyle
|
|
207
|
-
}, (0, _core.jsx)("div", {
|
|
208
|
-
css: emojiStyle
|
|
209
|
-
}, (0, _core.jsx)(_element.ResourcedEmoji, {
|
|
210
|
-
emojiProvider: emojiProvider,
|
|
211
|
-
emojiId: emojiId,
|
|
212
|
-
fitToHeight: 16
|
|
213
|
-
})), (0, _core.jsx)(_Counter.Counter, {
|
|
214
|
-
value: reaction.count,
|
|
215
|
-
highlight: reaction.reacted
|
|
216
|
-
}))));
|
|
217
|
-
}
|
|
218
|
-
}]);
|
|
219
|
-
return ReactionWithoutAnalytics;
|
|
220
|
-
}(_react.PureComponent);
|
|
221
|
-
|
|
222
|
-
(0, _defineProperty2.default)(ReactionWithoutAnalytics, "defaultProps", {
|
|
223
|
-
flash: false,
|
|
224
|
-
className: undefined,
|
|
225
|
-
onMouseEnter: undefined
|
|
226
|
-
});
|
|
227
|
-
(0, _defineProperty2.default)(ReactionWithoutAnalytics, "displayName", 'Reaction');
|
|
228
|
-
var Reaction = (0, _analyticsNext.withAnalyticsEvents)()(ReactionWithoutAnalytics);
|
|
229
|
-
exports.Reaction = Reaction;
|