@atlaskit/reactions 22.3.0 → 22.3.2

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.
Files changed (226) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/MockReactionsClient/package.json +2 -2
  3. package/dist/cjs/i18n/cs.js +14 -13
  4. package/dist/cjs/i18n/da.js +14 -13
  5. package/dist/cjs/i18n/de.js +13 -13
  6. package/dist/cjs/i18n/en.js +14 -14
  7. package/dist/cjs/i18n/en_GB.js +14 -14
  8. package/dist/cjs/i18n/en_ZZ.js +14 -14
  9. package/dist/cjs/i18n/es.js +14 -13
  10. package/dist/cjs/i18n/fi.js +13 -13
  11. package/dist/cjs/i18n/fr.js +14 -13
  12. package/dist/cjs/i18n/hu.js +14 -13
  13. package/dist/cjs/i18n/it.js +14 -13
  14. package/dist/cjs/i18n/ja.js +14 -13
  15. package/dist/cjs/i18n/ko.js +13 -13
  16. package/dist/cjs/i18n/nb.js +13 -13
  17. package/dist/cjs/i18n/nl.js +14 -13
  18. package/dist/cjs/i18n/pl.js +14 -13
  19. package/dist/cjs/i18n/pt_BR.js +14 -13
  20. package/dist/cjs/i18n/ru.js +13 -13
  21. package/dist/cjs/i18n/sv.js +14 -13
  22. package/dist/cjs/i18n/th.js +14 -13
  23. package/dist/cjs/i18n/tr.js +14 -13
  24. package/dist/cjs/i18n/uk.js +14 -13
  25. package/dist/cjs/i18n/vi.js +14 -13
  26. package/dist/cjs/i18n/zh.js +14 -13
  27. package/dist/cjs/i18n/zh_TW.js +13 -13
  28. package/dist/cjs/version.json +1 -1
  29. package/dist/es2019/i18n/cs.js +14 -13
  30. package/dist/es2019/i18n/da.js +14 -13
  31. package/dist/es2019/i18n/de.js +13 -13
  32. package/dist/es2019/i18n/en.js +14 -14
  33. package/dist/es2019/i18n/en_GB.js +14 -14
  34. package/dist/es2019/i18n/en_ZZ.js +14 -14
  35. package/dist/es2019/i18n/es.js +14 -13
  36. package/dist/es2019/i18n/fi.js +13 -13
  37. package/dist/es2019/i18n/fr.js +14 -13
  38. package/dist/es2019/i18n/hu.js +14 -13
  39. package/dist/es2019/i18n/it.js +14 -13
  40. package/dist/es2019/i18n/ja.js +14 -13
  41. package/dist/es2019/i18n/ko.js +13 -13
  42. package/dist/es2019/i18n/nb.js +13 -13
  43. package/dist/es2019/i18n/nl.js +14 -13
  44. package/dist/es2019/i18n/pl.js +14 -13
  45. package/dist/es2019/i18n/pt_BR.js +14 -13
  46. package/dist/es2019/i18n/ru.js +13 -13
  47. package/dist/es2019/i18n/sv.js +14 -13
  48. package/dist/es2019/i18n/th.js +14 -13
  49. package/dist/es2019/i18n/tr.js +14 -13
  50. package/dist/es2019/i18n/uk.js +14 -13
  51. package/dist/es2019/i18n/vi.js +14 -13
  52. package/dist/es2019/i18n/zh.js +14 -13
  53. package/dist/es2019/i18n/zh_TW.js +13 -13
  54. package/dist/es2019/version.json +1 -1
  55. package/dist/esm/i18n/cs.js +14 -13
  56. package/dist/esm/i18n/da.js +14 -13
  57. package/dist/esm/i18n/de.js +13 -13
  58. package/dist/esm/i18n/en.js +14 -14
  59. package/dist/esm/i18n/en_GB.js +14 -14
  60. package/dist/esm/i18n/en_ZZ.js +14 -14
  61. package/dist/esm/i18n/es.js +14 -13
  62. package/dist/esm/i18n/fi.js +13 -13
  63. package/dist/esm/i18n/fr.js +14 -13
  64. package/dist/esm/i18n/hu.js +14 -13
  65. package/dist/esm/i18n/it.js +14 -13
  66. package/dist/esm/i18n/ja.js +14 -13
  67. package/dist/esm/i18n/ko.js +13 -13
  68. package/dist/esm/i18n/nb.js +13 -13
  69. package/dist/esm/i18n/nl.js +14 -13
  70. package/dist/esm/i18n/pl.js +14 -13
  71. package/dist/esm/i18n/pt_BR.js +14 -13
  72. package/dist/esm/i18n/ru.js +13 -13
  73. package/dist/esm/i18n/sv.js +14 -13
  74. package/dist/esm/i18n/th.js +14 -13
  75. package/dist/esm/i18n/tr.js +14 -13
  76. package/dist/esm/i18n/uk.js +14 -13
  77. package/dist/esm/i18n/vi.js +14 -13
  78. package/dist/esm/i18n/zh.js +14 -13
  79. package/dist/esm/i18n/zh_TW.js +13 -13
  80. package/dist/esm/version.json +1 -1
  81. package/dist/types/analytics/analytics.d.ts +7 -7
  82. package/dist/types/components/ReactionDialog/styles.d.ts +2 -1
  83. package/dist/types/components/ReactionPicker/RepositionOnUpdate.d.ts +1 -1
  84. package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
  85. package/dist/types/hooks/useCloseManager.d.ts +1 -1
  86. package/dist/types/hooks/useFocusTrap.d.ts +1 -1
  87. package/dist/types/i18n/cs.d.ts +16 -15
  88. package/dist/types/i18n/da.d.ts +16 -15
  89. package/dist/types/i18n/de.d.ts +15 -15
  90. package/dist/types/i18n/en.d.ts +16 -16
  91. package/dist/types/i18n/en_GB.d.ts +16 -16
  92. package/dist/types/i18n/en_ZZ.d.ts +16 -16
  93. package/dist/types/i18n/es.d.ts +16 -15
  94. package/dist/types/i18n/et.d.ts +4 -4
  95. package/dist/types/i18n/fi.d.ts +15 -15
  96. package/dist/types/i18n/fr.d.ts +16 -15
  97. package/dist/types/i18n/hu.d.ts +16 -15
  98. package/dist/types/i18n/it.d.ts +16 -15
  99. package/dist/types/i18n/ja.d.ts +16 -15
  100. package/dist/types/i18n/ko.d.ts +15 -15
  101. package/dist/types/i18n/nb.d.ts +15 -15
  102. package/dist/types/i18n/nl.d.ts +16 -15
  103. package/dist/types/i18n/pl.d.ts +16 -15
  104. package/dist/types/i18n/pt_BR.d.ts +16 -15
  105. package/dist/types/i18n/pt_PT.d.ts +4 -4
  106. package/dist/types/i18n/ru.d.ts +15 -15
  107. package/dist/types/i18n/sk.d.ts +4 -4
  108. package/dist/types/i18n/sv.d.ts +16 -15
  109. package/dist/types/i18n/th.d.ts +16 -15
  110. package/dist/types/i18n/tr.d.ts +16 -15
  111. package/dist/types/i18n/uk.d.ts +16 -15
  112. package/dist/types/i18n/vi.d.ts +16 -15
  113. package/dist/types/i18n/zh.d.ts +16 -15
  114. package/dist/types/i18n/zh_TW.d.ts +15 -15
  115. package/dist/types/store/MemoryReactionsStore.d.ts +1 -1
  116. package/dist/types/store/ReactionConsumer.d.ts +2 -2
  117. package/dist/types/store/utils.d.ts +2 -2
  118. package/dist/types/types/Actions.d.ts +2 -2
  119. package/dist/types/types/Updater.d.ts +1 -1
  120. package/dist/types/types/User.d.ts +1 -1
  121. package/dist/types/types/client.d.ts +1 -1
  122. package/dist/types/types/reaction.d.ts +11 -11
  123. package/dist/types/types/store.d.ts +3 -3
  124. package/dist/types-ts4.5/MockReactionsClient.d.ts +27 -0
  125. package/dist/types-ts4.5/analytics/analytics.d.ts +121 -0
  126. package/dist/types-ts4.5/analytics/index.d.ts +2 -0
  127. package/dist/types-ts4.5/analytics/ufo.d.ts +56 -0
  128. package/dist/types-ts4.5/client/ReactionServiceClient.d.ts +35 -0
  129. package/dist/types-ts4.5/client/index.d.ts +1 -0
  130. package/dist/types-ts4.5/components/Counter/Counter.d.ts +44 -0
  131. package/dist/types-ts4.5/components/Counter/index.d.ts +3 -0
  132. package/dist/types-ts4.5/components/Counter/styles.d.ts +4 -0
  133. package/dist/types-ts4.5/components/EmojiButton/EmojiButton.d.ts +22 -0
  134. package/dist/types-ts4.5/components/EmojiButton/index.d.ts +2 -0
  135. package/dist/types-ts4.5/components/EmojiButton/styles.d.ts +1 -0
  136. package/dist/types-ts4.5/components/FlashAnimation/FlashAnimation.d.ts +20 -0
  137. package/dist/types-ts4.5/components/FlashAnimation/index.d.ts +2 -0
  138. package/dist/types-ts4.5/components/FlashAnimation/styles.d.ts +5 -0
  139. package/dist/types-ts4.5/components/Reaction/Reaction.d.ts +48 -0
  140. package/dist/types-ts4.5/components/Reaction/index.d.ts +2 -0
  141. package/dist/types-ts4.5/components/Reaction/styles.d.ts +10 -0
  142. package/dist/types-ts4.5/components/ReactionDialog/ReactionView.d.ts +19 -0
  143. package/dist/types-ts4.5/components/ReactionDialog/ReactionsDialog.d.ts +32 -0
  144. package/dist/types-ts4.5/components/ReactionDialog/ReactionsList.d.ts +23 -0
  145. package/dist/types-ts4.5/components/ReactionDialog/index.d.ts +1 -0
  146. package/dist/types-ts4.5/components/ReactionDialog/styles.d.ts +11 -0
  147. package/dist/types-ts4.5/components/ReactionPicker/ReactionPicker.d.ts +59 -0
  148. package/dist/types-ts4.5/components/ReactionPicker/RepositionOnUpdate.d.ts +13 -0
  149. package/dist/types-ts4.5/components/ReactionPicker/index.d.ts +2 -0
  150. package/dist/types-ts4.5/components/ReactionPicker/styles.d.ts +4 -0
  151. package/dist/types-ts4.5/components/ReactionTooltip/ReactionTooltip.d.ts +34 -0
  152. package/dist/types-ts4.5/components/ReactionTooltip/index.d.ts +2 -0
  153. package/dist/types-ts4.5/components/ReactionTooltip/styles.d.ts +5 -0
  154. package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +96 -0
  155. package/dist/types-ts4.5/components/Reactions/index.d.ts +2 -0
  156. package/dist/types-ts4.5/components/Reactions/styles.d.ts +3 -0
  157. package/dist/types-ts4.5/components/Selector/Selector.d.ts +34 -0
  158. package/dist/types-ts4.5/components/Selector/index.d.ts +3 -0
  159. package/dist/types-ts4.5/components/Selector/styles.d.ts +12 -0
  160. package/dist/types-ts4.5/components/ShowMore/ShowMore.d.ts +35 -0
  161. package/dist/types-ts4.5/components/ShowMore/index.d.ts +2 -0
  162. package/dist/types-ts4.5/components/ShowMore/styles.d.ts +3 -0
  163. package/dist/types-ts4.5/components/Trigger/Trigger.d.ts +36 -0
  164. package/dist/types-ts4.5/components/Trigger/index.d.ts +2 -0
  165. package/dist/types-ts4.5/components/Trigger/styles.d.ts +5 -0
  166. package/dist/types-ts4.5/components/UfoErrorBoundary/UfoErrorBoundary.d.ts +16 -0
  167. package/dist/types-ts4.5/components/UfoErrorBoundary/index.d.ts +2 -0
  168. package/dist/types-ts4.5/components/index.d.ts +9 -0
  169. package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +23 -0
  170. package/dist/types-ts4.5/containers/ConnectedReactionPicker/index.d.ts +2 -0
  171. package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +43 -0
  172. package/dist/types-ts4.5/containers/ConnectedReactionsView/index.d.ts +2 -0
  173. package/dist/types-ts4.5/containers/index.d.ts +2 -0
  174. package/dist/types-ts4.5/hooks/index.d.ts +1 -0
  175. package/dist/types-ts4.5/hooks/useCloseManager.d.ts +11 -0
  176. package/dist/types-ts4.5/hooks/useFocusTrap.d.ts +5 -0
  177. package/dist/types-ts4.5/i18n/cs.d.ts +23 -0
  178. package/dist/types-ts4.5/i18n/da.d.ts +23 -0
  179. package/dist/types-ts4.5/i18n/de.d.ts +22 -0
  180. package/dist/types-ts4.5/i18n/en.d.ts +23 -0
  181. package/dist/types-ts4.5/i18n/en_GB.d.ts +23 -0
  182. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +23 -0
  183. package/dist/types-ts4.5/i18n/es.d.ts +23 -0
  184. package/dist/types-ts4.5/i18n/et.d.ts +11 -0
  185. package/dist/types-ts4.5/i18n/fi.d.ts +22 -0
  186. package/dist/types-ts4.5/i18n/fr.d.ts +23 -0
  187. package/dist/types-ts4.5/i18n/hu.d.ts +23 -0
  188. package/dist/types-ts4.5/i18n/index.d.ts +35 -0
  189. package/dist/types-ts4.5/i18n/is.d.ts +6 -0
  190. package/dist/types-ts4.5/i18n/it.d.ts +23 -0
  191. package/dist/types-ts4.5/i18n/ja.d.ts +23 -0
  192. package/dist/types-ts4.5/i18n/ko.d.ts +22 -0
  193. package/dist/types-ts4.5/i18n/languages.d.ts +27 -0
  194. package/dist/types-ts4.5/i18n/nb.d.ts +22 -0
  195. package/dist/types-ts4.5/i18n/nl.d.ts +23 -0
  196. package/dist/types-ts4.5/i18n/pl.d.ts +23 -0
  197. package/dist/types-ts4.5/i18n/pt_BR.d.ts +23 -0
  198. package/dist/types-ts4.5/i18n/pt_PT.d.ts +11 -0
  199. package/dist/types-ts4.5/i18n/ro.d.ts +6 -0
  200. package/dist/types-ts4.5/i18n/ru.d.ts +22 -0
  201. package/dist/types-ts4.5/i18n/sk.d.ts +11 -0
  202. package/dist/types-ts4.5/i18n/sv.d.ts +23 -0
  203. package/dist/types-ts4.5/i18n/th.d.ts +23 -0
  204. package/dist/types-ts4.5/i18n/tr.d.ts +23 -0
  205. package/dist/types-ts4.5/i18n/uk.d.ts +23 -0
  206. package/dist/types-ts4.5/i18n/vi.d.ts +23 -0
  207. package/dist/types-ts4.5/i18n/zh.d.ts +23 -0
  208. package/dist/types-ts4.5/i18n/zh_TW.d.ts +22 -0
  209. package/dist/types-ts4.5/index.d.ts +7 -0
  210. package/dist/types-ts4.5/shared/constants.d.ts +28 -0
  211. package/dist/types-ts4.5/shared/i18n.d.ts +72 -0
  212. package/dist/types-ts4.5/shared/index.d.ts +3 -0
  213. package/dist/types-ts4.5/shared/utils.d.ts +18 -0
  214. package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +94 -0
  215. package/dist/types-ts4.5/store/ReactionConsumer.d.ts +57 -0
  216. package/dist/types-ts4.5/store/batched.d.ts +2 -0
  217. package/dist/types-ts4.5/store/index.d.ts +3 -0
  218. package/dist/types-ts4.5/store/utils.d.ts +11 -0
  219. package/dist/types-ts4.5/types/Actions.d.ts +27 -0
  220. package/dist/types-ts4.5/types/Updater.d.ts +1 -0
  221. package/dist/types-ts4.5/types/User.d.ts +20 -0
  222. package/dist/types-ts4.5/types/client.d.ts +38 -0
  223. package/dist/types-ts4.5/types/index.d.ts +7 -0
  224. package/dist/types-ts4.5/types/reaction.d.ts +113 -0
  225. package/dist/types-ts4.5/types/store.d.ts +63 -0
  226. package/package.json +12 -4
@@ -0,0 +1,56 @@
1
+ import { ConcurrentExperience, UFOExperience } from '@atlaskit/ufo';
2
+ /**
3
+ * Types of experiences
4
+ */
5
+ export declare enum ExperienceName {
6
+ REACTIONS_RENDERED = "reactions-rendered",
7
+ PICKER_OPENED = "reactions-picker-opened",
8
+ REACTION_ADDED = "reaction-added",
9
+ REACTION_REMOVED = "reaction-removed",
10
+ REACTION_DETAILS_FETCHED = "reaction-details-fetched",
11
+ REACTION_DIALOG_OPENED = "reaction-dialog-opened",
12
+ REACTION_DIALOG_CLOSED = "reaction-dialog-closed",
13
+ REACTION_DIALOG_SELECTED_REACTION_CHANGED = "reaction-dialog-selected-reaction-changed"
14
+ }
15
+ /**
16
+ * UFO types of components been instrumented
17
+ */
18
+ export declare enum ComponentName {
19
+ PICKER_RENDERED = "reactions-picker",
20
+ REACTIONS = "reactions-list",
21
+ REACTION_ITEM = "reaction-item",
22
+ REACTION_DIALOG = "reaction-dialog"
23
+ }
24
+ /**
25
+ * Experience when the emoji picker is opened
26
+ */
27
+ export declare const PickerRender: UFOExperience;
28
+ /**
29
+ * Experience when the list of reactions gets rendered
30
+ */
31
+ export declare const ReactionsRendered: ConcurrentExperience;
32
+ /**
33
+ * Experience when a reaction emoji gets added
34
+ */
35
+ export declare const ReactionsAdd: ConcurrentExperience;
36
+ /**
37
+ * Expeirence when a reaction dialog is opened
38
+ */
39
+ export declare const ReactionDialogOpened: UFOExperience;
40
+ /**
41
+ * Experience when a reaction dialog is closed
42
+ */
43
+ export declare const ReactionDialogClosed: UFOExperience;
44
+ /**
45
+ * Experience when a reaction changed/fetched from inside the modal dialog
46
+ */
47
+ export declare const ReactionDialogSelectedReactionChanged: UFOExperience;
48
+ /**
49
+ * Experience when a reaction details gets fetched
50
+ */
51
+ export declare const ReactionDetailsFetch: ConcurrentExperience;
52
+ /**
53
+ * Experience when a reaction emoji gets removed/decrement
54
+ */
55
+ export declare const ReactionsRemove: ConcurrentExperience;
56
+ export declare const sampledReactionsRendered: (instanceId: string) => import("@atlaskit/emoji").WithSamplingUFOExperience;
@@ -0,0 +1,35 @@
1
+ import { Reactions, ReactionSummary, Client } from '../types';
2
+ /**
3
+ * Utility class to retrieve/modify all actions on reactions collection
4
+ */
5
+ export declare class ReactionServiceClient implements Client {
6
+ /**
7
+ * oAuth token
8
+ */
9
+ private sessionToken?;
10
+ /**
11
+ * API config
12
+ */
13
+ private serviceConfig;
14
+ /**
15
+ *
16
+ * @param baseUrl base domain url
17
+ * @param sessionToken oAuth token for reactions emoji services
18
+ */
19
+ constructor(baseUrl: string, sessionToken?: string);
20
+ /**
21
+ * Get http headers for the "fetch" request
22
+ * @param hasBody
23
+ */
24
+ private getHeaders;
25
+ /**
26
+ * Send a request to remote service
27
+ * @param path endpoint api url
28
+ * @param options Optional custom params
29
+ */
30
+ private requestService;
31
+ getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
32
+ getDetailedReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary>;
33
+ addReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
34
+ deleteReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
35
+ }
@@ -0,0 +1 @@
1
+ export { ReactionServiceClient } from './ReactionServiceClient';
@@ -0,0 +1,44 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ /**
4
+ * Test id for component top level div
5
+ */
6
+ export declare const RENDER_COMPONENT_WRAPPER = "counter-wrapper";
7
+ /**
8
+ * Test id for wrapper div of the counter inside the slider
9
+ */
10
+ export declare const RENDER_COUNTER_TESTID = "counter-container";
11
+ /**
12
+ * Counter label value wrapper div
13
+ */
14
+ export declare const RENDER_LABEL_TESTID = "counter_label_wrapper";
15
+ export interface CounterProps {
16
+ /**
17
+ * Count of emoji been selected
18
+ */
19
+ value: number;
20
+ /**
21
+ * Has the emoji been selected by given user (defaults to false)
22
+ */
23
+ highlight?: boolean;
24
+ /**
25
+ * Max threshold of selections to show before having a label (defaults to 1000)
26
+ */
27
+ limit?: number;
28
+ /**
29
+ * Label to show when the value surpasses the limit value (defaults to "1k+")
30
+ */
31
+ overLimitLabel?: string;
32
+ /**
33
+ * Optional wrapper class name
34
+ */
35
+ className?: string;
36
+ /**
37
+ * Duration in ms of how long the motion will take (defaults to "mediumDurationMs" from '@atlaskit/motion')
38
+ */
39
+ animationDuration?: number;
40
+ }
41
+ /**
42
+ * Display reaction count next to the emoji button
43
+ */
44
+ export declare const Counter: React.FC<CounterProps>;
@@ -0,0 +1,3 @@
1
+ export { Counter, RENDER_COUNTER_TESTID, RENDER_COMPONENT_WRAPPER, RENDER_LABEL_TESTID, } from './Counter';
2
+ export type { CounterProps } from './Counter';
3
+ export * as styles from './styles';
@@ -0,0 +1,4 @@
1
+ export declare const countStyle: import("@emotion/react").SerializedStyles;
2
+ export declare const containerStyle: import("@emotion/react").SerializedStyles;
3
+ export declare const highlightStyle: import("@emotion/react").SerializedStyles;
4
+ export declare const counterLabelStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,22 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { EmojiId, OnEmojiEvent, EmojiProvider } from '@atlaskit/emoji';
4
+ export declare const RENDER_BUTTON_TESTID = "button-emoji-id";
5
+ export interface EmojiButtonProps {
6
+ /**
7
+ * identifier info for a given emoji
8
+ */
9
+ emojiId: EmojiId;
10
+ /**
11
+ * Async provider to fetch the emoji
12
+ */
13
+ emojiProvider: Promise<EmojiProvider>;
14
+ /**
15
+ * Event handler when a new emoji is selected
16
+ */
17
+ onClick: OnEmojiEvent;
18
+ }
19
+ /**
20
+ * custom button to render the custom emoji selector inside the reaction picker
21
+ */
22
+ export declare const EmojiButton: React.FC<EmojiButtonProps>;
@@ -0,0 +1,2 @@
1
+ export { EmojiButton, RENDER_BUTTON_TESTID } from './EmojiButton';
2
+ export type { EmojiButtonProps } from './EmojiButton';
@@ -0,0 +1 @@
1
+ export declare const emojiButtonStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,20 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ export interface FlashAnimationProps {
4
+ /**
5
+ * Optional wrapper div class anme
6
+ */
7
+ className?: string;
8
+ /**
9
+ * Show custom animation or render as standard without animation (defaults to false)
10
+ */
11
+ flash?: boolean;
12
+ }
13
+ /**
14
+ * Test id for wrapper FlashAnimation div
15
+ */
16
+ export declare const RENDER_FLASHANIMATION_TESTID = "flash-animation";
17
+ /**
18
+ * Flash animation background component. See Reaction component for usage.
19
+ */
20
+ export declare const FlashAnimation: React.FC<FlashAnimationProps>;
@@ -0,0 +1,2 @@
1
+ export { FlashAnimation, RENDER_FLASHANIMATION_TESTID } from './FlashAnimation';
2
+ export type { FlashAnimationProps } from './FlashAnimation';
@@ -0,0 +1,5 @@
1
+ /** @jsx jsx */
2
+ import { keyframes } from '@emotion/react';
3
+ export declare const flashAnimation: typeof keyframes;
4
+ export declare const containerStyle: import("@emotion/react").SerializedStyles;
5
+ export declare const flashStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,48 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { EmojiProvider } from '@atlaskit/emoji';
4
+ import { ReactionSummary, ReactionClick, ReactionMouseEnter } from '../../types';
5
+ import { ReactionTooltipProps } from '../ReactionTooltip';
6
+ import { ReactionFocused } from '../../types/reaction';
7
+ /**
8
+ * Test id for Reaction item wrapper div
9
+ */
10
+ export declare const RENDER_REACTION_TESTID = "render_reaction_wrapper";
11
+ export interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDialog'> {
12
+ /**
13
+ * Data for the reaction
14
+ */
15
+ reaction: ReactionSummary;
16
+ /**
17
+ * Provider for loading emojis
18
+ */
19
+ emojiProvider: Promise<EmojiProvider>;
20
+ /**
21
+ * event handler when the emoji button is clicked
22
+ */
23
+ onClick: ReactionClick;
24
+ /**
25
+ * Optional wrapper reaction <button /> class name
26
+ */
27
+ className?: string;
28
+ /**
29
+ * Optional event when the mouse cursor hovers over the reaction
30
+ */
31
+ onMouseEnter?: ReactionMouseEnter;
32
+ /**
33
+ * Optional event when focused the reaction
34
+ */
35
+ onFocused?: ReactionFocused;
36
+ /**
37
+ * Show custom animation or render as standard without animation (defaults to false)
38
+ */
39
+ flash?: boolean;
40
+ /**
41
+ * Optional function when the user wants to see more users in a modal
42
+ */
43
+ handleUserListClick?: (emojiId: string) => void;
44
+ }
45
+ /**
46
+ * Render an emoji reaction button
47
+ */
48
+ export declare const Reaction: React.FC<ReactionProps>;
@@ -0,0 +1,2 @@
1
+ export { Reaction, RENDER_REACTION_TESTID } from './Reaction';
2
+ export type { ReactionProps } from './Reaction';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Styling Note:
3
+ * Padding and line height are set within the child components
4
+ * of FlashAnimation b/c it otherwise throws off the flash styling
5
+ */
6
+ export declare const emojiStyle: import("@emotion/react").SerializedStyles;
7
+ export declare const reactionStyle: import("@emotion/react").SerializedStyles;
8
+ export declare const reactedStyle: import("@emotion/react").SerializedStyles;
9
+ export declare const flashHeight: number;
10
+ export declare const flashStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,19 @@
1
+ /** @jsx jsx */
2
+ import { FC } from 'react';
3
+ import { EmojiProvider } from '@atlaskit/emoji/resource';
4
+ import { ReactionSummary } from '../../types';
5
+ export interface ReactionViewProps {
6
+ /**
7
+ * Selected reaction to get user data from
8
+ */
9
+ reaction: ReactionSummary;
10
+ /**
11
+ * Current emoji selected in the reactions dialog
12
+ */
13
+ selectedEmojiId: string;
14
+ /**
15
+ * Provider for loading emojis
16
+ */
17
+ emojiProvider: Promise<EmojiProvider>;
18
+ }
19
+ export declare const ReactionView: FC<ReactionViewProps>;
@@ -0,0 +1,32 @@
1
+ /** @jsx jsx */
2
+ import { FC } from 'react';
3
+ import { EmojiProvider } from '@atlaskit/emoji/resource';
4
+ import { OnCloseHandler } from '@atlaskit/modal-dialog';
5
+ import { onDialogSelectReactionChange, ReactionSummary } from '../../types';
6
+ /**
7
+ * Test id for the Reactions modal dialog
8
+ */
9
+ export declare const RENDER_MODAL_TESTID = "render-reactions-modal";
10
+ export interface ReactionsDialogProps {
11
+ /**
12
+ * List of reactions to render (defaults to empty list)
13
+ */
14
+ reactions: ReactionSummary[];
15
+ /**
16
+ * Optional handler when the dialog closes
17
+ */
18
+ handleCloseReactionsDialog: OnCloseHandler;
19
+ /**
20
+ * Provider for loading emojis
21
+ */
22
+ emojiProvider: Promise<EmojiProvider>;
23
+ /**
24
+ * Current emoji selected to show the reactions dialog
25
+ */
26
+ selectedEmojiId: string;
27
+ /**
28
+ * Optional callback function called when user selects a reaction in reactions dialog
29
+ */
30
+ handleSelectReaction?: onDialogSelectReactionChange;
31
+ }
32
+ export declare const ReactionsDialog: FC<ReactionsDialogProps>;
@@ -0,0 +1,23 @@
1
+ /** @jsx jsx */
2
+ import { FC } from 'react';
3
+ import { EmojiProvider } from '@atlaskit/emoji/resource';
4
+ import { onDialogSelectReactionChange, ReactionSummary } from '../../types';
5
+ export interface ReactionsListProps {
6
+ /**
7
+ * Sorted list of reactions to render in list
8
+ */
9
+ reactions: ReactionSummary[];
10
+ /**
11
+ * Current emoji selected in the reactions dialog
12
+ */
13
+ initialEmojiId: string;
14
+ /**
15
+ * Provider for loading emojis
16
+ */
17
+ emojiProvider: Promise<EmojiProvider>;
18
+ /**
19
+ * Function to handle clicking on an emoji from the list
20
+ */
21
+ onReactionChanged: onDialogSelectReactionChange;
22
+ }
23
+ export declare const ReactionsList: FC<ReactionsListProps>;
@@ -0,0 +1 @@
1
+ export { ReactionsDialog } from './ReactionsDialog';
@@ -0,0 +1,11 @@
1
+ import { ThemeColorModes } from '@atlaskit/tokens';
2
+ export declare const containerStyle: (reactionsBorderWidth: number) => import("@emotion/react").SerializedStyles;
3
+ export declare const titleStyle: import("@emotion/react").SerializedStyles;
4
+ export declare const counterStyle: (isSelected: boolean) => import("@emotion/react").SerializedStyles;
5
+ export declare const customTabWrapper: (isSelected: boolean, selectedEmojiId: string, theme?: ThemeColorModes) => import("@emotion/react").SerializedStyles;
6
+ export declare const navigationContainerStyle: import("@emotion/react").SerializedStyles;
7
+ export declare const reactionViewStyle: import("@emotion/react").SerializedStyles;
8
+ export declare const userListStyle: import("@emotion/react").SerializedStyles;
9
+ export declare const userStyle: import("@emotion/react").SerializedStyles;
10
+ export declare const customTabListStyles: import("@emotion/react").SerializedStyles;
11
+ export declare const centerSpinner: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,59 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { PickerSize } from '@atlaskit/emoji/types';
4
+ import { EmojiProvider } from '@atlaskit/emoji/resource';
5
+ import { SelectorProps } from '../Selector';
6
+ import { TriggerProps } from '../Trigger';
7
+ import { ReactionSource } from '../../types';
8
+ /**
9
+ * Test id for wrapper ReactionPicker div
10
+ */
11
+ export declare const RENDER_REACTIONPICKER_TESTID = "reactionPicker-testid";
12
+ /**
13
+ * Test id for ReactionPicker panel div
14
+ */
15
+ export declare const RENDER_REACTIONPICKERPANEL_TESTID = "reactionPickerPanel-testid";
16
+ export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Partial<Pick<TriggerProps, 'tooltipContent' | 'miniMode'>> {
17
+ /**
18
+ * Provider for loading emojis
19
+ */
20
+ emojiProvider: Promise<EmojiProvider>;
21
+ /**
22
+ * Event callback when an emoji button is selected
23
+ * @param emojiId emoji unique id
24
+ * @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
25
+ */
26
+ onSelection: (emojiId: string, source: ReactionSource) => void;
27
+ /**
28
+ * Optional class name
29
+ */
30
+ className?: string;
31
+ /**
32
+ * Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
33
+ */
34
+ allowAllEmojis?: boolean;
35
+ /**
36
+ * Enable/Disable the button to be clickable (defaults to false)
37
+ */
38
+ disabled?: boolean;
39
+ /**
40
+ * Optional event handler when the emoji picker is opened
41
+ */
42
+ onOpen?: () => void;
43
+ /**
44
+ * Optional event handler when the emoji picker is clicked outside and closed
45
+ */
46
+ onCancel?: () => void;
47
+ /**
48
+ * Optional event handler when the custom emoji picker icon is selected
49
+ */
50
+ onShowMore?: () => void;
51
+ /**
52
+ * Optional emoji picker size to control the size of emoji picker
53
+ */
54
+ emojiPickerSize?: PickerSize;
55
+ }
56
+ /**
57
+ * Picker component for adding reactions
58
+ */
59
+ export declare const ReactionPicker: React.FC<ReactionPickerProps>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copied from ADS popup component with some tweeks for our use
3
+ */
4
+ import { FC } from 'react';
5
+ import { PopperChildrenProps } from '@atlaskit/popper';
6
+ export type RepositionOnUpdateProps = {
7
+ update: PopperChildrenProps['update'];
8
+ settings: {
9
+ isOpen: boolean;
10
+ showFullPicker: boolean;
11
+ };
12
+ };
13
+ export declare const RepositionOnUpdate: FC<RepositionOnUpdateProps>;
@@ -0,0 +1,2 @@
1
+ export { ReactionPicker, RENDER_REACTIONPICKER_TESTID } from './ReactionPicker';
2
+ export type { ReactionPickerProps } from './ReactionPicker';
@@ -0,0 +1,4 @@
1
+ export declare const pickerStyle: import("@emotion/react").SerializedStyles;
2
+ export declare const contentStyle: import("@emotion/react").SerializedStyles;
3
+ export declare const popupWrapperStyle: import("@emotion/react").SerializedStyles;
4
+ export declare const popupStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,34 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { ReactionSummary } from '../../types';
4
+ /**
5
+ * Test id for wrapper ReactionTooltip div
6
+ */
7
+ export declare const RENDER_REACTIONTOOLTIP_TESTID = "render-reactionTooltip";
8
+ export interface ReactionTooltipProps {
9
+ /**
10
+ * Optional name for the reaction emoji
11
+ */
12
+ emojiName?: string;
13
+ /**
14
+ * Info on the emoji reaction to render
15
+ */
16
+ reaction: ReactionSummary;
17
+ /**
18
+ * Optional Max users to show in the displayed tooltip (defaults to 5)
19
+ */
20
+ maxReactions?: number;
21
+ /**
22
+ * Optional function when the user wants to see more users in a modal
23
+ */
24
+ handleUserListClick?: (emojiId: string) => void;
25
+ /**
26
+ * Optional flag to show reactions dialog (defaults to false)
27
+ */
28
+ allowUserDialog?: boolean;
29
+ /**
30
+ * Optional flag for enabling tooltip (defaults to true)
31
+ */
32
+ isEnabled?: boolean;
33
+ }
34
+ export declare const ReactionTooltip: React.FC<ReactionTooltipProps>;
@@ -0,0 +1,2 @@
1
+ export { ReactionTooltip, RENDER_REACTIONTOOLTIP_TESTID, } from './ReactionTooltip';
2
+ export type { ReactionTooltipProps } from './ReactionTooltip';
@@ -0,0 +1,5 @@
1
+ export declare const verticalMargin = 5;
2
+ export declare const tooltipStyle: import("@emotion/react").SerializedStyles;
3
+ export declare const emojiNameStyle: import("@emotion/react").SerializedStyles;
4
+ export declare const footerStyle: import("@emotion/react").SerializedStyles;
5
+ export declare const underlineStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,96 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { OnCloseHandler } from '@atlaskit/modal-dialog';
5
+ import { onDialogSelectReactionChange, ReactionStatus, ReactionClick, ReactionSummary, QuickReactionEmojiSummary } from '../../types';
6
+ import { ReactionProps } from '../Reaction';
7
+ import { ReactionPickerProps } from '../ReactionPicker';
8
+ import { SelectorProps } from '../Selector';
9
+ /**
10
+ * Set of all available UFO experiences relating to reactions dialog
11
+ */
12
+ export declare const ufoExperiences: {
13
+ /**
14
+ * Expeirence when a reaction dialog is opened
15
+ */
16
+ openDialog: import("@atlaskit/ufo").UFOExperience;
17
+ /**
18
+ * Experience when a reaction dialog is closed
19
+ */
20
+ closeDialog: import("@atlaskit/ufo").UFOExperience;
21
+ /**
22
+ * Experience when a reaction changed/fetched from inside the modal dialog
23
+ */
24
+ selectedReactionChangeInsideDialog: import("@atlaskit/ufo").UFOExperience;
25
+ };
26
+ /**
27
+ * Test id for wrapper Reactions div
28
+ */
29
+ export declare const RENDER_REACTIONS_TESTID = "render-reactions";
30
+ /**
31
+ * Test id for the view all reacted user to trigger the dialog
32
+ */
33
+ export declare const RENDER_VIEWALL_REACTED_USERS_DIALOG = "viewall-reacted-users-dialog";
34
+ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode'>, Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Pick<ReactionProps, 'allowUserDialog'> {
35
+ /**
36
+ * event handler to fetching the reactions
37
+ */
38
+ loadReaction: () => void;
39
+ /**
40
+ * Event callback when an emoji button is selected
41
+ */
42
+ onSelection: (emojiId: string) => void;
43
+ /**
44
+ * Optional list of reactions to render (defaults to empty list)
45
+ */
46
+ reactions?: ReactionSummary[];
47
+ /**
48
+ * Condition for the reaction list status while being fetched
49
+ */
50
+ status: ReactionStatus;
51
+ /**
52
+ * event handler when the emoji button is clicked
53
+ */
54
+ onReactionClick: ReactionClick;
55
+ /**
56
+ * Optional emoji reactions list to show custom animation or render as standard (key => emoji string "id", value => true/false to show custom animation)
57
+ */
58
+ flash?: Record<string, boolean>;
59
+ /**
60
+ * Optional event to get reaction details for an emoji
61
+ * @param emojiId current reaction emoji id
62
+ */
63
+ getReactionDetails?: (emojiId: string) => void;
64
+ /**
65
+ * @deprecated use getReactionDetails instead
66
+ */
67
+ onReactionHover?: (emojiId: string) => void;
68
+ /**
69
+ * Optional error message to show when unable to display the reaction emoji
70
+ */
71
+ errorMessage?: string;
72
+ /**
73
+ * quickReactionEmojiIds are emojis that will be shown in the the primary view even if the reaction count is zero
74
+ */
75
+ quickReactionEmojis?: QuickReactionEmojiSummary;
76
+ /**
77
+ * Optional callback function called when opening reactions dialog
78
+ */
79
+ onDialogOpenCallback?: (emojiId: string, source?: string) => void;
80
+ /**
81
+ * Optional callback function called when closing reactions dialog
82
+ */
83
+ onDialogCloseCallback?: OnCloseHandler;
84
+ /**
85
+ * Optional callback function called when selecting a reaction in reactions dialog
86
+ */
87
+ onDialogSelectReactionCallback?: onDialogSelectReactionChange;
88
+ }
89
+ /**
90
+ * Get content of the tooltip
91
+ */
92
+ export declare function getTooltip(status: ReactionStatus, errorMessage?: string): string | jsx.JSX.Element | null;
93
+ /**
94
+ * Renders list of reactions
95
+ */
96
+ export declare const Reactions: React.FC<ReactionsProps>;
@@ -0,0 +1,2 @@
1
+ export { Reactions, RENDER_REACTIONS_TESTID } from './Reactions';
2
+ export type { ReactionsProps } from './Reactions';
@@ -0,0 +1,3 @@
1
+ export declare const reactionPickerStyle: import("@emotion/react").SerializedStyles;
2
+ export declare const seeWhoReacted: import("@emotion/react").SerializedStyles;
3
+ export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,34 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { EmojiId, OnEmojiEvent } from '@atlaskit/emoji/types';
4
+ import { EmojiProvider } from '@atlaskit/emoji/resource';
5
+ /**
6
+ * Test id for wrapper Selector div
7
+ */
8
+ export declare const RENDER_SELECTOR_TESTID = "render-selector";
9
+ export interface SelectorProps {
10
+ /**
11
+ * Provider for loading emojis
12
+ */
13
+ emojiProvider: Promise<EmojiProvider>;
14
+ /**
15
+ * Event handler when an emoji gets selected
16
+ */
17
+ onSelection: OnEmojiEvent;
18
+ /**
19
+ * Enable/Disable selection of extra custom emoji beyond default list (defaults to false)
20
+ */
21
+ showMore?: boolean;
22
+ /**
23
+ * Optional event when extra custom emojis icon is selected
24
+ */
25
+ onMoreClick?: React.MouseEventHandler<HTMLElement>;
26
+ /**
27
+ * Optional emojis shown for user to select from when the reaction add button is clicked (defaults to pre-defined list of emojis {@link constants.DefaultReactions})
28
+ */
29
+ pickerQuickReactionEmojiIds?: EmojiId[];
30
+ }
31
+ /**
32
+ * Reactions picker panel part of the <ReactionPicker /> component
33
+ */
34
+ export declare const Selector: React.FC<SelectorProps>;
@@ -0,0 +1,3 @@
1
+ export { Selector, RENDER_SELECTOR_TESTID } from './Selector';
2
+ export * as styles from './styles';
3
+ export type { SelectorProps } from './Selector';