@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,43 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type PropsWithChildren } from 'react';
6
- import { type ReactionSummary } from '../types';
7
- import { type OpenReactionsDialogOptions } from './Reactions';
8
- export declare const verticalMargin = 5;
9
- /**
10
- * Test id for wrapper ReactionTooltip div
11
- */
12
- export declare const RENDER_REACTIONTOOLTIP_TESTID = "render-reactionTooltip";
13
- export type ReactionTooltipProps = PropsWithChildren<{
14
- /**
15
- * Optional prop for enabling the Reactions Dialog
16
- */
17
- allowUserDialog?: boolean;
18
- /**
19
- * Function that hides the tooltip
20
- */
21
- dismissTooltip: () => void;
22
- /**
23
- * Optional name for the reaction emoji
24
- */
25
- emojiName?: string;
26
- /**
27
- * Optional function when the user wants to open the Reactions Dialog
28
- */
29
- handleOpenReactionsDialog?: (options?: OpenReactionsDialogOptions) => void;
30
- /**
31
- * Optional flag for enabling tooltip (defaults to true)
32
- */
33
- isEnabled?: boolean;
34
- /**
35
- * Optional Max users to show in the displayed tooltip (defaults to 5)
36
- */
37
- maxReactions?: number;
38
- /**
39
- * Info on the emoji reaction to render
40
- */
41
- reaction: ReactionSummary;
42
- }>;
43
- export declare const ReactionTooltip: ({ children, emojiName, reaction: { users }, maxReactions, isEnabled, allowUserDialog, handleOpenReactionsDialog, dismissTooltip, }: ReactionTooltipProps) => JSX.Element;
@@ -1,12 +0,0 @@
1
- import { type ReactionSummary, type ProfileCardWrapper } from '../types';
2
- export interface ReactionViewProps {
3
- /**
4
- * Optional ProfileWrapper component to show profile card on hover
5
- */
6
- ProfileCardWrapper?: ProfileCardWrapper;
7
- /**
8
- * Selected reaction to get user data from
9
- */
10
- reaction: ReactionSummary;
11
- }
12
- export declare const ReactionView: ({ reaction, ProfileCardWrapper }: ReactionViewProps) => JSX.Element;
@@ -1,206 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- * @jsxFrag React.Fragment
5
- */
6
- import React from 'react';
7
- import { type OnCloseHandler } from '@atlaskit/modal-dialog';
8
- import { type Placement } from '@atlaskit/popper';
9
- import { ReactionStatus, type ReactionClick, type ReactionSummary, type QuickReactionEmojiSummary, type ProfileCardWrapper } from '../types';
10
- import { type ReactionPickerProps } from './ReactionPicker';
11
- import { type SelectorProps } from './Selector';
12
- import type { UFOExperience } from '@atlaskit/ufo';
13
- /**
14
- * Set of all available UFO experiences relating to Reactions Dialog
15
- */
16
- export declare const ufoExperiences: {
17
- /**
18
- * Experience when a reaction dialog is opened
19
- */
20
- openDialog: UFOExperience;
21
- /**
22
- * Experience when a reaction changed/fetched from inside the modal dialog
23
- */
24
- selectedReactionChangeInsideDialog: 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
- /**
35
- * Test id for summary view of reactions
36
- */
37
- export declare const RENDER_REACTIONS_SUMMARY_TESTID = "reaction-summary-view";
38
- export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'reactionPickerTriggerIcon' | 'reactionPickerPlacement' | 'reactionPickerPopperZIndex'>, Pick<SelectorProps, 'pickerQuickReactionEmojiIds'> {
39
- /**
40
- * Optional prop for controlling if we can select emojis and display UI via summary view picker
41
- */
42
- allowSelectFromSummaryView?: boolean;
43
- /**
44
- * Optional prop from checking a feature gate for rendering Reactions Dialog
45
- */
46
- allowUserDialog?: boolean;
47
- /**
48
- * Optional error message to show when unable to display the reaction emoji
49
- */
50
- errorMessage?: string;
51
- /**
52
- * Optional emoji reactions list to show custom animation or render as standard (key => emoji string "id", value => true/false to show custom animation)
53
- */
54
- flash?: Record<string, boolean>;
55
- /**
56
- * Optional event to get reaction details for an emoji
57
- * @param emojiId current reaction emoji id
58
- */
59
- getReactionDetails?: (emojiId: string) => void;
60
- /**
61
- * Optional prop for hiding default reactions displayed when there are no existing reactions
62
- */
63
- hideDefaultReactions?: boolean;
64
- /**
65
- * Optional prop for controlling if the summary view is hoverable
66
- */
67
- hoverableSummaryView?: boolean;
68
- /**
69
- * Optional prop to say if the reactions component is in a list
70
- */
71
- isListItem?: boolean;
72
- /**
73
- * Optional prop for controlling if the reactions component is view only, disabling adding reactions
74
- */
75
- isViewOnly?: boolean;
76
- /**
77
- * event handler to fetching the reactions
78
- */
79
- loadReaction: () => void;
80
- /**
81
- * Optional prop for using your own container for relative positioning for emoji picker popup
82
- */
83
- noRelativeContainer?: boolean;
84
- noWrap?: boolean;
85
- /**
86
- * Optional callback function called when closing reactions dialog
87
- */
88
- onDialogCloseCallback?: OnCloseHandler;
89
- /**
90
- * Optional callback function called when opening reactions dialog
91
- */
92
- onDialogOpenCallback?: (emojiId: string, source?: string) => void;
93
- /**
94
- * Optional callback function called when navigating between pages in the reactions dialog
95
- */
96
- onDialogPageChangeCallback?: (emojiId: string, curentPage: number, maxPages: number) => void;
97
- /**
98
- * Optional callback function called when selecting a reaction in reactions dialog
99
- */
100
- onDialogSelectReactionCallback?: (emojiId: string) => void;
101
- /**
102
- * Optional prop to hide the user reactions and only render the picker
103
- */
104
- onlyRenderPicker?: boolean;
105
- /**
106
- * event handler when the emoji button is clicked
107
- */
108
- onReactionClick: ReactionClick;
109
- /**
110
- * Event callback when an emoji button is selected
111
- */
112
- onSelection: (emojiId: string) => void;
113
- /**
114
- * Optional emoji reactions list to show floating emoji particle effect (key => emoji string "id", value => true/false to show the particle effect).
115
- * Generally used for newly added reactions.
116
- */
117
- particleEffectByEmoji?: Record<string, boolean>;
118
- /**
119
- * Optional prop for rendering a profile card wrapper in the Reactions Dialog
120
- */
121
- ProfileCardWrapper?: ProfileCardWrapper;
122
- /**
123
- * quickReactionEmojiIds are emojis that will be shown in the the primary view even if the reaction count is zero
124
- */
125
- quickReactionEmojis?: QuickReactionEmojiSummary;
126
- /**
127
- * Optional prop to change the placement of the reaction picker popup
128
- */
129
- reactionPickerPlacement?: Placement;
130
- /**
131
- * Optional prop for controlling text of the trigger button
132
- */
133
- reactionPickerTriggerText?: string;
134
- /**
135
- * Optional prop for controlling tooltip content of the trigger button
136
- */
137
- reactionPickerTriggerTooltipContent?: string;
138
- /**
139
- * Optional list of reactions to render (defaults to empty list)
140
- */
141
- reactions?: ReactionSummary[];
142
- /**
143
- * Optional prop to render the particle effect on the summary view
144
- */
145
- renderParticleEffectOnSummaryView?: boolean;
146
- /**
147
- * Optional prop for displaying text to add a reaction
148
- */
149
- showAddReactionText?: boolean;
150
- /**
151
- * Optional prop for using an opaque button background instead of a transparent background
152
- */
153
- showOpaqueBackground?: boolean;
154
- /**
155
- * Optional prop for controlling if default reactions are subtle
156
- */
157
- showSubtleDefaultReactions?: boolean;
158
- /**
159
- * Condition for the reaction list status while being fetched
160
- */
161
- status: ReactionStatus;
162
- /**
163
- * Optional prop for applying subtle styling to reaction summary and picker
164
- */
165
- subtleReactionsSummaryAndPicker?: boolean;
166
- /**
167
- * Optional prop to add an icon to the end of the summary button
168
- */
169
- summaryButtonIconAfter?: React.ReactNode;
170
- /**
171
- * Optional prop to optimistically render the image URL for a given emoji id. Typically used in SSR before the emoji Provider resolves & the real image is loaded.
172
- */
173
- summaryGetOptimisticImageURL?: (emojiId: string) => string;
174
- /**
175
- * Optional function to get an optimistic image URL for a reaction emoji, used to render immediately without waiting for the catalogue.
176
- */
177
- getOptimisticImageURL?: (emojiId: string) => string;
178
- /**
179
- * Enables a summary view for displaying reactions. If enabled and the number of reactions meets or exceeds the summaryViewThreshold, reactions will be shown in a more aggregated format.
180
- */
181
- summaryViewEnabled?: boolean;
182
- /**
183
- * Optional prop to change the placement of the summary popup reaction list
184
- */
185
- summaryViewPlacement?: Placement;
186
- /**
187
- * The minimum number of reactions required to switch to the summary view when summaryViewEnabled is true. Defaults to 3 if not specified.
188
- */
189
- summaryViewThreshold?: number;
190
- /**
191
- * Optional prop to change the style of the summary view
192
- */
193
- useButtonAlignmentStyling?: boolean;
194
- }
195
- export interface OpenReactionsDialogOptions {
196
- emojiId?: string;
197
- source?: string;
198
- }
199
- /**
200
- * Get content of the tooltip
201
- */
202
- export declare function getTooltip(status: ReactionStatus, errorMessage?: string, tooltipContent?: string): string | JSX.Element | null;
203
- /**
204
- * Renders list of reactions
205
- */
206
- export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, isViewOnly, noWrap, noRelativeContainer, showSubtleDefaultReactions, reactionPickerTriggerTooltipContent, reactionPickerTriggerIcon, allowSelectFromSummaryView, useButtonAlignmentStyling, reactionPickerTriggerText, hoverableSummaryView, isListItem, summaryGetOptimisticImageURL, getOptimisticImageURL, reactionPickerPlacement, summaryButtonIconAfter, renderParticleEffectOnSummaryView, reactionPickerPopperZIndex, }: ReactionsProps) => JSX.Element>;
@@ -1,32 +0,0 @@
1
- import { type EmojiProvider } from '@atlaskit/emoji/resource';
2
- import { type OnCloseHandler } from '@atlaskit/modal-dialog';
3
- import { type ReactionSummary, type ProfileCardWrapper } from '../types';
4
- /**
5
- * Test id for the Reactions modal dialog
6
- */
7
- export declare const RENDER_MODAL_TESTID = "render-reactions-modal";
8
- export interface ReactionsDialogProps {
9
- /**
10
- * Provider for loading emojis
11
- */
12
- emojiProvider: Promise<EmojiProvider>;
13
- /**
14
- * Optional handler when the dialog closes
15
- */
16
- handleCloseReactionsDialog: OnCloseHandler;
17
- handlePaginationChange?: (emojiId: string, currentPage: number, maxPages: number) => void;
18
- /**
19
- * Optional callback function called when user selects a reaction in reactions dialog
20
- */
21
- handleSelectReaction?: (emojiId: string) => void;
22
- ProfileCardWrapper?: ProfileCardWrapper;
23
- /**
24
- * List of reactions to render (defaults to empty list)
25
- */
26
- reactions: ReactionSummary[];
27
- /**
28
- * Current emoji selected to show the reactions dialog
29
- */
30
- selectedEmojiId: string;
31
- }
32
- export declare const ReactionsDialog: ({ reactions, handleCloseReactionsDialog, emojiProvider, selectedEmojiId, handleSelectReaction, handlePaginationChange, ProfileCardWrapper, }: ReactionsDialogProps) => JSX.Element;
@@ -1,15 +0,0 @@
1
- import { type OnCloseHandler } from '@atlaskit/modal-dialog';
2
- import { type EmojiProvider } from '@atlaskit/emoji/resource';
3
- import { type ReactionSummary } from '../types';
4
- interface ReactionsDialogModalHeaderProps {
5
- currentPage: number;
6
- currentReactions: ReactionSummary[];
7
- emojiProvider: Promise<EmojiProvider>;
8
- handleCloseReactionsDialog: OnCloseHandler;
9
- handleNextPage: () => void;
10
- handlePreviousPage: () => void;
11
- maxPages: number;
12
- totalReactionsCount: number;
13
- }
14
- export declare const ReactionsDialogHeader: ({ totalReactionsCount, handlePreviousPage, handleNextPage, currentPage, maxPages, currentReactions, emojiProvider, handleCloseReactionsDialog, }: ReactionsDialogModalHeaderProps) => JSX.Element;
15
- export {};
@@ -1,5 +0,0 @@
1
- interface ReactionsDialogTriggerProps {
2
- onClick: () => void;
3
- }
4
- export declare const ReactionsDialogTrigger: ({ onClick }: ReactionsDialogTriggerProps) => JSX.Element;
5
- export {};
@@ -1,20 +0,0 @@
1
- import React from 'react';
2
- import { type ReactionSummary, type ProfileCardWrapper } from '../types';
3
- export interface ReactionsListProps {
4
- /**
5
- * Provider for loading emojis
6
- */
7
- /**
8
- * A functional component from Confluence to show a profile card on hover
9
- */
10
- ProfileCardWrapper?: ProfileCardWrapper;
11
- /**
12
- * Sorted list of reactions to render in list
13
- */
14
- reactions: ReactionSummary[];
15
- /**
16
- * Current emoji selected in the reactions dialog
17
- */
18
- selectedEmojiId: string;
19
- }
20
- export declare const ReactionsList: ({ reactions, selectedEmojiId, ProfileCardWrapper, }: ReactionsListProps) => React.JSX.Element;
@@ -1,13 +0,0 @@
1
- /**
2
- * Copied from ADS popup component with some tweeks for our use
3
- */
4
- import React from 'react';
5
- import { type PopperChildrenProps, type Placement } from '@atlaskit/popper';
6
- export type RepositionOnUpdateProps = {
7
- settings: {
8
- popperPlacement: Placement;
9
- showFullPicker: boolean;
10
- };
11
- update: PopperChildrenProps['update'];
12
- };
13
- export declare const RepositionOnUpdate: ({ children, update, settings, }: React.PropsWithChildren<RepositionOnUpdateProps>) => React.JSX.Element;
@@ -1,36 +0,0 @@
1
- import { type EmojiId, type OnEmojiEvent } from '@atlaskit/emoji/types';
2
- import { type EmojiProvider } from '@atlaskit/emoji/resource';
3
- /**
4
- * Test id for wrapper Selector div
5
- */
6
- export declare const RENDER_SELECTOR_TESTID = "render-selector";
7
- export interface SelectorProps {
8
- /**
9
- * Provider for loading emojis
10
- */
11
- emojiProvider: Promise<EmojiProvider>;
12
- /**
13
- * Optional prop for hoverable reaction picker selector
14
- */
15
- hoverableReactionPickerSelector?: boolean;
16
- /**
17
- * Optional event when extra custom emojis icon is selected
18
- */
19
- onMoreClick?: React.MouseEventHandler<HTMLElement>;
20
- /**
21
- * Event handler when an emoji gets selected
22
- */
23
- onSelection: OnEmojiEvent;
24
- /**
25
- * Optional emojis shown for user to select from when the reaction add button is clicked (defaults to pre-defined list of emojis {@link DefaultReactions})
26
- */
27
- pickerQuickReactionEmojiIds?: EmojiId[];
28
- /**
29
- * Enable/Disable selection of extra custom emoji beyond default list (defaults to false)
30
- */
31
- showMore?: boolean;
32
- }
33
- /**
34
- * Reactions picker panel part of the <ReactionPicker /> component
35
- */
36
- export declare const Selector: ({ emojiProvider, onMoreClick, onSelection, showMore, pickerQuickReactionEmojiIds, hoverableReactionPickerSelector, }: SelectorProps) => JSX.Element;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Test id for wrapper button
4
- */
5
- export declare const RENDER_SHOWMORE_TESTID = "show-more-button";
6
- export interface ShowMoreProps {
7
- /**
8
- * Optional mouse click DOM event on showing more emoji icon
9
- */
10
- onClick?: React.MouseEventHandler<HTMLElement>;
11
- }
12
- /**
13
- * Show more custom emojis button
14
- */
15
- export declare const ShowMore: ({ onClick }: ShowMoreProps) => React.JSX.Element;
@@ -1,11 +0,0 @@
1
- type StaticReactionProps = {
2
- children?: React.ReactNode;
3
- dataAttributes?: {
4
- [key: string]: string;
5
- };
6
- onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
7
- onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement>) => void;
8
- testId?: string;
9
- };
10
- export declare const StaticReaction: ({ onMouseEnter, onFocus, children, testId, dataAttributes, }: StaticReactionProps) => JSX.Element;
11
- export {};
@@ -1,83 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type AriaAttributes } from 'react';
6
- import { type AnalyticsEvent } from '@atlaskit/analytics-next';
7
- import { type PickerSize } from '@atlaskit/emoji/types';
8
- import React from 'react';
9
- /**
10
- * Test id for the tooltip
11
- */
12
- export declare const RENDER_TOOLTIP_TRIGGER_TESTID = "render-tooltip-trigger";
13
- export declare const RENDER_TRIGGER_BUTTON_TESTID = "render-trigger-button";
14
- export declare const RENDER_TRIGGER_CONTAINER_TESTID = "render-trigger-container";
15
- export declare const RENDER_LIST_ITEM_WRAPPER_TESTID = "render-list-item-wrapper";
16
- export interface TriggerProps {
17
- /**
18
- * Aria accessibility attributes that will be added to the button
19
- */
20
- ariaAttributes?: AriaAttributes;
21
- /**
22
- * Enable/Disable the button to be clickable (defaults to false)
23
- */
24
- disabled?: boolean;
25
- /**
26
- * Optional emoji picker size; when supplied, the default trigger icon is rendered at the
27
- * matching size ('small' = 12px, 'medium' = 16px). Mirrors the size used by the emoji
28
- * picker popup so the trigger stays visually consistent. `'large'` is excluded because
29
- * the underlying icon family does not provide a large variant.
30
- */
31
- emojiPickerSize?: PickerSize;
32
- fullWidthSelectorTrayReactionPickerTrigger?: boolean;
33
- /**
34
- * Optional prop for controlling if the summary view reaction picker trigger should be full width
35
- */
36
- fullWidthSummaryViewReactionPickerTrigger?: boolean;
37
- /**
38
- * Optional prop to say if the reactions component is in a list
39
- */
40
- isListItem?: boolean;
41
- /**
42
- * Optional prop for controlling if reaction picker is opened
43
- */
44
- isSelected?: boolean;
45
- /**
46
- * apply "miniMode" className to the button
47
- */
48
- miniMode?: boolean;
49
- /**
50
- * Optional Event handler when the button to open the picker is clicked
51
- * @param e Mouse Dom event
52
- * @param analyticsEvent atlaskit analytics event payload of the button
53
- */
54
- onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: AnalyticsEvent) => void;
55
- /**
56
- * Optional prop for controlling icon inside Trigger
57
- */
58
- reactionPickerTriggerIcon?: React.ReactNode;
59
- /**
60
- * Optional prop for controlling text inside Trigger
61
- */
62
- reactionPickerTriggerText?: string;
63
- /**
64
- * Optional prop for displaying text to add a reaction
65
- */
66
- showAddReactionText?: boolean;
67
- /**
68
- * Optional prop for using an opaque button background instead of a transparent background
69
- */
70
- showOpaqueBackground?: boolean;
71
- /**
72
- * Optional prop for applying subtle styling to reaction picker
73
- */
74
- subtleReactionsSummaryAndPicker?: boolean;
75
- /**
76
- * Tooltip content for trigger button
77
- */
78
- tooltipContent: React.ReactNode;
79
- }
80
- /**
81
- * Render an emoji button to open the reactions select picker
82
- */
83
- export declare const Trigger: React.ForwardRefExoticComponent<TriggerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,17 +0,0 @@
1
- import React, { type ErrorInfo } from 'react';
2
- import { type UFOExperience } from '@atlaskit/ufo';
3
- import { type WithSamplingUFOExperience } from '@atlaskit/emoji';
4
- export interface UfoErrorBoundaryProps {
5
- children?: React.ReactNode;
6
- /**
7
- * UFO Experiences to notify failure when the children components fail on rendering
8
- */
9
- experiences: UFOExperience[] | WithSamplingUFOExperience[];
10
- }
11
- /**
12
- * Error boundary wrapper to notify "failure" for UFO events of components when there was a re-rendering exception caught inside the `componentDidCatch` event handler
13
- */
14
- export declare class UfoErrorBoundary extends React.Component<UfoErrorBoundaryProps> {
15
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
16
- render(): React.ReactNode;
17
- }
@@ -1,9 +0,0 @@
1
- export { Reaction } from './Reaction';
2
- export type { ReactionProps } from './Reaction';
3
- export { ReactionPicker } from './ReactionPicker';
4
- export type { ReactionPickerProps } from './ReactionPicker';
5
- export { Reactions } from './Reactions';
6
- export type { ReactionsProps } from './Reactions';
7
- export { UfoErrorBoundary } from './UfoErrorBoundary';
8
- export type { UfoErrorBoundaryProps } from './UfoErrorBoundary';
9
- export { ReactionsDialog } from './ReactionsDialog';
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { type ReactionPickerProps } from '../../components';
3
- import { type StorePropInput } from '../../types';
4
- export interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps, 'onSelection'> {
5
- /**
6
- * Individual id for a reaction
7
- */
8
- ari: string;
9
- /**
10
- * Wrapper id for reactions list
11
- */
12
- containerAri: string;
13
- /**
14
- * Reference to the store.
15
- * @remarks
16
- * 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)
17
- */
18
- store: StorePropInput;
19
- }
20
- /**
21
- * Reaction Picker component
22
- */
23
- export declare const ConnectedReactionPicker: (props: React.PropsWithChildren<ConnectedReactionPickerProps>) => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- export { ConnectedReactionPicker } from './ConnectedReactionPicker';
2
- export type { ConnectedReactionPickerProps } from './ConnectedReactionPicker';
@@ -1,56 +0,0 @@
1
- import React from 'react';
2
- import { type ReactionsProps, type ReactionPickerProps } from '../../components';
3
- import { ReactionStatus, type Actions, type State, type StorePropInput } from '../../types';
4
- import { type ReactionSummary, type ReactionUpdateSuccess } from '../../types/reaction';
5
- export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'isViewOnly' | 'allowSelectFromSummaryView' | 'reactionPickerPopperZIndex'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
6
- /**
7
- * Individual id for a reaction
8
- */
9
- ari: string;
10
- /**
11
- * Wrapper id for reactions list
12
- */
13
- containerAri: string;
14
- /**
15
- * Callback function when a reaction is successfully added
16
- */
17
- onReactionSuccess?: ReactionUpdateSuccess;
18
- /**
19
- * Optional boolean to control if particle animation on reactions appear
20
- */
21
- particleEffectByEmojiEnabled?: boolean;
22
- /**
23
- * Reference to the store.
24
- * @remarks
25
- * This was initially implemented with a sync and Async versions and will be replaced with just a sync Store in a future release (Please use only the sync version)
26
- */
27
- store: StorePropInput;
28
- }
29
- /**
30
- * Export the mapper function outside the component so easier to do unit tests
31
- */
32
- export declare const mapStateToPropsHelper: (containerAri: string, ari: string, particleEffectByEmojiEnabled?: boolean, state?: State) => {
33
- status: ReactionStatus;
34
- reactions: never[];
35
- flash?: undefined;
36
- particleEffectByEmoji?: undefined;
37
- } | {
38
- reactions: ReactionSummary[];
39
- status: ReactionStatus.ready;
40
- flash: {
41
- [emojiId: string]: boolean;
42
- };
43
- particleEffectByEmoji: {
44
- [emojiId: string]: boolean;
45
- };
46
- };
47
- /**
48
- * Export the mapper function outside the component so easier to do unit tests
49
- */
50
- export declare const mapDispatchToPropsHelper: (actions: Actions, containerAri: string, ari: string, successCallBack?: ReactionUpdateSuccess) => {
51
- loadReaction: () => void;
52
- onReactionClick: (emojiId: string) => void;
53
- getReactionDetails: (emojiId: string) => void;
54
- onSelection: (emojiId: string) => void;
55
- };
56
- export declare const ConnectedReactionsView: (props: React.PropsWithChildren<ConnectedReactionsViewProps>) => React.JSX.Element;
@@ -1,2 +0,0 @@
1
- export { ConnectedReactionsView } from './ConnectedReactionsView';
2
- export type { ConnectedReactionsViewProps } from './ConnectedReactionsView';
@@ -1,2 +0,0 @@
1
- export { ConnectedReactionPicker, type ConnectedReactionPickerProps, } from './ConnectedReactionPicker';
2
- export { ConnectedReactionsView, type ConnectedReactionsViewProps } from './ConnectedReactionsView';
@@ -1,20 +0,0 @@
1
- import type React from 'react';
2
- type callbackType = 'CLICK_OUTSIDE' | 'ESCAPE';
3
- /**
4
- * Custom hook to detect when user action is outside given container ref or press escape key
5
- * @param ref ref object to an html element
6
- * @param callback event callback when detected a click outside the ref object or escape key is pressed
7
- * @param useCapture (Optional) use capture phase of event. @default false
8
- * @param enabled (Optional) enable/disable the outside click or escape key press handler. @default true
9
- */
10
- export declare function useCloseManager(ref: React.RefObject<HTMLElement>, callback: (type: callbackType) => void, useCapture?: boolean, enabled?: boolean): void;
11
- /**
12
- * Custom hook to detect when user action is outside given container ref or press escape key
13
- * Used within ReactionPickerNew
14
- * @param ref ref object to an html element
15
- * @param callback event callback when detected a click outside the ref object or escape key is pressed
16
- * @param useCapture (Optional) use capture phase of event. @default false
17
- * @param enabled (Optional) enable/disable the outside click or escape key press handler. @default true
18
- */
19
- export declare function useCloseManagerV2(popupRef: HTMLElement | null, triggerRef: HTMLElement | null, callback: (type: callbackType) => void, useCapture?: boolean, enabled?: boolean): void;
20
- export {};
@@ -1,6 +0,0 @@
1
- type useDelayedStateResponse<T> = [
2
- T,
3
- (value: T, immediate?: boolean) => void
4
- ];
5
- export declare const useDelayedState: <T>(initialState: T, delay: number) => useDelayedStateResponse<T>;
6
- export {};
@@ -1,5 +0,0 @@
1
- export type FocusManagerHook = {
2
- initialFocusRef: HTMLElement | null;
3
- targetRef: HTMLDivElement | null;
4
- };
5
- export declare const useFocusTrap: ({ targetRef, initialFocusRef }: FocusManagerHook) => void;