@atlaskit/reactions 21.8.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/cjs/MockReactionsClient.js +24 -16
  3. package/dist/cjs/analytics/analytics.js +9 -1
  4. package/dist/cjs/analytics/ufo.js +24 -2
  5. package/dist/cjs/components/Counter/Counter.js +16 -20
  6. package/dist/cjs/components/Reaction/Reaction.js +52 -18
  7. package/dist/cjs/components/Reaction/styles.js +8 -1
  8. package/dist/cjs/components/ReactionDialog/ReactionView.js +121 -0
  9. package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +187 -0
  10. package/dist/cjs/components/ReactionDialog/ReactionsList.js +104 -0
  11. package/dist/cjs/components/ReactionDialog/index.js +13 -0
  12. package/dist/cjs/components/ReactionDialog/styles.js +202 -0
  13. package/dist/cjs/components/ReactionPicker/ReactionPicker.js +15 -20
  14. package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +26 -12
  15. package/dist/cjs/components/ReactionTooltip/styles.js +11 -2
  16. package/dist/cjs/components/Reactions/Reactions.js +166 -21
  17. package/dist/cjs/components/Reactions/styles.js +11 -6
  18. package/dist/cjs/components/Trigger/Trigger.js +1 -2
  19. package/dist/cjs/components/index.js +9 -1
  20. package/dist/cjs/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +6 -2
  21. package/dist/cjs/containers/ConnectedReactionsView/ConnectedReactionsView.js +9 -4
  22. package/dist/cjs/shared/constants.js +62 -10
  23. package/dist/cjs/shared/i18n.js +40 -0
  24. package/dist/cjs/shared/utils.js +60 -2
  25. package/dist/cjs/types/reaction.js +13 -1
  26. package/dist/cjs/version.json +1 -1
  27. package/dist/es2019/MockReactionsClient.js +22 -14
  28. package/dist/es2019/analytics/analytics.js +3 -0
  29. package/dist/es2019/analytics/ufo.js +19 -0
  30. package/dist/es2019/components/Counter/Counter.js +16 -15
  31. package/dist/es2019/components/Reaction/Reaction.js +43 -18
  32. package/dist/es2019/components/Reaction/styles.js +9 -2
  33. package/dist/es2019/components/ReactionDialog/ReactionView.js +69 -0
  34. package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +145 -0
  35. package/dist/es2019/components/ReactionDialog/ReactionsList.js +69 -0
  36. package/dist/es2019/components/ReactionDialog/index.js +1 -0
  37. package/dist/es2019/components/ReactionDialog/styles.js +169 -0
  38. package/dist/es2019/components/ReactionPicker/ReactionPicker.js +12 -20
  39. package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +22 -12
  40. package/dist/es2019/components/ReactionTooltip/styles.js +9 -1
  41. package/dist/es2019/components/Reactions/Reactions.js +146 -22
  42. package/dist/es2019/components/Reactions/styles.js +9 -5
  43. package/dist/es2019/components/Trigger/Trigger.js +1 -2
  44. package/dist/es2019/components/index.js +2 -1
  45. package/dist/es2019/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +8 -2
  46. package/dist/es2019/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -4
  47. package/dist/es2019/shared/constants.js +55 -6
  48. package/dist/es2019/shared/i18n.js +43 -0
  49. package/dist/es2019/shared/utils.js +51 -0
  50. package/dist/es2019/types/reaction.js +13 -1
  51. package/dist/es2019/version.json +1 -1
  52. package/dist/esm/MockReactionsClient.js +24 -13
  53. package/dist/esm/analytics/analytics.js +5 -0
  54. package/dist/esm/analytics/ufo.js +19 -0
  55. package/dist/esm/components/Counter/Counter.js +17 -17
  56. package/dist/esm/components/Reaction/Reaction.js +51 -19
  57. package/dist/esm/components/Reaction/styles.js +9 -2
  58. package/dist/esm/components/ReactionDialog/ReactionView.js +98 -0
  59. package/dist/esm/components/ReactionDialog/ReactionsDialog.js +161 -0
  60. package/dist/esm/components/ReactionDialog/ReactionsList.js +79 -0
  61. package/dist/esm/components/ReactionDialog/index.js +1 -0
  62. package/dist/esm/components/ReactionDialog/styles.js +177 -0
  63. package/dist/esm/components/ReactionPicker/ReactionPicker.js +15 -20
  64. package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +26 -12
  65. package/dist/esm/components/ReactionTooltip/styles.js +9 -1
  66. package/dist/esm/components/Reactions/Reactions.js +158 -22
  67. package/dist/esm/components/Reactions/styles.js +9 -5
  68. package/dist/esm/components/Trigger/Trigger.js +1 -2
  69. package/dist/esm/components/index.js +2 -1
  70. package/dist/esm/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +6 -2
  71. package/dist/esm/containers/ConnectedReactionsView/ConnectedReactionsView.js +8 -4
  72. package/dist/esm/shared/constants.js +57 -6
  73. package/dist/esm/shared/i18n.js +40 -0
  74. package/dist/esm/shared/utils.js +53 -0
  75. package/dist/esm/types/reaction.js +13 -1
  76. package/dist/esm/version.json +1 -1
  77. package/dist/types/MockReactionsClient.d.ts +7 -3
  78. package/dist/types/analytics/analytics.d.ts +10 -0
  79. package/dist/types/analytics/ufo.d.ts +18 -2
  80. package/dist/types/components/Counter/Counter.d.ts +0 -1
  81. package/dist/types/components/Reaction/Reaction.d.ts +11 -1
  82. package/dist/types/components/ReactionDialog/ReactionView.d.ts +19 -0
  83. package/dist/types/components/ReactionDialog/ReactionsDialog.d.ts +32 -0
  84. package/dist/types/components/ReactionDialog/ReactionsList.d.ts +23 -0
  85. package/dist/types/components/ReactionDialog/index.d.ts +1 -0
  86. package/dist/types/components/ReactionDialog/styles.d.ts +11 -0
  87. package/dist/types/components/ReactionPicker/ReactionPicker.d.ts +5 -0
  88. package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +12 -0
  89. package/dist/types/components/ReactionTooltip/styles.d.ts +1 -0
  90. package/dist/types/components/Reactions/Reactions.d.ts +45 -6
  91. package/dist/types/components/Reactions/styles.d.ts +1 -0
  92. package/dist/types/components/index.d.ts +1 -0
  93. package/dist/types/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +0 -4
  94. package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +2 -11
  95. package/dist/types/index.d.ts +1 -1
  96. package/dist/types/shared/constants.d.ts +11 -5
  97. package/dist/types/shared/i18n.d.ts +40 -0
  98. package/dist/types/shared/utils.d.ts +7 -0
  99. package/dist/types/types/User.d.ts +10 -0
  100. package/dist/types/types/index.d.ts +1 -1
  101. package/dist/types/types/reaction.d.ts +15 -2
  102. package/docs/0-intro.tsx +3 -0
  103. package/docs/5-graphql-support.tsx +153 -0
  104. package/package.json +11 -18
  105. package/dist/types-ts4.0/MockReactionsClient.d.ts +0 -23
  106. package/dist/types-ts4.0/analytics/analytics.d.ts +0 -102
  107. package/dist/types-ts4.0/analytics/constants.d.ts +0 -1
  108. package/dist/types-ts4.0/analytics/index.d.ts +0 -2
  109. package/dist/types-ts4.0/analytics/ufo.d.ts +0 -40
  110. package/dist/types-ts4.0/client/ReactionServiceClient.d.ts +0 -35
  111. package/dist/types-ts4.0/client/index.d.ts +0 -1
  112. package/dist/types-ts4.0/components/Counter/Counter.d.ts +0 -45
  113. package/dist/types-ts4.0/components/Counter/index.d.ts +0 -3
  114. package/dist/types-ts4.0/components/Counter/styles.d.ts +0 -3
  115. package/dist/types-ts4.0/components/EmojiButton/EmojiButton.d.ts +0 -22
  116. package/dist/types-ts4.0/components/EmojiButton/index.d.ts +0 -2
  117. package/dist/types-ts4.0/components/EmojiButton/styles.d.ts +0 -1
  118. package/dist/types-ts4.0/components/FlashAnimation/FlashAnimation.d.ts +0 -20
  119. package/dist/types-ts4.0/components/FlashAnimation/index.d.ts +0 -2
  120. package/dist/types-ts4.0/components/FlashAnimation/styles.d.ts +0 -5
  121. package/dist/types-ts4.0/components/Reaction/Reaction.d.ts +0 -38
  122. package/dist/types-ts4.0/components/Reaction/index.d.ts +0 -2
  123. package/dist/types-ts4.0/components/Reaction/styles.d.ts +0 -10
  124. package/dist/types-ts4.0/components/ReactionPicker/ReactionPicker.d.ts +0 -50
  125. package/dist/types-ts4.0/components/ReactionPicker/index.d.ts +0 -2
  126. package/dist/types-ts4.0/components/ReactionPicker/styles.d.ts +0 -3
  127. package/dist/types-ts4.0/components/ReactionTooltip/ReactionTooltip.d.ts +0 -22
  128. package/dist/types-ts4.0/components/ReactionTooltip/index.d.ts +0 -2
  129. package/dist/types-ts4.0/components/ReactionTooltip/styles.d.ts +0 -4
  130. package/dist/types-ts4.0/components/Reactions/Reactions.d.ts +0 -57
  131. package/dist/types-ts4.0/components/Reactions/index.d.ts +0 -2
  132. package/dist/types-ts4.0/components/Reactions/styles.d.ts +0 -2
  133. package/dist/types-ts4.0/components/Selector/Selector.d.ts +0 -34
  134. package/dist/types-ts4.0/components/Selector/index.d.ts +0 -3
  135. package/dist/types-ts4.0/components/Selector/styles.d.ts +0 -12
  136. package/dist/types-ts4.0/components/ShowMore/ShowMore.d.ts +0 -35
  137. package/dist/types-ts4.0/components/ShowMore/index.d.ts +0 -2
  138. package/dist/types-ts4.0/components/ShowMore/styles.d.ts +0 -3
  139. package/dist/types-ts4.0/components/Trigger/Trigger.d.ts +0 -35
  140. package/dist/types-ts4.0/components/Trigger/index.d.ts +0 -2
  141. package/dist/types-ts4.0/components/Trigger/styles.d.ts +0 -5
  142. package/dist/types-ts4.0/components/UfoErrorBoundary/UfoErrorBoundary.d.ts +0 -16
  143. package/dist/types-ts4.0/components/UfoErrorBoundary/index.d.ts +0 -2
  144. package/dist/types-ts4.0/components/index.d.ts +0 -8
  145. package/dist/types-ts4.0/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +0 -27
  146. package/dist/types-ts4.0/containers/ConnectedReactionPicker/index.d.ts +0 -2
  147. package/dist/types-ts4.0/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +0 -52
  148. package/dist/types-ts4.0/containers/ConnectedReactionsView/index.d.ts +0 -2
  149. package/dist/types-ts4.0/containers/index.d.ts +0 -2
  150. package/dist/types-ts4.0/hooks/index.d.ts +0 -1
  151. package/dist/types-ts4.0/hooks/useClickAway.d.ts +0 -9
  152. package/dist/types-ts4.0/i18n/cs.d.ts +0 -13
  153. package/dist/types-ts4.0/i18n/da.d.ts +0 -13
  154. package/dist/types-ts4.0/i18n/de.d.ts +0 -13
  155. package/dist/types-ts4.0/i18n/en.d.ts +0 -7
  156. package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -7
  157. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -13
  158. package/dist/types-ts4.0/i18n/es.d.ts +0 -13
  159. package/dist/types-ts4.0/i18n/et.d.ts +0 -12
  160. package/dist/types-ts4.0/i18n/fi.d.ts +0 -13
  161. package/dist/types-ts4.0/i18n/fr.d.ts +0 -13
  162. package/dist/types-ts4.0/i18n/hu.d.ts +0 -13
  163. package/dist/types-ts4.0/i18n/index.d.ts +0 -35
  164. package/dist/types-ts4.0/i18n/is.d.ts +0 -6
  165. package/dist/types-ts4.0/i18n/it.d.ts +0 -13
  166. package/dist/types-ts4.0/i18n/ja.d.ts +0 -13
  167. package/dist/types-ts4.0/i18n/ko.d.ts +0 -13
  168. package/dist/types-ts4.0/i18n/languages.d.ts +0 -27
  169. package/dist/types-ts4.0/i18n/nb.d.ts +0 -13
  170. package/dist/types-ts4.0/i18n/nl.d.ts +0 -13
  171. package/dist/types-ts4.0/i18n/pl.d.ts +0 -13
  172. package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -13
  173. package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -12
  174. package/dist/types-ts4.0/i18n/ro.d.ts +0 -6
  175. package/dist/types-ts4.0/i18n/ru.d.ts +0 -13
  176. package/dist/types-ts4.0/i18n/sk.d.ts +0 -12
  177. package/dist/types-ts4.0/i18n/sv.d.ts +0 -13
  178. package/dist/types-ts4.0/i18n/th.d.ts +0 -13
  179. package/dist/types-ts4.0/i18n/tr.d.ts +0 -13
  180. package/dist/types-ts4.0/i18n/uk.d.ts +0 -13
  181. package/dist/types-ts4.0/i18n/vi.d.ts +0 -13
  182. package/dist/types-ts4.0/i18n/zh.d.ts +0 -13
  183. package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -13
  184. package/dist/types-ts4.0/index.d.ts +0 -7
  185. package/dist/types-ts4.0/shared/constants.d.ts +0 -21
  186. package/dist/types-ts4.0/shared/i18n.d.ts +0 -32
  187. package/dist/types-ts4.0/shared/index.d.ts +0 -3
  188. package/dist/types-ts4.0/shared/utils.d.ts +0 -11
  189. package/dist/types-ts4.0/store/MemoryReactionsStore.d.ts +0 -94
  190. package/dist/types-ts4.0/store/ReactionConsumer.d.ts +0 -57
  191. package/dist/types-ts4.0/store/batched.d.ts +0 -2
  192. package/dist/types-ts4.0/store/index.d.ts +0 -3
  193. package/dist/types-ts4.0/store/utils.d.ts +0 -11
  194. package/dist/types-ts4.0/types/Actions.d.ts +0 -27
  195. package/dist/types-ts4.0/types/Updater.d.ts +0 -1
  196. package/dist/types-ts4.0/types/User.d.ts +0 -10
  197. package/dist/types-ts4.0/types/client.d.ts +0 -38
  198. package/dist/types-ts4.0/types/index.d.ts +0 -7
  199. package/dist/types-ts4.0/types/reaction.d.ts +0 -100
  200. package/dist/types-ts4.0/types/store.d.ts +0 -63
@@ -1,27 +0,0 @@
1
- declare const _default: {
2
- zh: string;
3
- cs: string;
4
- da: string;
5
- nl: string;
6
- en: string;
7
- en_GB: string;
8
- et: string;
9
- fi: string;
10
- fr: string;
11
- de: string;
12
- hu: string;
13
- is: string;
14
- it: string;
15
- ja: string;
16
- ko: string;
17
- nb: string;
18
- pl: string;
19
- pt_BR: string;
20
- pt_PT: string;
21
- ro: string;
22
- ru: string;
23
- sk: string;
24
- es: string;
25
- sv: string;
26
- };
27
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,12 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- };
6
- /**
7
- * NOTE:
8
- *
9
- * This file is automatically generated by Traduki 2.0.
10
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
11
- */
12
- export default _default;
@@ -1,6 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.loading': string;
3
- 'fabric.reactions.more.emoji': string;
4
- 'fabric.reactions.error.unexpected': string;
5
- };
6
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,12 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- };
6
- /**
7
- * NOTE:
8
- *
9
- * This file is automatically generated by Traduki 2.0.
10
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
11
- */
12
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- 'fabric.reactions.error.unexpected': string;
3
- 'fabric.reactions.loading': string;
4
- 'fabric.reactions.more.emoji': string;
5
- 'fabric.reactions.other.reacted.users': string;
6
- };
7
- /**
8
- * NOTE:
9
- *
10
- * This file is automatically generated by Traduki 2.0.
11
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
12
- */
13
- export default _default;
@@ -1,7 +0,0 @@
1
- export { UFO } from './analytics';
2
- export { ReactionServiceClient } from './client';
3
- export type { Client as ReactionClient, Request as ReactionRequest, Store as ReactionsStore, StorePropInput, State, } from './types';
4
- export { constants } from './shared';
5
- export { Reaction, ReactionPicker, Reactions } from './components';
6
- export { ConnectedReactionPicker, ConnectedReactionsView } from './containers';
7
- export { MemoryReactionsStore, ReactionConsumer } from './store';
@@ -1,21 +0,0 @@
1
- import { EmojiId } from '@atlaskit/emoji/types';
2
- /**
3
- * Initial list of emoji to pick from
4
- */
5
- export declare const DefaultReactions: EmojiId[];
6
- /**
7
- * Default label to show for the overLimitLabel prop
8
- */
9
- export declare const DEFAULT_OVER_THE_LIMIT_REACTION_LABEL = "1k+";
10
- /**
11
- * Default maximum value to use when the emoji received higher than top limit reactions
12
- */
13
- export declare const DEFAULT_REACTION_TOP_LIMIT = 1000;
14
- /**
15
- * ES6 Map object from default emoji reactions (with key => shortName, value => entire emoji item)
16
- */
17
- export declare const DefaultReactionsByShortName: Map<string, EmojiId>;
18
- /**
19
- * Maximum number of users to show in the tooltip for an emoji reaction
20
- */
21
- export declare const TOOLTIP_USERS_LIMIT = 5;
@@ -1,32 +0,0 @@
1
- export declare const messages: {
2
- addReaction: {
3
- id: string;
4
- defaultMessage: string;
5
- description: string;
6
- };
7
- loadingReactions: {
8
- id: string;
9
- defaultMessage: string;
10
- description: string;
11
- };
12
- moreEmoji: {
13
- id: string;
14
- defaultMessage: string;
15
- description: string;
16
- };
17
- reactWithEmoji: {
18
- id: string;
19
- defaultMessage: string;
20
- description: string;
21
- };
22
- unexpectedError: {
23
- id: string;
24
- defaultMessage: string;
25
- description: string;
26
- };
27
- otherUsers: {
28
- id: string;
29
- defaultMessage: string;
30
- description: string;
31
- };
32
- };
@@ -1,3 +0,0 @@
1
- export * as constants from './constants';
2
- export * as utils from './utils';
3
- export * as i18n from './i18n';
@@ -1,11 +0,0 @@
1
- import { EmojiId } from '@atlaskit/emoji/types';
2
- /**
3
- * Is selected mouse event a left click
4
- * @param event event data
5
- */
6
- export declare const isLeftClick: (event: React.MouseEvent<HTMLElement>) => boolean;
7
- /**
8
- * Does provided item part of the default emoji ids
9
- * @param item selected emoji item
10
- */
11
- export declare const isDefaultReaction: (item: EmojiId) => boolean;
@@ -1,94 +0,0 @@
1
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
- import * as Types from '../types';
3
- /**
4
- * Set of all available UFO experiences relating to reaction element
5
- */
6
- export declare const ufoExperiences: {
7
- /**
8
- * Experience when a reaction emoji gets added
9
- */
10
- add: import("@atlaskit/ufo").ConcurrentExperience;
11
- /**
12
- * Experience when a reaction emoji gets removed/decrement
13
- */
14
- remove: import("@atlaskit/ufo").ConcurrentExperience;
15
- /**
16
- * Experience when the list of reactions gets rendered with sampling
17
- */
18
- render: (instanceId: string) => import("@atlaskit/emoji").WithSamplingUFOExperience;
19
- /**
20
- * Experience when a reaction details gets fetched
21
- */
22
- fetchDetails: import("@atlaskit/ufo").ConcurrentExperience;
23
- };
24
- /**
25
- * Optional metadata information in the store used in sending the API client requests
26
- */
27
- interface StoreMetadata {
28
- subproduct?: string;
29
- [k: string]: any;
30
- }
31
- export declare class MemoryReactionsStore implements Types.Store {
32
- private client;
33
- private state;
34
- private metadata;
35
- private callbacks;
36
- private createAnalyticsEvent?;
37
- /**
38
- * default initial store data
39
- */
40
- private initialState;
41
- constructor(client: Types.Client, state?: Types.State, metadata?: StoreMetadata);
42
- /**
43
- * Update the store state data with a new data
44
- * @param newState new store data
45
- */
46
- private setState;
47
- /**
48
- * Calls any onChange callbacks in the store using latest state data.
49
- */
50
- private triggerOnChange;
51
- private setReactions;
52
- private getReactionsState;
53
- private handleDetailedReactionResponse;
54
- private setFlash;
55
- private flash;
56
- private optmisticUpdate;
57
- /**
58
- * Utility function to help execute a callback to Reaction if its state is ready.
59
- *
60
- *
61
- * @param containerAri
62
- * @param ari
63
- *
64
- * @returns (updater: Updater<ReactionsReadyState>) => ReactionsState?
65
- * A function that will execute the received callback with the ReactionsState if
66
- * ready. If some state is returned, the new state will be applied.
67
- */
68
- private withReadyReaction;
69
- /**
70
- * Utility function to help execute actions with a reaction. It handles reaction discovery
71
- * and branching between reacted and not reacted.
72
- *
73
- * @param reactedCallback callback that will be executed when the user has already reacted
74
- * with the emoji
75
- * @param notReactedCallback callback that will be executed when the user hasn't reacted
76
- * with the emoji
77
- *
78
- * @returns (containerAri: string, ari: string, emojiId: string) => ReactionsState?
79
- * A function that will execute the correct callback to the triple containerAri, ari and
80
- * emojiId. If some state is returned, the new state will be applied.
81
- */
82
- private withReaction;
83
- private doAddReaction;
84
- private doRemoveReaction;
85
- setCreateAnalyticsEvent: (createAnalyticsEvent?: CreateUIAnalyticsEvent | undefined) => void;
86
- getReactions: (key: string, ...args: string[]) => void;
87
- toggleReaction: (containerAri: string, ari: string, emojiId: string) => void;
88
- addReaction: (containerAri: string, ari: string, emojiId: string) => void;
89
- getDetailedReaction: (containerAri: string, ari: string, emojiId: string) => void;
90
- getState: () => Types.State;
91
- onChange: (callback: Types.OnChangeCallback) => void;
92
- removeOnChangeListener: (toRemove: Types.OnChangeCallback) => void;
93
- }
94
- export {};
@@ -1,57 +0,0 @@
1
- import React from 'react';
2
- import { Actions, State, StorePropInput, Store } from '../types';
3
- /**
4
- * Props type for the ReactionConsumer class component
5
- */
6
- export declare type ReactioConsumerProps<PropsFromState, PropsFromActions> = {
7
- /**
8
- * Return a plain object containing the data that the connected component needs
9
- */
10
- mapStateToProps?: (state: State) => PropsFromState;
11
- /**
12
- * Specify which actions the child component might need to dispatch from its props
13
- */
14
- mapActionsToProps?: (actions: Actions) => PropsFromActions;
15
- /**
16
- * Component to render
17
- */
18
- children: (props: PropsFromState & PropsFromActions) => React.ReactNode;
19
- /**
20
- * Reference to the store.
21
- * @remarks
22
- * 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)
23
- */
24
- store: StorePropInput;
25
- };
26
- /**
27
- * State type for the ReactionConsumer class component
28
- */
29
- export declare type ReactionConsumerState = {
30
- store?: Store;
31
- };
32
- /**
33
- * A custom mapper class that takes the store instance and mapper functions "mapStateToProps" and "mapActionsToProps" to return the renderProps pattern as a child component
34
- * @deprecated please avoid using this class as it will be removed in a future release
35
- */
36
- export declare class ReactionConsumer<PropsFromState, PropsFromActions> extends React.PureComponent<ReactioConsumerProps<PropsFromState, PropsFromActions>, ReactionConsumerState> {
37
- private previousActions;
38
- private propsFromActions;
39
- constructor(props: ReactioConsumerProps<PropsFromState, PropsFromActions>);
40
- componentDidMount(): void;
41
- componentWillUnmount(): Promise<void>;
42
- /**
43
- * Get the actions the child component might need to dispatch from its props
44
- */
45
- private getPropsFromActions;
46
- /**
47
- *
48
- * @param state Internal state data
49
- * @returns object containing the data that the connected component needs
50
- */
51
- private getPropsFromState;
52
- /**
53
- *
54
- */
55
- private handleOnChange;
56
- render(): React.ReactNode;
57
- }
@@ -1,2 +0,0 @@
1
- export declare function batch<T>(callback: (args: T[][]) => void): (...args: T[]) => void;
2
- export declare function batchByKey<T>(callback: (key: string, args: T[][]) => void): (key: string, ...args: T[]) => void;
@@ -1,3 +0,0 @@
1
- export { ReactionConsumer } from './ReactionConsumer';
2
- export type { ReactioConsumerProps } from './ReactionConsumer';
3
- export { MemoryReactionsStore, ufoExperiences } from './MemoryReactionsStore';
@@ -1,11 +0,0 @@
1
- import { Updater, ReactionsReadyState, ReactionSummary } from '../types';
2
- declare type ReactionSummarySortFunction = (a: ReactionSummary, b: ReactionSummary) => number;
3
- export declare const readyState: (reactions: ReactionSummary[]) => ReactionsReadyState;
4
- export declare const byEmojiId: (emojiId: string) => (reaction: ReactionSummary) => boolean;
5
- export declare const addOne: (reaction: ReactionSummary) => ReactionSummary;
6
- export declare const removeOne: (reaction: ReactionSummary) => ReactionSummary;
7
- export declare const updateByEmojiId: (emojiId: string, updater: Updater<ReactionSummary> | ReactionSummary) => (reaction: ReactionSummary) => void | ReactionSummary;
8
- export declare const getReactionsSortFunction: (reactions?: ReactionSummary[] | undefined) => ReactionSummarySortFunction;
9
- export declare const flattenAris: (a: string[], b: string[]) => string[];
10
- export declare function isRealErrorFromService(errorCode?: number): boolean;
11
- export {};
@@ -1,27 +0,0 @@
1
- /**
2
- * Event callback by the client to the API
3
- * @param containerAri the container for reactions/ari in the page (attached to the "quickReactionEmojis" prop)
4
- * @param ariunique Atlassian identifier for an emoji (attached to the "quickReactionEmojis" prop)
5
- * @param emojiId unique identifier guid for the emoji
6
- */
7
- export declare type ReactionAction = (containerAri: string, ari: string, emojiId: string) => void;
8
- export declare type Actions = {
9
- /**
10
- * Retrieve reaction collection api
11
- * @param containerId the container for reactions/ari in the page
12
- * @param aris collection of Asset ids in the container
13
- */
14
- getReactions: (containerId: string, aris: string) => void;
15
- /**
16
- * Select/deselect a rection callback
17
- */
18
- toggleReaction: ReactionAction;
19
- /**
20
- * Add a new reation api
21
- */
22
- addReaction: ReactionAction;
23
- /**
24
- * Hover an existing reaction emoji api
25
- */
26
- getDetailedReaction: ReactionAction;
27
- };
@@ -1 +0,0 @@
1
- export declare type Updater<T> = (original: T) => T | void;
@@ -1,10 +0,0 @@
1
- export interface User {
2
- /**
3
- * user id in system
4
- */
5
- id: string;
6
- /**
7
- * name of user clicked on the reaction
8
- */
9
- displayName: string;
10
- }
@@ -1,38 +0,0 @@
1
- import { Reactions, ReactionSummary } from './reaction';
2
- export declare type Request<T> = (
3
- /**
4
- * Reaction Asset id in the container
5
- */
6
- ari: string,
7
- /**
8
- * the container for reactions/ari
9
- */
10
- containerAri: string,
11
- /**
12
- * unique Atlassian identifier for an emoji
13
- */
14
- emojiId: string,
15
- /**
16
- * Optional metadata information used in the API request
17
- */
18
- metadata?: Record<string, any>) => Promise<T>;
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
- /**
31
- * Fetch request when adding a reaction to a container.
32
- */
33
- addReaction: Request<ReactionSummary[]>;
34
- /**
35
- * Fetch request when removing a reaction from a container.
36
- */
37
- deleteReaction: Request<ReactionSummary[]>;
38
- }
@@ -1,7 +0,0 @@
1
- export type { ReactionAction, Actions } from './Actions';
2
- export { ReactionStatus } from './reaction';
3
- export type { ReactionSource, ReactionsError, ReactionsLoading, ReactionsReadyState, ReactionsState, ReactionSummary, QuickReactionEmojiSummary, ReactionsNotLoaded, Reactions, ReactionClick, ReactionMouseEnter, } from './reaction';
4
- export type { Client, Request } from './client';
5
- export type { Updater } from './Updater';
6
- export type { User } from './User';
7
- export type { Store, StorePropInput, State, OnChangeCallback } from './store';