@atlaskit/reactions 33.2.12 → 33.2.13
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 +8 -0
- package/afm-cc/tsconfig.json +2 -2
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/esm/analytics/index.js +1 -1
- package/dist/types/components/Counter.d.ts +10 -10
- package/dist/types/components/EmojiButton.d.ts +4 -4
- package/dist/types/components/Reaction.d.ts +20 -20
- package/dist/types/components/ReactionButton.d.ts +9 -9
- package/dist/types/components/ReactionPicker.d.ts +34 -34
- package/dist/types/components/ReactionPickerNew.d.ts +41 -41
- package/dist/types/components/ReactionSummaryButton.d.ts +12 -12
- package/dist/types/components/ReactionSummaryView.d.ts +32 -32
- package/dist/types/components/ReactionTooltip.d.ts +14 -14
- package/dist/types/components/ReactionView.d.ts +4 -4
- package/dist/types/components/Reactions.d.ts +73 -73
- package/dist/types/components/ReactionsDialog.d.ts +10 -10
- package/dist/types/components/ReactionsDialogHeader.d.ts +5 -5
- package/dist/types/components/ReactionsList.d.ts +7 -7
- package/dist/types/components/RepositionOnUpdate.d.ts +2 -2
- package/dist/types/components/Selector.d.ts +8 -8
- package/dist/types/components/StaticReaction.d.ts +3 -3
- package/dist/types/components/Trigger.d.ts +27 -27
- package/dist/types/components/UfoErrorBoundary.d.ts +1 -1
- package/dist/types/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +4 -4
- package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +10 -10
- package/dist/types/hooks/useFocusTrap.d.ts +1 -1
- package/dist/types/store/MemoryReactionsStore.d.ts +1 -1
- package/dist/types/store/ReactionConsumer.d.ts +4 -4
- package/dist/types/types/Actions.d.ts +8 -8
- package/dist/types/types/User.d.ts +5 -5
- package/dist/types/types/client.d.ts +10 -10
- package/dist/types/types/index.d.ts +6 -6
- package/dist/types/types/reaction.d.ts +12 -12
- package/dist/types/types/store.d.ts +6 -6
- package/dist/types-ts4.5/components/Counter.d.ts +10 -10
- package/dist/types-ts4.5/components/EmojiButton.d.ts +4 -4
- package/dist/types-ts4.5/components/Reaction.d.ts +20 -20
- package/dist/types-ts4.5/components/ReactionButton.d.ts +9 -9
- package/dist/types-ts4.5/components/ReactionPicker.d.ts +34 -34
- package/dist/types-ts4.5/components/ReactionPickerNew.d.ts +41 -41
- package/dist/types-ts4.5/components/ReactionSummaryButton.d.ts +12 -12
- package/dist/types-ts4.5/components/ReactionSummaryView.d.ts +32 -32
- package/dist/types-ts4.5/components/ReactionTooltip.d.ts +14 -14
- package/dist/types-ts4.5/components/ReactionView.d.ts +4 -4
- package/dist/types-ts4.5/components/Reactions.d.ts +73 -73
- package/dist/types-ts4.5/components/ReactionsDialog.d.ts +10 -10
- package/dist/types-ts4.5/components/ReactionsDialogHeader.d.ts +5 -5
- package/dist/types-ts4.5/components/ReactionsList.d.ts +7 -7
- package/dist/types-ts4.5/components/RepositionOnUpdate.d.ts +2 -2
- package/dist/types-ts4.5/components/Selector.d.ts +8 -8
- package/dist/types-ts4.5/components/StaticReaction.d.ts +3 -3
- package/dist/types-ts4.5/components/Trigger.d.ts +27 -27
- package/dist/types-ts4.5/components/UfoErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +4 -4
- package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +10 -10
- package/dist/types-ts4.5/hooks/useFocusTrap.d.ts +1 -1
- package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +1 -1
- package/dist/types-ts4.5/store/ReactionConsumer.d.ts +4 -4
- package/dist/types-ts4.5/types/Actions.d.ts +8 -8
- package/dist/types-ts4.5/types/User.d.ts +5 -5
- package/dist/types-ts4.5/types/client.d.ts +10 -10
- package/dist/types-ts4.5/types/index.d.ts +6 -6
- package/dist/types-ts4.5/types/reaction.d.ts +12 -12
- package/dist/types-ts4.5/types/store.d.ts +6 -6
- package/package.json +1 -1
|
@@ -5,17 +5,17 @@ import { type Actions, type State, type StorePropInput, type Store } from '../ty
|
|
|
5
5
|
*/
|
|
6
6
|
export type ReactioConsumerProps<PropsFromState, PropsFromActions> = {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Component to render
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
children: (props: PropsFromState & PropsFromActions) => React.ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* Specify which actions the child component might need to dispatch from its props
|
|
13
13
|
*/
|
|
14
14
|
mapActionsToProps?: (actions: Actions) => PropsFromActions;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Return a plain object containing the data that the connected component needs
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
mapStateToProps?: (state: State) => PropsFromState;
|
|
19
19
|
/**
|
|
20
20
|
* Reference to the store.
|
|
21
21
|
* @remarks
|
|
@@ -7,6 +7,14 @@ import { type ReactionUpdateSuccess } from './reaction';
|
|
|
7
7
|
*/
|
|
8
8
|
export type ReactionAction = (containerAri: string, ari: string, emojiId: string, onSuccess?: ReactionUpdateSuccess) => void;
|
|
9
9
|
export type Actions = {
|
|
10
|
+
/**
|
|
11
|
+
* Add a new reation api
|
|
12
|
+
*/
|
|
13
|
+
addReaction: ReactionAction;
|
|
14
|
+
/**
|
|
15
|
+
* Hover an existing reaction emoji api
|
|
16
|
+
*/
|
|
17
|
+
getDetailedReaction: ReactionAction;
|
|
10
18
|
/**
|
|
11
19
|
* Retrieve reaction collection api
|
|
12
20
|
* @param containerId the container for reactions/ari in the page
|
|
@@ -17,12 +25,4 @@ export type Actions = {
|
|
|
17
25
|
* Select/deselect a rection callback
|
|
18
26
|
*/
|
|
19
27
|
toggleReaction: ReactionAction;
|
|
20
|
-
/**
|
|
21
|
-
* Add a new reation api
|
|
22
|
-
*/
|
|
23
|
-
addReaction: ReactionAction;
|
|
24
|
-
/**
|
|
25
|
-
* Hover an existing reaction emoji api
|
|
26
|
-
*/
|
|
27
|
-
getDetailedReaction: ReactionAction;
|
|
28
28
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export interface User {
|
|
2
|
-
|
|
3
|
-
* user id in system
|
|
4
|
-
*/
|
|
5
|
-
id: string;
|
|
2
|
+
accountId?: string;
|
|
6
3
|
/**
|
|
7
4
|
* name of user clicked on the reaction
|
|
8
5
|
*/
|
|
9
6
|
displayName: string;
|
|
7
|
+
/**
|
|
8
|
+
* user id in system
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
10
11
|
/**
|
|
11
12
|
* optional path to a user profile picture
|
|
12
13
|
*/
|
|
13
14
|
profilePicture?: ProfilePicture;
|
|
14
|
-
accountId?: string;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Type defining the path to a user profile picture
|
|
@@ -17,16 +17,6 @@ emojiId: string,
|
|
|
17
17
|
*/
|
|
18
18
|
metadata?: Record<string, any>) => Promise<T>;
|
|
19
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
20
|
/**
|
|
31
21
|
* Fetch request when adding a reaction to a container.
|
|
32
22
|
*/
|
|
@@ -35,4 +25,14 @@ export interface Client {
|
|
|
35
25
|
* Fetch request when removing a reaction from a container.
|
|
36
26
|
*/
|
|
37
27
|
deleteReaction: Request<ReactionSummary[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Fetch details for a given reaction.
|
|
30
|
+
*/
|
|
31
|
+
getDetailedReaction: Request<ReactionSummary>;
|
|
32
|
+
/**
|
|
33
|
+
* fetch reactions request handler
|
|
34
|
+
* @param containerAri container wrapper id
|
|
35
|
+
* @param aris container reaction assets unique ids
|
|
36
|
+
*/
|
|
37
|
+
getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
|
|
38
38
|
}
|
|
@@ -8,15 +8,15 @@ export type { User } from './User';
|
|
|
8
8
|
export type { Store, StorePropInput, State, OnChangeCallback } from './store';
|
|
9
9
|
type TriggerPosition = 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end' | 'top-end' | 'top' | 'top-start' | 'right-end' | 'right' | 'right-start';
|
|
10
10
|
type ProfileCardWrapperProps = {
|
|
11
|
-
|
|
12
|
-
position?: TriggerPosition;
|
|
13
|
-
isAnonymous?: boolean;
|
|
11
|
+
ariaLabel?: string;
|
|
14
12
|
canViewProfile?: boolean;
|
|
15
13
|
children: ReactNode;
|
|
16
|
-
fullName?: string;
|
|
17
14
|
disabledAriaAttributes?: boolean;
|
|
18
|
-
|
|
15
|
+
fullName?: string;
|
|
16
|
+
isAnonymous?: boolean;
|
|
19
17
|
offset?: [number, number];
|
|
20
|
-
|
|
18
|
+
onVisibilityChange?: (isVisible: boolean) => void;
|
|
19
|
+
position?: TriggerPosition;
|
|
20
|
+
userId?: string | null;
|
|
21
21
|
};
|
|
22
22
|
export type ProfileCardWrapper = React.ComponentType<ProfileCardWrapperProps>;
|
|
@@ -15,30 +15,30 @@ export interface ReactionSummary {
|
|
|
15
15
|
* the container for reactions/ari in the page
|
|
16
16
|
*/
|
|
17
17
|
containerAri: string;
|
|
18
|
-
/**
|
|
19
|
-
* unique Atlassian identifier for an emoji
|
|
20
|
-
*/
|
|
21
|
-
emojiId: string;
|
|
22
18
|
/**
|
|
23
19
|
* Number of selected count for the emoji
|
|
24
20
|
*/
|
|
25
21
|
count: number;
|
|
26
22
|
/**
|
|
27
|
-
*
|
|
23
|
+
* unique Atlassian identifier for an emoji
|
|
28
24
|
*/
|
|
29
|
-
|
|
25
|
+
emojiId: string;
|
|
30
26
|
/**
|
|
31
|
-
*
|
|
27
|
+
* A path to the emoji image, used for optimistic rendering.
|
|
32
28
|
*/
|
|
33
|
-
|
|
29
|
+
emojiPath?: string;
|
|
34
30
|
/**
|
|
35
31
|
* @deprecated Legacy content Not in use anymore
|
|
36
32
|
*/
|
|
37
33
|
optimisticallyUpdated?: boolean;
|
|
38
34
|
/**
|
|
39
|
-
*
|
|
35
|
+
* Has the current user selected the emoji or not
|
|
40
36
|
*/
|
|
41
|
-
|
|
37
|
+
reacted: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Users collection
|
|
40
|
+
*/
|
|
41
|
+
users?: User[];
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Metadata for composing a summary of emojis that will be shown in the the primary view even if the reaction count is zero
|
|
@@ -102,15 +102,15 @@ export declare enum ReactionStatus {
|
|
|
102
102
|
*/
|
|
103
103
|
export type ReactionsState = ReactionsNotLoaded | ReactionsLoading | ReactionsReadyState | ReactionsError;
|
|
104
104
|
export type ReactionsReadyState = {
|
|
105
|
-
readonly status: ReactionStatus.ready;
|
|
106
105
|
readonly reactions: ReactionSummary[];
|
|
106
|
+
readonly status: ReactionStatus.ready;
|
|
107
107
|
};
|
|
108
108
|
export type ReactionsLoading = {
|
|
109
109
|
readonly status: ReactionStatus.loading;
|
|
110
110
|
};
|
|
111
111
|
export type ReactionsError = {
|
|
112
|
-
readonly status: ReactionStatus.error;
|
|
113
112
|
readonly message: string;
|
|
113
|
+
readonly status: ReactionStatus.error;
|
|
114
114
|
};
|
|
115
115
|
export type ReactionsNotLoaded = {
|
|
116
116
|
readonly status: ReactionStatus.notLoaded;
|
|
@@ -46,12 +46,6 @@ export type StorePropInput = Store | Promise<Store>;
|
|
|
46
46
|
* store main structure
|
|
47
47
|
*/
|
|
48
48
|
export type State = {
|
|
49
|
-
/**
|
|
50
|
-
* collection of the different reactions (key => unique reaction id , value => state of the reaction)
|
|
51
|
-
*/
|
|
52
|
-
reactions: {
|
|
53
|
-
[key: string]: ReactionsState;
|
|
54
|
-
};
|
|
55
49
|
/**
|
|
56
50
|
* custom animation for given emojis as true|false (key => unique reaction id, value => collection of emojiIds and true|false to apply custom animation)
|
|
57
51
|
*/
|
|
@@ -68,4 +62,10 @@ export type State = {
|
|
|
68
62
|
[emojiId: string]: boolean;
|
|
69
63
|
};
|
|
70
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* collection of the different reactions (key => unique reaction id , value => state of the reaction)
|
|
67
|
+
*/
|
|
68
|
+
reactions: {
|
|
69
|
+
[key: string]: ReactionsState;
|
|
70
|
+
};
|
|
71
71
|
};
|
|
@@ -13,9 +13,13 @@ export declare const RENDER_COUNTER_TESTID = "counter-container";
|
|
|
13
13
|
export declare const RENDER_LABEL_TESTID = "counter_label_wrapper";
|
|
14
14
|
export interface CounterProps {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Duration of how long the motion will take (defaults to "medium" from '@atlaskit/motion')
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
animationDuration?: Durations;
|
|
19
|
+
/**
|
|
20
|
+
* Optional wrapper class name
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
19
23
|
/**
|
|
20
24
|
* Has the emoji been selected by given user (defaults to false)
|
|
21
25
|
*/
|
|
@@ -28,14 +32,6 @@ export interface CounterProps {
|
|
|
28
32
|
* Label to show when the value surpasses the limit value (defaults to "1k+")
|
|
29
33
|
*/
|
|
30
34
|
overLimitLabel?: string;
|
|
31
|
-
/**
|
|
32
|
-
* Optional wrapper class name
|
|
33
|
-
*/
|
|
34
|
-
className?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Duration of how long the motion will take (defaults to "medium" from '@atlaskit/motion')
|
|
37
|
-
*/
|
|
38
|
-
animationDuration?: Durations;
|
|
39
35
|
/**
|
|
40
36
|
* Optional prop to use a darker text color for the counter
|
|
41
37
|
*/
|
|
@@ -44,6 +40,10 @@ export interface CounterProps {
|
|
|
44
40
|
* Optional prop to show updated styling for counter
|
|
45
41
|
*/
|
|
46
42
|
useUpdatedStyles?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Count of emoji been selected
|
|
45
|
+
*/
|
|
46
|
+
value: number;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Display reaction count next to the emoji button
|
|
@@ -9,14 +9,14 @@ export interface EmojiButtonProps {
|
|
|
9
9
|
* Async provider to fetch the emoji
|
|
10
10
|
*/
|
|
11
11
|
emojiProvider: Promise<EmojiProvider>;
|
|
12
|
-
/**
|
|
13
|
-
* Event handler when a new emoji is selected
|
|
14
|
-
*/
|
|
15
|
-
onClick: OnEmojiEvent;
|
|
16
12
|
/**
|
|
17
13
|
* Optional prop for hoverable reaction picker selector emoji
|
|
18
14
|
*/
|
|
19
15
|
hoverableReactionPickerSelectorEmoji?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Event handler when a new emoji is selected
|
|
18
|
+
*/
|
|
19
|
+
onClick: OnEmojiEvent;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* custom button to render the custom emoji selector inside the reaction picker
|
|
@@ -8,49 +8,49 @@ import { type OpenReactionsDialogOptions } from './Reactions';
|
|
|
8
8
|
export declare const RENDER_REACTION_TESTID = "render_reaction_wrapper";
|
|
9
9
|
export interface ReactionProps {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Optional prop for enabling the Reactions Dialog
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
allowUserDialog?: boolean;
|
|
14
14
|
/**
|
|
15
15
|
* Provider for loading emojis
|
|
16
16
|
*/
|
|
17
17
|
emojiProvider: Promise<EmojiProvider>;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Show custom animation or render as standard without animation (defaults to false)
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
flash?: boolean;
|
|
22
22
|
/**
|
|
23
|
-
* Optional
|
|
23
|
+
* Optional function when the user wants to open the Reactions Dialog
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
handleOpenReactionsDialog?: (options?: OpenReactionsDialogOptions) => void;
|
|
26
26
|
/**
|
|
27
|
-
* Optional
|
|
27
|
+
* Optional prop for controlling if the reactions component is view only, disabling adding reactions
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
isViewOnly?: boolean;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* event handler when the emoji button is clicked
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
onClick: ReactionClick;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Optional event when focused the reaction
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
onFocused?: ReactionFocused;
|
|
38
38
|
/**
|
|
39
|
-
* Optional
|
|
39
|
+
* Optional event when the mouse cursor hovers over the reaction
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
onMouseEnter?: ReactionMouseEnter;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Data for the reaction
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
reaction: ReactionSummary;
|
|
46
46
|
/**
|
|
47
|
-
* Optional
|
|
47
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
showOpaqueBackground?: boolean;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* Show a floating emoji particle effect (usually in response to a new reaction) (defaults to false)
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
showParticleEffect?: boolean;
|
|
54
54
|
/**
|
|
55
55
|
* Optional prop for controlling if the reaction displayed is a default one and should not have a border
|
|
56
56
|
*/
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { type ReactionProps } from './Reaction';
|
|
2
2
|
interface ReactionButtonProps extends Pick<ReactionProps, 'flash'> {
|
|
3
|
-
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
4
|
-
className?: string;
|
|
5
3
|
ariaLabel: string;
|
|
6
4
|
ariaPressed?: boolean;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
10
7
|
dataAttributes?: {
|
|
11
8
|
[key: string]: string;
|
|
12
9
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
11
|
+
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
12
|
+
onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
+
onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
+
reacted?: boolean;
|
|
16
15
|
showOpaqueBackground?: boolean;
|
|
16
|
+
showSubtleStyle?: boolean;
|
|
17
|
+
testId?: string;
|
|
17
18
|
useCompactStyles?: boolean;
|
|
18
|
-
reacted?: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare const ReactionButton: ({ onClick, flash, showSubtleStyle, showOpaqueBackground, useCompactStyles, reacted, ariaLabel, ariaPressed, onMouseEnter, onMouseLeave, onFocus, children, dataAttributes, testId, }: ReactionButtonProps) => JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -19,55 +19,55 @@ export declare const RENDER_REACTIONPICKER_TESTID = "reactionPicker-testid";
|
|
|
19
19
|
export declare const RENDER_REACTIONPICKERPANEL_TESTID = "reactionPickerPanel-testid";
|
|
20
20
|
export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Partial<Pick<TriggerProps, 'tooltipContent' | 'miniMode'>> {
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
25
|
-
/**
|
|
26
|
-
* Event callback when an emoji button is selected
|
|
27
|
-
* @param emojiId emoji unique id
|
|
28
|
-
* @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
|
|
22
|
+
* Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
|
|
29
23
|
*/
|
|
30
|
-
|
|
24
|
+
allowAllEmojis?: boolean;
|
|
31
25
|
/**
|
|
32
26
|
* Optional class name
|
|
33
27
|
*/
|
|
34
28
|
className?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
|
|
37
|
-
*/
|
|
38
|
-
allowAllEmojis?: boolean;
|
|
39
29
|
/**
|
|
40
30
|
* Enable/Disable the button to be clickable (defaults to false)
|
|
41
31
|
*/
|
|
42
32
|
disabled?: boolean;
|
|
43
33
|
/**
|
|
44
|
-
* Optional
|
|
34
|
+
* Optional emoji picker size to control the size of emoji picker
|
|
45
35
|
*/
|
|
46
|
-
|
|
36
|
+
emojiPickerSize?: PickerSize;
|
|
47
37
|
/**
|
|
48
|
-
*
|
|
38
|
+
* Provider for loading emojis
|
|
49
39
|
*/
|
|
50
|
-
|
|
40
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
51
41
|
/**
|
|
52
|
-
* Optional
|
|
42
|
+
* Optional prop for hoverable reaction picker
|
|
53
43
|
*/
|
|
54
|
-
|
|
44
|
+
hoverableReactionPicker?: boolean;
|
|
55
45
|
/**
|
|
56
|
-
* Optional
|
|
46
|
+
* Optional prop to set a delay for the reaction picker when it opens/closes on hover
|
|
57
47
|
*/
|
|
58
|
-
|
|
48
|
+
hoverableReactionPickerDelay?: number;
|
|
59
49
|
/**
|
|
60
|
-
* Optional prop
|
|
50
|
+
* Optional prop to say if the reactions component is in a list
|
|
61
51
|
*/
|
|
62
|
-
|
|
52
|
+
isListItem?: boolean;
|
|
63
53
|
/**
|
|
64
|
-
* Optional
|
|
54
|
+
* Optional event handler when the emoji picker is clicked outside and closed
|
|
65
55
|
*/
|
|
66
|
-
|
|
56
|
+
onCancel?: () => void;
|
|
67
57
|
/**
|
|
68
|
-
* Optional
|
|
58
|
+
* Optional event handler when the emoji picker is opened
|
|
69
59
|
*/
|
|
70
|
-
|
|
60
|
+
onOpen?: () => void;
|
|
61
|
+
/**
|
|
62
|
+
* Event callback when an emoji button is selected
|
|
63
|
+
* @param emojiId emoji unique id
|
|
64
|
+
* @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
|
|
65
|
+
*/
|
|
66
|
+
onSelection: (emojiId: string, source: ReactionSource) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Optional event handler when the custom emoji picker icon is selected
|
|
69
|
+
*/
|
|
70
|
+
onShowMore?: () => void;
|
|
71
71
|
/**
|
|
72
72
|
* Optional prop for controlling the picker location
|
|
73
73
|
*/
|
|
@@ -81,27 +81,27 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
81
81
|
*/
|
|
82
82
|
reactionPickerTriggerText?: string;
|
|
83
83
|
/**
|
|
84
|
-
* Optional prop
|
|
84
|
+
* Optional prop for displaying text to add a reaction
|
|
85
85
|
*/
|
|
86
|
-
|
|
86
|
+
showAddReactionText?: boolean;
|
|
87
87
|
/**
|
|
88
|
-
* Optional prop for
|
|
88
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
showOpaqueBackground?: boolean;
|
|
91
91
|
/**
|
|
92
|
-
* Optional prop
|
|
92
|
+
* Optional prop for applying subtle styling to reaction summary and picker
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
subtleReactionsSummaryAndPicker?: boolean;
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
97
|
* Picker component for adding reactions
|
|
98
98
|
*/
|
|
99
99
|
export declare const ReactionPicker: React.MemoExoticComponent<(props: ReactionPickerProps) => JSX.Element>;
|
|
100
100
|
export interface PopperWrapperProps {
|
|
101
|
+
popperModifiers?: PopperProps<{}>['modifiers'];
|
|
101
102
|
settings: {
|
|
102
|
-
showFullPicker: boolean;
|
|
103
103
|
popperPlacement: Placement;
|
|
104
|
+
showFullPicker: boolean;
|
|
104
105
|
};
|
|
105
|
-
popperModifiers?: PopperProps<{}>['modifiers'];
|
|
106
106
|
}
|
|
107
107
|
export declare const PopperWrapper: (props: PropsWithChildren<PopperWrapperProps>) => JSX.Element;
|
|
@@ -19,59 +19,63 @@ export declare const RENDER_REACTIONPICKER_TESTID = "reactionPicker-testid";
|
|
|
19
19
|
export declare const RENDER_REACTIONPICKERPANEL_TESTID = "reactionPickerPanel-testid";
|
|
20
20
|
export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Partial<Pick<TriggerProps, 'tooltipContent' | 'miniMode'>> {
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
25
|
-
/**
|
|
26
|
-
* Event callback when an emoji button is selected
|
|
27
|
-
* @param emojiId emoji unique id
|
|
28
|
-
* @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
|
|
22
|
+
* Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
|
|
29
23
|
*/
|
|
30
|
-
|
|
24
|
+
allowAllEmojis?: boolean;
|
|
31
25
|
/**
|
|
32
26
|
* Optional class name
|
|
33
27
|
*/
|
|
34
28
|
className?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
|
|
37
|
-
*/
|
|
38
|
-
allowAllEmojis?: boolean;
|
|
39
29
|
/**
|
|
40
30
|
* Enable/Disable the button to be clickable (defaults to false)
|
|
41
31
|
*/
|
|
42
32
|
disabled?: boolean;
|
|
43
33
|
/**
|
|
44
|
-
* Optional
|
|
34
|
+
* Optional emoji picker size to control the size of emoji picker
|
|
45
35
|
*/
|
|
46
|
-
|
|
36
|
+
emojiPickerSize?: PickerSize;
|
|
47
37
|
/**
|
|
48
|
-
*
|
|
38
|
+
* Provider for loading emojis
|
|
49
39
|
*/
|
|
50
|
-
|
|
40
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
51
41
|
/**
|
|
52
|
-
* Optional
|
|
42
|
+
* Optional prop for hoverable reaction picker
|
|
53
43
|
*/
|
|
54
|
-
|
|
44
|
+
hoverableReactionPicker?: boolean;
|
|
55
45
|
/**
|
|
56
|
-
* Optional
|
|
46
|
+
* Optional prop to set a delay for the reaction picker when it opens/closes on hover
|
|
57
47
|
*/
|
|
58
|
-
|
|
48
|
+
hoverableReactionPickerDelay?: number;
|
|
59
49
|
/**
|
|
60
|
-
* Optional prop
|
|
50
|
+
* Optional prop to say if the reactions component is in a list
|
|
61
51
|
*/
|
|
62
|
-
|
|
52
|
+
isListItem?: boolean;
|
|
63
53
|
/**
|
|
64
|
-
* Optional
|
|
54
|
+
* Optional event handler when the emoji picker is clicked outside and closed
|
|
65
55
|
*/
|
|
66
|
-
|
|
56
|
+
onCancel?: () => void;
|
|
67
57
|
/**
|
|
68
|
-
* Optional
|
|
58
|
+
* Optional event handler when the emoji picker is opened
|
|
69
59
|
*/
|
|
70
|
-
|
|
60
|
+
onOpen?: () => void;
|
|
61
|
+
/**
|
|
62
|
+
* Event callback when an emoji button is selected
|
|
63
|
+
* @param emojiId emoji unique id
|
|
64
|
+
* @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
|
|
65
|
+
*/
|
|
66
|
+
onSelection: (emojiId: string, source: ReactionSource) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Optional event handler when the custom emoji picker icon is selected
|
|
69
|
+
*/
|
|
70
|
+
onShowMore?: () => void;
|
|
71
71
|
/**
|
|
72
72
|
* Optional prop for controlling the picker location
|
|
73
73
|
*/
|
|
74
74
|
reactionPickerPlacement?: Placement;
|
|
75
|
+
/**
|
|
76
|
+
* Optional prop to set the strategy of the reaction picker popup
|
|
77
|
+
*/
|
|
78
|
+
reactionPickerStrategy?: PopperProps<{}>['strategy'];
|
|
75
79
|
/**
|
|
76
80
|
* Optional prop for controlling icon inside Trigger
|
|
77
81
|
*/
|
|
@@ -81,34 +85,30 @@ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickRea
|
|
|
81
85
|
*/
|
|
82
86
|
reactionPickerTriggerText?: string;
|
|
83
87
|
/**
|
|
84
|
-
* Optional prop
|
|
85
|
-
*/
|
|
86
|
-
isListItem?: boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Optional prop for hoverable reaction picker
|
|
88
|
+
* Optional prop for displaying text to add a reaction
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
showAddReactionText?: boolean;
|
|
91
91
|
/**
|
|
92
|
-
* Optional prop
|
|
92
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
93
93
|
*/
|
|
94
|
-
|
|
94
|
+
showOpaqueBackground?: boolean;
|
|
95
95
|
/**
|
|
96
|
-
* Optional prop
|
|
96
|
+
* Optional prop for applying subtle styling to reaction summary and picker
|
|
97
97
|
*/
|
|
98
|
-
|
|
98
|
+
subtleReactionsSummaryAndPicker?: boolean;
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
101
|
* Picker component for adding reactions
|
|
102
102
|
*/
|
|
103
103
|
export declare const ReactionPicker: React.MemoExoticComponent<(props: ReactionPickerProps) => JSX.Element>;
|
|
104
104
|
export interface PopperWrapperProps {
|
|
105
|
-
triggerRef: HTMLDivElement | HTMLButtonElement | null;
|
|
106
|
-
settings: {
|
|
107
|
-
showFullPicker: boolean;
|
|
108
|
-
popperPlacement: Placement;
|
|
109
|
-
};
|
|
110
105
|
isOpen: boolean;
|
|
111
106
|
onClose: () => void;
|
|
112
107
|
popperModifiers?: PopperProps<{}>['modifiers'];
|
|
108
|
+
settings: {
|
|
109
|
+
popperPlacement: Placement;
|
|
110
|
+
showFullPicker: boolean;
|
|
111
|
+
};
|
|
112
|
+
triggerRef: HTMLDivElement | HTMLButtonElement | null;
|
|
113
113
|
}
|
|
114
114
|
export declare const PopperWrapper: (props: PropsWithChildren<PopperWrapperProps>) => JSX.Element;
|