@atlaskit/reactions 22.3.1 → 22.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/version.json +1 -1
  3. package/dist/es2019/version.json +1 -1
  4. package/dist/esm/version.json +1 -1
  5. package/dist/types-ts4.5/MockReactionsClient.d.ts +27 -0
  6. package/dist/types-ts4.5/analytics/analytics.d.ts +121 -0
  7. package/dist/types-ts4.5/analytics/index.d.ts +2 -0
  8. package/dist/types-ts4.5/analytics/ufo.d.ts +56 -0
  9. package/dist/types-ts4.5/client/ReactionServiceClient.d.ts +35 -0
  10. package/dist/types-ts4.5/client/index.d.ts +1 -0
  11. package/dist/types-ts4.5/components/Counter/Counter.d.ts +44 -0
  12. package/dist/types-ts4.5/components/Counter/index.d.ts +3 -0
  13. package/dist/types-ts4.5/components/Counter/styles.d.ts +4 -0
  14. package/dist/types-ts4.5/components/EmojiButton/EmojiButton.d.ts +22 -0
  15. package/dist/types-ts4.5/components/EmojiButton/index.d.ts +2 -0
  16. package/dist/types-ts4.5/components/EmojiButton/styles.d.ts +1 -0
  17. package/dist/types-ts4.5/components/FlashAnimation/FlashAnimation.d.ts +20 -0
  18. package/dist/types-ts4.5/components/FlashAnimation/index.d.ts +2 -0
  19. package/dist/types-ts4.5/components/FlashAnimation/styles.d.ts +5 -0
  20. package/dist/types-ts4.5/components/Reaction/Reaction.d.ts +48 -0
  21. package/dist/types-ts4.5/components/Reaction/index.d.ts +2 -0
  22. package/dist/types-ts4.5/components/Reaction/styles.d.ts +10 -0
  23. package/dist/types-ts4.5/components/ReactionDialog/ReactionView.d.ts +19 -0
  24. package/dist/types-ts4.5/components/ReactionDialog/ReactionsDialog.d.ts +32 -0
  25. package/dist/types-ts4.5/components/ReactionDialog/ReactionsList.d.ts +23 -0
  26. package/dist/types-ts4.5/components/ReactionDialog/index.d.ts +1 -0
  27. package/dist/types-ts4.5/components/ReactionDialog/styles.d.ts +11 -0
  28. package/dist/types-ts4.5/components/ReactionPicker/ReactionPicker.d.ts +59 -0
  29. package/dist/types-ts4.5/components/ReactionPicker/RepositionOnUpdate.d.ts +13 -0
  30. package/dist/types-ts4.5/components/ReactionPicker/index.d.ts +2 -0
  31. package/dist/types-ts4.5/components/ReactionPicker/styles.d.ts +4 -0
  32. package/dist/types-ts4.5/components/ReactionTooltip/ReactionTooltip.d.ts +34 -0
  33. package/dist/types-ts4.5/components/ReactionTooltip/index.d.ts +2 -0
  34. package/dist/types-ts4.5/components/ReactionTooltip/styles.d.ts +5 -0
  35. package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +96 -0
  36. package/dist/types-ts4.5/components/Reactions/index.d.ts +2 -0
  37. package/dist/types-ts4.5/components/Reactions/styles.d.ts +3 -0
  38. package/dist/types-ts4.5/components/Selector/Selector.d.ts +34 -0
  39. package/dist/types-ts4.5/components/Selector/index.d.ts +3 -0
  40. package/dist/types-ts4.5/components/Selector/styles.d.ts +12 -0
  41. package/dist/types-ts4.5/components/ShowMore/ShowMore.d.ts +35 -0
  42. package/dist/types-ts4.5/components/ShowMore/index.d.ts +2 -0
  43. package/dist/types-ts4.5/components/ShowMore/styles.d.ts +3 -0
  44. package/dist/types-ts4.5/components/Trigger/Trigger.d.ts +36 -0
  45. package/dist/types-ts4.5/components/Trigger/index.d.ts +2 -0
  46. package/dist/types-ts4.5/components/Trigger/styles.d.ts +5 -0
  47. package/dist/types-ts4.5/components/UfoErrorBoundary/UfoErrorBoundary.d.ts +16 -0
  48. package/dist/types-ts4.5/components/UfoErrorBoundary/index.d.ts +2 -0
  49. package/dist/types-ts4.5/components/index.d.ts +9 -0
  50. package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +23 -0
  51. package/dist/types-ts4.5/containers/ConnectedReactionPicker/index.d.ts +2 -0
  52. package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +43 -0
  53. package/dist/types-ts4.5/containers/ConnectedReactionsView/index.d.ts +2 -0
  54. package/dist/types-ts4.5/containers/index.d.ts +2 -0
  55. package/dist/types-ts4.5/hooks/index.d.ts +1 -0
  56. package/dist/types-ts4.5/hooks/useCloseManager.d.ts +11 -0
  57. package/dist/types-ts4.5/hooks/useFocusTrap.d.ts +5 -0
  58. package/dist/types-ts4.5/i18n/cs.d.ts +23 -0
  59. package/dist/types-ts4.5/i18n/da.d.ts +23 -0
  60. package/dist/types-ts4.5/i18n/de.d.ts +22 -0
  61. package/dist/types-ts4.5/i18n/en.d.ts +23 -0
  62. package/dist/types-ts4.5/i18n/en_GB.d.ts +23 -0
  63. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +23 -0
  64. package/dist/types-ts4.5/i18n/es.d.ts +23 -0
  65. package/dist/types-ts4.5/i18n/et.d.ts +11 -0
  66. package/dist/types-ts4.5/i18n/fi.d.ts +22 -0
  67. package/dist/types-ts4.5/i18n/fr.d.ts +23 -0
  68. package/dist/types-ts4.5/i18n/hu.d.ts +23 -0
  69. package/dist/types-ts4.5/i18n/index.d.ts +35 -0
  70. package/dist/types-ts4.5/i18n/is.d.ts +6 -0
  71. package/dist/types-ts4.5/i18n/it.d.ts +23 -0
  72. package/dist/types-ts4.5/i18n/ja.d.ts +23 -0
  73. package/dist/types-ts4.5/i18n/ko.d.ts +22 -0
  74. package/dist/types-ts4.5/i18n/languages.d.ts +27 -0
  75. package/dist/types-ts4.5/i18n/nb.d.ts +22 -0
  76. package/dist/types-ts4.5/i18n/nl.d.ts +23 -0
  77. package/dist/types-ts4.5/i18n/pl.d.ts +23 -0
  78. package/dist/types-ts4.5/i18n/pt_BR.d.ts +23 -0
  79. package/dist/types-ts4.5/i18n/pt_PT.d.ts +11 -0
  80. package/dist/types-ts4.5/i18n/ro.d.ts +6 -0
  81. package/dist/types-ts4.5/i18n/ru.d.ts +22 -0
  82. package/dist/types-ts4.5/i18n/sk.d.ts +11 -0
  83. package/dist/types-ts4.5/i18n/sv.d.ts +23 -0
  84. package/dist/types-ts4.5/i18n/th.d.ts +23 -0
  85. package/dist/types-ts4.5/i18n/tr.d.ts +23 -0
  86. package/dist/types-ts4.5/i18n/uk.d.ts +23 -0
  87. package/dist/types-ts4.5/i18n/vi.d.ts +23 -0
  88. package/dist/types-ts4.5/i18n/zh.d.ts +23 -0
  89. package/dist/types-ts4.5/i18n/zh_TW.d.ts +22 -0
  90. package/dist/types-ts4.5/index.d.ts +7 -0
  91. package/dist/types-ts4.5/shared/constants.d.ts +28 -0
  92. package/dist/types-ts4.5/shared/i18n.d.ts +72 -0
  93. package/dist/types-ts4.5/shared/index.d.ts +3 -0
  94. package/dist/types-ts4.5/shared/utils.d.ts +18 -0
  95. package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +94 -0
  96. package/dist/types-ts4.5/store/ReactionConsumer.d.ts +57 -0
  97. package/dist/types-ts4.5/store/batched.d.ts +2 -0
  98. package/dist/types-ts4.5/store/index.d.ts +3 -0
  99. package/dist/types-ts4.5/store/utils.d.ts +11 -0
  100. package/dist/types-ts4.5/types/Actions.d.ts +27 -0
  101. package/dist/types-ts4.5/types/Updater.d.ts +1 -0
  102. package/dist/types-ts4.5/types/User.d.ts +20 -0
  103. package/dist/types-ts4.5/types/client.d.ts +38 -0
  104. package/dist/types-ts4.5/types/index.d.ts +7 -0
  105. package/dist/types-ts4.5/types/reaction.d.ts +113 -0
  106. package/dist/types-ts4.5/types/store.d.ts +63 -0
  107. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { ReactionSummary } from '../../types';
4
+ /**
5
+ * Test id for wrapper ReactionTooltip div
6
+ */
7
+ export declare const RENDER_REACTIONTOOLTIP_TESTID = "render-reactionTooltip";
8
+ export interface ReactionTooltipProps {
9
+ /**
10
+ * Optional name for the reaction emoji
11
+ */
12
+ emojiName?: string;
13
+ /**
14
+ * Info on the emoji reaction to render
15
+ */
16
+ reaction: ReactionSummary;
17
+ /**
18
+ * Optional Max users to show in the displayed tooltip (defaults to 5)
19
+ */
20
+ maxReactions?: number;
21
+ /**
22
+ * Optional function when the user wants to see more users in a modal
23
+ */
24
+ handleUserListClick?: (emojiId: string) => void;
25
+ /**
26
+ * Optional flag to show reactions dialog (defaults to false)
27
+ */
28
+ allowUserDialog?: boolean;
29
+ /**
30
+ * Optional flag for enabling tooltip (defaults to true)
31
+ */
32
+ isEnabled?: boolean;
33
+ }
34
+ export declare const ReactionTooltip: React.FC<ReactionTooltipProps>;
@@ -0,0 +1,2 @@
1
+ export { ReactionTooltip, RENDER_REACTIONTOOLTIP_TESTID, } from './ReactionTooltip';
2
+ export type { ReactionTooltipProps } from './ReactionTooltip';
@@ -0,0 +1,5 @@
1
+ export declare const verticalMargin = 5;
2
+ export declare const tooltipStyle: import("@emotion/react").SerializedStyles;
3
+ export declare const emojiNameStyle: import("@emotion/react").SerializedStyles;
4
+ export declare const footerStyle: import("@emotion/react").SerializedStyles;
5
+ export declare const underlineStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,96 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import { OnCloseHandler } from '@atlaskit/modal-dialog';
5
+ import { onDialogSelectReactionChange, ReactionStatus, ReactionClick, ReactionSummary, QuickReactionEmojiSummary } from '../../types';
6
+ import { ReactionProps } from '../Reaction';
7
+ import { ReactionPickerProps } from '../ReactionPicker';
8
+ import { SelectorProps } from '../Selector';
9
+ /**
10
+ * Set of all available UFO experiences relating to reactions dialog
11
+ */
12
+ export declare const ufoExperiences: {
13
+ /**
14
+ * Expeirence when a reaction dialog is opened
15
+ */
16
+ openDialog: import("@atlaskit/ufo").UFOExperience;
17
+ /**
18
+ * Experience when a reaction dialog is closed
19
+ */
20
+ closeDialog: import("@atlaskit/ufo").UFOExperience;
21
+ /**
22
+ * Experience when a reaction changed/fetched from inside the modal dialog
23
+ */
24
+ selectedReactionChangeInsideDialog: import("@atlaskit/ufo").UFOExperience;
25
+ };
26
+ /**
27
+ * Test id for wrapper Reactions div
28
+ */
29
+ export declare const RENDER_REACTIONS_TESTID = "render-reactions";
30
+ /**
31
+ * Test id for the view all reacted user to trigger the dialog
32
+ */
33
+ export declare const RENDER_VIEWALL_REACTED_USERS_DIALOG = "viewall-reacted-users-dialog";
34
+ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode'>, Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Pick<ReactionProps, 'allowUserDialog'> {
35
+ /**
36
+ * event handler to fetching the reactions
37
+ */
38
+ loadReaction: () => void;
39
+ /**
40
+ * Event callback when an emoji button is selected
41
+ */
42
+ onSelection: (emojiId: string) => void;
43
+ /**
44
+ * Optional list of reactions to render (defaults to empty list)
45
+ */
46
+ reactions?: ReactionSummary[];
47
+ /**
48
+ * Condition for the reaction list status while being fetched
49
+ */
50
+ status: ReactionStatus;
51
+ /**
52
+ * event handler when the emoji button is clicked
53
+ */
54
+ onReactionClick: ReactionClick;
55
+ /**
56
+ * Optional emoji reactions list to show custom animation or render as standard (key => emoji string "id", value => true/false to show custom animation)
57
+ */
58
+ flash?: Record<string, boolean>;
59
+ /**
60
+ * Optional event to get reaction details for an emoji
61
+ * @param emojiId current reaction emoji id
62
+ */
63
+ getReactionDetails?: (emojiId: string) => void;
64
+ /**
65
+ * @deprecated use getReactionDetails instead
66
+ */
67
+ onReactionHover?: (emojiId: string) => void;
68
+ /**
69
+ * Optional error message to show when unable to display the reaction emoji
70
+ */
71
+ errorMessage?: string;
72
+ /**
73
+ * quickReactionEmojiIds are emojis that will be shown in the the primary view even if the reaction count is zero
74
+ */
75
+ quickReactionEmojis?: QuickReactionEmojiSummary;
76
+ /**
77
+ * Optional callback function called when opening reactions dialog
78
+ */
79
+ onDialogOpenCallback?: (emojiId: string, source?: string) => void;
80
+ /**
81
+ * Optional callback function called when closing reactions dialog
82
+ */
83
+ onDialogCloseCallback?: OnCloseHandler;
84
+ /**
85
+ * Optional callback function called when selecting a reaction in reactions dialog
86
+ */
87
+ onDialogSelectReactionCallback?: onDialogSelectReactionChange;
88
+ }
89
+ /**
90
+ * Get content of the tooltip
91
+ */
92
+ export declare function getTooltip(status: ReactionStatus, errorMessage?: string): string | jsx.JSX.Element | null;
93
+ /**
94
+ * Renders list of reactions
95
+ */
96
+ export declare const Reactions: React.FC<ReactionsProps>;
@@ -0,0 +1,2 @@
1
+ export { Reactions, RENDER_REACTIONS_TESTID } from './Reactions';
2
+ export type { ReactionsProps } from './Reactions';
@@ -0,0 +1,3 @@
1
+ export declare const reactionPickerStyle: import("@emotion/react").SerializedStyles;
2
+ export declare const seeWhoReacted: import("@emotion/react").SerializedStyles;
3
+ export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,34 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { EmojiId, OnEmojiEvent } from '@atlaskit/emoji/types';
4
+ import { EmojiProvider } from '@atlaskit/emoji/resource';
5
+ /**
6
+ * Test id for wrapper Selector div
7
+ */
8
+ export declare const RENDER_SELECTOR_TESTID = "render-selector";
9
+ export interface SelectorProps {
10
+ /**
11
+ * Provider for loading emojis
12
+ */
13
+ emojiProvider: Promise<EmojiProvider>;
14
+ /**
15
+ * Event handler when an emoji gets selected
16
+ */
17
+ onSelection: OnEmojiEvent;
18
+ /**
19
+ * Enable/Disable selection of extra custom emoji beyond default list (defaults to false)
20
+ */
21
+ showMore?: boolean;
22
+ /**
23
+ * Optional event when extra custom emojis icon is selected
24
+ */
25
+ onMoreClick?: React.MouseEventHandler<HTMLElement>;
26
+ /**
27
+ * Optional emojis shown for user to select from when the reaction add button is clicked (defaults to pre-defined list of emojis {@link constants.DefaultReactions})
28
+ */
29
+ pickerQuickReactionEmojiIds?: EmojiId[];
30
+ }
31
+ /**
32
+ * Reactions picker panel part of the <ReactionPicker /> component
33
+ */
34
+ export declare const Selector: React.FC<SelectorProps>;
@@ -0,0 +1,3 @@
1
+ export { Selector, RENDER_SELECTOR_TESTID } from './Selector';
2
+ export * as styles from './styles';
3
+ export type { SelectorProps } from './Selector';
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ /** @jsx jsx */
3
+ import { keyframes } from '@emotion/react';
4
+ export declare const selectorStyle: import("@emotion/react").SerializedStyles;
5
+ export declare const emojiStyle: import("@emotion/react").SerializedStyles;
6
+ export declare const revealAnimation: typeof keyframes;
7
+ export declare const revealStyle: import("@emotion/react").SerializedStyles;
8
+ /**
9
+ * custom css styling for the emoji icon
10
+ * @param index location of the emoji in the rendered list of items
11
+ */
12
+ export declare const emojiStyleAnimation: (index: number) => React.CSSProperties;
@@ -0,0 +1,35 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { SerializedStyles } from '@emotion/react';
4
+ /**
5
+ * Test id for wrapper button
6
+ */
7
+ export declare const RENDER_SHOWMORE_TESTID = "show-more-button";
8
+ export declare const RENDER_WRAPPER_TESTID = "show-more-wrapper";
9
+ interface CommonProps<T> {
10
+ container?: T;
11
+ button?: T;
12
+ }
13
+ export interface ShowMoreProps {
14
+ /**
15
+ * Optional mouse click DOM event on showing more emoji icon
16
+ */
17
+ onClick?: React.MouseEventHandler<HTMLElement>;
18
+ /**
19
+ * Optional button css
20
+ */
21
+ buttonStyle?: SerializedStyles;
22
+ /**
23
+ * Optional custom styling for wrapper show more emoji button
24
+ */
25
+ style?: CommonProps<React.CSSProperties>;
26
+ /**
27
+ * Optional custom styling for wrapper show more emoji button
28
+ */
29
+ className?: CommonProps<string>;
30
+ }
31
+ /**
32
+ * Show more custom emojis button
33
+ */
34
+ export declare const ShowMore: React.FC<ShowMoreProps>;
35
+ export {};
@@ -0,0 +1,2 @@
1
+ export { ShowMore, RENDER_SHOWMORE_TESTID, RENDER_WRAPPER_TESTID, } from './ShowMore';
2
+ export type { ShowMoreProps } from './ShowMore';
@@ -0,0 +1,3 @@
1
+ export declare const moreEmojiContainerStyle: import("@emotion/react").SerializedStyles;
2
+ export declare const moreButtonStyle: import("@emotion/react").SerializedStyles;
3
+ export declare const separatorStyle: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,36 @@
1
+ /** @jsx jsx */
2
+ import React, { AriaAttributes } from 'react';
3
+ import { AnalyticsEvent } from '@atlaskit/analytics-next';
4
+ /**
5
+ * Test id for the tooltip
6
+ */
7
+ export declare const RENDER_TOOLTIP_TRIGGER_TESTID = "render-tooltip-trigger";
8
+ export declare const RENDER_TRIGGER_BUTTON_TESTID = "render-trigger-button";
9
+ export interface TriggerProps {
10
+ /**
11
+ * Optional Event handler when the button to open the picker is clicked
12
+ * @param e Mouse Dom event
13
+ * @param analyticsEvent atlaskit analytics event payload of the button
14
+ */
15
+ onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: AnalyticsEvent) => void;
16
+ /**
17
+ * apply "miniMode" className to the button
18
+ */
19
+ miniMode?: boolean;
20
+ /**
21
+ * Enable/Disable the button to be clickable (defaults to false)
22
+ */
23
+ disabled?: boolean;
24
+ /**
25
+ * Tooltip content for trigger button
26
+ */
27
+ tooltipContent: React.ReactNode;
28
+ /**
29
+ * Aria accessibility attributes that will be added to the button
30
+ */
31
+ ariaAttributes?: AriaAttributes;
32
+ }
33
+ /**
34
+ * Render an emoji button to open the reactions select picker
35
+ */
36
+ export declare const Trigger: React.ForwardRefExoticComponent<TriggerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export { Trigger, RENDER_TOOLTIP_TRIGGER_TESTID } from './Trigger';
2
+ export type { TriggerProps } from './Trigger';
@@ -0,0 +1,5 @@
1
+ export declare const DISABLED_BUTTON_COLOR: string;
2
+ export declare const triggerStyle: ({ miniMode, disabled }: {
3
+ miniMode?: boolean | undefined;
4
+ disabled?: boolean | undefined;
5
+ }) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,16 @@
1
+ import React, { ErrorInfo } from 'react';
2
+ import { UFOExperience } from '@atlaskit/ufo';
3
+ import { WithSamplingUFOExperience } from '@atlaskit/emoji';
4
+ export interface UfoErrorBoundaryProps {
5
+ /**
6
+ * UFO Experiences to notify failure when the children components fail on rendering
7
+ */
8
+ experiences: UFOExperience[] | WithSamplingUFOExperience[];
9
+ }
10
+ /**
11
+ * Error boundary wrapper to notify "failure" for UFO events of components when there was a re-rendering exception caught inside the `componentDidCatch` event handler
12
+ */
13
+ export declare class UfoErrorBoundary extends React.Component<UfoErrorBoundaryProps> {
14
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
15
+ render(): React.ReactNode;
16
+ }
@@ -0,0 +1,2 @@
1
+ export { UfoErrorBoundary } from './UfoErrorBoundary';
2
+ export type { UfoErrorBoundaryProps } from './UfoErrorBoundary';
@@ -0,0 +1,9 @@
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 './ReactionDialog/ReactionsDialog';
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { ReactionPickerProps } from '../../components';
3
+ import { StorePropInput } from '../../types';
4
+ export interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps, 'onSelection'> {
5
+ /**
6
+ * Wrapper id for reactions list
7
+ */
8
+ containerAri: string;
9
+ /**
10
+ * Individual id for a reaction
11
+ */
12
+ ari: 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: React.FC<ConnectedReactionPickerProps>;
@@ -0,0 +1,2 @@
1
+ export { ConnectedReactionPicker } from './ConnectedReactionPicker';
2
+ export type { ConnectedReactionPickerProps } from './ConnectedReactionPicker';
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+ import { ReactionsProps, ReactionPickerProps } from '../../components';
3
+ import { ReactionStatus, Actions, State, StorePropInput } from '../../types';
4
+ export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
5
+ /**
6
+ * Wrapper id for reactions list
7
+ */
8
+ containerAri: string;
9
+ /**
10
+ * Individual id for a reaction
11
+ */
12
+ ari: 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
+ * Export the mapper function outside the component so easier to do unit tests
22
+ */
23
+ export declare const mapStateToPropsHelper: (containerAri: string, ari: string, state?: State) => {
24
+ status: ReactionStatus;
25
+ reactions: never[];
26
+ flash?: undefined;
27
+ } | {
28
+ reactions: import("../../types").ReactionSummary[];
29
+ status: ReactionStatus.ready;
30
+ flash: {
31
+ [emojiId: string]: boolean;
32
+ };
33
+ };
34
+ /**
35
+ * Export the mapper function outside the component so easier to do unit tests
36
+ */
37
+ export declare const mapDispatchToPropsHelper: (actions: Actions, containerAri: string, ari: string) => {
38
+ loadReaction: () => void;
39
+ onReactionClick: (emojiId: string) => void;
40
+ getReactionDetails: (emojiId: string) => void;
41
+ onSelection: (emojiId: string) => void;
42
+ };
43
+ export declare const ConnectedReactionsView: React.FC<ConnectedReactionsViewProps>;
@@ -0,0 +1,2 @@
1
+ export { ConnectedReactionsView } from './ConnectedReactionsView';
2
+ export type { ConnectedReactionsViewProps } from './ConnectedReactionsView';
@@ -0,0 +1,2 @@
1
+ export * from './ConnectedReactionPicker';
2
+ export * from './ConnectedReactionsView';
@@ -0,0 +1 @@
1
+ export { useCloseManager } from './useCloseManager';
@@ -0,0 +1,11 @@
1
+ import 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
+ export {};
@@ -0,0 +1,5 @@
1
+ export type FocusManagerHook = {
2
+ targetRef: HTMLDivElement | null;
3
+ initialFocusRef: HTMLElement | null;
4
+ };
5
+ export declare const useFocusTrap: ({ targetRef, initialFocusRef, }: FocusManagerHook) => void;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.add': string;
9
+ 'fabric.reactions.error.unexpected': string;
10
+ 'fabric.reactions.loading': string;
11
+ 'fabric.reactions.more.emojis': string;
12
+ 'fabric.reactions.more.info': string;
13
+ 'fabric.reactions.other.reacted.users': string;
14
+ 'fabric.reactions.reactwithemoji': string;
15
+ 'reactions.dialog.close': string;
16
+ 'reactions.dialog.emoji.name': string;
17
+ 'reactions.dialog.left.navigate': string;
18
+ 'reactions.dialog.reactions.count': string;
19
+ 'reactions.dialog.right.navigate': string;
20
+ 'reactions.dialog.viewall': string;
21
+ 'reactions.dialog.viewall.tooltip': string;
22
+ };
23
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.add': string;
9
+ 'fabric.reactions.error.unexpected': string;
10
+ 'fabric.reactions.loading': string;
11
+ 'fabric.reactions.more.emojis': string;
12
+ 'fabric.reactions.more.info': string;
13
+ 'fabric.reactions.other.reacted.users': string;
14
+ 'fabric.reactions.reactwithemoji': string;
15
+ 'reactions.dialog.close': string;
16
+ 'reactions.dialog.emoji.name': string;
17
+ 'reactions.dialog.left.navigate': string;
18
+ 'reactions.dialog.reactions.count': string;
19
+ 'reactions.dialog.right.navigate': string;
20
+ 'reactions.dialog.viewall': string;
21
+ 'reactions.dialog.viewall.tooltip': string;
22
+ };
23
+ export default _default;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.add': string;
9
+ 'fabric.reactions.error.unexpected': string;
10
+ 'fabric.reactions.loading': string;
11
+ 'fabric.reactions.more.emojis': string;
12
+ 'fabric.reactions.more.info': string;
13
+ 'fabric.reactions.other.reacted.users': string;
14
+ 'fabric.reactions.reactwithemoji': string;
15
+ 'reactions.dialog.close': string;
16
+ 'reactions.dialog.left.navigate': string;
17
+ 'reactions.dialog.reactions.count': string;
18
+ 'reactions.dialog.right.navigate': string;
19
+ 'reactions.dialog.viewall': string;
20
+ 'reactions.dialog.viewall.tooltip': string;
21
+ };
22
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.add': string;
9
+ 'fabric.reactions.error.unexpected': string;
10
+ 'fabric.reactions.loading': string;
11
+ 'fabric.reactions.more.emojis': string;
12
+ 'fabric.reactions.more.info': string;
13
+ 'fabric.reactions.other.reacted.users': string;
14
+ 'fabric.reactions.reactwithemoji': string;
15
+ 'reactions.dialog.close': string;
16
+ 'reactions.dialog.emoji.name': string;
17
+ 'reactions.dialog.left.navigate': string;
18
+ 'reactions.dialog.reactions.count': string;
19
+ 'reactions.dialog.right.navigate': string;
20
+ 'reactions.dialog.viewall': string;
21
+ 'reactions.dialog.viewall.tooltip': string;
22
+ };
23
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.add': string;
9
+ 'fabric.reactions.error.unexpected': string;
10
+ 'fabric.reactions.loading': string;
11
+ 'fabric.reactions.more.emojis': string;
12
+ 'fabric.reactions.more.info': string;
13
+ 'fabric.reactions.other.reacted.users': string;
14
+ 'fabric.reactions.reactwithemoji': string;
15
+ 'reactions.dialog.close': string;
16
+ 'reactions.dialog.emoji.name': string;
17
+ 'reactions.dialog.left.navigate': string;
18
+ 'reactions.dialog.reactions.count': string;
19
+ 'reactions.dialog.right.navigate': string;
20
+ 'reactions.dialog.viewall': string;
21
+ 'reactions.dialog.viewall.tooltip': string;
22
+ };
23
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.add': string;
9
+ 'fabric.reactions.error.unexpected': string;
10
+ 'fabric.reactions.loading': string;
11
+ 'fabric.reactions.more.emojis': string;
12
+ 'fabric.reactions.more.info': string;
13
+ 'fabric.reactions.other.reacted.users': string;
14
+ 'fabric.reactions.reactwithemoji': string;
15
+ 'reactions.dialog.close': string;
16
+ 'reactions.dialog.emoji.name': string;
17
+ 'reactions.dialog.left.navigate': string;
18
+ 'reactions.dialog.reactions.count': string;
19
+ 'reactions.dialog.right.navigate': string;
20
+ 'reactions.dialog.viewall': string;
21
+ 'reactions.dialog.viewall.tooltip': string;
22
+ };
23
+ export default _default;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.add': string;
9
+ 'fabric.reactions.error.unexpected': string;
10
+ 'fabric.reactions.loading': string;
11
+ 'fabric.reactions.more.emojis': string;
12
+ 'fabric.reactions.more.info': string;
13
+ 'fabric.reactions.other.reacted.users': string;
14
+ 'fabric.reactions.reactwithemoji': string;
15
+ 'reactions.dialog.close': string;
16
+ 'reactions.dialog.emoji.name': string;
17
+ 'reactions.dialog.left.navigate': string;
18
+ 'reactions.dialog.reactions.count': string;
19
+ 'reactions.dialog.right.navigate': string;
20
+ 'reactions.dialog.viewall': string;
21
+ 'reactions.dialog.viewall.tooltip': string;
22
+ };
23
+ export default _default;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.error.unexpected': string;
9
+ 'fabric.reactions.loading': string;
10
+ };
11
+ export default _default;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * NOTE:
3
+ *
4
+ * This file is automatically generated by Traduki 2.0.
5
+ * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
+ */
7
+ declare const _default: {
8
+ 'fabric.reactions.add': string;
9
+ 'fabric.reactions.error.unexpected': string;
10
+ 'fabric.reactions.loading': string;
11
+ 'fabric.reactions.more.emojis': string;
12
+ 'fabric.reactions.more.info': string;
13
+ 'fabric.reactions.other.reacted.users': string;
14
+ 'fabric.reactions.reactwithemoji': string;
15
+ 'reactions.dialog.close': string;
16
+ 'reactions.dialog.left.navigate': string;
17
+ 'reactions.dialog.reactions.count': string;
18
+ 'reactions.dialog.right.navigate': string;
19
+ 'reactions.dialog.viewall': string;
20
+ 'reactions.dialog.viewall.tooltip': string;
21
+ };
22
+ export default _default;