@atlaskit/reactions 33.2.11 → 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 +14 -0
- package/afm-cc/tsconfig.json +2 -2
- package/afm-rovo-extension/tsconfig.json +105 -0
- 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 +5 -5
|
@@ -35,156 +35,156 @@ export declare const RENDER_VIEWALL_REACTED_USERS_DIALOG = "viewall-reacted-user
|
|
|
35
35
|
export declare const RENDER_REACTIONS_SUMMARY_TESTID = "reaction-summary-view";
|
|
36
36
|
export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'reactionPickerTriggerIcon' | 'reactionPickerPlacement'>, Pick<SelectorProps, 'pickerQuickReactionEmojiIds'> {
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Optional prop for controlling if we can select emojis and display UI via summary view picker
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
allowSelectFromSummaryView?: boolean;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Optional prop from checking a feature gate for rendering Reactions Dialog
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
allowUserDialog?: boolean;
|
|
45
45
|
/**
|
|
46
|
-
* Optional
|
|
46
|
+
* Optional error message to show when unable to display the reaction emoji
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
errorMessage?: string;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Optional emoji reactions list to show custom animation or render as standard (key => emoji string "id", value => true/false to show custom animation)
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
flash?: Record<string, boolean>;
|
|
53
53
|
/**
|
|
54
|
-
* event
|
|
54
|
+
* Optional event to get reaction details for an emoji
|
|
55
|
+
* @param emojiId current reaction emoji id
|
|
55
56
|
*/
|
|
56
|
-
|
|
57
|
+
getReactionDetails?: (emojiId: string) => void;
|
|
57
58
|
/**
|
|
58
|
-
* Optional
|
|
59
|
+
* Optional prop for hiding default reactions displayed when there are no existing reactions
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
+
hideDefaultReactions?: boolean;
|
|
61
62
|
/**
|
|
62
|
-
* Optional
|
|
63
|
-
* Generally used for newly added reactions.
|
|
63
|
+
* Optional prop for controlling if the summary view is hoverable
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
hoverableSummaryView?: boolean;
|
|
66
66
|
/**
|
|
67
|
-
* Optional
|
|
68
|
-
* @param emojiId current reaction emoji id
|
|
67
|
+
* Optional prop to say if the reactions component is in a list
|
|
69
68
|
*/
|
|
70
|
-
|
|
69
|
+
isListItem?: boolean;
|
|
71
70
|
/**
|
|
72
|
-
* Optional
|
|
71
|
+
* Optional prop for controlling if the reactions component is view only, disabling adding reactions
|
|
73
72
|
*/
|
|
74
|
-
|
|
73
|
+
isViewOnly?: boolean;
|
|
75
74
|
/**
|
|
76
|
-
*
|
|
75
|
+
* event handler to fetching the reactions
|
|
77
76
|
*/
|
|
78
|
-
|
|
77
|
+
loadReaction: () => void;
|
|
79
78
|
/**
|
|
80
|
-
* Optional
|
|
79
|
+
* Optional prop for using your own container for relative positioning for emoji picker popup
|
|
81
80
|
*/
|
|
82
|
-
|
|
81
|
+
noRelativeContainer?: boolean;
|
|
82
|
+
noWrap?: boolean;
|
|
83
83
|
/**
|
|
84
84
|
* Optional callback function called when closing reactions dialog
|
|
85
85
|
*/
|
|
86
86
|
onDialogCloseCallback?: OnCloseHandler;
|
|
87
87
|
/**
|
|
88
|
-
* Optional callback function called when
|
|
88
|
+
* Optional callback function called when opening reactions dialog
|
|
89
89
|
*/
|
|
90
|
-
|
|
90
|
+
onDialogOpenCallback?: (emojiId: string, source?: string) => void;
|
|
91
91
|
/**
|
|
92
92
|
* Optional callback function called when navigating between pages in the reactions dialog
|
|
93
93
|
*/
|
|
94
94
|
onDialogPageChangeCallback?: (emojiId: string, curentPage: number, maxPages: number) => void;
|
|
95
95
|
/**
|
|
96
|
-
*
|
|
97
|
-
*/
|
|
98
|
-
summaryViewEnabled?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
* The minimum number of reactions required to switch to the summary view when summaryViewEnabled is true. Defaults to 3 if not specified.
|
|
96
|
+
* Optional callback function called when selecting a reaction in reactions dialog
|
|
101
97
|
*/
|
|
102
|
-
|
|
98
|
+
onDialogSelectReactionCallback?: (emojiId: string) => void;
|
|
103
99
|
/**
|
|
104
|
-
* Optional prop to
|
|
100
|
+
* Optional prop to hide the user reactions and only render the picker
|
|
105
101
|
*/
|
|
106
|
-
|
|
102
|
+
onlyRenderPicker?: boolean;
|
|
107
103
|
/**
|
|
108
|
-
*
|
|
104
|
+
* event handler when the emoji button is clicked
|
|
109
105
|
*/
|
|
110
|
-
|
|
106
|
+
onReactionClick: ReactionClick;
|
|
111
107
|
/**
|
|
112
|
-
*
|
|
108
|
+
* Event callback when an emoji button is selected
|
|
113
109
|
*/
|
|
114
|
-
|
|
110
|
+
onSelection: (emojiId: string) => void;
|
|
115
111
|
/**
|
|
116
|
-
* Optional
|
|
112
|
+
* Optional emoji reactions list to show floating emoji particle effect (key => emoji string "id", value => true/false to show the particle effect).
|
|
113
|
+
* Generally used for newly added reactions.
|
|
117
114
|
*/
|
|
118
|
-
|
|
115
|
+
particleEffectByEmoji?: Record<string, boolean>;
|
|
119
116
|
/**
|
|
120
|
-
* Optional prop for
|
|
117
|
+
* Optional prop for rendering a profile card wrapper in the Reactions Dialog
|
|
121
118
|
*/
|
|
122
|
-
|
|
119
|
+
ProfileCardWrapper?: ProfileCardWrapper;
|
|
123
120
|
/**
|
|
124
|
-
*
|
|
121
|
+
* quickReactionEmojiIds are emojis that will be shown in the the primary view even if the reaction count is zero
|
|
125
122
|
*/
|
|
126
|
-
|
|
123
|
+
quickReactionEmojis?: QuickReactionEmojiSummary;
|
|
127
124
|
/**
|
|
128
|
-
*
|
|
125
|
+
* Optional prop to change the placement of the reaction picker popup
|
|
129
126
|
*/
|
|
130
|
-
|
|
127
|
+
reactionPickerPlacement?: Placement;
|
|
131
128
|
/**
|
|
132
|
-
* Optional prop for
|
|
129
|
+
* Optional prop for controlling text of the trigger button
|
|
133
130
|
*/
|
|
134
|
-
|
|
131
|
+
reactionPickerTriggerText?: string;
|
|
135
132
|
/**
|
|
136
|
-
* Optional prop
|
|
133
|
+
* Optional prop for controlling tooltip content of the trigger button
|
|
137
134
|
*/
|
|
138
|
-
|
|
135
|
+
reactionPickerTriggerTooltipContent?: string;
|
|
139
136
|
/**
|
|
140
|
-
* Optional
|
|
137
|
+
* Optional list of reactions to render (defaults to empty list)
|
|
141
138
|
*/
|
|
142
|
-
|
|
143
|
-
noWrap?: boolean;
|
|
139
|
+
reactions?: ReactionSummary[];
|
|
144
140
|
/**
|
|
145
|
-
* Optional prop
|
|
141
|
+
* Optional prop to render the particle effect on the summary view
|
|
146
142
|
*/
|
|
147
|
-
|
|
143
|
+
renderParticleEffectOnSummaryView?: boolean;
|
|
148
144
|
/**
|
|
149
|
-
* Optional prop for
|
|
145
|
+
* Optional prop for displaying text to add a reaction
|
|
150
146
|
*/
|
|
151
|
-
|
|
147
|
+
showAddReactionText?: boolean;
|
|
152
148
|
/**
|
|
153
|
-
* Optional prop for
|
|
149
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
154
150
|
*/
|
|
155
|
-
|
|
151
|
+
showOpaqueBackground?: boolean;
|
|
156
152
|
/**
|
|
157
|
-
* Optional prop for controlling if
|
|
153
|
+
* Optional prop for controlling if default reactions are subtle
|
|
158
154
|
*/
|
|
159
|
-
|
|
155
|
+
showSubtleDefaultReactions?: boolean;
|
|
160
156
|
/**
|
|
161
|
-
*
|
|
157
|
+
* Condition for the reaction list status while being fetched
|
|
162
158
|
*/
|
|
163
|
-
|
|
159
|
+
status: ReactionStatus;
|
|
164
160
|
/**
|
|
165
|
-
* Optional prop for
|
|
161
|
+
* Optional prop for applying subtle styling to reaction summary and picker
|
|
166
162
|
*/
|
|
167
|
-
|
|
163
|
+
subtleReactionsSummaryAndPicker?: boolean;
|
|
168
164
|
/**
|
|
169
|
-
* Optional prop to
|
|
165
|
+
* Optional prop to add an icon to the end of the summary button
|
|
170
166
|
*/
|
|
171
|
-
|
|
167
|
+
summaryButtonIconAfter?: React.ReactNode;
|
|
172
168
|
/**
|
|
173
169
|
* Optional prop to optimistically render the image URL for a given emoji id. Typically used in SSR before the emoji Provider resolves & the real image is loaded.
|
|
174
170
|
*/
|
|
175
171
|
summaryGetOptimisticImageURL?: (emojiId: string) => string;
|
|
176
172
|
/**
|
|
177
|
-
*
|
|
173
|
+
* Enables a summary view for displaying reactions. If enabled and the number of reactions meets or exceeds the summaryViewThreshold, reactions will be shown in a more aggregated format.
|
|
178
174
|
*/
|
|
179
|
-
|
|
175
|
+
summaryViewEnabled?: boolean;
|
|
180
176
|
/**
|
|
181
|
-
* Optional prop to
|
|
177
|
+
* Optional prop to change the placement of the summary popup reaction list
|
|
182
178
|
*/
|
|
183
|
-
|
|
179
|
+
summaryViewPlacement?: Placement;
|
|
184
180
|
/**
|
|
185
|
-
*
|
|
181
|
+
* The minimum number of reactions required to switch to the summary view when summaryViewEnabled is true. Defaults to 3 if not specified.
|
|
186
182
|
*/
|
|
187
|
-
|
|
183
|
+
summaryViewThreshold?: number;
|
|
184
|
+
/**
|
|
185
|
+
* Optional prop to change the style of the summary view
|
|
186
|
+
*/
|
|
187
|
+
useButtonAlignmentStyling?: boolean;
|
|
188
188
|
}
|
|
189
189
|
export interface OpenReactionsDialogOptions {
|
|
190
190
|
emojiId?: string;
|
|
@@ -7,26 +7,26 @@ import { type ReactionSummary, type ProfileCardWrapper } from '../types';
|
|
|
7
7
|
export declare const RENDER_MODAL_TESTID = "render-reactions-modal";
|
|
8
8
|
export interface ReactionsDialogProps {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Provider for loading emojis
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
13
13
|
/**
|
|
14
14
|
* Optional handler when the dialog closes
|
|
15
15
|
*/
|
|
16
16
|
handleCloseReactionsDialog: OnCloseHandler;
|
|
17
|
+
handlePaginationChange?: (emojiId: string, currentPage: number, maxPages: number) => void;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Optional callback function called when user selects a reaction in reactions dialog
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
handleSelectReaction?: (emojiId: string) => void;
|
|
22
|
+
ProfileCardWrapper?: ProfileCardWrapper;
|
|
21
23
|
/**
|
|
22
|
-
*
|
|
24
|
+
* List of reactions to render (defaults to empty list)
|
|
23
25
|
*/
|
|
24
|
-
|
|
26
|
+
reactions: ReactionSummary[];
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
28
|
+
* Current emoji selected to show the reactions dialog
|
|
27
29
|
*/
|
|
28
|
-
|
|
29
|
-
handlePaginationChange?: (emojiId: string, currentPage: number, maxPages: number) => void;
|
|
30
|
-
ProfileCardWrapper?: ProfileCardWrapper;
|
|
30
|
+
selectedEmojiId: string;
|
|
31
31
|
}
|
|
32
32
|
export declare const ReactionsDialog: ({ reactions, handleCloseReactionsDialog, emojiProvider, selectedEmojiId, handleSelectReaction, handlePaginationChange, ProfileCardWrapper, }: ReactionsDialogProps) => JSX.Element;
|
|
@@ -2,14 +2,14 @@ import { type OnCloseHandler } from '@atlaskit/modal-dialog';
|
|
|
2
2
|
import { type EmojiProvider } from '@atlaskit/emoji/resource';
|
|
3
3
|
import { type ReactionSummary } from '../types';
|
|
4
4
|
interface ReactionsDialogModalHeaderProps {
|
|
5
|
-
totalReactionsCount: number;
|
|
6
|
-
handlePreviousPage: () => void;
|
|
7
|
-
handleNextPage: () => void;
|
|
8
5
|
currentPage: number;
|
|
9
|
-
maxPages: number;
|
|
10
|
-
emojiProvider: Promise<EmojiProvider>;
|
|
11
6
|
currentReactions: ReactionSummary[];
|
|
7
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
12
8
|
handleCloseReactionsDialog: OnCloseHandler;
|
|
9
|
+
handleNextPage: () => void;
|
|
10
|
+
handlePreviousPage: () => void;
|
|
11
|
+
maxPages: number;
|
|
12
|
+
totalReactionsCount: number;
|
|
13
13
|
}
|
|
14
14
|
export declare const ReactionsDialogHeader: ({ totalReactionsCount, handlePreviousPage, handleNextPage, currentPage, maxPages, currentReactions, emojiProvider, handleCloseReactionsDialog, }: ReactionsDialogModalHeaderProps) => JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -2,19 +2,19 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactionSummary, type ProfileCardWrapper } from '../types';
|
|
3
3
|
export interface ReactionsListProps {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provider for loading emojis
|
|
6
6
|
*/
|
|
7
|
-
reactions: ReactionSummary[];
|
|
8
7
|
/**
|
|
9
|
-
*
|
|
8
|
+
* A functional component from Confluence to show a profile card on hover
|
|
10
9
|
*/
|
|
11
|
-
|
|
10
|
+
ProfileCardWrapper?: ProfileCardWrapper;
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
12
|
+
* Sorted list of reactions to render in list
|
|
14
13
|
*/
|
|
14
|
+
reactions: ReactionSummary[];
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Current emoji selected in the reactions dialog
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
selectedEmojiId: string;
|
|
19
19
|
}
|
|
20
20
|
export declare const ReactionsList: ({ reactions, selectedEmojiId, ProfileCardWrapper, }: ReactionsListProps) => React.JSX.Element;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { type PopperChildrenProps, type Placement } from '@atlaskit/popper';
|
|
6
6
|
export type RepositionOnUpdateProps = {
|
|
7
|
-
update: PopperChildrenProps['update'];
|
|
8
7
|
settings: {
|
|
9
|
-
showFullPicker: boolean;
|
|
10
8
|
popperPlacement: Placement;
|
|
9
|
+
showFullPicker: boolean;
|
|
11
10
|
};
|
|
11
|
+
update: PopperChildrenProps['update'];
|
|
12
12
|
};
|
|
13
13
|
export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => React.JSX.Element;
|
|
@@ -10,25 +10,25 @@ export interface SelectorProps {
|
|
|
10
10
|
*/
|
|
11
11
|
emojiProvider: Promise<EmojiProvider>;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
onSelection: OnEmojiEvent;
|
|
16
|
-
/**
|
|
17
|
-
* Enable/Disable selection of extra custom emoji beyond default list (defaults to false)
|
|
13
|
+
* Optional prop for hoverable reaction picker selector
|
|
18
14
|
*/
|
|
19
|
-
|
|
15
|
+
hoverableReactionPickerSelector?: boolean;
|
|
20
16
|
/**
|
|
21
17
|
* Optional event when extra custom emojis icon is selected
|
|
22
18
|
*/
|
|
23
19
|
onMoreClick?: React.MouseEventHandler<HTMLElement>;
|
|
20
|
+
/**
|
|
21
|
+
* Event handler when an emoji gets selected
|
|
22
|
+
*/
|
|
23
|
+
onSelection: OnEmojiEvent;
|
|
24
24
|
/**
|
|
25
25
|
* Optional emojis shown for user to select from when the reaction add button is clicked (defaults to pre-defined list of emojis {@link DefaultReactions})
|
|
26
26
|
*/
|
|
27
27
|
pickerQuickReactionEmojiIds?: EmojiId[];
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Enable/Disable selection of extra custom emoji beyond default list (defaults to false)
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
showMore?: boolean;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
34
|
* Reactions picker panel part of the <ReactionPicker /> component
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
type StaticReactionProps = {
|
|
2
|
-
onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
3
|
-
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
4
|
-
testId?: string;
|
|
5
2
|
children?: React.ReactNode;
|
|
6
3
|
dataAttributes?: {
|
|
7
4
|
[key: string]: string;
|
|
8
5
|
};
|
|
6
|
+
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
7
|
+
onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
testId?: string;
|
|
9
9
|
};
|
|
10
10
|
export declare const StaticReaction: ({ onMouseEnter, onFocus, children, testId, dataAttributes, }: StaticReactionProps) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -14,60 +14,60 @@ export declare const RENDER_TRIGGER_CONTAINER_TESTID = "render-trigger-container
|
|
|
14
14
|
export declare const RENDER_LIST_ITEM_WRAPPER_TESTID = "render-list-item-wrapper";
|
|
15
15
|
export interface TriggerProps {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @param e Mouse Dom event
|
|
19
|
-
* @param analyticsEvent atlaskit analytics event payload of the button
|
|
20
|
-
*/
|
|
21
|
-
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: AnalyticsEvent) => void;
|
|
22
|
-
/**
|
|
23
|
-
* apply "miniMode" className to the button
|
|
17
|
+
* Aria accessibility attributes that will be added to the button
|
|
24
18
|
*/
|
|
25
|
-
|
|
19
|
+
ariaAttributes?: AriaAttributes;
|
|
26
20
|
/**
|
|
27
21
|
* Enable/Disable the button to be clickable (defaults to false)
|
|
28
22
|
*/
|
|
29
23
|
disabled?: boolean;
|
|
24
|
+
fullWidthSelectorTrayReactionPickerTrigger?: boolean;
|
|
30
25
|
/**
|
|
31
|
-
*
|
|
26
|
+
* Optional prop for controlling if the summary view reaction picker trigger should be full width
|
|
32
27
|
*/
|
|
33
|
-
|
|
28
|
+
fullWidthSummaryViewReactionPickerTrigger?: boolean;
|
|
34
29
|
/**
|
|
35
|
-
*
|
|
30
|
+
* Optional prop to say if the reactions component is in a list
|
|
36
31
|
*/
|
|
37
|
-
|
|
32
|
+
isListItem?: boolean;
|
|
38
33
|
/**
|
|
39
|
-
* Optional prop for
|
|
34
|
+
* Optional prop for controlling if reaction picker is opened
|
|
40
35
|
*/
|
|
41
|
-
|
|
36
|
+
isSelected?: boolean;
|
|
42
37
|
/**
|
|
43
|
-
*
|
|
38
|
+
* apply "miniMode" className to the button
|
|
44
39
|
*/
|
|
45
|
-
|
|
40
|
+
miniMode?: boolean;
|
|
46
41
|
/**
|
|
47
|
-
* Optional
|
|
42
|
+
* Optional Event handler when the button to open the picker is clicked
|
|
43
|
+
* @param e Mouse Dom event
|
|
44
|
+
* @param analyticsEvent atlaskit analytics event payload of the button
|
|
48
45
|
*/
|
|
49
|
-
|
|
46
|
+
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: AnalyticsEvent) => void;
|
|
50
47
|
/**
|
|
51
48
|
* Optional prop for controlling icon inside Trigger
|
|
52
49
|
*/
|
|
53
50
|
reactionPickerTriggerIcon?: React.ReactNode;
|
|
54
|
-
/**
|
|
55
|
-
* Optional prop for controlling if reaction picker is opened
|
|
56
|
-
*/
|
|
57
|
-
isSelected?: boolean;
|
|
58
51
|
/**
|
|
59
52
|
* Optional prop for controlling text inside Trigger
|
|
60
53
|
*/
|
|
61
54
|
reactionPickerTriggerText?: string;
|
|
62
55
|
/**
|
|
63
|
-
* Optional prop for
|
|
56
|
+
* Optional prop for displaying text to add a reaction
|
|
64
57
|
*/
|
|
65
|
-
|
|
58
|
+
showAddReactionText?: boolean;
|
|
66
59
|
/**
|
|
67
|
-
* Optional prop
|
|
60
|
+
* Optional prop for using an opaque button background instead of a transparent background
|
|
68
61
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
showOpaqueBackground?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Optional prop for applying subtle styling to reaction picker
|
|
65
|
+
*/
|
|
66
|
+
subtleReactionsSummaryAndPicker?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Tooltip content for trigger button
|
|
69
|
+
*/
|
|
70
|
+
tooltipContent: React.ReactNode;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* Render an emoji button to open the reactions select picker
|
|
@@ -2,11 +2,11 @@ import React, { type ErrorInfo } from 'react';
|
|
|
2
2
|
import { type UFOExperience } from '@atlaskit/ufo';
|
|
3
3
|
import { type WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
4
4
|
export interface UfoErrorBoundaryProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
5
6
|
/**
|
|
6
7
|
* UFO Experiences to notify failure when the children components fail on rendering
|
|
7
8
|
*/
|
|
8
9
|
experiences: UFOExperience[] | WithSamplingUFOExperience[];
|
|
9
|
-
children?: React.ReactNode;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Error boundary wrapper to notify "failure" for UFO events of components when there was a re-rendering exception caught inside the `componentDidCatch` event handler
|
|
@@ -2,14 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactionPickerProps } from '../../components';
|
|
3
3
|
import { type StorePropInput } from '../../types';
|
|
4
4
|
export interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps, 'onSelection'> {
|
|
5
|
-
/**
|
|
6
|
-
* Wrapper id for reactions list
|
|
7
|
-
*/
|
|
8
|
-
containerAri: string;
|
|
9
5
|
/**
|
|
10
6
|
* Individual id for a reaction
|
|
11
7
|
*/
|
|
12
8
|
ari: string;
|
|
9
|
+
/**
|
|
10
|
+
* Wrapper id for reactions list
|
|
11
|
+
*/
|
|
12
|
+
containerAri: string;
|
|
13
13
|
/**
|
|
14
14
|
* Reference to the store.
|
|
15
15
|
* @remarks
|
|
@@ -3,28 +3,28 @@ import { type ReactionsProps, type ReactionPickerProps } from '../../components'
|
|
|
3
3
|
import { ReactionStatus, type Actions, type State, type StorePropInput } from '../../types';
|
|
4
4
|
import { type ReactionUpdateSuccess } from '../../types/reaction';
|
|
5
5
|
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'isViewOnly' | 'allowSelectFromSummaryView'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
6
|
-
/**
|
|
7
|
-
* Wrapper id for reactions list
|
|
8
|
-
*/
|
|
9
|
-
containerAri: string;
|
|
10
6
|
/**
|
|
11
7
|
* Individual id for a reaction
|
|
12
8
|
*/
|
|
13
9
|
ari: string;
|
|
14
10
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* 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)
|
|
11
|
+
* Wrapper id for reactions list
|
|
18
12
|
*/
|
|
19
|
-
|
|
13
|
+
containerAri: string;
|
|
14
|
+
/**
|
|
15
|
+
* Callback function when a reaction is successfully added
|
|
16
|
+
*/
|
|
17
|
+
onReactionSuccess?: ReactionUpdateSuccess;
|
|
20
18
|
/**
|
|
21
19
|
* Optional boolean to control if particle animation on reactions appear
|
|
22
20
|
*/
|
|
23
21
|
particleEffectByEmojiEnabled?: boolean;
|
|
24
22
|
/**
|
|
25
|
-
*
|
|
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
26
|
*/
|
|
27
|
-
|
|
27
|
+
store: StorePropInput;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Export the mapper function outside the component so easier to do unit tests
|
|
@@ -26,8 +26,8 @@ export declare const ufoExperiences: {
|
|
|
26
26
|
* Optional metadata information in the store used in sending the API client requests
|
|
27
27
|
*/
|
|
28
28
|
interface StoreMetadata {
|
|
29
|
-
subproduct?: string;
|
|
30
29
|
[k: string]: any;
|
|
30
|
+
subproduct?: string;
|
|
31
31
|
}
|
|
32
32
|
export declare class MemoryReactionsStore implements Store {
|
|
33
33
|
private client;
|
|
@@ -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
|
};
|