@atlaskit/reactions 34.4.12 → 35.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 (102) hide show
  1. package/CHANGELOG.md +32 -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/es2019/analytics/index.js +1 -1
  13. package/dist/esm/analytics/index.js +1 -1
  14. package/package.json +28 -36
  15. package/reaction/package.json +1 -8
  16. package/store/package.json +1 -8
  17. package/types/package.json +1 -8
  18. package/useCloseManager/package.json +1 -8
  19. package/dist/types-ts4.5/MockReactionsClient.d.ts +0 -27
  20. package/dist/types-ts4.5/analytics/index.d.ts +0 -121
  21. package/dist/types-ts4.5/client/ReactionServiceClient.d.ts +0 -35
  22. package/dist/types-ts4.5/client/index.d.ts +0 -1
  23. package/dist/types-ts4.5/components/Counter.d.ts +0 -51
  24. package/dist/types-ts4.5/components/EmojiButton.d.ts +0 -24
  25. package/dist/types-ts4.5/components/FlashAnimation.d.ts +0 -23
  26. package/dist/types-ts4.5/components/Reaction.d.ts +0 -67
  27. package/dist/types-ts4.5/components/ReactionButton.d.ts +0 -22
  28. package/dist/types-ts4.5/components/ReactionParticleEffect.d.ts +0 -22
  29. package/dist/types-ts4.5/components/ReactionPicker.d.ts +0 -119
  30. package/dist/types-ts4.5/components/ReactionSummaryButton.d.ts +0 -61
  31. package/dist/types-ts4.5/components/ReactionSummaryView.d.ts +0 -81
  32. package/dist/types-ts4.5/components/ReactionTooltip.d.ts +0 -43
  33. package/dist/types-ts4.5/components/ReactionView.d.ts +0 -12
  34. package/dist/types-ts4.5/components/Reactions.d.ts +0 -206
  35. package/dist/types-ts4.5/components/ReactionsDialog.d.ts +0 -32
  36. package/dist/types-ts4.5/components/ReactionsDialogHeader.d.ts +0 -15
  37. package/dist/types-ts4.5/components/ReactionsDialogTrigger.d.ts +0 -5
  38. package/dist/types-ts4.5/components/ReactionsList.d.ts +0 -20
  39. package/dist/types-ts4.5/components/RepositionOnUpdate.d.ts +0 -13
  40. package/dist/types-ts4.5/components/Selector.d.ts +0 -36
  41. package/dist/types-ts4.5/components/ShowMore.d.ts +0 -15
  42. package/dist/types-ts4.5/components/StaticReaction.d.ts +0 -11
  43. package/dist/types-ts4.5/components/Trigger.d.ts +0 -83
  44. package/dist/types-ts4.5/components/UfoErrorBoundary.d.ts +0 -17
  45. package/dist/types-ts4.5/components/index.d.ts +0 -9
  46. package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +0 -23
  47. package/dist/types-ts4.5/containers/ConnectedReactionPicker/index.d.ts +0 -2
  48. package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +0 -56
  49. package/dist/types-ts4.5/containers/ConnectedReactionsView/index.d.ts +0 -2
  50. package/dist/types-ts4.5/containers/index.d.ts +0 -2
  51. package/dist/types-ts4.5/hooks/useCloseManager.d.ts +0 -20
  52. package/dist/types-ts4.5/hooks/useDelayedState.d.ts +0 -6
  53. package/dist/types-ts4.5/hooks/useFocusTrap.d.ts +0 -5
  54. package/dist/types-ts4.5/i18n/cs.d.ts +0 -27
  55. package/dist/types-ts4.5/i18n/da.d.ts +0 -27
  56. package/dist/types-ts4.5/i18n/de.d.ts +0 -26
  57. package/dist/types-ts4.5/i18n/en.d.ts +0 -27
  58. package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -27
  59. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -27
  60. package/dist/types-ts4.5/i18n/es.d.ts +0 -27
  61. package/dist/types-ts4.5/i18n/et.d.ts +0 -11
  62. package/dist/types-ts4.5/i18n/fi.d.ts +0 -26
  63. package/dist/types-ts4.5/i18n/fr.d.ts +0 -27
  64. package/dist/types-ts4.5/i18n/hu.d.ts +0 -27
  65. package/dist/types-ts4.5/i18n/index.d.ts +0 -37
  66. package/dist/types-ts4.5/i18n/is.d.ts +0 -6
  67. package/dist/types-ts4.5/i18n/it.d.ts +0 -27
  68. package/dist/types-ts4.5/i18n/ja.d.ts +0 -27
  69. package/dist/types-ts4.5/i18n/ko.d.ts +0 -26
  70. package/dist/types-ts4.5/i18n/languages.d.ts +0 -28
  71. package/dist/types-ts4.5/i18n/nb.d.ts +0 -26
  72. package/dist/types-ts4.5/i18n/nl.d.ts +0 -27
  73. package/dist/types-ts4.5/i18n/pl.d.ts +0 -27
  74. package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -27
  75. package/dist/types-ts4.5/i18n/pt_PT.d.ts +0 -11
  76. package/dist/types-ts4.5/i18n/ro.d.ts +0 -6
  77. package/dist/types-ts4.5/i18n/ru.d.ts +0 -26
  78. package/dist/types-ts4.5/i18n/sk.d.ts +0 -11
  79. package/dist/types-ts4.5/i18n/sv.d.ts +0 -27
  80. package/dist/types-ts4.5/i18n/th.d.ts +0 -27
  81. package/dist/types-ts4.5/i18n/tr.d.ts +0 -27
  82. package/dist/types-ts4.5/i18n/uk.d.ts +0 -27
  83. package/dist/types-ts4.5/i18n/vi.d.ts +0 -27
  84. package/dist/types-ts4.5/i18n/zh.d.ts +0 -27
  85. package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -26
  86. package/dist/types-ts4.5/index.d.ts +0 -34
  87. package/dist/types-ts4.5/shared/constants.d.ts +0 -34
  88. package/dist/types-ts4.5/shared/i18n.d.ts +0 -87
  89. package/dist/types-ts4.5/shared/utils.d.ts +0 -18
  90. package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +0 -99
  91. package/dist/types-ts4.5/store/ReactionConsumer.d.ts +0 -57
  92. package/dist/types-ts4.5/store/batched.d.ts +0 -2
  93. package/dist/types-ts4.5/store/index.d.ts +0 -3
  94. package/dist/types-ts4.5/store/utils.d.ts +0 -11
  95. package/dist/types-ts4.5/types/Actions.d.ts +0 -28
  96. package/dist/types-ts4.5/types/Updater.d.ts +0 -2
  97. package/dist/types-ts4.5/types/User.d.ts +0 -21
  98. package/dist/types-ts4.5/types/client.d.ts +0 -38
  99. package/dist/types-ts4.5/types/index.d.ts +0 -25
  100. package/dist/types-ts4.5/types/reaction.d.ts +0 -117
  101. package/dist/types-ts4.5/types/store.d.ts +0 -71
  102. package/dist/types-ts4.5/ufo/index.d.ts +0 -54
@@ -1,67 +0,0 @@
1
- import { type EmojiProvider } from '@atlaskit/emoji';
2
- import { type ReactionSummary, type ReactionClick, type ReactionMouseEnter } from '../types';
3
- import { type ReactionFocused } from '../types/reaction';
4
- import { type OpenReactionsDialogOptions } from './Reactions';
5
- /**
6
- * Test id for Reaction item wrapper div
7
- */
8
- export declare const RENDER_REACTION_TESTID = "render_reaction_wrapper";
9
- export interface ReactionProps {
10
- /**
11
- * Optional prop for enabling the Reactions Dialog
12
- */
13
- allowUserDialog?: boolean;
14
- /**
15
- * Provider for loading emojis
16
- */
17
- emojiProvider: Promise<EmojiProvider>;
18
- /**
19
- * Show custom animation or render as standard without animation (defaults to false)
20
- */
21
- flash?: boolean;
22
- /**
23
- * Optional function when the user wants to open the Reactions Dialog
24
- */
25
- handleOpenReactionsDialog?: (options?: OpenReactionsDialogOptions) => void;
26
- /**
27
- * Optional prop for controlling if the reactions component is view only, disabling adding reactions
28
- */
29
- isViewOnly?: boolean;
30
- /**
31
- * event handler when the emoji button is clicked
32
- */
33
- onClick: ReactionClick;
34
- /**
35
- * Optional event when focused the reaction
36
- */
37
- onFocused?: ReactionFocused;
38
- /**
39
- * Optional event when the mouse cursor hovers over the reaction
40
- */
41
- onMouseEnter?: ReactionMouseEnter;
42
- /**
43
- * Data for the reaction
44
- */
45
- reaction: ReactionSummary;
46
- /**
47
- * Optional prop for using an opaque button background instead of a transparent background
48
- */
49
- showOpaqueBackground?: boolean;
50
- /**
51
- * Show a floating emoji particle effect (usually in response to a new reaction) (defaults to false)
52
- */
53
- showParticleEffect?: boolean;
54
- /**
55
- * Optional prop for controlling if the reaction displayed is a default one and should not have a border
56
- */
57
- showSubtleStyle?: boolean;
58
- /**
59
- * Optional URL to optimistically render the emoji image before the catalogue arrives.
60
- * When provided, the emoji will render immediately without waiting for the emoji provider to resolve.
61
- */
62
- optimisticImageURL?: string;
63
- }
64
- /**
65
- * Render an emoji reaction button
66
- */
67
- export declare const Reaction: ({ emojiProvider, onClick, reaction, onMouseEnter, onFocused, flash, showParticleEffect, showOpaqueBackground, allowUserDialog, handleOpenReactionsDialog, isViewOnly, showSubtleStyle, optimisticImageURL, }: ReactionProps) => JSX.Element;
@@ -1,22 +0,0 @@
1
- import { type ReactionProps } from './Reaction';
2
- interface ReactionButtonProps extends Pick<ReactionProps, 'flash'> {
3
- ariaExpanded?: boolean;
4
- ariaLabel: string;
5
- ariaPressed?: boolean;
6
- children?: React.ReactNode;
7
- className?: string;
8
- dataAttributes?: {
9
- [key: string]: string;
10
- };
11
- onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
12
- onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
13
- onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement>) => void;
14
- onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement>) => void;
15
- reacted?: boolean;
16
- showOpaqueBackground?: boolean;
17
- showSubtleStyle?: boolean;
18
- testId?: string;
19
- useCompactStyles?: boolean;
20
- }
21
- export declare const ReactionButton: ({ onClick, flash, showSubtleStyle, showOpaqueBackground, useCompactStyles, reacted, ariaLabel, ariaExpanded, ariaPressed, onMouseEnter, onMouseLeave, onFocus, children, dataAttributes, testId, }: ReactionButtonProps) => JSX.Element;
22
- export {};
@@ -1,22 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type EmojiProvider, type EmojiId } from '@atlaskit/emoji';
6
- export declare const PARTICLE_COUNT = 4;
7
- interface ReactionParticleEffectProps {
8
- /**
9
- * ID of the emoji to show within the particle effect
10
- */
11
- emojiId: EmojiId;
12
- /**
13
- * Provider for loading emojis
14
- */
15
- emojiProvider: Promise<EmojiProvider>;
16
- /**
17
- * Optional URL to optimistically render the emoji image before the catalogue arrives.
18
- */
19
- optimisticImageURL?: string;
20
- }
21
- export declare const ReactionParticleEffect: ({ emojiProvider, emojiId, optimisticImageURL, }: ReactionParticleEffectProps) => JSX.Element;
22
- export {};
@@ -1,119 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import React, { type PropsWithChildren } from 'react';
6
- import { type PickerSize } from '@atlaskit/emoji/types';
7
- import { type EmojiProvider } from '@atlaskit/emoji/resource';
8
- import { type PopperProps, type Placement } from '@atlaskit/popper';
9
- import { type ReactionSource } from '../types';
10
- import { type SelectorProps } from './Selector';
11
- import { type TriggerProps } from './Trigger';
12
- /**
13
- * Test id for wrapper ReactionPicker div
14
- */
15
- export declare const RENDER_REACTIONPICKER_TESTID = "reactionPicker-testid";
16
- /**
17
- * Test id for ReactionPicker panel div
18
- */
19
- export declare const RENDER_REACTIONPICKERPANEL_TESTID = "reactionPickerPanel-testid";
20
- export interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Partial<Pick<TriggerProps, 'tooltipContent' | 'miniMode'>> {
21
- /**
22
- * Optional Show the "more emoji" selector icon for choosing emoji beyond the default list of emojis (defaults to false)
23
- */
24
- allowAllEmojis?: boolean;
25
- /**
26
- * Optional class name
27
- */
28
- className?: string;
29
- /**
30
- * Enable/Disable the button to be clickable (defaults to false)
31
- */
32
- disabled?: boolean;
33
- /**
34
- * Optional emoji picker size to control the size of emoji picker
35
- */
36
- emojiPickerSize?: PickerSize;
37
- /**
38
- * Provider for loading emojis
39
- */
40
- emojiProvider: Promise<EmojiProvider>;
41
- /**
42
- * Optional prop for hoverable reaction picker
43
- */
44
- hoverableReactionPicker?: boolean;
45
- /**
46
- * Optional prop to set a delay for the reaction picker when it opens/closes on hover
47
- */
48
- hoverableReactionPickerDelay?: number;
49
- /**
50
- * Optional prop to say if the reactions component is in a list
51
- */
52
- isListItem?: boolean;
53
- /**
54
- * Optional event handler when the emoji picker is clicked outside and closed
55
- */
56
- onCancel?: () => void;
57
- /**
58
- * Optional event handler when the emoji picker is opened
59
- */
60
- onOpen?: () => void;
61
- /**
62
- * Event callback when an emoji button is selected
63
- * @param emojiId emoji unique id
64
- * @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
65
- */
66
- onSelection: (emojiId: string, source: ReactionSource) => void;
67
- /**
68
- * Optional event handler when the custom emoji picker icon is selected
69
- */
70
- onShowMore?: () => void;
71
- /**
72
- * Optional prop for controlling the picker location
73
- */
74
- reactionPickerPlacement?: Placement;
75
- /**
76
- * Optional zIndex for the reaction picker popper
77
- */
78
- reactionPickerPopperZIndex?: number;
79
- /**
80
- * Optional prop to set the strategy of the reaction picker popup
81
- */
82
- reactionPickerStrategy?: PopperProps<{}>['strategy'];
83
- /**
84
- * Optional prop for controlling icon inside Trigger
85
- */
86
- reactionPickerTriggerIcon?: React.ReactNode;
87
- /**
88
- * Optional prop for controlling text of the trigger button
89
- */
90
- reactionPickerTriggerText?: string;
91
- /**
92
- * Optional prop for displaying text to add a reaction
93
- */
94
- showAddReactionText?: boolean;
95
- /**
96
- * Optional prop for using an opaque button background instead of a transparent background
97
- */
98
- showOpaqueBackground?: boolean;
99
- /**
100
- * Optional prop for applying subtle styling to reaction summary and picker
101
- */
102
- subtleReactionsSummaryAndPicker?: boolean;
103
- }
104
- /**
105
- * Picker component for adding reactions
106
- */
107
- export declare const ReactionPicker: React.MemoExoticComponent<(props: ReactionPickerProps) => JSX.Element>;
108
- export interface PopperWrapperProps {
109
- isOpen: boolean;
110
- onClose: () => void;
111
- popperModifiers?: PopperProps<{}>['modifiers'];
112
- settings: {
113
- popperPlacement: Placement;
114
- showFullPicker: boolean;
115
- };
116
- triggerRef: HTMLDivElement | HTMLButtonElement | null;
117
- zIndex?: number;
118
- }
119
- export declare const PopperWrapper: (props: PropsWithChildren<PopperWrapperProps>) => JSX.Element;
@@ -1,61 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
6
- import { type ReactionsProps } from './Reactions';
7
- interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'useButtonAlignmentStyling'> {
8
- /**
9
- * The number of emojis to show in the summary button
10
- */
11
- emojisToShow?: number;
12
- /**
13
- * event handler when the summary button is clicked to view all reactions
14
- */
15
- onClick: () => void;
16
- /**
17
- * Optional event handler when mouse enters the button
18
- */
19
- onMouseEnter?: () => void;
20
- /**
21
- * Optional event handler when mouse leaves the button
22
- */
23
- onMouseLeave?: () => void;
24
- /**
25
- * Optional prop for using an opaque button background instead of a transparent background
26
- */
27
- showOpaqueBackground?: boolean;
28
- /**
29
- * Optional prop for applying subtle styling to reaction summary button
30
- */
31
- subtleReactionsSummaryAndPicker?: boolean;
32
- /**
33
- * Optional prop to add an icon to the end of the summary button
34
- */
35
- summaryButtonIconAfter?: React.ReactNode;
36
- /**
37
- * Optional prop for the optimistic image URL
38
- */
39
- summaryGetOptimisticImageURL?: (emojiId: string) => string;
40
- /**
41
- * Optional prop to set the most recently clicked emoji id
42
- */
43
- summaryViewParticleEffectEmojiId?: {
44
- id: string;
45
- shortName: string;
46
- } | null;
47
- /**
48
- * Optional prop to indicate whether the summary popup is open, used for aria-expanded
49
- */
50
- isOpen?: boolean;
51
- }
52
- /**
53
- * Test id for summary reaction wrapper button
54
- */
55
- export declare const RENDER_SUMMARY_BUTTON_TESTID = "reaction-summary-button";
56
- /**
57
- * Test id for emojis displayed inside summary button. All emoji's in the summary button will have this test id
58
- */
59
- export declare const RENDER_SUMMARY_EMOJI_TESTID = "summary-emoji-display";
60
- export declare const ReactionSummaryButton: ForwardRefExoticComponent<ReactionSummaryButtonProps & RefAttributes<HTMLDivElement>>;
61
- export {};
@@ -1,81 +0,0 @@
1
- import { type Placement } from '@atlaskit/popper';
2
- import { type ReactionClick, type ReactionFocused, type ReactionMouseEnter, type ReactionSource } from '../types';
3
- import { type ReactionsProps, type OpenReactionsDialogOptions } from './Reactions';
4
- import { type TriggerProps } from './Trigger';
5
- /**
6
- * Test id for the Reactions summary view popup
7
- */
8
- export declare const RENDER_SUMMARY_VIEW_POPUP_TESTID = "render-summary-view-popup";
9
- interface ReactionSummaryViewProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'flash' | 'particleEffectByEmoji' | 'allowUserDialog' | 'allowSelectFromSummaryView' | 'emojiPickerSize' | 'useButtonAlignmentStyling' | 'reactionPickerTriggerText'>, Pick<TriggerProps, 'tooltipContent' | 'reactionPickerTriggerIcon' | 'disabled'> {
10
- /**
11
- * Optional prop for enabling the Reactions Dialog
12
- */
13
- allowUserDialog?: boolean;
14
- /**
15
- * Optional function when the user wants to open the Reactions Dialog
16
- */
17
- handleOpenReactionsDialog?: (options?: OpenReactionsDialogOptions) => void;
18
- /**
19
- * Optional prop to make the summary view open on hover
20
- */
21
- hoverableSummaryView?: boolean;
22
- /**
23
- * Optional prop to set a delay for the summary view when it opens/closes on hover
24
- */
25
- hoverableSummaryViewDelay?: number;
26
- /**
27
- * Optional prop for controlling if the reactions component is view only, disabling adding reactions
28
- */
29
- isViewOnly?: boolean;
30
- /**
31
- * Optional event handler when the emoji picker is opened
32
- */
33
- onOpen?: () => void;
34
- /**
35
- * event handler when a a reaction button is clicked inside the summary
36
- */
37
- onReactionClick: ReactionClick;
38
- /**
39
- * Optional event when focused a reaction inside the summary
40
- */
41
- onReactionFocused?: ReactionFocused;
42
- /**
43
- * Optional event when the mouse cursor hovers over a reaction button inside the summary
44
- */
45
- onReactionMouseEnter?: ReactionMouseEnter;
46
- /**
47
- * Event callback when an emoji button is selected
48
- * @param emojiId emoji unique id
49
- * @param source source where the reaction was picked (either the initial default reactions or the custom reactions picker)
50
- */
51
- onSelection: (emojiId: string, source: ReactionSource) => void;
52
- /**
53
- * Optional prop to change the placement of the summary popup reaction list
54
- */
55
- placement?: Placement;
56
- /**
57
- * Optional prop for using an opaque button background instead of a transparent background
58
- */
59
- showOpaqueBackground?: boolean;
60
- /**
61
- * Optional prop for applying subtle styling to reaction picker
62
- */
63
- subtleReactionsSummaryAndPicker?: boolean;
64
- /**
65
- * Optional prop to control if the side picker is shown
66
- */
67
- summaryButtonIconAfter?: React.ReactNode;
68
- /**
69
- * Optional prop for the optimistic image URL
70
- */
71
- summaryGetOptimisticImageURL?: (emojiId: string) => string;
72
- /**
73
- * Optional prop to set the most recently clicked id
74
- */
75
- summaryViewParticleEffectEmojiId?: {
76
- id: string;
77
- shortName: string;
78
- } | null;
79
- }
80
- export declare const ReactionSummaryView: ({ emojiProvider, reactions, flash, particleEffectByEmoji, placement, onReactionClick, onReactionFocused, onReactionMouseEnter, showOpaqueBackground, subtleReactionsSummaryAndPicker, allowUserDialog, handleOpenReactionsDialog, isViewOnly, allowSelectFromSummaryView, disabled, emojiPickerSize, onSelection, tooltipContent, reactionPickerTriggerIcon, onOpen, useButtonAlignmentStyling, reactionPickerTriggerText, hoverableSummaryView, hoverableSummaryViewDelay, summaryGetOptimisticImageURL, summaryButtonIconAfter, summaryViewParticleEffectEmojiId, }: ReactionSummaryViewProps) => JSX.Element;
81
- export {};
@@ -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;