@atlaskit/reactions 34.4.11 → 34.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/ConnectedReactionPicker/package.json +1 -8
  3. package/ConnectedReactionsView/package.json +1 -8
  4. package/MemoryReactionsStore/package.json +1 -8
  5. package/MockReactionsClient/package.json +1 -8
  6. package/Reaction/package.json +1 -8
  7. package/ReactionConsumer/package.json +1 -8
  8. package/ReactionPicker/package.json +1 -8
  9. package/ReactionServiceClient/package.json +1 -8
  10. package/Reactions/package.json +1 -8
  11. package/dist/cjs/analytics/index.js +1 -1
  12. package/dist/cjs/components/Selector.js +17 -6
  13. package/dist/cjs/shared/constants.js +28 -1
  14. package/dist/es2019/analytics/index.js +1 -1
  15. package/dist/es2019/components/Selector.js +15 -7
  16. package/dist/es2019/shared/constants.js +24 -0
  17. package/dist/esm/analytics/index.js +1 -1
  18. package/dist/esm/components/Selector.js +19 -8
  19. package/dist/esm/shared/constants.js +27 -0
  20. package/dist/types/MockReactionsClient.d.ts +1 -1
  21. package/dist/types/index.d.ts +1 -1
  22. package/dist/types/shared/constants.d.ts +5 -0
  23. package/package.json +2 -2
  24. package/reaction/package.json +1 -8
  25. package/store/package.json +1 -8
  26. package/types/package.json +1 -8
  27. package/useCloseManager/package.json +1 -8
  28. package/dist/types-ts4.5/MockReactionsClient.d.ts +0 -27
  29. package/dist/types-ts4.5/analytics/index.d.ts +0 -121
  30. package/dist/types-ts4.5/client/ReactionServiceClient.d.ts +0 -35
  31. package/dist/types-ts4.5/client/index.d.ts +0 -1
  32. package/dist/types-ts4.5/components/Counter.d.ts +0 -51
  33. package/dist/types-ts4.5/components/EmojiButton.d.ts +0 -24
  34. package/dist/types-ts4.5/components/FlashAnimation.d.ts +0 -23
  35. package/dist/types-ts4.5/components/Reaction.d.ts +0 -67
  36. package/dist/types-ts4.5/components/ReactionButton.d.ts +0 -22
  37. package/dist/types-ts4.5/components/ReactionParticleEffect.d.ts +0 -22
  38. package/dist/types-ts4.5/components/ReactionPicker.d.ts +0 -119
  39. package/dist/types-ts4.5/components/ReactionSummaryButton.d.ts +0 -61
  40. package/dist/types-ts4.5/components/ReactionSummaryView.d.ts +0 -81
  41. package/dist/types-ts4.5/components/ReactionTooltip.d.ts +0 -43
  42. package/dist/types-ts4.5/components/ReactionView.d.ts +0 -12
  43. package/dist/types-ts4.5/components/Reactions.d.ts +0 -206
  44. package/dist/types-ts4.5/components/ReactionsDialog.d.ts +0 -32
  45. package/dist/types-ts4.5/components/ReactionsDialogHeader.d.ts +0 -15
  46. package/dist/types-ts4.5/components/ReactionsDialogTrigger.d.ts +0 -5
  47. package/dist/types-ts4.5/components/ReactionsList.d.ts +0 -20
  48. package/dist/types-ts4.5/components/RepositionOnUpdate.d.ts +0 -13
  49. package/dist/types-ts4.5/components/Selector.d.ts +0 -36
  50. package/dist/types-ts4.5/components/ShowMore.d.ts +0 -15
  51. package/dist/types-ts4.5/components/StaticReaction.d.ts +0 -11
  52. package/dist/types-ts4.5/components/Trigger.d.ts +0 -83
  53. package/dist/types-ts4.5/components/UfoErrorBoundary.d.ts +0 -17
  54. package/dist/types-ts4.5/components/index.d.ts +0 -9
  55. package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +0 -23
  56. package/dist/types-ts4.5/containers/ConnectedReactionPicker/index.d.ts +0 -2
  57. package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +0 -56
  58. package/dist/types-ts4.5/containers/ConnectedReactionsView/index.d.ts +0 -2
  59. package/dist/types-ts4.5/containers/index.d.ts +0 -2
  60. package/dist/types-ts4.5/hooks/useCloseManager.d.ts +0 -20
  61. package/dist/types-ts4.5/hooks/useDelayedState.d.ts +0 -6
  62. package/dist/types-ts4.5/hooks/useFocusTrap.d.ts +0 -5
  63. package/dist/types-ts4.5/i18n/cs.d.ts +0 -27
  64. package/dist/types-ts4.5/i18n/da.d.ts +0 -27
  65. package/dist/types-ts4.5/i18n/de.d.ts +0 -26
  66. package/dist/types-ts4.5/i18n/en.d.ts +0 -27
  67. package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -27
  68. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -27
  69. package/dist/types-ts4.5/i18n/es.d.ts +0 -27
  70. package/dist/types-ts4.5/i18n/et.d.ts +0 -11
  71. package/dist/types-ts4.5/i18n/fi.d.ts +0 -26
  72. package/dist/types-ts4.5/i18n/fr.d.ts +0 -27
  73. package/dist/types-ts4.5/i18n/hu.d.ts +0 -27
  74. package/dist/types-ts4.5/i18n/index.d.ts +0 -37
  75. package/dist/types-ts4.5/i18n/is.d.ts +0 -6
  76. package/dist/types-ts4.5/i18n/it.d.ts +0 -27
  77. package/dist/types-ts4.5/i18n/ja.d.ts +0 -27
  78. package/dist/types-ts4.5/i18n/ko.d.ts +0 -26
  79. package/dist/types-ts4.5/i18n/languages.d.ts +0 -28
  80. package/dist/types-ts4.5/i18n/nb.d.ts +0 -26
  81. package/dist/types-ts4.5/i18n/nl.d.ts +0 -27
  82. package/dist/types-ts4.5/i18n/pl.d.ts +0 -27
  83. package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -27
  84. package/dist/types-ts4.5/i18n/pt_PT.d.ts +0 -11
  85. package/dist/types-ts4.5/i18n/ro.d.ts +0 -6
  86. package/dist/types-ts4.5/i18n/ru.d.ts +0 -26
  87. package/dist/types-ts4.5/i18n/sk.d.ts +0 -11
  88. package/dist/types-ts4.5/i18n/sv.d.ts +0 -27
  89. package/dist/types-ts4.5/i18n/th.d.ts +0 -27
  90. package/dist/types-ts4.5/i18n/tr.d.ts +0 -27
  91. package/dist/types-ts4.5/i18n/uk.d.ts +0 -27
  92. package/dist/types-ts4.5/i18n/vi.d.ts +0 -27
  93. package/dist/types-ts4.5/i18n/zh.d.ts +0 -27
  94. package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -26
  95. package/dist/types-ts4.5/index.d.ts +0 -34
  96. package/dist/types-ts4.5/shared/constants.d.ts +0 -29
  97. package/dist/types-ts4.5/shared/i18n.d.ts +0 -87
  98. package/dist/types-ts4.5/shared/utils.d.ts +0 -18
  99. package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +0 -99
  100. package/dist/types-ts4.5/store/ReactionConsumer.d.ts +0 -57
  101. package/dist/types-ts4.5/store/batched.d.ts +0 -2
  102. package/dist/types-ts4.5/store/index.d.ts +0 -3
  103. package/dist/types-ts4.5/store/utils.d.ts +0 -11
  104. package/dist/types-ts4.5/types/Actions.d.ts +0 -28
  105. package/dist/types-ts4.5/types/Updater.d.ts +0 -2
  106. package/dist/types-ts4.5/types/User.d.ts +0 -21
  107. package/dist/types-ts4.5/types/client.d.ts +0 -38
  108. package/dist/types-ts4.5/types/index.d.ts +0 -25
  109. package/dist/types-ts4.5/types/reaction.d.ts +0 -117
  110. package/dist/types-ts4.5/types/store.d.ts +0 -71
  111. package/dist/types-ts4.5/ufo/index.d.ts +0 -54
@@ -1,117 +0,0 @@
1
- import { type User } from './User';
2
- /**
3
- * Collection of reactions as object (key is unique id from containerAri and ari combined)
4
- */
5
- export type Reactions = Record<string, ReactionSummary[]>;
6
- /**
7
- * MetaData for Reaction object
8
- */
9
- export interface ReactionSummary {
10
- /**
11
- * Reaction Asset id in the container
12
- */
13
- ari: string;
14
- /**
15
- * the container for reactions/ari in the page
16
- */
17
- containerAri: string;
18
- /**
19
- * Number of selected count for the emoji
20
- */
21
- count: number;
22
- /**
23
- * unique Atlassian identifier for an emoji
24
- */
25
- emojiId: string;
26
- /**
27
- * @deprecated Legacy content Not in use anymore
28
- */
29
- optimisticallyUpdated?: boolean;
30
- /**
31
- * Has the current user selected the emoji or not
32
- */
33
- reacted: boolean;
34
- /**
35
- * Users collection
36
- */
37
- users?: User[];
38
- }
39
- /**
40
- * Metadata for composing a summary of emojis that will be shown in the the primary view even if the reaction count is zero
41
- */
42
- export interface QuickReactionEmojiSummary {
43
- /**
44
- * unique Atlassian identifier for an emoji (attached to the "emojiIds" when forming {@link ReactionSummary} object)
45
- */
46
- ari: string;
47
- /**
48
- * unique Atlassian identifier for the container grouping reactions/ari in the page (attached to the "emojiIds" when forming {@link ReactionSummary} object)
49
- */
50
- containerAri: string;
51
- /**
52
- * emoji ids collection that will be shown in the the primary view even if the reaction count is zero
53
- */
54
- emojiIds: string[];
55
- }
56
- /**
57
- * Event handler for when the user clicks on the reaction
58
- * @param id give id for the emoji
59
- * @param event selected mouse event proerties
60
- */
61
- export type ReactionClick = (id: string, event: React.MouseEvent<HTMLButtonElement>) => void;
62
- /**
63
- * Event handler for when the user hovers with the mouse on the reaction
64
- * @param emojiId id of emoji
65
- * @param event (Optional) custom DOM event handler callback
66
- */
67
- export type ReactionMouseEnter = (emojiId: string, event?: React.MouseEvent<any>) => void;
68
- /**
69
- * Event handler for when the user focused on the reaction
70
- * @param emojiId id of emoji
71
- * @param event (Optional) custom DOM event handler callback
72
- */
73
- export type ReactionFocused = (emojiId: string, event?: React.FocusEvent<any>) => void;
74
- export declare enum ReactionUpdateType {
75
- added = "added",
76
- removed = "removed"
77
- }
78
- /**
79
- * Event handler that is invoked when a reaction update is successful.
80
- *
81
- * @param {ReactionUpdateType} action - The action performed on the reaction.
82
- * @param ari - The ARI (Atlassian Resource Identifier) of the entity.
83
- * @param emojiId - The ID of the emoji used in the reaction.
84
- */
85
- export type ReactionUpdateSuccess = (action: ReactionUpdateType, ari: string, emojiId: string, count: number) => void;
86
- /**
87
- * Condition of the reaction when gets loaded from the store
88
- */
89
- export declare enum ReactionStatus {
90
- ready = "READY",
91
- loading = "LOADING",
92
- error = "ERROR",
93
- notLoaded = "NOT_LOADED",
94
- disabled = "DISABLED"
95
- }
96
- /**
97
- * state in which the reaction is at
98
- */
99
- export type ReactionsState = ReactionsNotLoaded | ReactionsLoading | ReactionsReadyState | ReactionsError;
100
- export type ReactionsReadyState = {
101
- readonly reactions: ReactionSummary[];
102
- readonly status: ReactionStatus.ready;
103
- };
104
- export type ReactionsLoading = {
105
- readonly status: ReactionStatus.loading;
106
- };
107
- export type ReactionsError = {
108
- readonly message: string;
109
- readonly status: ReactionStatus.error;
110
- };
111
- export type ReactionsNotLoaded = {
112
- readonly status: ReactionStatus.notLoaded;
113
- };
114
- /**
115
- * Source where the emoji selected from ("quickSelector" -> default list, "emojiPicker" -> custom emoji list)
116
- */
117
- export type ReactionSource = 'quickSelector' | 'emojiPicker';
@@ -1,71 +0,0 @@
1
- import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
- import { type Actions } from './Actions';
3
- import { type ReactionsState } from './reaction';
4
- /**
5
- * Callback event when changes apply to the main store
6
- * @param state latest store state
7
- */
8
- export type OnChangeCallback = (state: State) => void;
9
- /**
10
- * Map of state props
11
- */
12
- export interface StoreProps {
13
- /**
14
- * Get current state of the stor
15
- */
16
- getState: () => State;
17
- /**
18
- * Register a callbsack event on change to the store instance state data
19
- * @param callback event to register
20
- * @deprecated initially implemented by the MemoryReactionsStore class and kept. This will be removed in a future release
21
- */
22
- onChange: (callback: OnChangeCallback) => void;
23
- /**
24
- * Deregister any callback event on changes to the store instance state data
25
- * @param callback event to de-register
26
- * @deprecated initially implemented by the MemoryReactionsStore class and kept. This will be removed in a future release
27
- */
28
- removeOnChangeListener: (callback: OnChangeCallback) => void;
29
- /**
30
- * Add Atlaskit analytics events to different operations in the store
31
- * @param createAnalyticsEvent analytics event trigger
32
- * @deprecated initially implemented by the MemoryReactionsStore class and kept. This will be removed in a future release
33
- */
34
- setCreateAnalyticsEvent?: (createAnalyticsEvent: CreateUIAnalyticsEvent) => void;
35
- }
36
- /**
37
- * General Interface for a reaction store
38
- */
39
- export interface Store extends Actions, StoreProps {
40
- }
41
- /**
42
- * the "store" prop option to the connected view and picker components
43
- */
44
- export type StorePropInput = Store | Promise<Store>;
45
- /**
46
- * store main structure
47
- */
48
- export type State = {
49
- /**
50
- * custom animation for given emojis as true|false (key => unique reaction id, value => collection of emojiIds and true|false to apply custom animation)
51
- */
52
- flash: {
53
- [key: string]: {
54
- [emojiId: string]: boolean;
55
- };
56
- };
57
- /**
58
- * floating reactions for given emojis as true|false (key => unique id, value => collection of emojiIds and true|false to apply floating animation)
59
- */
60
- particleEffectByEmoji: {
61
- [key: string]: {
62
- [emojiId: string]: boolean;
63
- };
64
- };
65
- /**
66
- * collection of the different reactions (key => unique reaction id , value => state of the reaction)
67
- */
68
- reactions: {
69
- [key: string]: ReactionsState;
70
- };
71
- };
@@ -1,54 +0,0 @@
1
- import { ConcurrentExperience, UFOExperience } from '@atlaskit/ufo';
2
- import { type WithSamplingUFOExperience } from '@atlaskit/emoji';
3
- /**
4
- * Types of experiences
5
- */
6
- export declare enum ExperienceName {
7
- REACTIONS_RENDERED = "reactions-rendered",
8
- PICKER_OPENED = "reactions-picker-opened",
9
- REACTION_ADDED = "reaction-added",
10
- REACTION_REMOVED = "reaction-removed",
11
- REACTION_DETAILS_FETCHED = "reaction-details-fetched",
12
- REACTION_DIALOG_OPENED = "reaction-dialog-opened",
13
- REACTION_DIALOG_CLOSED = "reaction-dialog-closed",
14
- REACTION_DIALOG_SELECTED_REACTION_CHANGED = "reaction-dialog-selected-reaction-changed",
15
- REACTION_DIALOG_PAGE_NAVIGATION = "reaction-dialog-page-navigation"
16
- }
17
- /**
18
- * UFO types of components been instrumented
19
- */
20
- export declare enum ComponentName {
21
- PICKER_RENDERED = "reactions-picker",
22
- REACTIONS = "reactions-list",
23
- REACTION_ITEM = "reaction-item",
24
- REACTION_DIALOG = "reaction-dialog"
25
- }
26
- /**
27
- * Experience when the emoji picker is opened
28
- */
29
- export declare const PickerRender: UFOExperience;
30
- /**
31
- * Experience when the list of reactions gets rendered
32
- */
33
- export declare const ReactionsRendered: ConcurrentExperience;
34
- /**
35
- * Experience when a reaction emoji gets added
36
- */
37
- export declare const ReactionsAdd: ConcurrentExperience;
38
- /**
39
- * Expeirence when a reaction dialog is opened
40
- */
41
- export declare const ReactionDialogOpened: UFOExperience;
42
- /**
43
- * Experience when a reaction changed/fetched from inside the modal dialog
44
- */
45
- export declare const ReactionDialogSelectedReactionChanged: UFOExperience;
46
- /**
47
- * Experience when a reaction details gets fetched
48
- */
49
- export declare const ReactionDetailsFetch: ConcurrentExperience;
50
- /**
51
- * Experience when a reaction emoji gets removed/decrement
52
- */
53
- export declare const ReactionsRemove: ConcurrentExperience;
54
- export declare const sampledReactionsRendered: (instanceId: string) => WithSamplingUFOExperience;