@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
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of reactions as object (key is unique id from containerAri and ari combined)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* MetaData for Reaction object
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Event handler for when the user clicks on the reaction
|
|
11
|
+
* @param id give id for the emoji
|
|
12
|
+
* @param event selected mouse event proerties
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Event handler for when the user hovers with the mouse on the reaction
|
|
17
|
+
* @param reaction reaction object
|
|
18
|
+
* @param event (Optional) custom DOM event handler callback
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Condition of the reaction when gets loaded from the store
|
|
23
|
+
*/
|
|
24
|
+
export var ReactionStatus;
|
|
25
|
+
/**
|
|
26
|
+
* state in which the reaction is at
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
(function (ReactionStatus) {
|
|
30
|
+
ReactionStatus["ready"] = "READY";
|
|
31
|
+
ReactionStatus["loading"] = "LOADING";
|
|
32
|
+
ReactionStatus["error"] = "ERROR";
|
|
33
|
+
ReactionStatus["notLoaded"] = "NOT_LOADED";
|
|
34
|
+
})(ReactionStatus || (ReactionStatus = {}));
|
|
File without changes
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Reactions, Client, ReactionSummary } from './types';
|
|
2
|
+
export declare const containerAri = "ari:cloud:owner:demo-cloud-id:container/1";
|
|
3
|
+
export declare const ari = "ari:cloud:owner:demo-cloud-id:item/1";
|
|
4
|
+
export declare const getReactionSummary: (shortName: string, count: number, reacted: boolean) => ReactionSummary;
|
|
5
|
+
export declare const getUser: (id: string, displayName: string) => {
|
|
6
|
+
id: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Mocked version of the client to fetch user information
|
|
11
|
+
*/
|
|
12
|
+
export declare class MockReactionsClient implements Client {
|
|
13
|
+
private delay;
|
|
14
|
+
constructor(delay?: number);
|
|
15
|
+
private delayPromise;
|
|
16
|
+
getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
|
|
17
|
+
getDetailedReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary>;
|
|
18
|
+
addReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary[]>;
|
|
19
|
+
deleteReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary[]>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
+
import { EventType } from '@atlaskit/analytics-gas-types';
|
|
3
|
+
import { ReactionSummary, ReactionSource } from '../types';
|
|
4
|
+
export declare type PreviousState = 'new' | 'existingNotReacted' | 'existingReacted';
|
|
5
|
+
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
6
|
+
export declare const createAndFireSafe: <U extends any[], T extends (...args: U) => AnalyticsEventPayload>(createAnalyticsEvent: CreateUIAnalyticsEvent | void, creator: T, ...args: U) => void;
|
|
7
|
+
export declare const createRestSucceededEvent: (actionSubject: string) => {
|
|
8
|
+
action: string;
|
|
9
|
+
actionSubject: string;
|
|
10
|
+
eventType: EventType;
|
|
11
|
+
actionSubjectId: string | undefined;
|
|
12
|
+
attributes: {
|
|
13
|
+
packageName: any;
|
|
14
|
+
packageVersion: any;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare const createRestFailedEvent: (actionSubject: string, errorCode?: number | undefined) => {
|
|
18
|
+
action: string;
|
|
19
|
+
actionSubject: string;
|
|
20
|
+
eventType: EventType;
|
|
21
|
+
actionSubjectId: string | undefined;
|
|
22
|
+
attributes: {
|
|
23
|
+
packageName: any;
|
|
24
|
+
packageVersion: any;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const createReactionsRenderedEvent: (startTime: number) => {
|
|
28
|
+
action: string;
|
|
29
|
+
actionSubject: string;
|
|
30
|
+
eventType: EventType;
|
|
31
|
+
actionSubjectId: string | undefined;
|
|
32
|
+
attributes: {
|
|
33
|
+
packageName: any;
|
|
34
|
+
packageVersion: any;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const createPickerButtonClickedEvent: (reactionEmojiCount: number) => {
|
|
38
|
+
action: string;
|
|
39
|
+
actionSubject: string;
|
|
40
|
+
eventType: EventType;
|
|
41
|
+
actionSubjectId: string | undefined;
|
|
42
|
+
attributes: {
|
|
43
|
+
packageName: any;
|
|
44
|
+
packageVersion: any;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export declare const createPickerCancelledEvent: (startTime?: number | undefined) => {
|
|
48
|
+
action: string;
|
|
49
|
+
actionSubject: string;
|
|
50
|
+
eventType: EventType;
|
|
51
|
+
actionSubjectId: string | undefined;
|
|
52
|
+
attributes: {
|
|
53
|
+
packageName: any;
|
|
54
|
+
packageVersion: any;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export declare const createPickerMoreClickedEvent: (startTime?: number | undefined) => {
|
|
58
|
+
action: string;
|
|
59
|
+
actionSubject: string;
|
|
60
|
+
eventType: EventType;
|
|
61
|
+
actionSubjectId: string | undefined;
|
|
62
|
+
attributes: {
|
|
63
|
+
packageName: any;
|
|
64
|
+
packageVersion: any;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export declare const createReactionSelectionEvent: (source: ReactionSource, emojiId: string, reaction?: ReactionSummary | undefined, startTime?: number | undefined) => {
|
|
68
|
+
action: string;
|
|
69
|
+
actionSubject: string;
|
|
70
|
+
eventType: EventType;
|
|
71
|
+
actionSubjectId: string | undefined;
|
|
72
|
+
attributes: {
|
|
73
|
+
packageName: any;
|
|
74
|
+
packageVersion: any;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export declare const createReactionHoveredEvent: (startTime?: number | undefined) => {
|
|
78
|
+
action: string;
|
|
79
|
+
actionSubject: string;
|
|
80
|
+
eventType: EventType;
|
|
81
|
+
actionSubjectId: string | undefined;
|
|
82
|
+
attributes: {
|
|
83
|
+
packageName: any;
|
|
84
|
+
packageVersion: any;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export declare const createReactionClickedEvent: (added: boolean, emojiId: string) => {
|
|
88
|
+
action: string;
|
|
89
|
+
actionSubject: string;
|
|
90
|
+
eventType: EventType;
|
|
91
|
+
actionSubjectId: string | undefined;
|
|
92
|
+
attributes: {
|
|
93
|
+
packageName: any;
|
|
94
|
+
packageVersion: any;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
@@ -1,97 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { EventType } from '@atlaskit/analytics-gas-types';
|
|
3
|
-
import { ReactionSummary, ReactionSource } from '../types';
|
|
1
|
+
export * as Analytics from './analytics';
|
|
4
2
|
export * as UFO from './ufo';
|
|
5
|
-
export declare type PreviousState = 'new' | 'existingNotReacted' | 'existingReacted';
|
|
6
|
-
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
7
|
-
export declare const createAndFireSafe: <U extends any[], T extends (...args: U) => AnalyticsEventPayload>(createAnalyticsEvent: CreateUIAnalyticsEvent | void, creator: T, ...args: U) => void;
|
|
8
|
-
export declare const createRestSucceededEvent: (actionSubject: string) => {
|
|
9
|
-
action: string;
|
|
10
|
-
actionSubject: string;
|
|
11
|
-
eventType: EventType;
|
|
12
|
-
actionSubjectId: string | undefined;
|
|
13
|
-
attributes: {
|
|
14
|
-
packageName: any;
|
|
15
|
-
packageVersion: any;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare const createRestFailedEvent: (actionSubject: string, errorCode?: number | undefined) => {
|
|
19
|
-
action: string;
|
|
20
|
-
actionSubject: string;
|
|
21
|
-
eventType: EventType;
|
|
22
|
-
actionSubjectId: string | undefined;
|
|
23
|
-
attributes: {
|
|
24
|
-
packageName: any;
|
|
25
|
-
packageVersion: any;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export declare const createReactionsRenderedEvent: (startTime: number) => {
|
|
29
|
-
action: string;
|
|
30
|
-
actionSubject: string;
|
|
31
|
-
eventType: EventType;
|
|
32
|
-
actionSubjectId: string | undefined;
|
|
33
|
-
attributes: {
|
|
34
|
-
packageName: any;
|
|
35
|
-
packageVersion: any;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export declare const createPickerButtonClickedEvent: (reactionEmojiCount: number) => {
|
|
39
|
-
action: string;
|
|
40
|
-
actionSubject: string;
|
|
41
|
-
eventType: EventType;
|
|
42
|
-
actionSubjectId: string | undefined;
|
|
43
|
-
attributes: {
|
|
44
|
-
packageName: any;
|
|
45
|
-
packageVersion: any;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
export declare const createPickerCancelledEvent: (startTime?: number | undefined) => {
|
|
49
|
-
action: string;
|
|
50
|
-
actionSubject: string;
|
|
51
|
-
eventType: EventType;
|
|
52
|
-
actionSubjectId: string | undefined;
|
|
53
|
-
attributes: {
|
|
54
|
-
packageName: any;
|
|
55
|
-
packageVersion: any;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
export declare const createPickerMoreClickedEvent: (startTime?: number | undefined) => {
|
|
59
|
-
action: string;
|
|
60
|
-
actionSubject: string;
|
|
61
|
-
eventType: EventType;
|
|
62
|
-
actionSubjectId: string | undefined;
|
|
63
|
-
attributes: {
|
|
64
|
-
packageName: any;
|
|
65
|
-
packageVersion: any;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
export declare const createReactionSelectionEvent: (source: ReactionSource, emojiId: string, reaction?: ReactionSummary | undefined, startTime?: number | undefined) => {
|
|
69
|
-
action: string;
|
|
70
|
-
actionSubject: string;
|
|
71
|
-
eventType: EventType;
|
|
72
|
-
actionSubjectId: string | undefined;
|
|
73
|
-
attributes: {
|
|
74
|
-
packageName: any;
|
|
75
|
-
packageVersion: any;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export declare const createReactionHoveredEvent: (startTime?: number | undefined) => {
|
|
79
|
-
action: string;
|
|
80
|
-
actionSubject: string;
|
|
81
|
-
eventType: EventType;
|
|
82
|
-
actionSubjectId: string | undefined;
|
|
83
|
-
attributes: {
|
|
84
|
-
packageName: any;
|
|
85
|
-
packageVersion: any;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
export declare const createReactionClickedEvent: (added: boolean, emojiId: string) => {
|
|
89
|
-
action: string;
|
|
90
|
-
actionSubject: string;
|
|
91
|
-
eventType: EventType;
|
|
92
|
-
actionSubjectId: string | undefined;
|
|
93
|
-
attributes: {
|
|
94
|
-
packageName: any;
|
|
95
|
-
packageVersion: any;
|
|
96
|
-
};
|
|
97
|
-
};
|
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
import { Reactions } from '../types
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Reactions, ReactionSummary, Client } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Utility class to retrieve/modify all actions on reactions collection
|
|
4
|
+
*/
|
|
5
|
+
export declare class ReactionServiceClient implements Client {
|
|
6
|
+
/**
|
|
7
|
+
* oAuth token
|
|
8
|
+
*/
|
|
5
9
|
private sessionToken?;
|
|
10
|
+
/**
|
|
11
|
+
* API config
|
|
12
|
+
*/
|
|
6
13
|
private serviceConfig;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @param baseUrl base domain url
|
|
17
|
+
* @param sessionToken oAuth token for reactions emoji services
|
|
18
|
+
*/
|
|
7
19
|
constructor(baseUrl: string, sessionToken?: string);
|
|
20
|
+
/**
|
|
21
|
+
* Get http headers for the "fetch" request
|
|
22
|
+
* @param hasBody
|
|
23
|
+
*/
|
|
8
24
|
private getHeaders;
|
|
25
|
+
/**
|
|
26
|
+
* Send a request to remote service
|
|
27
|
+
* @param path endpoint api url
|
|
28
|
+
* @param options Optional custom params
|
|
29
|
+
*/
|
|
9
30
|
private requestService;
|
|
10
31
|
getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
|
|
11
32
|
getDetailedReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary>;
|
|
12
|
-
addReaction(containerAri: string, ari: string, emojiId: string, metadata?:
|
|
13
|
-
|
|
14
|
-
}): Promise<ReactionSummary[]>;
|
|
15
|
-
deleteReaction(containerAri: string, ari: string, emojiId: string, metadata?: {
|
|
16
|
-
[k: string]: any;
|
|
17
|
-
}): Promise<ReactionSummary[]>;
|
|
33
|
+
addReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
|
|
34
|
+
deleteReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
|
|
18
35
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Test id for wrapper div
|
|
5
|
+
*/
|
|
6
|
+
export declare const RENDER_COUNTER_TESTID = "counter-container";
|
|
7
|
+
/**
|
|
8
|
+
* Test id for container div
|
|
9
|
+
*/
|
|
10
|
+
export declare const RENDER_COUNTER_WRAPPER_TESTID = "counter-wrapper";
|
|
11
|
+
export interface CounterProps {
|
|
12
|
+
/**
|
|
13
|
+
* Count of emoji been selected
|
|
14
|
+
*/
|
|
15
|
+
value: number;
|
|
16
|
+
/**
|
|
17
|
+
* Has the emoji been selected by given user (defaults to false)
|
|
18
|
+
*/
|
|
19
|
+
highlight?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Max threshold of selections to show before having a label (defaults to 1000)
|
|
22
|
+
*/
|
|
23
|
+
limit?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Label to show when the value surpasses the limit value (defaults to "1k+")
|
|
26
|
+
*/
|
|
27
|
+
overLimitLabel?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional wrapper class name
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Duration in ms of how long the motion will take (defaults to "mediumDurationMs" from '@atlaskit/motion')
|
|
34
|
+
*/
|
|
35
|
+
animationDuration?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Display reaction count next to the emoji button
|
|
39
|
+
*/
|
|
40
|
+
export declare const Counter: React.FC<CounterProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { EmojiId, OnEmojiEvent, EmojiProvider } from '@atlaskit/emoji';
|
|
4
|
+
export declare const RENDER_BUTTON_TESTID = "button-emoji-id";
|
|
5
|
+
export interface EmojiButtonProps {
|
|
6
|
+
/**
|
|
7
|
+
* identifier info for a given emoji
|
|
8
|
+
*/
|
|
9
|
+
emojiId: EmojiId;
|
|
10
|
+
/**
|
|
11
|
+
* Async provider to fetch the emoji
|
|
12
|
+
*/
|
|
13
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
14
|
+
/**
|
|
15
|
+
* Event handler when a new emoji is selected
|
|
16
|
+
*/
|
|
17
|
+
onClick: OnEmojiEvent;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* custom button to render the custom emoji selector inside the reaction picker
|
|
21
|
+
*/
|
|
22
|
+
export declare const EmojiButton: React.FC<EmojiButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const emojiButtonStyle: import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface FlashAnimationProps {
|
|
4
|
+
/**
|
|
5
|
+
* Optional wrapper div class anme
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Show custom animation or render as standard without animation (defaults to false)
|
|
10
|
+
*/
|
|
11
|
+
flash?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Test id for wrapper FlashAnimation div
|
|
15
|
+
*/
|
|
16
|
+
export declare const RENDER_FLASHANIMATION_TESTID = "flash-animation";
|
|
17
|
+
/**
|
|
18
|
+
* Flash animation background component. See Reaction component for usage.
|
|
19
|
+
*/
|
|
20
|
+
export declare const FlashAnimation: React.FC<FlashAnimationProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { EmojiProvider } from '@atlaskit/emoji';
|
|
4
|
+
import { ReactionSummary, ReactionClick, ReactionMouseEnter } from '../../types';
|
|
5
|
+
/**
|
|
6
|
+
* Test id for Reaction item wrapper div
|
|
7
|
+
*/
|
|
8
|
+
export declare const RENDER_REACTION_TESTID = "render_reaction_wrapper";
|
|
9
|
+
export interface ReactionProps {
|
|
10
|
+
/**
|
|
11
|
+
* Data for the reaction
|
|
12
|
+
*/
|
|
13
|
+
reaction: ReactionSummary;
|
|
14
|
+
/**
|
|
15
|
+
* Provider for loading emojis
|
|
16
|
+
*/
|
|
17
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
18
|
+
/**
|
|
19
|
+
* event handler when the emoji button is clicked
|
|
20
|
+
*/
|
|
21
|
+
onClick: ReactionClick;
|
|
22
|
+
/**
|
|
23
|
+
* Optional wrapper reaction <button /> class name
|
|
24
|
+
*/
|
|
25
|
+
className?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional event when the mouse cursor hovers over the reaction
|
|
28
|
+
*/
|
|
29
|
+
onMouseEnter?: ReactionMouseEnter;
|
|
30
|
+
/**
|
|
31
|
+
* Show custom animation or render as standard without animation (defaults to false)
|
|
32
|
+
*/
|
|
33
|
+
flash?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Render an emoji reaction button
|
|
37
|
+
*/
|
|
38
|
+
export declare const Reaction: React.FC<ReactionProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Styling Note:
|
|
3
|
+
* Padding and line height are set within the child components
|
|
4
|
+
* of FlashAnimation b/c it otherwise throws off the flash styling
|
|
5
|
+
*/
|
|
6
|
+
export declare const emojiStyle: import("@emotion/utils").SerializedStyles;
|
|
7
|
+
export declare const reactionStyle: import("@emotion/utils").SerializedStyles;
|
|
8
|
+
export declare const reactedStyle: import("@emotion/utils").SerializedStyles;
|
|
9
|
+
export declare const flashHeight: number;
|
|
10
|
+
export declare const flashStyle: import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { EmojiProvider } from '@atlaskit/emoji/resource';
|
|
4
|
+
import { SelectorProps } from '../Selector';
|
|
5
|
+
import { ReactionSource } from '../../types';
|
|
6
|
+
/**
|
|
7
|
+
* Test id for wrapper ReactionPicker div
|
|
8
|
+
*/
|
|
9
|
+
export declare const RENDER_REACTIONPICKER_TESTID = "reactionPicker-testid";
|
|
10
|
+
export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickReactionEmojiIds'> {
|
|
11
|
+
/**
|
|
12
|
+
* Provider for loading emojis
|
|
13
|
+
*/
|
|
14
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
15
|
+
/**
|
|
16
|
+
* Event callback when an emoji button is selected
|
|
17
|
+
* @param emojiId emoji unique id
|
|
18
|
+
* @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
|
|
19
|
+
*/
|
|
20
|
+
onSelection: (emojiId: string, source: ReactionSource) => void;
|
|
21
|
+
/**
|
|
22
|
+
* apply "miniMode" className to the <ReactionPicker /> component
|
|
23
|
+
*/
|
|
24
|
+
miniMode?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Optional class name
|
|
27
|
+
*/
|
|
28
|
+
className?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
|
|
31
|
+
*/
|
|
32
|
+
allowAllEmojis?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Enable/Disable the button to be clickable (defaults to false)
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Optional event handler when the emoji picker is opened
|
|
39
|
+
*/
|
|
40
|
+
onOpen?: () => void;
|
|
41
|
+
/**
|
|
42
|
+
* Optional event handler when the emoji picker is clicked outside and closed
|
|
43
|
+
*/
|
|
44
|
+
onCancel?: () => void;
|
|
45
|
+
/**
|
|
46
|
+
* Optional event handler when the custom emoji picker icon is selected
|
|
47
|
+
*/
|
|
48
|
+
onShowMore?: () => void;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Picker component for adding reactions
|
|
52
|
+
*/
|
|
53
|
+
export declare const ReactionPicker: React.FC<ReactionPickerProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactionSummary } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Test id for wrapper ReactionTooltip div
|
|
6
|
+
*/
|
|
7
|
+
export declare const RENDER_REACTIONTOOLTIP_TESTID = "render-reactionTooltip";
|
|
8
|
+
export interface ReactionTooltipProps {
|
|
9
|
+
/**
|
|
10
|
+
* Optional name for the reaction emoji
|
|
11
|
+
*/
|
|
12
|
+
emojiName?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Info on the emoji reaction to render
|
|
15
|
+
*/
|
|
16
|
+
reaction: ReactionSummary;
|
|
17
|
+
/**
|
|
18
|
+
* Optional Max users to show in the displayed tooltip (defaults to 5)
|
|
19
|
+
*/
|
|
20
|
+
maxReactions?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare const ReactionTooltip: React.FC<ReactionTooltipProps>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const verticalMargin = 5;
|
|
2
|
+
export declare const tooltipStyle: import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const emojiNameStyle: import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const footerStyle: import("@emotion/utils").SerializedStyles;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactionStatus, ReactionClick, ReactionSummary } from '../../types';
|
|
4
|
+
import { ReactionPickerProps } from '../ReactionPicker';
|
|
5
|
+
import { SelectorProps } from '../Selector';
|
|
6
|
+
/**
|
|
7
|
+
* Test id for wrapper Reactions div
|
|
8
|
+
*/
|
|
9
|
+
export declare const RENDER_REACTIONS_TESTID = "render-reactions";
|
|
10
|
+
/**
|
|
11
|
+
* Test id for the tooltip
|
|
12
|
+
*/
|
|
13
|
+
export declare const RENDER_TOOLTIP_TESTID = "render-tooltip";
|
|
14
|
+
export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmojis' | 'emojiProvider'>, Pick<SelectorProps, 'pickerQuickReactionEmojiIds'> {
|
|
15
|
+
/**
|
|
16
|
+
* event handler to fetching the reactions
|
|
17
|
+
*/
|
|
18
|
+
loadReaction: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Event callback when an emoji button is selected
|
|
21
|
+
*/
|
|
22
|
+
onSelection: (emojiId: string) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Optional list of reactions to render (defaults to empty list)
|
|
25
|
+
*/
|
|
26
|
+
reactions?: ReactionSummary[];
|
|
27
|
+
/**
|
|
28
|
+
* Condition for the reaction list status while been fetched
|
|
29
|
+
*/
|
|
30
|
+
status: ReactionStatus;
|
|
31
|
+
/**
|
|
32
|
+
* event handler when the emoji button is clicked
|
|
33
|
+
*/
|
|
34
|
+
onReactionClick: ReactionClick;
|
|
35
|
+
/**
|
|
36
|
+
* Optional emoji reactions list to show custom animation or render as standard (key => emoji string "id", value => true/false to show custom animation)
|
|
37
|
+
*/
|
|
38
|
+
flash?: Record<string, boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Optional event when the mouse cursor hovers over the reaction
|
|
41
|
+
* @param emojiId hovered reaction emoji id
|
|
42
|
+
*/
|
|
43
|
+
onReactionHover?: (emojiId: string) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Optional error message to show when unable to display the reaction emoji
|
|
46
|
+
*/
|
|
47
|
+
errorMessage?: string;
|
|
48
|
+
/**
|
|
49
|
+
* the container for reactions/ari in the page (attached to the "quickReactionEmojiIds" prop)
|
|
50
|
+
*/
|
|
51
|
+
containerAri: string;
|
|
52
|
+
/**
|
|
53
|
+
* unique Atlassian identifier for an emoji (attached to the "quickReactionEmojiIds" prop)
|
|
54
|
+
*/
|
|
55
|
+
ari: string;
|
|
56
|
+
/**
|
|
57
|
+
* quickReactionEmojiIds are emojis that will be shown in the the primary view even if the reaction count is zero
|
|
58
|
+
*/
|
|
59
|
+
quickReactionEmojiIds?: string[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Renders list of reactions
|
|
63
|
+
*/
|
|
64
|
+
export declare const Reactions: React.FC<ReactionsProps>;
|