@atlaskit/reactions 21.5.1 → 21.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/MockReactionsClient/package.json +7 -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/{client/MockReactionsClient.d.ts → MockReactionsClient.d.ts} +4 -5
- 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.d.ts → Counter/Counter.d.ts} +15 -7
- 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.d.ts → ReactionPicker/ReactionPicker.d.ts} +12 -33
- 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.d.ts → ShowMore/ShowMore.d.ts} +14 -13
- 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/{components → shared}/i18n.d.ts +0 -0
- package/dist/types/shared/index.d.ts +3 -1
- package/dist/types/shared/utils.d.ts +11 -0
- package/dist/types/store/{ReactionsStore.d.ts → MemoryReactionsStore.d.ts} +21 -61
- 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/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 +21 -5
- 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
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { EmojiId, OnEmojiEvent } from '@atlaskit/emoji/types';
|
|
4
|
+
import { EmojiProvider } from '@atlaskit/emoji/resource';
|
|
5
|
+
/**
|
|
6
|
+
* Test id for wrapper Selector div
|
|
7
|
+
*/
|
|
8
|
+
export declare const RENDER_SELECTOR_TESTID = "render-selector";
|
|
9
|
+
export interface SelectorProps {
|
|
10
|
+
/**
|
|
11
|
+
* Provider for loading emojis
|
|
12
|
+
*/
|
|
13
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
14
|
+
/**
|
|
15
|
+
* Event handler when an emoji gets selected
|
|
16
|
+
*/
|
|
17
|
+
onSelection: OnEmojiEvent;
|
|
18
|
+
/**
|
|
19
|
+
* Enable/Disable selection of extra custom emoji beyond default list (defaults to false)
|
|
20
|
+
*/
|
|
21
|
+
showMore?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Optional event when extra custom emojis icon is selected
|
|
24
|
+
*/
|
|
25
|
+
onMoreClick?: React.MouseEventHandler<HTMLElement>;
|
|
26
|
+
/**
|
|
27
|
+
* Optional emojis shown for user to select from when the reaction add button is clicked (defaults to pre-defined list of emojis {@link constants.DEFAULT_REACTION_EMOJI_IDS})
|
|
28
|
+
*/
|
|
29
|
+
pickerQuickReactionEmojiIds?: EmojiId[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Reactions picker panel part of the <ReactionPicker /> component
|
|
33
|
+
*/
|
|
34
|
+
export declare const Selector: React.FC<SelectorProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const selectorStyle: import("@emotion/utils").SerializedStyles;
|
|
3
|
+
export declare const emojiStyle: import("@emotion/utils").SerializedStyles;
|
|
4
|
+
export declare const revealAnimation: import("@emotion/serialize").Keyframes;
|
|
5
|
+
export declare const revealStyle: import("@emotion/utils").SerializedStyles;
|
|
6
|
+
/**
|
|
7
|
+
* custom css styling for the emoji icon
|
|
8
|
+
* @param index location of the emoji in the rendered list of items
|
|
9
|
+
*/
|
|
10
|
+
export declare const emojiStyleAnimation: (index: number) => React.CSSProperties;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { SerializedStyles } from '@emotion/core';
|
|
3
2
|
import React from 'react';
|
|
4
|
-
|
|
3
|
+
import { SerializedStyles } from '@emotion/core';
|
|
4
|
+
/**
|
|
5
|
+
* Test id for wrapper button
|
|
6
|
+
*/
|
|
7
|
+
export declare const RENDER_SHOWMORE_TESTID = "show-more-button";
|
|
8
|
+
interface CommonProps<T> {
|
|
5
9
|
container?: T;
|
|
6
10
|
button?: T;
|
|
7
|
-
}
|
|
8
|
-
export
|
|
11
|
+
}
|
|
12
|
+
export interface ShowMoreProps {
|
|
9
13
|
/**
|
|
10
14
|
* Optional mouse click DOM event on showing more emoji icon
|
|
11
15
|
*/
|
|
@@ -13,7 +17,7 @@ export declare type Props = {
|
|
|
13
17
|
/**
|
|
14
18
|
* Optional button css
|
|
15
19
|
*/
|
|
16
|
-
|
|
20
|
+
buttonStyle?: SerializedStyles;
|
|
17
21
|
/**
|
|
18
22
|
* Optional custom styling for wrapper show more emoji button
|
|
19
23
|
*/
|
|
@@ -22,12 +26,9 @@ export declare type Props = {
|
|
|
22
26
|
* Optional custom styling for wrapper show more emoji button
|
|
23
27
|
*/
|
|
24
28
|
className?: CommonProps<string>;
|
|
25
|
-
};
|
|
26
|
-
export declare const showMoreTestId = "show-more-button";
|
|
27
|
-
export declare class ShowMore extends React.PureComponent<Props> {
|
|
28
|
-
static defaultProps: {
|
|
29
|
-
className: {};
|
|
30
|
-
style: {};
|
|
31
|
-
};
|
|
32
|
-
render(): JSX.Element;
|
|
33
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Show more custom emojis button
|
|
32
|
+
*/
|
|
33
|
+
export declare const ShowMore: React.FC<ShowMoreProps>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
|
+
export interface TriggerProps {
|
|
5
|
+
/**
|
|
6
|
+
* Optional Event handler when the button to open the picker is clicked
|
|
7
|
+
* @param e Mouse Dom event
|
|
8
|
+
* @param analyticsEvent atlaskit analytics event payload of the button
|
|
9
|
+
*/
|
|
10
|
+
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: AnalyticsEvent) => void;
|
|
11
|
+
/**
|
|
12
|
+
* apply "miniMode" className to the button
|
|
13
|
+
*/
|
|
14
|
+
miniMode?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Enable/Disable the button to be clickable (defaults to false)
|
|
17
|
+
*/
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Render a button to open the reactions picker
|
|
22
|
+
*/
|
|
23
|
+
export declare const Trigger: React.ForwardRefExoticComponent<TriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { ErrorInfo } from 'react';
|
|
2
|
+
import { UFOExperience } from '@atlaskit/ufo';
|
|
3
|
+
import { WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
4
|
+
export interface UfoErrorBoundaryProps {
|
|
5
|
+
/**
|
|
6
|
+
* UFO Experiences to notify failure when the children components fail on rendering
|
|
7
|
+
*/
|
|
8
|
+
experiences: UFOExperience[] | WithSamplingUFOExperience[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Error boundary wrapper to notify "failure" for UFO events of components when there was a re-rendering exception caught inside the `componentDidCatch` event handler
|
|
12
|
+
*/
|
|
13
|
+
export declare class UfoErrorBoundary extends React.Component<UfoErrorBoundaryProps> {
|
|
14
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
15
|
+
render(): React.ReactNode;
|
|
16
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { Reaction } from './Reaction';
|
|
2
|
+
export type { ReactionProps } from './Reaction';
|
|
2
3
|
export { ReactionPicker } from './ReactionPicker';
|
|
4
|
+
export type { ReactionPickerProps } from './ReactionPicker';
|
|
3
5
|
export { Reactions } from './Reactions';
|
|
4
|
-
export type {
|
|
6
|
+
export type { ReactionsProps } from './Reactions';
|
|
5
7
|
export { UfoErrorBoundary } from './UfoErrorBoundary';
|
|
8
|
+
export type { UfoErrorBoundaryProps } from './UfoErrorBoundary';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ReactionPickerProps } from '../../components';
|
|
3
|
+
import { StorePropInput } from '../../types';
|
|
4
|
+
export interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps, 'onSelection'> {
|
|
5
|
+
/**
|
|
6
|
+
* Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
|
|
7
|
+
*/
|
|
8
|
+
allowAllEmojis?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Wrapper id for reactions list
|
|
11
|
+
*/
|
|
12
|
+
containerAri: string;
|
|
13
|
+
/**
|
|
14
|
+
* Individual id for a reaction
|
|
15
|
+
*/
|
|
16
|
+
ari: string;
|
|
17
|
+
/**
|
|
18
|
+
* Reference to the store.
|
|
19
|
+
* @remarks
|
|
20
|
+
* This was initially implemented with a sync and Async versions and will be replaced with just a sync Store in a future release (Please use only the sync version)
|
|
21
|
+
*/
|
|
22
|
+
store: StorePropInput;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Reaction Picker component
|
|
26
|
+
*/
|
|
27
|
+
export declare const ConnectedReactionPicker: React.FC<ConnectedReactionPickerProps>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EmojiProvider } from '@atlaskit/emoji/resource';
|
|
3
|
+
import { ReactionsProps, ReactionPickerProps } from '../../components';
|
|
4
|
+
import { ReactionStatus, Actions, State, StorePropInput } from '../../types';
|
|
5
|
+
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojiIds'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
6
|
+
/**
|
|
7
|
+
* Provider for loading emojis
|
|
8
|
+
*/
|
|
9
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
10
|
+
/**
|
|
11
|
+
* Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
|
|
12
|
+
*/
|
|
13
|
+
allowAllEmojis?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Wrapper id for reactions list
|
|
16
|
+
*/
|
|
17
|
+
containerAri: string;
|
|
18
|
+
/**
|
|
19
|
+
* Individual id for a reaction
|
|
20
|
+
*/
|
|
21
|
+
ari: string;
|
|
22
|
+
/**
|
|
23
|
+
* Reference to the store.
|
|
24
|
+
* @remarks
|
|
25
|
+
* This was initially implemented with a sync and Async versions and will be replaced with just a sync Store in a future release (Please use only the sync version)
|
|
26
|
+
*/
|
|
27
|
+
store: StorePropInput;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Export the mapper function outside the component so easier to do unit tests migration from Enzyme to React Testing Library
|
|
31
|
+
*/
|
|
32
|
+
export declare const mapStateToPropsHelper: (containerAri: string, ari: string, state?: State | undefined) => {
|
|
33
|
+
status: ReactionStatus;
|
|
34
|
+
reactions: never[];
|
|
35
|
+
flash?: undefined;
|
|
36
|
+
} | {
|
|
37
|
+
reactions: import("../../types").ReactionSummary[];
|
|
38
|
+
status: ReactionStatus.ready;
|
|
39
|
+
flash: {
|
|
40
|
+
[emojiId: string]: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Export the mapper function outside the component so easier to do unit tests migration from Enzyme to React Testing Library
|
|
45
|
+
*/
|
|
46
|
+
export declare const mapDispatchToPropsHelper: (actions: Actions, containerAri: string, ari: string) => {
|
|
47
|
+
loadReaction: () => void;
|
|
48
|
+
onReactionClick: (emojiId: string) => void;
|
|
49
|
+
onReactionHover: (emojiId: string) => void;
|
|
50
|
+
onSelection: (emojiId: string) => void;
|
|
51
|
+
};
|
|
52
|
+
export declare const ConnectedReactionsView: React.FC<ConnectedReactionsViewProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from './ConnectedReactionPicker';
|
|
2
|
+
export * from './ConnectedReactionsView';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useClickAway } from './useClickAway';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook to detect when user action is outside given container ref
|
|
4
|
+
* @param ref ref object to an html element
|
|
5
|
+
* @param callback event callback when detected a click outside the ref object
|
|
6
|
+
* @param type (Optional) type of event to listen to. @default click
|
|
7
|
+
*/
|
|
8
|
+
export declare function useClickAway(ref: React.RefObject<HTMLElement>, callback: () => void, type?: 'click' | 'mousedown' | 'touchstart'): void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { UFO } from './analytics';
|
|
2
2
|
export { ReactionServiceClient } from './client';
|
|
3
|
-
export type { ReactionClient, ReactionRequest } from './
|
|
3
|
+
export type { Client as ReactionClient, Request as ReactionRequest, Store as ReactionsStore, StorePropInput, State, } from './types';
|
|
4
|
+
export { constants } from './shared';
|
|
4
5
|
export { Reaction, ReactionPicker, Reactions } from './components';
|
|
5
6
|
export { ConnectedReactionPicker, ConnectedReactionsView } from './containers';
|
|
6
7
|
export { MemoryReactionsStore, ReactionConsumer } from './store';
|
|
7
|
-
export type { ReactionsStore, State } from './store';
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { EmojiId } from '@atlaskit/emoji/types';
|
|
2
|
+
/**
|
|
3
|
+
* Initial list of emoji to pick from
|
|
4
|
+
*/
|
|
5
|
+
export declare const DefaultReactions: EmojiId[];
|
|
6
|
+
/**
|
|
7
|
+
* ES6 Map object from default emoji reactions (with key => shortName, value => entire emoji item)
|
|
8
|
+
*/
|
|
9
|
+
export declare const DefaultReactionsByShortName: Map<string, EmojiId>;
|
|
10
|
+
/**
|
|
11
|
+
* Maximum number of users to show in the tooltip for an emoji reaction
|
|
12
|
+
*/
|
|
13
|
+
export declare const TOOLTIP_USERS_LIMIT = 5;
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EmojiId } from '@atlaskit/emoji/types';
|
|
2
|
+
/**
|
|
3
|
+
* Is selected mouse event a left click
|
|
4
|
+
* @param event event data
|
|
5
|
+
*/
|
|
6
|
+
export declare const isLeftClick: (event: React.MouseEvent<HTMLElement>) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Does provided item part of the default emoji ids
|
|
9
|
+
* @param item selected emoji item
|
|
10
|
+
*/
|
|
11
|
+
export declare const isDefaultReaction: (item: EmojiId) => boolean;
|
|
@@ -1,37 +1,5 @@
|
|
|
1
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { ReactionClient } from '../client';
|
|
3
2
|
import * as Types from '../types';
|
|
4
|
-
/**
|
|
5
|
-
* store main structure
|
|
6
|
-
*/
|
|
7
|
-
export declare type State = {
|
|
8
|
-
/**
|
|
9
|
-
* collection of the different reactions (key => unique reaction id , value => state of the reaction)
|
|
10
|
-
*/
|
|
11
|
-
reactions: {
|
|
12
|
-
[key: string]: Types.ReactionsState;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* custom animation for given emojis as true|false (key => unique reaction id, value => collection of emojiIds and true|false to apply custom animation)
|
|
16
|
-
*/
|
|
17
|
-
flash: {
|
|
18
|
-
[key: string]: {
|
|
19
|
-
[emojiId: string]: boolean;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Callback event when changes apply to the main store
|
|
25
|
-
* @param state latest store state
|
|
26
|
-
*/
|
|
27
|
-
export declare type OnChangeCallback = (state: State) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Optional metadata information in the store used in sending the API client requests
|
|
30
|
-
*/
|
|
31
|
-
export interface StoreMetadata {
|
|
32
|
-
subproduct?: string;
|
|
33
|
-
[k: string]: any;
|
|
34
|
-
}
|
|
35
3
|
/**
|
|
36
4
|
* Set of all available UFO experiences relating to reaction element
|
|
37
5
|
*/
|
|
@@ -54,40 +22,31 @@ export declare const ufoExperiences: {
|
|
|
54
22
|
fetchDetails: import("@atlaskit/ufo").ConcurrentExperience;
|
|
55
23
|
};
|
|
56
24
|
/**
|
|
57
|
-
*
|
|
25
|
+
* Optional metadata information in the store used in sending the API client requests
|
|
58
26
|
*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*/
|
|
63
|
-
getState: () => State;
|
|
64
|
-
/**
|
|
65
|
-
* Register a callback event on change to the store instance state data
|
|
66
|
-
* @param callback event to register
|
|
67
|
-
* @deprecated initially implemented by the MemoryReactionsStore and kept. This is not required by external ReactionsStore implementation
|
|
68
|
-
*/
|
|
69
|
-
onChange: (callback: OnChangeCallback) => void;
|
|
70
|
-
/**
|
|
71
|
-
* Deregister any callback event on changes to the store instance state data
|
|
72
|
-
* @param callback event to deregister
|
|
73
|
-
* @deprecated initially implemented by the MemoryReactionsStore and kept. This is not required by external ReactionsStore implementation
|
|
74
|
-
*/
|
|
75
|
-
removeOnChangeListener: (callback: OnChangeCallback) => void;
|
|
76
|
-
/**
|
|
77
|
-
* Add Atlaskit analytics events to different operations in the store
|
|
78
|
-
* @param createAnalyticsEvent analytics event trigger
|
|
79
|
-
* @deprecated initially implemented by the MemoryReactionsStore and kept. This is not required by external ReactionsStore implementation
|
|
80
|
-
*/
|
|
81
|
-
setCreateAnalyticsEvent?: (createAnalyticsEvent: CreateUIAnalyticsEvent) => void;
|
|
27
|
+
interface StoreMetadata {
|
|
28
|
+
subproduct?: string;
|
|
29
|
+
[k: string]: any;
|
|
82
30
|
}
|
|
83
|
-
export declare class MemoryReactionsStore implements
|
|
31
|
+
export declare class MemoryReactionsStore implements Types.Store {
|
|
84
32
|
private client;
|
|
85
33
|
private state;
|
|
86
34
|
private metadata;
|
|
87
35
|
private callbacks;
|
|
88
36
|
private createAnalyticsEvent?;
|
|
89
|
-
|
|
37
|
+
/**
|
|
38
|
+
* default initial store data
|
|
39
|
+
*/
|
|
40
|
+
private initialState;
|
|
41
|
+
constructor(client: Types.Client, state?: Types.State, metadata?: StoreMetadata);
|
|
42
|
+
/**
|
|
43
|
+
* Update the store state data with a new data
|
|
44
|
+
* @param newState new store data
|
|
45
|
+
*/
|
|
90
46
|
private setState;
|
|
47
|
+
/**
|
|
48
|
+
* Calls any onChange callbacks in the store using latest state data.
|
|
49
|
+
*/
|
|
91
50
|
private triggerOnChange;
|
|
92
51
|
private setReactions;
|
|
93
52
|
private getReactionsState;
|
|
@@ -128,7 +87,8 @@ export declare class MemoryReactionsStore implements ReactionsStore {
|
|
|
128
87
|
toggleReaction: (containerAri: string, ari: string, emojiId: string) => void;
|
|
129
88
|
addReaction: (containerAri: string, ari: string, emojiId: string) => void;
|
|
130
89
|
getDetailedReaction: (containerAri: string, ari: string, emojiId: string) => void;
|
|
131
|
-
getState: () => State;
|
|
132
|
-
onChange: (callback: OnChangeCallback) => void;
|
|
133
|
-
removeOnChangeListener: (toRemove: OnChangeCallback) => void;
|
|
90
|
+
getState: () => Types.State;
|
|
91
|
+
onChange: (callback: Types.OnChangeCallback) => void;
|
|
92
|
+
removeOnChangeListener: (toRemove: Types.OnChangeCallback) => void;
|
|
134
93
|
}
|
|
94
|
+
export {};
|
|
@@ -1,29 +1,57 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Actions } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { Actions, State, StorePropInput, Store } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Props type for the ReactionConsumer class component
|
|
5
|
+
*/
|
|
6
|
+
export declare type ReactioConsumerProps<PropsFromState, PropsFromActions> = {
|
|
7
|
+
/**
|
|
8
|
+
* Return a plain object containing the data that the connected component needs
|
|
9
|
+
*/
|
|
10
|
+
mapStateToProps?: (state: State) => PropsFromState;
|
|
11
|
+
/**
|
|
12
|
+
* Specify which actions the child component might need to dispatch from its props
|
|
13
|
+
*/
|
|
14
|
+
mapActionsToProps?: (actions: Actions) => PropsFromActions;
|
|
15
|
+
/**
|
|
16
|
+
* Component to render
|
|
17
|
+
*/
|
|
18
|
+
children: (props: PropsFromState & PropsFromActions) => React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Reference to the store.
|
|
21
|
+
* @remarks
|
|
22
|
+
* This was initially implemented with a sync and Async versions and will be replaced with just a sync Store in a future release (Please use only the sync version)
|
|
23
|
+
*/
|
|
24
|
+
store: StorePropInput;
|
|
14
25
|
};
|
|
15
|
-
|
|
16
|
-
|
|
26
|
+
/**
|
|
27
|
+
* State type for the ReactionConsumer class component
|
|
28
|
+
*/
|
|
29
|
+
export declare type ReactionConsumerState = {
|
|
30
|
+
store?: Store;
|
|
17
31
|
};
|
|
18
|
-
|
|
32
|
+
/**
|
|
33
|
+
* A custom mapper class that takes the store instance and mapper functions "mapStateToProps" and "mapActionsToProps" to return the renderProps pattern as a child component
|
|
34
|
+
* @deprecated please avoid using this class as it will be removed in a future release
|
|
35
|
+
*/
|
|
36
|
+
export declare class ReactionConsumer<PropsFromState, PropsFromActions> extends React.PureComponent<ReactioConsumerProps<PropsFromState, PropsFromActions>, ReactionConsumerState> {
|
|
19
37
|
private previousActions;
|
|
20
38
|
private propsFromActions;
|
|
21
|
-
constructor(props:
|
|
39
|
+
constructor(props: ReactioConsumerProps<PropsFromState, PropsFromActions>);
|
|
40
|
+
componentDidMount(): void;
|
|
41
|
+
componentWillUnmount(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Get the actions the child component might need to dispatch from its props
|
|
44
|
+
*/
|
|
22
45
|
private getPropsFromActions;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @param state Internal state data
|
|
49
|
+
* @returns object containing the data that the connected component needs
|
|
50
|
+
*/
|
|
23
51
|
private getPropsFromState;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
24
55
|
private handleOnChange;
|
|
25
|
-
componentDidMount(): void;
|
|
26
|
-
componentWillUnmount(): void;
|
|
27
56
|
render(): React.ReactNode;
|
|
28
57
|
}
|
|
29
|
-
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ReactionConsumer } from './ReactionConsumer';
|
|
2
|
-
export {
|
|
3
|
-
export
|
|
2
|
+
export type { ReactioConsumerProps } from './ReactionConsumer';
|
|
3
|
+
export { MemoryReactionsStore, ufoExperiences } from './MemoryReactionsStore';
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { ReactionsReadyState } from '../types
|
|
2
|
-
|
|
3
|
-
import { Updater } from '../types/Updater';
|
|
4
|
-
export declare const compareEmojiId: (l: string, r: string) => number;
|
|
5
|
-
export declare type ReactionSummarySortFunction = (a: ReactionSummary, b: ReactionSummary) => number;
|
|
6
|
-
export declare const sortByRelevance: ReactionSummarySortFunction;
|
|
7
|
-
export declare const sortByPreviousPosition: (reactions: ReactionSummary[]) => ReactionSummarySortFunction;
|
|
1
|
+
import { Updater, ReactionsReadyState, ReactionSummary } from '../types';
|
|
2
|
+
declare type ReactionSummarySortFunction = (a: ReactionSummary, b: ReactionSummary) => number;
|
|
8
3
|
export declare const readyState: (reactions: ReactionSummary[]) => ReactionsReadyState;
|
|
9
4
|
export declare const byEmojiId: (emojiId: string) => (reaction: ReactionSummary) => boolean;
|
|
10
5
|
export declare const addOne: (reaction: ReactionSummary) => ReactionSummary;
|
|
@@ -13,3 +8,4 @@ export declare const updateByEmojiId: (emojiId: string, updater: Updater<Reactio
|
|
|
13
8
|
export declare const getReactionsSortFunction: (reactions?: ReactionSummary[] | undefined) => ReactionSummarySortFunction;
|
|
14
9
|
export declare const flattenAris: (a: string[], b: string[]) => string[];
|
|
15
10
|
export declare function isRealErrorFromService(errorCode?: number): boolean;
|
|
11
|
+
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Event callback by the client to the API
|
|
3
|
+
* @param containerAri the container for reactions/ari in the page (attached to the "quickReactionEmojiIds" prop)
|
|
4
|
+
* @param ariunique Atlassian identifier for an emoji (attached to the "quickReactionEmojiIds" prop)
|
|
5
|
+
* @param emojiId unique identifier guid for the emoji
|
|
3
6
|
*/
|
|
4
7
|
export declare type ReactionAction = (containerAri: string, ari: string, emojiId: string) => void;
|
|
5
8
|
export declare type Actions = {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Reactions, ReactionSummary } from './reaction';
|
|
2
|
+
export declare type Request<T> = (
|
|
3
|
+
/**
|
|
4
|
+
* Reaction Asset id in the container
|
|
5
|
+
*/
|
|
6
|
+
ari: string,
|
|
7
|
+
/**
|
|
8
|
+
* the container for reactions/ari
|
|
9
|
+
*/
|
|
10
|
+
containerAri: string,
|
|
11
|
+
/**
|
|
12
|
+
* unique Atlassian identifier for an emoji
|
|
13
|
+
*/
|
|
14
|
+
emojiId: string,
|
|
15
|
+
/**
|
|
16
|
+
* Optional metadata information used in the API request
|
|
17
|
+
*/
|
|
18
|
+
metadata?: Record<string, any>) => Promise<T>;
|
|
19
|
+
export interface Client {
|
|
20
|
+
/**
|
|
21
|
+
* fetch reactions request handler
|
|
22
|
+
* @param containerAri container wrapper id
|
|
23
|
+
* @param aris container reaction assets unique ids
|
|
24
|
+
*/
|
|
25
|
+
getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
|
|
26
|
+
/**
|
|
27
|
+
* Fetch details for a given reaction.
|
|
28
|
+
*/
|
|
29
|
+
getDetailedReaction: Request<ReactionSummary>;
|
|
30
|
+
/**
|
|
31
|
+
* Fetch request when adding a reaction to a container.
|
|
32
|
+
*/
|
|
33
|
+
addReaction: Request<ReactionSummary[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Fetch request when removing a reaction from a container.
|
|
36
|
+
*/
|
|
37
|
+
deleteReaction: Request<ReactionSummary[]>;
|
|
38
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
export type { ReactionAction, Actions } from './Actions';
|
|
2
|
-
export
|
|
3
|
-
export type { Reactions } from './
|
|
4
|
-
export type {
|
|
5
|
-
export type { ReactionsError, ReactionsLoading, ReactionsReadyState, ReactionsState, } from './ReactionsState';
|
|
6
|
-
export { ReactionStatus } from './ReactionStatus';
|
|
7
|
-
export type { ReactionSummary } from './ReactionSummary';
|
|
2
|
+
export { ReactionStatus } from './reaction';
|
|
3
|
+
export type { ReactionSource, ReactionsError, ReactionsLoading, ReactionsReadyState, ReactionsState, ReactionSummary, ReactionsNotLoaded, Reactions, ReactionClick, ReactionMouseEnter, } from './reaction';
|
|
4
|
+
export type { Client, Request } from './client';
|
|
8
5
|
export type { Updater } from './Updater';
|
|
9
6
|
export type { User } from './User';
|
|
7
|
+
export type { Store, StorePropInput, State, OnChangeCallback } from './store';
|