@atlaskit/reactions 25.0.0 → 25.2.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.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/ReactionDialog/ReactionView.js +2 -69
- package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +11 -17
- package/dist/cjs/components/ReactionDialog/ReactionsDialogHeader.js +168 -94
- package/dist/cjs/components/ReactionDialog/ReactionsList.js +2 -1
- package/dist/cjs/components/ReactionSummary/ReactionSummaryView.js +16 -7
- package/dist/cjs/components/Reactions/Reactions.js +27 -14
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/shared/i18n.js +0 -5
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/ReactionDialog/ReactionView.js +4 -48
- package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +11 -17
- package/dist/es2019/components/ReactionDialog/ReactionsDialogHeader.js +129 -68
- package/dist/es2019/components/ReactionDialog/ReactionsList.js +2 -1
- package/dist/es2019/components/ReactionSummary/ReactionSummaryView.js +17 -8
- package/dist/es2019/components/Reactions/Reactions.js +27 -15
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/shared/i18n.js +0 -5
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/ReactionDialog/ReactionView.js +4 -71
- package/dist/esm/components/ReactionDialog/ReactionsDialog.js +11 -17
- package/dist/esm/components/ReactionDialog/ReactionsDialogHeader.js +161 -83
- package/dist/esm/components/ReactionDialog/ReactionsList.js +2 -1
- package/dist/esm/components/ReactionSummary/ReactionSummaryView.js +18 -9
- package/dist/esm/components/Reactions/Reactions.js +29 -16
- package/dist/esm/index.js +1 -1
- package/dist/esm/shared/i18n.js +0 -5
- package/dist/types/components/ReactionDialog/ReactionsDialog.d.ts +2 -1
- package/dist/types/components/ReactionDialog/ReactionsDialogHeader.d.ts +3 -2
- package/dist/types/components/Reactions/Reactions.d.ts +6 -1
- package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/i18n.d.ts +0 -5
- package/dist/types-ts4.5/components/ReactionDialog/ReactionsDialog.d.ts +2 -1
- package/dist/types-ts4.5/components/ReactionDialog/ReactionsDialogHeader.d.ts +3 -2
- package/dist/types-ts4.5/components/Reactions/Reactions.d.ts +6 -1
- package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/shared/i18n.d.ts +0 -5
- package/package.json +3 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import React, { useCallback, useState } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useIntl } from 'react-intl-next';
|
|
5
5
|
import Popup from '@atlaskit/popup';
|
|
6
|
-
import { Box, Inline,
|
|
6
|
+
import { Box, Inline, Pressable, Flex, xcss } from '@atlaskit/primitives';
|
|
7
7
|
import Button from '@atlaskit/button/new';
|
|
8
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
+
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
9
10
|
import { Reaction } from '../Reaction';
|
|
10
11
|
import { ReactionSummaryButton } from './ReactionSummaryButton';
|
|
11
12
|
import { messages } from '../../shared/i18n';
|
|
@@ -17,6 +18,9 @@ var summaryPopupStyles = xcss({
|
|
|
17
18
|
var viewAllButtonStyling = xcss({
|
|
18
19
|
marginTop: 'space.050'
|
|
19
20
|
});
|
|
21
|
+
var iconStyle = xcss({
|
|
22
|
+
height: '20px'
|
|
23
|
+
});
|
|
20
24
|
|
|
21
25
|
/**
|
|
22
26
|
* Test id for the Reactions summary view popup
|
|
@@ -41,6 +45,7 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
|
|
|
41
45
|
subtleReactionsSummaryAndPicker = _ref$subtleReactionsS === void 0 ? false : _ref$subtleReactionsS,
|
|
42
46
|
handleOpenReactionsDialog = _ref.handleOpenReactionsDialog,
|
|
43
47
|
allowUserDialog = _ref.allowUserDialog;
|
|
48
|
+
var intl = useIntl();
|
|
44
49
|
var _useState = useState(false),
|
|
45
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46
51
|
isSummaryPopupOpen = _useState2[0],
|
|
@@ -73,9 +78,11 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
|
|
|
73
78
|
});
|
|
74
79
|
}), allowUserDialog && /*#__PURE__*/React.createElement(Box, {
|
|
75
80
|
xcss: viewAllButtonStyling
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
82
|
+
backgroundColor: "color.background.neutral.subtle",
|
|
83
|
+
padding: "space.0"
|
|
76
84
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
77
|
-
content:
|
|
78
|
-
hideTooltipOnClick: true
|
|
85
|
+
content: intl.formatMessage(messages.seeWhoReactedTooltip)
|
|
79
86
|
}, function (tooltipProps) {
|
|
80
87
|
return /*#__PURE__*/React.createElement(Button, _extends({}, tooltipProps, {
|
|
81
88
|
spacing: "compact",
|
|
@@ -83,11 +90,13 @@ export var ReactionSummaryView = function ReactionSummaryView(_ref) {
|
|
|
83
90
|
handlePopupClose();
|
|
84
91
|
handleOpenReactionsDialog === null || handleOpenReactionsDialog === void 0 || handleOpenReactionsDialog(reactions[0].emojiId);
|
|
85
92
|
}
|
|
86
|
-
}), /*#__PURE__*/React.createElement(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}, /*#__PURE__*/React.createElement(
|
|
90
|
-
|
|
93
|
+
}), /*#__PURE__*/React.createElement(Flex, {
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
xcss: iconStyle
|
|
96
|
+
}, /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
|
|
97
|
+
label: intl.formatMessage(messages.seeWhoReacted)
|
|
98
|
+
})));
|
|
99
|
+
}))));
|
|
91
100
|
},
|
|
92
101
|
isOpen: isSummaryPopupOpen,
|
|
93
102
|
onClose: handlePopupClose,
|
|
@@ -8,13 +8,14 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
8
8
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { jsx } from '@emotion/react';
|
|
11
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
11
|
+
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
12
12
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
13
13
|
import { ModalTransition } from '@atlaskit/modal-dialog';
|
|
14
|
-
import Button from '@atlaskit/button/new';
|
|
15
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
16
|
-
import { Box, xcss } from '@atlaskit/primitives';
|
|
15
|
+
import { Box, Pressable, Flex, xcss } from '@atlaskit/primitives';
|
|
17
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
+
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
18
|
+
import Button from '@atlaskit/button/new';
|
|
18
19
|
import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../../analytics';
|
|
19
20
|
import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../../shared/constants';
|
|
20
21
|
import { messages } from '../../shared/i18n';
|
|
@@ -44,10 +45,6 @@ export var ufoExperiences = {
|
|
|
44
45
|
selectedReactionChangeInsideDialog: ReactionDialogSelectedReactionChanged,
|
|
45
46
|
pageNavigated: ReactionDialogPageNavigation
|
|
46
47
|
};
|
|
47
|
-
var dialogEntrypointButtonStyle = xcss({
|
|
48
|
-
marginRight: 'space.050',
|
|
49
|
-
marginTop: 'space.050'
|
|
50
|
-
});
|
|
51
48
|
|
|
52
49
|
/**
|
|
53
50
|
* Test id for wrapper Reactions div
|
|
@@ -79,6 +76,13 @@ export function getTooltip(status, errorMessage) {
|
|
|
79
76
|
return jsx(FormattedMessage, messages.addReaction);
|
|
80
77
|
}
|
|
81
78
|
}
|
|
79
|
+
var dialogEntrypointButtonStyle = xcss({
|
|
80
|
+
marginRight: 'space.050',
|
|
81
|
+
marginTop: 'space.050'
|
|
82
|
+
});
|
|
83
|
+
var iconStyle = xcss({
|
|
84
|
+
height: '20px'
|
|
85
|
+
});
|
|
82
86
|
|
|
83
87
|
/**
|
|
84
88
|
* Renders list of reactions
|
|
@@ -129,13 +133,16 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
129
133
|
showAddReactionText = _ref$showAddReactionT === void 0 ? false : _ref$showAddReactionT,
|
|
130
134
|
_ref$hideDefaultReact = _ref.hideDefaultReactions,
|
|
131
135
|
hideDefaultReactions = _ref$hideDefaultReact === void 0 ? false : _ref$hideDefaultReact,
|
|
132
|
-
ProfileCardWrapper = _ref.ProfileCardWrapper
|
|
136
|
+
ProfileCardWrapper = _ref.ProfileCardWrapper,
|
|
137
|
+
_ref$onlyRenderPicker = _ref.onlyRenderPicker,
|
|
138
|
+
onlyRenderPicker = _ref$onlyRenderPicker === void 0 ? false : _ref$onlyRenderPicker;
|
|
133
139
|
var _useState = useState(),
|
|
134
140
|
_useState2 = _slicedToArray(_useState, 2),
|
|
135
141
|
selectedEmojiId = _useState2[0],
|
|
136
142
|
setSelectedEmojiId = _useState2[1];
|
|
137
143
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
138
144
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
145
|
+
var intl = useIntl();
|
|
139
146
|
var openTime = useRef();
|
|
140
147
|
var renderTime = useRef();
|
|
141
148
|
useEffect(function () {
|
|
@@ -298,7 +305,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
298
305
|
jsx("div", {
|
|
299
306
|
css: wrapperStyle,
|
|
300
307
|
"data-testid": RENDER_REACTIONS_TESTID
|
|
301
|
-
}, shouldShowSummaryView ? jsx("div", {
|
|
308
|
+
}, !onlyRenderPicker && (shouldShowSummaryView ? jsx("div", {
|
|
302
309
|
"data-testid": RENDER_REACTIONS_SUMMARY_TESTID
|
|
303
310
|
}, jsx(ReactionSummaryView, {
|
|
304
311
|
reactions: sortedReactions,
|
|
@@ -325,20 +332,26 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
325
332
|
showParticleEffect: particleEffectByEmoji[reaction.emojiId],
|
|
326
333
|
showOpaqueBackground: showOpaqueBackground
|
|
327
334
|
});
|
|
328
|
-
}), allowUserDialog && hasEmojiWithFivePlusReactions && !shouldShowSummaryView && jsx(Box, {
|
|
335
|
+
})), !onlyRenderPicker && allowUserDialog && hasEmojiWithFivePlusReactions && !shouldShowSummaryView && jsx(Box, {
|
|
329
336
|
xcss: dialogEntrypointButtonStyle
|
|
337
|
+
}, jsx(Pressable, {
|
|
338
|
+
backgroundColor: "color.background.neutral.subtle",
|
|
339
|
+
padding: "space.0"
|
|
330
340
|
}, jsx(Tooltip, {
|
|
331
|
-
content:
|
|
332
|
-
hideTooltipOnClick: true
|
|
341
|
+
content: intl.formatMessage(messages.seeWhoReactedTooltip)
|
|
333
342
|
}, function (tooltipProps) {
|
|
334
343
|
return jsx(Button, _extends({}, tooltipProps, {
|
|
335
344
|
spacing: "compact",
|
|
336
345
|
onClick: function onClick() {
|
|
337
346
|
return handleOpenReactionsDialog(sortedReactions[0].emojiId);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
347
|
+
}
|
|
348
|
+
}), jsx(Flex, {
|
|
349
|
+
alignItems: "center",
|
|
350
|
+
xcss: iconStyle
|
|
351
|
+
}, jsx(ShowMoreHorizontalIcon, {
|
|
352
|
+
label: intl.formatMessage(messages.seeWhoReacted)
|
|
353
|
+
})));
|
|
354
|
+
}))), jsx(ReactionPicker
|
|
342
355
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
343
356
|
, {
|
|
344
357
|
css: reactionPickerStyle,
|
package/dist/esm/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export { ConnectedReactionPicker, ConnectedReactionsView } from './containers';
|
|
|
6
6
|
export { MemoryReactionsStore, ReactionConsumer } from './store';
|
|
7
7
|
// TODO: Convert all calls for ReactionRequest to Request, RequestClient to Client and ReactionsStore to Store
|
|
8
8
|
|
|
9
|
-
export { ReactionUpdateType } from './types';
|
|
9
|
+
export { ReactionUpdateType, ReactionStatus } from './types';
|
|
10
10
|
export var constants = {
|
|
11
11
|
DefaultReactions: DefaultReactions,
|
|
12
12
|
DefaultReactionsByShortName: DefaultReactionsByShortName,
|
package/dist/esm/shared/i18n.js
CHANGED
|
@@ -69,10 +69,5 @@ export var messages = defineMessages({
|
|
|
69
69
|
id: 'reactions.dialog.viewall.tooltip',
|
|
70
70
|
defaultMessage: 'View all user reactions',
|
|
71
71
|
description: 'Tooltip content of see who reacted link'
|
|
72
|
-
},
|
|
73
|
-
peopleWhoReactedSubheading: {
|
|
74
|
-
id: 'reactions.dialog.people-who-reacted.subheader',
|
|
75
|
-
defaultMessage: 'People who reacted with {emojiShortName}',
|
|
76
|
-
description: 'Subheading that shows the user which emoji tab they are on'
|
|
77
72
|
}
|
|
78
73
|
});
|
|
@@ -29,5 +29,6 @@ export interface ReactionsDialogProps {
|
|
|
29
29
|
handleSelectReaction?: (emojiId: string) => void;
|
|
30
30
|
handlePaginationChange?: (emojiId: string, currentPage: number, maxPages: number) => void;
|
|
31
31
|
ProfileCardWrapper?: ProfileCardWrapper;
|
|
32
|
+
handleReactionMouseEnter?: (emojiId: string) => void;
|
|
32
33
|
}
|
|
33
|
-
export declare const ReactionsDialog: ({ reactions, handleCloseReactionsDialog, emojiProvider, selectedEmojiId, handleSelectReaction, handlePaginationChange, ProfileCardWrapper, }: ReactionsDialogProps) => jsx.JSX.Element;
|
|
34
|
+
export declare const ReactionsDialog: ({ reactions, handleCloseReactionsDialog, emojiProvider, selectedEmojiId, handleSelectReaction, handlePaginationChange, ProfileCardWrapper, handleReactionMouseEnter, }: ReactionsDialogProps) => jsx.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
+
import { type OnCloseHandler } from '@atlaskit/modal-dialog';
|
|
2
3
|
import { type EmojiProvider } from '@atlaskit/emoji/resource';
|
|
3
4
|
import { type ReactionSummary } from '../../types';
|
|
4
5
|
interface ReactionsDialogModalHeaderProps {
|
|
@@ -8,8 +9,8 @@ interface ReactionsDialogModalHeaderProps {
|
|
|
8
9
|
currentPage: number;
|
|
9
10
|
maxPages: number;
|
|
10
11
|
emojiProvider: Promise<EmojiProvider>;
|
|
11
|
-
selectedEmojiId: string;
|
|
12
12
|
currentReactions: ReactionSummary[];
|
|
13
|
+
handleCloseReactionsDialog: OnCloseHandler;
|
|
13
14
|
}
|
|
14
|
-
export declare const ReactionsDialogHeader: ({ totalReactionsCount, handlePreviousPage, handleNextPage, currentPage, maxPages, currentReactions, emojiProvider,
|
|
15
|
+
export declare const ReactionsDialogHeader: ({ totalReactionsCount, handlePreviousPage, handleNextPage, currentPage, maxPages, currentReactions, emojiProvider, handleCloseReactionsDialog, }: ReactionsDialogModalHeaderProps) => jsx.JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -75,6 +75,7 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
75
75
|
*/
|
|
76
76
|
getReactionDetails?: (emojiId: string) => void;
|
|
77
77
|
/**
|
|
78
|
+
* @private
|
|
78
79
|
* @deprecated use getReactionDetails instead
|
|
79
80
|
*/
|
|
80
81
|
onReactionHover?: (emojiId: string) => void;
|
|
@@ -138,6 +139,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
138
139
|
* Optional prop for rendering a profile card wrapper in the Reactions Dialog
|
|
139
140
|
*/
|
|
140
141
|
ProfileCardWrapper?: ProfileCardWrapper;
|
|
142
|
+
/**
|
|
143
|
+
* Optional prop to hide the user reactions and only render the picker
|
|
144
|
+
*/
|
|
145
|
+
onlyRenderPicker?: boolean;
|
|
141
146
|
}
|
|
142
147
|
/**
|
|
143
148
|
* Get content of the tooltip
|
|
@@ -146,4 +151,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
146
151
|
/**
|
|
147
152
|
* Renders list of reactions
|
|
148
153
|
*/
|
|
149
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, }: ReactionsProps) => jsx.JSX.Element>;
|
|
154
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, }: ReactionsProps) => jsx.JSX.Element>;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactionsProps, type ReactionPickerProps } from '../../components';
|
|
3
3
|
import { ReactionStatus, type Actions, type State, type StorePropInput } from '../../types';
|
|
4
4
|
import { type ReactionUpdateSuccess } from '../../types/reaction';
|
|
5
|
-
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
5
|
+
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
6
6
|
/**
|
|
7
7
|
* Wrapper id for reactions list
|
|
8
8
|
*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { Reaction, ReactionPicker, Reactions } from './components';
|
|
|
4
4
|
export { ConnectedReactionPicker, ConnectedReactionsView } from './containers';
|
|
5
5
|
export { MemoryReactionsStore, ReactionConsumer } from './store';
|
|
6
6
|
export type { Client as ReactionClient, Request as ReactionRequest, Store as ReactionsStore, StorePropInput, State, } from './types';
|
|
7
|
-
export { ReactionUpdateType } from './types';
|
|
7
|
+
export { ReactionUpdateType, ReactionStatus } from './types';
|
|
8
8
|
export declare const constants: {
|
|
9
9
|
DefaultReactions: import("@atlaskit/emoji").EmojiId[];
|
|
10
10
|
DefaultReactionsByShortName: Map<string, import("@atlaskit/emoji").EmojiId>;
|
|
@@ -29,5 +29,6 @@ export interface ReactionsDialogProps {
|
|
|
29
29
|
handleSelectReaction?: (emojiId: string) => void;
|
|
30
30
|
handlePaginationChange?: (emojiId: string, currentPage: number, maxPages: number) => void;
|
|
31
31
|
ProfileCardWrapper?: ProfileCardWrapper;
|
|
32
|
+
handleReactionMouseEnter?: (emojiId: string) => void;
|
|
32
33
|
}
|
|
33
|
-
export declare const ReactionsDialog: ({ reactions, handleCloseReactionsDialog, emojiProvider, selectedEmojiId, handleSelectReaction, handlePaginationChange, ProfileCardWrapper, }: ReactionsDialogProps) => jsx.JSX.Element;
|
|
34
|
+
export declare const ReactionsDialog: ({ reactions, handleCloseReactionsDialog, emojiProvider, selectedEmojiId, handleSelectReaction, handlePaginationChange, ProfileCardWrapper, handleReactionMouseEnter, }: ReactionsDialogProps) => jsx.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
|
+
import { type OnCloseHandler } from '@atlaskit/modal-dialog';
|
|
2
3
|
import { type EmojiProvider } from '@atlaskit/emoji/resource';
|
|
3
4
|
import { type ReactionSummary } from '../../types';
|
|
4
5
|
interface ReactionsDialogModalHeaderProps {
|
|
@@ -8,8 +9,8 @@ interface ReactionsDialogModalHeaderProps {
|
|
|
8
9
|
currentPage: number;
|
|
9
10
|
maxPages: number;
|
|
10
11
|
emojiProvider: Promise<EmojiProvider>;
|
|
11
|
-
selectedEmojiId: string;
|
|
12
12
|
currentReactions: ReactionSummary[];
|
|
13
|
+
handleCloseReactionsDialog: OnCloseHandler;
|
|
13
14
|
}
|
|
14
|
-
export declare const ReactionsDialogHeader: ({ totalReactionsCount, handlePreviousPage, handleNextPage, currentPage, maxPages, currentReactions, emojiProvider,
|
|
15
|
+
export declare const ReactionsDialogHeader: ({ totalReactionsCount, handlePreviousPage, handleNextPage, currentPage, maxPages, currentReactions, emojiProvider, handleCloseReactionsDialog, }: ReactionsDialogModalHeaderProps) => jsx.JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -75,6 +75,7 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
75
75
|
*/
|
|
76
76
|
getReactionDetails?: (emojiId: string) => void;
|
|
77
77
|
/**
|
|
78
|
+
* @private
|
|
78
79
|
* @deprecated use getReactionDetails instead
|
|
79
80
|
*/
|
|
80
81
|
onReactionHover?: (emojiId: string) => void;
|
|
@@ -138,6 +139,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
138
139
|
* Optional prop for rendering a profile card wrapper in the Reactions Dialog
|
|
139
140
|
*/
|
|
140
141
|
ProfileCardWrapper?: ProfileCardWrapper;
|
|
142
|
+
/**
|
|
143
|
+
* Optional prop to hide the user reactions and only render the picker
|
|
144
|
+
*/
|
|
145
|
+
onlyRenderPicker?: boolean;
|
|
141
146
|
}
|
|
142
147
|
/**
|
|
143
148
|
* Get content of the tooltip
|
|
@@ -146,4 +151,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
146
151
|
/**
|
|
147
152
|
* Renders list of reactions
|
|
148
153
|
*/
|
|
149
|
-
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, }: ReactionsProps) => jsx.JSX.Element>;
|
|
154
|
+
export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, }: ReactionsProps) => jsx.JSX.Element>;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type ReactionsProps, type ReactionPickerProps } from '../../components';
|
|
3
3
|
import { ReactionStatus, type Actions, type State, type StorePropInput } from '../../types';
|
|
4
4
|
import { type ReactionUpdateSuccess } from '../../types/reaction';
|
|
5
|
-
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
5
|
+
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
6
6
|
/**
|
|
7
7
|
* Wrapper id for reactions list
|
|
8
8
|
*/
|
|
@@ -4,7 +4,7 @@ export { Reaction, ReactionPicker, Reactions } from './components';
|
|
|
4
4
|
export { ConnectedReactionPicker, ConnectedReactionsView } from './containers';
|
|
5
5
|
export { MemoryReactionsStore, ReactionConsumer } from './store';
|
|
6
6
|
export type { Client as ReactionClient, Request as ReactionRequest, Store as ReactionsStore, StorePropInput, State, } from './types';
|
|
7
|
-
export { ReactionUpdateType } from './types';
|
|
7
|
+
export { ReactionUpdateType, ReactionStatus } from './types';
|
|
8
8
|
export declare const constants: {
|
|
9
9
|
DefaultReactions: import("@atlaskit/emoji").EmojiId[];
|
|
10
10
|
DefaultReactionsByShortName: Map<string, import("@atlaskit/emoji").EmojiId>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.2.0",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^10.3.0",
|
|
38
38
|
"@atlaskit/avatar": "^21.18.0",
|
|
39
39
|
"@atlaskit/button": "^20.5.0",
|
|
40
|
-
"@atlaskit/emoji": "^67.
|
|
40
|
+
"@atlaskit/emoji": "^67.14.0",
|
|
41
41
|
"@atlaskit/heading": "^4.1.0",
|
|
42
|
-
"@atlaskit/icon": "^23.
|
|
42
|
+
"@atlaskit/icon": "^23.9.0",
|
|
43
43
|
"@atlaskit/modal-dialog": "^12.20.0",
|
|
44
44
|
"@atlaskit/motion": "^2.0.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^1.0.0",
|