@atlaskit/reactions 22.5.3 → 22.5.4
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 +70 -64
- package/dist/cjs/MockReactionsClient.js +10 -15
- package/dist/cjs/analytics/index.js +130 -8
- package/dist/cjs/client/ReactionServiceClient.js +2 -3
- package/dist/cjs/components/Counter/Counter.js +11 -15
- package/dist/cjs/components/Counter/index.js +1 -7
- package/dist/cjs/components/Counter/styles.js +5 -9
- package/dist/cjs/components/EmojiButton/EmojiButton.js +9 -13
- package/dist/cjs/components/EmojiButton/styles.js +2 -3
- package/dist/cjs/components/FlashAnimation/FlashAnimation.js +5 -10
- package/dist/cjs/components/FlashAnimation/styles.js +4 -7
- package/dist/cjs/components/Reaction/Reaction.js +14 -15
- package/dist/cjs/components/Reaction/styles.js +7 -11
- package/dist/cjs/components/ReactionDialog/ReactionView.js +4 -5
- package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +10 -11
- package/dist/cjs/components/ReactionDialog/ReactionsList.js +2 -3
- package/dist/cjs/components/ReactionDialog/styles.js +13 -23
- package/dist/cjs/components/ReactionPicker/ReactionPicker.js +18 -21
- package/dist/cjs/components/ReactionPicker/RepositionOnUpdate.js +2 -3
- package/dist/cjs/components/ReactionPicker/styles.js +5 -9
- package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +12 -16
- package/dist/cjs/components/ReactionTooltip/styles.js +6 -11
- package/dist/cjs/components/Reactions/Reactions.js +26 -30
- package/dist/cjs/components/Reactions/styles.js +5 -8
- package/dist/cjs/components/Selector/Selector.js +10 -12
- package/dist/cjs/components/Selector/index.js +1 -7
- package/dist/cjs/components/Selector/styles.js +6 -11
- package/dist/cjs/components/ShowMore/ShowMore.js +11 -17
- package/dist/cjs/components/ShowMore/styles.js +4 -7
- package/dist/cjs/components/Trigger/Trigger.js +6 -12
- package/dist/cjs/components/Trigger/styles.js +3 -5
- package/dist/cjs/components/UfoErrorBoundary/UfoErrorBoundary.js +2 -3
- package/dist/cjs/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +4 -5
- package/dist/cjs/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -8
- package/dist/cjs/containers/index.js +13 -21
- package/dist/cjs/hooks/useFocusTrap.js +2 -3
- package/dist/cjs/i18n/cs.js +2 -3
- package/dist/cjs/i18n/da.js +2 -3
- package/dist/cjs/i18n/de.js +2 -3
- package/dist/cjs/i18n/en.js +2 -3
- package/dist/cjs/i18n/en_GB.js +2 -3
- package/dist/cjs/i18n/en_ZZ.js +2 -3
- package/dist/cjs/i18n/es.js +2 -3
- package/dist/cjs/i18n/et.js +2 -3
- package/dist/cjs/i18n/fi.js +2 -3
- package/dist/cjs/i18n/fr.js +2 -3
- package/dist/cjs/i18n/hu.js +2 -3
- package/dist/cjs/i18n/is.js +2 -3
- package/dist/cjs/i18n/it.js +2 -3
- package/dist/cjs/i18n/ja.js +2 -3
- package/dist/cjs/i18n/ko.js +2 -3
- package/dist/cjs/i18n/languages.js +2 -3
- package/dist/cjs/i18n/nb.js +2 -3
- package/dist/cjs/i18n/nl.js +2 -3
- package/dist/cjs/i18n/pl.js +2 -3
- package/dist/cjs/i18n/pt_BR.js +2 -3
- package/dist/cjs/i18n/pt_PT.js +2 -3
- package/dist/cjs/i18n/ro.js +2 -3
- package/dist/cjs/i18n/ru.js +2 -3
- package/dist/cjs/i18n/sk.js +2 -3
- package/dist/cjs/i18n/sv.js +2 -3
- package/dist/cjs/i18n/th.js +2 -3
- package/dist/cjs/i18n/tr.js +2 -3
- package/dist/cjs/i18n/uk.js +2 -3
- package/dist/cjs/i18n/vi.js +2 -3
- package/dist/cjs/i18n/zh.js +2 -3
- package/dist/cjs/i18n/zh_TW.js +2 -3
- package/dist/cjs/index.js +28 -15
- package/dist/cjs/shared/constants.js +7 -14
- package/dist/cjs/shared/i18n.js +2 -3
- package/dist/cjs/shared/utils.js +5 -9
- package/dist/cjs/store/MemoryReactionsStore.js +29 -35
- package/dist/cjs/store/ReactionConsumer.js +2 -3
- package/dist/cjs/store/utils.js +7 -14
- package/dist/cjs/types/reaction.js +2 -3
- package/dist/cjs/ufo/index.js +92 -0
- package/dist/es2019/MockReactionsClient.js +2 -2
- package/dist/es2019/analytics/index.js +95 -2
- package/dist/es2019/components/Counter/Counter.js +6 -6
- package/dist/es2019/components/Counter/index.js +1 -2
- package/dist/es2019/components/EmojiButton/EmojiButton.js +6 -5
- package/dist/es2019/components/FlashAnimation/FlashAnimation.js +2 -2
- package/dist/es2019/components/Reaction/Reaction.js +12 -11
- package/dist/es2019/components/ReactionDialog/ReactionView.js +2 -2
- package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +5 -4
- package/dist/es2019/components/ReactionDialog/styles.js +2 -2
- package/dist/es2019/components/ReactionPicker/ReactionPicker.js +13 -13
- package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +9 -8
- package/dist/es2019/components/Reactions/Reactions.js +21 -21
- package/dist/es2019/components/Reactions/styles.js +1 -1
- package/dist/es2019/components/Selector/Selector.js +7 -7
- package/dist/es2019/components/Selector/index.js +1 -2
- package/dist/es2019/components/ShowMore/ShowMore.js +7 -7
- package/dist/es2019/components/Trigger/Trigger.js +2 -2
- package/dist/es2019/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +2 -2
- package/dist/es2019/containers/index.js +2 -2
- package/dist/es2019/index.js +27 -5
- package/dist/es2019/store/MemoryReactionsStore.js +21 -23
- package/dist/esm/MockReactionsClient.js +2 -2
- package/dist/esm/analytics/index.js +127 -4
- package/dist/esm/components/Counter/Counter.js +6 -6
- package/dist/esm/components/Counter/index.js +1 -3
- package/dist/esm/components/EmojiButton/EmojiButton.js +6 -5
- package/dist/esm/components/FlashAnimation/FlashAnimation.js +2 -2
- package/dist/esm/components/Reaction/Reaction.js +12 -11
- package/dist/esm/components/ReactionDialog/ReactionView.js +2 -2
- package/dist/esm/components/ReactionDialog/ReactionsDialog.js +7 -6
- package/dist/esm/components/ReactionDialog/styles.js +2 -2
- package/dist/esm/components/ReactionPicker/ReactionPicker.js +14 -14
- package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +9 -8
- package/dist/esm/components/Reactions/Reactions.js +21 -21
- package/dist/esm/components/Reactions/styles.js +1 -1
- package/dist/esm/components/Selector/Selector.js +7 -7
- package/dist/esm/components/Selector/index.js +1 -3
- package/dist/esm/components/ShowMore/ShowMore.js +7 -7
- package/dist/esm/components/Trigger/Trigger.js +2 -2
- package/dist/esm/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +2 -2
- package/dist/esm/containers/ConnectedReactionsView/ConnectedReactionsView.js +1 -1
- package/dist/esm/containers/index.js +2 -2
- package/dist/esm/index.js +27 -5
- package/dist/esm/store/MemoryReactionsStore.js +21 -23
- package/dist/types/analytics/index.d.ts +121 -2
- package/dist/types/components/Counter/index.d.ts +0 -1
- package/dist/types/components/ReactionPicker/ReactionPicker.d.ts +1 -1
- package/dist/types/components/Reactions/styles.d.ts +1 -1
- package/dist/types/components/Selector/Selector.d.ts +1 -1
- package/dist/types/components/Selector/index.d.ts +0 -1
- package/dist/types/containers/index.d.ts +2 -2
- package/dist/types/index.d.ts +24 -3
- package/dist/types/store/MemoryReactionsStore.d.ts +6 -6
- package/dist/types-ts4.5/analytics/index.d.ts +121 -2
- package/dist/types-ts4.5/components/Counter/index.d.ts +0 -1
- package/dist/types-ts4.5/components/ReactionPicker/ReactionPicker.d.ts +1 -1
- package/dist/types-ts4.5/components/Reactions/styles.d.ts +1 -1
- package/dist/types-ts4.5/components/Selector/Selector.d.ts +1 -1
- package/dist/types-ts4.5/components/Selector/index.d.ts +0 -1
- package/dist/types-ts4.5/containers/index.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +24 -3
- package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +6 -6
- package/package.json +7 -8
- package/report.api.md +494 -0
- package/tmp/api-report-tmp.d.ts +398 -0
- package/dist/cjs/analytics/analytics.js +0 -149
- package/dist/cjs/analytics/ufo.js +0 -103
- package/dist/cjs/hooks/index.js +0 -12
- package/dist/cjs/shared/index.js +0 -15
- package/dist/es2019/analytics/analytics.js +0 -95
- package/dist/es2019/hooks/index.js +0 -1
- package/dist/es2019/shared/index.js +0 -3
- package/dist/esm/analytics/analytics.js +0 -127
- package/dist/esm/hooks/index.js +0 -1
- package/dist/esm/shared/index.js +0 -6
- package/dist/types/analytics/analytics.d.ts +0 -121
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/shared/index.d.ts +0 -3
- package/dist/types-ts4.5/analytics/analytics.d.ts +0 -121
- package/dist/types-ts4.5/hooks/index.d.ts +0 -1
- package/dist/types-ts4.5/shared/index.d.ts +0 -3
- /package/dist/es2019/{analytics/ufo.js → ufo/index.js} +0 -0
- /package/dist/esm/{analytics/ufo.js → ufo/index.js} +0 -0
- /package/dist/types/{analytics/ufo.d.ts → ufo/index.d.ts} +0 -0
- /package/dist/types-ts4.5/{analytics/ufo.d.ts → ufo/index.d.ts} +0 -0
package/report.api.md
ADDED
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
|
+
|
|
3
|
+
## API Report File for "@atlaskit/reactions"
|
|
4
|
+
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
9
|
+
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
11
|
+
- [Peer Dependencies](#peer-dependencies)
|
|
12
|
+
|
|
13
|
+
### Main Entry Types
|
|
14
|
+
|
|
15
|
+
<!--SECTION START: Main Entry Types-->
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
/// <reference types="react" />
|
|
19
|
+
|
|
20
|
+
import { AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
21
|
+
import { AriaAttributes } from 'react';
|
|
22
|
+
import { ConcurrentExperience } from '@atlaskit/ufo';
|
|
23
|
+
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
24
|
+
import { EmojiId } from '@atlaskit/emoji/types';
|
|
25
|
+
import { EmojiId as EmojiId_2 } from '@atlaskit/emoji';
|
|
26
|
+
import { EmojiProvider } from '@atlaskit/emoji';
|
|
27
|
+
import { EmojiProvider as EmojiProvider_2 } from '@atlaskit/emoji/resource';
|
|
28
|
+
import { OnCloseHandler } from '@atlaskit/modal-dialog';
|
|
29
|
+
import { OnEmojiEvent } from '@atlaskit/emoji/types';
|
|
30
|
+
import { PickerSize } from '@atlaskit/emoji/types';
|
|
31
|
+
import { default as React_2 } from 'react';
|
|
32
|
+
import { UFOExperience } from '@atlaskit/ufo';
|
|
33
|
+
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
34
|
+
import { WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
35
|
+
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
type Actions = {
|
|
38
|
+
getReactions: (containerId: string, aris: string) => void;
|
|
39
|
+
toggleReaction: ReactionAction;
|
|
40
|
+
addReaction: ReactionAction;
|
|
41
|
+
getDetailedReaction: ReactionAction;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// @public
|
|
45
|
+
enum ComponentName {
|
|
46
|
+
// (undocumented)
|
|
47
|
+
PICKER_RENDERED = 'reactions-picker',
|
|
48
|
+
// (undocumented)
|
|
49
|
+
REACTION_DIALOG = 'reaction-dialog',
|
|
50
|
+
// (undocumented)
|
|
51
|
+
REACTION_ITEM = 'reaction-item',
|
|
52
|
+
// (undocumented)
|
|
53
|
+
REACTIONS = 'reactions-list',
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// @public
|
|
57
|
+
export const ConnectedReactionPicker: React_2.FC<ConnectedReactionPickerProps>;
|
|
58
|
+
|
|
59
|
+
// @public (undocumented)
|
|
60
|
+
interface ConnectedReactionPickerProps
|
|
61
|
+
extends Omit<ReactionPickerProps, 'onSelection'> {
|
|
62
|
+
ari: string;
|
|
63
|
+
containerAri: string;
|
|
64
|
+
store: StorePropInput;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// @public (undocumented)
|
|
68
|
+
export const ConnectedReactionsView: React_2.FC<ConnectedReactionsViewProps>;
|
|
69
|
+
|
|
70
|
+
// @public (undocumented)
|
|
71
|
+
interface ConnectedReactionsViewProps
|
|
72
|
+
extends Pick<
|
|
73
|
+
ReactionsProps,
|
|
74
|
+
| 'allowAllEmojis'
|
|
75
|
+
| 'allowUserDialog'
|
|
76
|
+
| 'emojiPickerSize'
|
|
77
|
+
| 'emojiProvider'
|
|
78
|
+
| 'miniMode'
|
|
79
|
+
| 'onDialogCloseCallback'
|
|
80
|
+
| 'onDialogOpenCallback'
|
|
81
|
+
| 'onDialogSelectReactionCallback'
|
|
82
|
+
| 'quickReactionEmojis'
|
|
83
|
+
>,
|
|
84
|
+
Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
85
|
+
ari: string;
|
|
86
|
+
containerAri: string;
|
|
87
|
+
store: StorePropInput;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// @public (undocumented)
|
|
91
|
+
export const constants: {
|
|
92
|
+
DefaultReactions: EmojiId_2[];
|
|
93
|
+
DefaultReactionsByShortName: Map<string, EmojiId_2>;
|
|
94
|
+
ExtendedReactions: EmojiId_2[];
|
|
95
|
+
ExtendedReactionsByShortName: Map<string, EmojiId_2>;
|
|
96
|
+
NUMBER_OF_REACTIONS_TO_DISPLAY: number;
|
|
97
|
+
SAMPLING_RATE_REACTIONS_RENDERED_EXP: number;
|
|
98
|
+
TOOLTIP_USERS_LIMIT: number;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// @public
|
|
102
|
+
enum ExperienceName {
|
|
103
|
+
// (undocumented)
|
|
104
|
+
PICKER_OPENED = 'reactions-picker-opened',
|
|
105
|
+
// (undocumented)
|
|
106
|
+
REACTION_ADDED = 'reaction-added',
|
|
107
|
+
// (undocumented)
|
|
108
|
+
REACTION_DETAILS_FETCHED = 'reaction-details-fetched',
|
|
109
|
+
// (undocumented)
|
|
110
|
+
REACTION_DIALOG_CLOSED = 'reaction-dialog-closed',
|
|
111
|
+
// (undocumented)
|
|
112
|
+
REACTION_DIALOG_OPENED = 'reaction-dialog-opened',
|
|
113
|
+
// (undocumented)
|
|
114
|
+
REACTION_DIALOG_SELECTED_REACTION_CHANGED = 'reaction-dialog-selected-reaction-changed',
|
|
115
|
+
// (undocumented)
|
|
116
|
+
REACTION_REMOVED = 'reaction-removed',
|
|
117
|
+
// (undocumented)
|
|
118
|
+
REACTIONS_RENDERED = 'reactions-rendered',
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// @public (undocumented)
|
|
122
|
+
export class MemoryReactionsStore implements ReactionsStore {
|
|
123
|
+
constructor(client: ReactionClient, state?: State, metadata?: StoreMetadata);
|
|
124
|
+
// (undocumented)
|
|
125
|
+
addReaction: (containerAri: string, ari: string, emojiId: string) => void;
|
|
126
|
+
// (undocumented)
|
|
127
|
+
getDetailedReaction: (
|
|
128
|
+
containerAri: string,
|
|
129
|
+
ari: string,
|
|
130
|
+
emojiId: string,
|
|
131
|
+
) => void;
|
|
132
|
+
// (undocumented)
|
|
133
|
+
getReactions: (key: string, ...args: string[]) => void;
|
|
134
|
+
// (undocumented)
|
|
135
|
+
getState: () => State;
|
|
136
|
+
// (undocumented)
|
|
137
|
+
onChange: (callback: OnChangeCallback) => void;
|
|
138
|
+
// (undocumented)
|
|
139
|
+
removeOnChangeListener: (toRemove: OnChangeCallback) => void;
|
|
140
|
+
// (undocumented)
|
|
141
|
+
setCreateAnalyticsEvent: (
|
|
142
|
+
createAnalyticsEvent?: CreateUIAnalyticsEvent,
|
|
143
|
+
) => void;
|
|
144
|
+
// (undocumented)
|
|
145
|
+
toggleReaction: (containerAri: string, ari: string, emojiId: string) => void;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// @public
|
|
149
|
+
type OnChangeCallback = (state: State) => void;
|
|
150
|
+
|
|
151
|
+
// @public
|
|
152
|
+
export type onDialogSelectReactionChange = (
|
|
153
|
+
emojiId: string,
|
|
154
|
+
analyticsEvent: UIAnalyticsEvent,
|
|
155
|
+
) => void;
|
|
156
|
+
|
|
157
|
+
// @public
|
|
158
|
+
type ProfilePicture = {
|
|
159
|
+
path: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// @public
|
|
163
|
+
interface QuickReactionEmojiSummary {
|
|
164
|
+
ari: string;
|
|
165
|
+
containerAri: string;
|
|
166
|
+
emojiIds: string[];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// @public
|
|
170
|
+
type ReactioConsumerProps<PropsFromState, PropsFromActions> = {
|
|
171
|
+
mapStateToProps?: (state: State) => PropsFromState;
|
|
172
|
+
mapActionsToProps?: (actions: Actions) => PropsFromActions;
|
|
173
|
+
children: (props: PropsFromState & PropsFromActions) => React_2.ReactNode;
|
|
174
|
+
store: StorePropInput;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
// @public
|
|
178
|
+
export const Reaction: React_2.FC<ReactionProps>;
|
|
179
|
+
|
|
180
|
+
// @public
|
|
181
|
+
type ReactionAction = (
|
|
182
|
+
containerAri: string,
|
|
183
|
+
ari: string,
|
|
184
|
+
emojiId: string,
|
|
185
|
+
) => void;
|
|
186
|
+
|
|
187
|
+
// @public
|
|
188
|
+
type ReactionClick = (
|
|
189
|
+
id: string,
|
|
190
|
+
event: React.MouseEvent<HTMLButtonElement>,
|
|
191
|
+
) => void;
|
|
192
|
+
|
|
193
|
+
// @public (undocumented)
|
|
194
|
+
export interface ReactionClient {
|
|
195
|
+
addReaction: ReactionRequest<ReactionSummary[]>;
|
|
196
|
+
deleteReaction: ReactionRequest<ReactionSummary[]>;
|
|
197
|
+
getDetailedReaction: ReactionRequest<ReactionSummary>;
|
|
198
|
+
getReactions(containerAri: string, aris: string[]): Promise<Reactions_2>;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// @public @deprecated
|
|
202
|
+
export class ReactionConsumer<
|
|
203
|
+
PropsFromState,
|
|
204
|
+
PropsFromActions,
|
|
205
|
+
> extends React_2.PureComponent<
|
|
206
|
+
ReactioConsumerProps<PropsFromState, PropsFromActions>,
|
|
207
|
+
ReactionConsumerState
|
|
208
|
+
> {
|
|
209
|
+
constructor(props: ReactioConsumerProps<PropsFromState, PropsFromActions>);
|
|
210
|
+
// (undocumented)
|
|
211
|
+
componentDidMount(): void;
|
|
212
|
+
// (undocumented)
|
|
213
|
+
componentWillUnmount(): Promise<void>;
|
|
214
|
+
// (undocumented)
|
|
215
|
+
render(): React_2.ReactNode;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// @public
|
|
219
|
+
type ReactionConsumerState = {
|
|
220
|
+
store?: ReactionsStore;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
// @public
|
|
224
|
+
type ReactionFocused = (emojiId: string, event?: React.FocusEvent<any>) => void;
|
|
225
|
+
|
|
226
|
+
// @public
|
|
227
|
+
type ReactionMouseEnter = (
|
|
228
|
+
emojiId: string,
|
|
229
|
+
event?: React.MouseEvent<any>,
|
|
230
|
+
) => void;
|
|
231
|
+
|
|
232
|
+
// @public
|
|
233
|
+
export const ReactionPicker: React_2.FC<ReactionPickerProps>;
|
|
234
|
+
|
|
235
|
+
// @public (undocumented)
|
|
236
|
+
interface ReactionPickerProps
|
|
237
|
+
extends Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>,
|
|
238
|
+
Partial<Pick<TriggerProps, 'miniMode' | 'tooltipContent'>> {
|
|
239
|
+
allowAllEmojis?: boolean;
|
|
240
|
+
className?: string;
|
|
241
|
+
disabled?: boolean;
|
|
242
|
+
emojiPickerSize?: PickerSize;
|
|
243
|
+
emojiProvider: Promise<EmojiProvider_2>;
|
|
244
|
+
onCancel?: () => void;
|
|
245
|
+
onOpen?: () => void;
|
|
246
|
+
onSelection: (emojiId: string, source: ReactionSource) => void;
|
|
247
|
+
onShowMore?: () => void;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// @public (undocumented)
|
|
251
|
+
interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDialog'> {
|
|
252
|
+
className?: string;
|
|
253
|
+
emojiProvider: Promise<EmojiProvider>;
|
|
254
|
+
flash?: boolean;
|
|
255
|
+
handleUserListClick?: (emojiId: string) => void;
|
|
256
|
+
onClick: ReactionClick;
|
|
257
|
+
onFocused?: ReactionFocused;
|
|
258
|
+
onMouseEnter?: ReactionMouseEnter;
|
|
259
|
+
reaction: ReactionSummary;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// @public (undocumented)
|
|
263
|
+
export type ReactionRequest<T> = (
|
|
264
|
+
ari: string,
|
|
265
|
+
containerAri: string,
|
|
266
|
+
emojiId: string,
|
|
267
|
+
metadata?: Record<string, any>,
|
|
268
|
+
) => Promise<T>;
|
|
269
|
+
|
|
270
|
+
// @public
|
|
271
|
+
export const Reactions: React_2.FC<ReactionsProps>;
|
|
272
|
+
|
|
273
|
+
// @public
|
|
274
|
+
type Reactions_2 = Record<string, ReactionSummary[]>;
|
|
275
|
+
|
|
276
|
+
// @public (undocumented)
|
|
277
|
+
type ReactionsError = {
|
|
278
|
+
readonly status: ReactionStatus.error;
|
|
279
|
+
readonly message: string;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
// @public
|
|
283
|
+
export class ReactionServiceClient implements ReactionClient {
|
|
284
|
+
constructor(baseUrl: string, sessionToken?: string);
|
|
285
|
+
// (undocumented)
|
|
286
|
+
addReaction(
|
|
287
|
+
containerAri: string,
|
|
288
|
+
ari: string,
|
|
289
|
+
emojiId: string,
|
|
290
|
+
metadata?: Record<string, any>,
|
|
291
|
+
): Promise<ReactionSummary[]>;
|
|
292
|
+
// (undocumented)
|
|
293
|
+
deleteReaction(
|
|
294
|
+
containerAri: string,
|
|
295
|
+
ari: string,
|
|
296
|
+
emojiId: string,
|
|
297
|
+
metadata?: Record<string, any>,
|
|
298
|
+
): Promise<ReactionSummary[]>;
|
|
299
|
+
// (undocumented)
|
|
300
|
+
getDetailedReaction(
|
|
301
|
+
containerAri: string,
|
|
302
|
+
ari: string,
|
|
303
|
+
emojiId: string,
|
|
304
|
+
): Promise<ReactionSummary>;
|
|
305
|
+
// (undocumented)
|
|
306
|
+
getReactions(containerAri: string, aris: string[]): Promise<Reactions_2>;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// @public (undocumented)
|
|
310
|
+
type ReactionsLoading = {
|
|
311
|
+
readonly status: ReactionStatus.loading;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// @public (undocumented)
|
|
315
|
+
type ReactionsNotLoaded = {
|
|
316
|
+
readonly status: ReactionStatus.notLoaded;
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
// @public
|
|
320
|
+
type ReactionSource = 'emojiPicker' | 'quickSelector';
|
|
321
|
+
|
|
322
|
+
// @public (undocumented)
|
|
323
|
+
interface ReactionsProps
|
|
324
|
+
extends Pick<
|
|
325
|
+
ReactionPickerProps,
|
|
326
|
+
'allowAllEmojis' | 'emojiPickerSize' | 'emojiProvider' | 'miniMode'
|
|
327
|
+
>,
|
|
328
|
+
Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>,
|
|
329
|
+
Pick<ReactionProps, 'allowUserDialog'> {
|
|
330
|
+
errorMessage?: string;
|
|
331
|
+
flash?: Record<string, boolean>;
|
|
332
|
+
getReactionDetails?: (emojiId: string) => void;
|
|
333
|
+
loadReaction: () => void;
|
|
334
|
+
onDialogCloseCallback?: OnCloseHandler;
|
|
335
|
+
onDialogOpenCallback?: (emojiId: string, source?: string) => void;
|
|
336
|
+
onDialogSelectReactionCallback?: onDialogSelectReactionChange;
|
|
337
|
+
onReactionClick: ReactionClick;
|
|
338
|
+
// @deprecated (undocumented)
|
|
339
|
+
onReactionHover?: (emojiId: string) => void;
|
|
340
|
+
onSelection: (emojiId: string) => void;
|
|
341
|
+
quickReactionEmojis?: QuickReactionEmojiSummary;
|
|
342
|
+
reactions?: ReactionSummary[];
|
|
343
|
+
status: ReactionStatus;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// @public (undocumented)
|
|
347
|
+
type ReactionsReadyState = {
|
|
348
|
+
readonly status: ReactionStatus.ready;
|
|
349
|
+
readonly reactions: ReactionSummary[];
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
// @public
|
|
353
|
+
type ReactionsState =
|
|
354
|
+
| ReactionsError
|
|
355
|
+
| ReactionsLoading
|
|
356
|
+
| ReactionsNotLoaded
|
|
357
|
+
| ReactionsReadyState;
|
|
358
|
+
|
|
359
|
+
// @public
|
|
360
|
+
export interface ReactionsStore extends Actions, StoreProps {}
|
|
361
|
+
|
|
362
|
+
// @public
|
|
363
|
+
enum ReactionStatus {
|
|
364
|
+
// (undocumented)
|
|
365
|
+
disabled = 'DISABLED',
|
|
366
|
+
// (undocumented)
|
|
367
|
+
error = 'ERROR',
|
|
368
|
+
// (undocumented)
|
|
369
|
+
loading = 'LOADING',
|
|
370
|
+
// (undocumented)
|
|
371
|
+
notLoaded = 'NOT_LOADED',
|
|
372
|
+
// (undocumented)
|
|
373
|
+
ready = 'READY',
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// @public
|
|
377
|
+
interface ReactionSummary {
|
|
378
|
+
ari: string;
|
|
379
|
+
containerAri: string;
|
|
380
|
+
count: number;
|
|
381
|
+
emojiId: string;
|
|
382
|
+
// @deprecated (undocumented)
|
|
383
|
+
optimisticallyUpdated?: boolean;
|
|
384
|
+
reacted: boolean;
|
|
385
|
+
users?: User[];
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// @public (undocumented)
|
|
389
|
+
interface ReactionTooltipProps {
|
|
390
|
+
allowUserDialog?: boolean;
|
|
391
|
+
emojiName?: string;
|
|
392
|
+
handleUserListClick?: (emojiId: string) => void;
|
|
393
|
+
isEnabled?: boolean;
|
|
394
|
+
maxReactions?: number;
|
|
395
|
+
reaction: ReactionSummary;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// @public (undocumented)
|
|
399
|
+
interface SelectorProps {
|
|
400
|
+
emojiProvider: Promise<EmojiProvider_2>;
|
|
401
|
+
onMoreClick?: React_2.MouseEventHandler<HTMLElement>;
|
|
402
|
+
onSelection: OnEmojiEvent;
|
|
403
|
+
pickerQuickReactionEmojiIds?: EmojiId[];
|
|
404
|
+
showMore?: boolean;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// @public
|
|
408
|
+
export type State = {
|
|
409
|
+
reactions: {
|
|
410
|
+
[key: string]: ReactionsState;
|
|
411
|
+
};
|
|
412
|
+
flash: {
|
|
413
|
+
[key: string]: {
|
|
414
|
+
[emojiId: string]: boolean;
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
// @public
|
|
420
|
+
interface StoreMetadata {
|
|
421
|
+
// (undocumented)
|
|
422
|
+
[k: string]: any;
|
|
423
|
+
// (undocumented)
|
|
424
|
+
subproduct?: string;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// @public
|
|
428
|
+
export type StorePropInput = Promise<ReactionsStore> | ReactionsStore;
|
|
429
|
+
|
|
430
|
+
// @public
|
|
431
|
+
interface StoreProps {
|
|
432
|
+
getState: () => State;
|
|
433
|
+
// @deprecated
|
|
434
|
+
onChange: (callback: OnChangeCallback) => void;
|
|
435
|
+
// @deprecated
|
|
436
|
+
removeOnChangeListener: (callback: OnChangeCallback) => void;
|
|
437
|
+
// @deprecated
|
|
438
|
+
setCreateAnalyticsEvent?: (
|
|
439
|
+
createAnalyticsEvent: CreateUIAnalyticsEvent,
|
|
440
|
+
) => void;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
// @public (undocumented)
|
|
444
|
+
interface TriggerProps {
|
|
445
|
+
ariaAttributes?: AriaAttributes;
|
|
446
|
+
disabled?: boolean;
|
|
447
|
+
miniMode?: boolean;
|
|
448
|
+
onClick?: (
|
|
449
|
+
e: React_2.MouseEvent<HTMLElement>,
|
|
450
|
+
analyticsEvent: AnalyticsEvent,
|
|
451
|
+
) => void;
|
|
452
|
+
tooltipContent: React_2.ReactNode;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// @public (undocumented)
|
|
456
|
+
export const UFO: {
|
|
457
|
+
ComponentName: typeof ComponentName;
|
|
458
|
+
ExperienceName: typeof ExperienceName;
|
|
459
|
+
PickerRender: UFOExperience;
|
|
460
|
+
ReactionsAdd: ConcurrentExperience;
|
|
461
|
+
ReactionDetailsFetch: ConcurrentExperience;
|
|
462
|
+
ReactionDialogClosed: UFOExperience;
|
|
463
|
+
ReactionDialogOpened: UFOExperience;
|
|
464
|
+
ReactionDialogSelectedReactionChanged: UFOExperience;
|
|
465
|
+
ReactionsRemove: ConcurrentExperience;
|
|
466
|
+
ReactionsRendered: ConcurrentExperience;
|
|
467
|
+
sampledReactionsRendered: (instanceId: string) => WithSamplingUFOExperience;
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
// @public (undocumented)
|
|
471
|
+
interface User {
|
|
472
|
+
displayName: string;
|
|
473
|
+
id: string;
|
|
474
|
+
profilePicture?: ProfilePicture;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// (No @packageDocumentation comment for this package)
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
<!--SECTION END: Main Entry Types-->
|
|
481
|
+
|
|
482
|
+
### Peer Dependencies
|
|
483
|
+
|
|
484
|
+
<!--SECTION START: Peer Dependencies-->
|
|
485
|
+
|
|
486
|
+
```json
|
|
487
|
+
{
|
|
488
|
+
"react": "^16.8.0",
|
|
489
|
+
"react-dom": "^16.8.0",
|
|
490
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
491
|
+
}
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
<!--SECTION END: Peer Dependencies-->
|