@atlaskit/reactions 25.4.1 → 25.5.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 +10 -0
- package/dist/cjs/MockReactionsClient.js +2 -1
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/Reaction/Reaction.js +6 -2
- package/dist/cjs/components/ReactionDialog/ReactionView.js +2 -6
- package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +8 -97
- package/dist/cjs/components/ReactionDialog/ReactionsDialogHeader.js +17 -11
- package/dist/cjs/components/ReactionDialog/ReactionsDialogTrigger.js +49 -0
- package/dist/cjs/components/ReactionDialog/ReactionsList.js +0 -3
- package/dist/cjs/components/ReactionSummary/ReactionSummaryView.js +6 -36
- package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +9 -5
- package/dist/cjs/components/ReactionTooltip/styles.js +12 -1
- package/dist/cjs/components/Reactions/Reactions.js +28 -59
- package/dist/es2019/MockReactionsClient.js +2 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/Reaction/Reaction.js +6 -2
- package/dist/es2019/components/ReactionDialog/ReactionView.js +1 -5
- package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +3 -87
- package/dist/es2019/components/ReactionDialog/ReactionsDialogHeader.js +20 -11
- package/dist/es2019/components/ReactionDialog/ReactionsDialogTrigger.js +43 -0
- package/dist/es2019/components/ReactionDialog/ReactionsList.js +0 -3
- package/dist/es2019/components/ReactionSummary/ReactionSummaryView.js +7 -35
- package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +10 -6
- package/dist/es2019/components/ReactionTooltip/styles.js +12 -1
- package/dist/es2019/components/Reactions/Reactions.js +27 -55
- package/dist/esm/MockReactionsClient.js +2 -1
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/Reaction/Reaction.js +6 -2
- package/dist/esm/components/ReactionDialog/ReactionView.js +2 -6
- package/dist/esm/components/ReactionDialog/ReactionsDialog.js +9 -98
- package/dist/esm/components/ReactionDialog/ReactionsDialogHeader.js +17 -11
- package/dist/esm/components/ReactionDialog/ReactionsDialogTrigger.js +42 -0
- package/dist/esm/components/ReactionDialog/ReactionsList.js +0 -3
- package/dist/esm/components/ReactionSummary/ReactionSummaryView.js +7 -37
- package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +10 -6
- package/dist/esm/components/ReactionTooltip/styles.js +12 -1
- package/dist/esm/components/Reactions/Reactions.js +29 -60
- package/dist/types/components/Reaction/Reaction.d.ts +9 -1
- package/dist/types/components/ReactionDialog/ReactionView.d.ts +2 -8
- package/dist/types/components/ReactionDialog/ReactionsDialog.d.ts +1 -2
- package/dist/types/components/ReactionDialog/ReactionsDialogTrigger.d.ts +6 -0
- package/dist/types/components/ReactionDialog/ReactionsList.d.ts +1 -3
- package/dist/types/components/ReactionSummary/ReactionSummaryView.d.ts +7 -3
- package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +9 -1
- package/dist/types/components/ReactionTooltip/styles.d.ts +1 -0
- package/dist/types/components/Reactions/Reactions.d.ts +1 -6
- package/dist/types-ts4.5/components/Reaction/Reaction.d.ts +9 -1
- package/dist/types-ts4.5/components/ReactionDialog/ReactionView.d.ts +2 -8
- package/dist/types-ts4.5/components/ReactionDialog/ReactionsDialog.d.ts +1 -2
- package/dist/types-ts4.5/components/ReactionDialog/ReactionsDialogTrigger.d.ts +6 -0
- package/dist/types-ts4.5/components/ReactionDialog/ReactionsList.d.ts +1 -3
- package/dist/types-ts4.5/components/ReactionSummary/ReactionSummaryView.d.ts +7 -3
- package/dist/types-ts4.5/components/ReactionTooltip/ReactionTooltip.d.ts +9 -1
- package/dist/types-ts4.5/components/ReactionTooltip/styles.d.ts +1 -0
- package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +1 -6
- package/package.json +1 -1
|
@@ -26,5 +26,13 @@ export type ReactionTooltipProps = PropsWithChildren<{
|
|
|
26
26
|
* Optional flag for enabling tooltip (defaults to true)
|
|
27
27
|
*/
|
|
28
28
|
isEnabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Optional prop for enabling the Reactions Dialog
|
|
31
|
+
*/
|
|
32
|
+
allowUserDialog?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Optional function when the user wants to open the Reactions Dialog
|
|
35
|
+
*/
|
|
36
|
+
handleOpenReactionsDialog?: (emojiId?: string, source?: string) => void;
|
|
29
37
|
}>;
|
|
30
|
-
export declare const ReactionTooltip: ({ children, emojiName, reaction: { users }, maxReactions, isEnabled, }: ReactionTooltipProps) => jsx.JSX.Element;
|
|
38
|
+
export declare const ReactionTooltip: ({ children, emojiName, reaction: { users }, maxReactions, isEnabled, allowUserDialog, handleOpenReactionsDialog, }: ReactionTooltipProps) => jsx.JSX.Element;
|
|
@@ -2,3 +2,4 @@ export declare const verticalMargin = 5;
|
|
|
2
2
|
export declare const tooltipStyle: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const emojiNameStyle: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const footerStyle: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const underlineStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -74,11 +74,6 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
74
74
|
* @param emojiId current reaction emoji id
|
|
75
75
|
*/
|
|
76
76
|
getReactionDetails?: (emojiId: string) => void;
|
|
77
|
-
/**
|
|
78
|
-
* @private
|
|
79
|
-
* @deprecated use getReactionDetails instead
|
|
80
|
-
*/
|
|
81
|
-
onReactionHover?: (emojiId: string) => void;
|
|
82
77
|
/**
|
|
83
78
|
* Optional error message to show when unable to display the reaction emoji
|
|
84
79
|
*/
|
|
@@ -159,4 +154,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
159
154
|
/**
|
|
160
155
|
* Renders list of reactions
|
|
161
156
|
*/
|
|
162
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails,
|
|
157
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, }: ReactionsProps) => jsx.JSX.Element>;
|
|
@@ -39,8 +39,16 @@ export interface ReactionProps {
|
|
|
39
39
|
* Optional prop for using an opaque button background instead of a transparent background
|
|
40
40
|
*/
|
|
41
41
|
showOpaqueBackground?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Optional prop for enabling the Reactions Dialog
|
|
44
|
+
*/
|
|
45
|
+
allowUserDialog?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Optional function when the user wants to open the Reactions Dialog
|
|
48
|
+
*/
|
|
49
|
+
handleOpenReactionsDialog?: (emojiId?: string, source?: string) => void;
|
|
42
50
|
}
|
|
43
51
|
/**
|
|
44
52
|
* Render an emoji reaction button
|
|
45
53
|
*/
|
|
46
|
-
export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, showOpaqueBackground, }: ReactionProps) => jsx.JSX.Element;
|
|
54
|
+
export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, showOpaqueBackground, allowUserDialog, handleOpenReactionsDialog, }: ReactionProps) => jsx.JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
-
import { type EmojiProvider } from '@atlaskit/emoji/resource';
|
|
3
2
|
import { type ReactionSummary, type ProfileCardWrapper } from '../../types';
|
|
4
3
|
export interface ReactionViewProps {
|
|
5
4
|
/**
|
|
@@ -7,13 +6,8 @@ export interface ReactionViewProps {
|
|
|
7
6
|
*/
|
|
8
7
|
reaction: ReactionSummary;
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
9
|
+
* Optional ProfileWrapper component to show profile card on hover
|
|
11
10
|
*/
|
|
12
|
-
selectedEmojiId: string;
|
|
13
|
-
/**
|
|
14
|
-
* Provider for loading emojis
|
|
15
|
-
*/
|
|
16
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
17
11
|
ProfileCardWrapper?: ProfileCardWrapper;
|
|
18
12
|
}
|
|
19
|
-
export declare const ReactionView: ({
|
|
13
|
+
export declare const ReactionView: ({ reaction, ProfileCardWrapper }: ReactionViewProps) => jsx.JSX.Element;
|
|
@@ -29,6 +29,5 @@ export interface ReactionsDialogProps {
|
|
|
29
29
|
handleSelectReaction?: (emojiId: string) => void;
|
|
30
30
|
handlePaginationChange?: (emojiId: string, currentPage: number, maxPages: number) => void;
|
|
31
31
|
ProfileCardWrapper?: ProfileCardWrapper;
|
|
32
|
-
handleReactionMouseEnter?: (emojiId: string) => void;
|
|
33
32
|
}
|
|
34
|
-
export declare const ReactionsDialog: ({ reactions, handleCloseReactionsDialog, emojiProvider, selectedEmojiId, handleSelectReaction, handlePaginationChange, ProfileCardWrapper,
|
|
33
|
+
export declare const ReactionsDialog: ({ reactions, handleCloseReactionsDialog, emojiProvider, selectedEmojiId, handleSelectReaction, handlePaginationChange, ProfileCardWrapper, }: ReactionsDialogProps) => jsx.JSX.Element;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
|
-
import { type EmojiProvider } from '@atlaskit/emoji/resource';
|
|
7
6
|
import { type ReactionSummary, type ProfileCardWrapper } from '../../types';
|
|
8
7
|
export interface ReactionsListProps {
|
|
9
8
|
/**
|
|
@@ -17,10 +16,9 @@ export interface ReactionsListProps {
|
|
|
17
16
|
/**
|
|
18
17
|
* Provider for loading emojis
|
|
19
18
|
*/
|
|
20
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
21
19
|
/**
|
|
22
20
|
* A functional component from Confluence to show a profile card on hover
|
|
23
21
|
*/
|
|
24
22
|
ProfileCardWrapper?: ProfileCardWrapper;
|
|
25
23
|
}
|
|
26
|
-
export declare const ReactionsList: ({ reactions, selectedEmojiId,
|
|
24
|
+
export declare const ReactionsList: ({ reactions, selectedEmojiId, ProfileCardWrapper, }: ReactionsListProps) => jsx.JSX.Element;
|
|
@@ -32,9 +32,13 @@ interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider'
|
|
|
32
32
|
*/
|
|
33
33
|
subtleReactionsSummaryAndPicker?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
* Optional
|
|
35
|
+
* Optional prop for enabling the Reactions Dialog
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
allowUserDialog?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Optional function when the user wants to open the Reactions Dialog
|
|
40
|
+
*/
|
|
41
|
+
handleOpenReactionsDialog?: (emojiId?: string, source?: string) => void;
|
|
38
42
|
}
|
|
39
|
-
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker,
|
|
43
|
+
export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, allowUserDialog, handleOpenReactionsDialog, }: ReactionSummaryViewProps) => React.JSX.Element;
|
|
40
44
|
export {};
|
|
@@ -26,5 +26,13 @@ export type ReactionTooltipProps = PropsWithChildren<{
|
|
|
26
26
|
* Optional flag for enabling tooltip (defaults to true)
|
|
27
27
|
*/
|
|
28
28
|
isEnabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Optional prop for enabling the Reactions Dialog
|
|
31
|
+
*/
|
|
32
|
+
allowUserDialog?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Optional function when the user wants to open the Reactions Dialog
|
|
35
|
+
*/
|
|
36
|
+
handleOpenReactionsDialog?: (emojiId?: string, source?: string) => void;
|
|
29
37
|
}>;
|
|
30
|
-
export declare const ReactionTooltip: ({ children, emojiName, reaction: { users }, maxReactions, isEnabled, }: ReactionTooltipProps) => jsx.JSX.Element;
|
|
38
|
+
export declare const ReactionTooltip: ({ children, emojiName, reaction: { users }, maxReactions, isEnabled, allowUserDialog, handleOpenReactionsDialog, }: ReactionTooltipProps) => jsx.JSX.Element;
|
|
@@ -2,3 +2,4 @@ export declare const verticalMargin = 5;
|
|
|
2
2
|
export declare const tooltipStyle: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const emojiNameStyle: import("@emotion/react").SerializedStyles;
|
|
4
4
|
export declare const footerStyle: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const underlineStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -74,11 +74,6 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
74
74
|
* @param emojiId current reaction emoji id
|
|
75
75
|
*/
|
|
76
76
|
getReactionDetails?: (emojiId: string) => void;
|
|
77
|
-
/**
|
|
78
|
-
* @private
|
|
79
|
-
* @deprecated use getReactionDetails instead
|
|
80
|
-
*/
|
|
81
|
-
onReactionHover?: (emojiId: string) => void;
|
|
82
77
|
/**
|
|
83
78
|
* Optional error message to show when unable to display the reaction emoji
|
|
84
79
|
*/
|
|
@@ -159,4 +154,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
159
154
|
/**
|
|
160
155
|
* Renders list of reactions
|
|
161
156
|
*/
|
|
162
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails,
|
|
157
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, }: ReactionsProps) => jsx.JSX.Element>;
|