@atlaskit/reactions 31.6.3 → 31.7.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 +12 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/Reactions.js +3 -1
- package/dist/cjs/components/Trigger.js +4 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/Reactions.js +3 -1
- package/dist/es2019/components/Trigger.js +2 -1
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/Reactions.js +3 -1
- package/dist/esm/components/Trigger.js +4 -1
- package/dist/types/components/Reactions.d.ts +5 -1
- package/dist/types-ts4.5/components/Reactions.d.ts +5 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 31.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#150353](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/150353)
|
|
8
|
+
[`fb0f2127ccd01`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fb0f2127ccd01) -
|
|
9
|
+
[ux] Removes reactions trigger tooltip when the reaction trigger already has text
|
|
10
|
+
- [#152335](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/152335)
|
|
11
|
+
[`e863365b1e932`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e863365b1e932) -
|
|
12
|
+
Pass reactionPickerPlacement prop into Reactions component to allow for differing aligment of
|
|
13
|
+
reaction picker popup
|
|
14
|
+
|
|
3
15
|
## 31.6.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var _analyticsGasTypes = require("@atlaskit/analytics-gas-types");
|
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
var packageName = "@atlaskit/reactions";
|
|
14
|
-
var packageVersion = "31.
|
|
14
|
+
var packageVersion = "31.7.0";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -146,7 +146,8 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
146
146
|
_ref$hoverableSummary = _ref.hoverableSummaryView,
|
|
147
147
|
hoverableSummaryView = _ref$hoverableSummary === void 0 ? false : _ref$hoverableSummary,
|
|
148
148
|
_ref$isListItem = _ref.isListItem,
|
|
149
|
-
isListItem = _ref$isListItem === void 0 ? false : _ref$isListItem
|
|
149
|
+
isListItem = _ref$isListItem === void 0 ? false : _ref$isListItem,
|
|
150
|
+
reactionPickerPlacement = _ref.reactionPickerPlacement;
|
|
150
151
|
var _useState = (0, _react.useState)(''),
|
|
151
152
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
152
153
|
selectedEmojiId = _useState2[0],
|
|
@@ -366,6 +367,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
366
367
|
isListItem: isListItem,
|
|
367
368
|
hoverableReactionPicker: hoverableSummaryView,
|
|
368
369
|
hoverableReactionPickerDelay: hoverableSummaryView ? 300 : 0,
|
|
370
|
+
reactionPickerPlacement: reactionPickerPlacement,
|
|
369
371
|
className: (0, _runtime.ax)(["_1e0c1o8l _19pk1b66"])
|
|
370
372
|
}), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/_react.default.createElement(_segment.default, {
|
|
371
373
|
name: "reactions-dialog"
|
|
@@ -117,7 +117,10 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react2.default.forwardRef(function
|
|
|
117
117
|
testId: RENDER_TRIGGER_CONTAINER_TESTID
|
|
118
118
|
}, /*#__PURE__*/_react2.default.createElement(_tooltip.default, {
|
|
119
119
|
testId: RENDER_TOOLTIP_TRIGGER_TESTID,
|
|
120
|
-
content: tooltipContent
|
|
120
|
+
content: tooltipContent,
|
|
121
|
+
canAppear: function canAppear() {
|
|
122
|
+
return !showAddReactionText;
|
|
123
|
+
}
|
|
121
124
|
}, isListItem ? /*#__PURE__*/_react2.default.createElement("li", {
|
|
122
125
|
"data-testid": RENDER_LIST_ITEM_WRAPPER_TESTID,
|
|
123
126
|
className: (0, _runtime.ax)(["_qtt8glyw"])
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
3
3
|
const packageName = "@atlaskit/reactions";
|
|
4
|
-
const packageVersion = "31.
|
|
4
|
+
const packageVersion = "31.7.0";
|
|
5
5
|
/**
|
|
6
6
|
* TODO: move to utility package?
|
|
7
7
|
* A random sampling function
|
|
@@ -108,7 +108,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
108
108
|
useButtonAlignmentStyling = false,
|
|
109
109
|
reactionPickerTriggerText,
|
|
110
110
|
hoverableSummaryView = false,
|
|
111
|
-
isListItem = false
|
|
111
|
+
isListItem = false,
|
|
112
|
+
reactionPickerPlacement
|
|
112
113
|
}) => {
|
|
113
114
|
const [selectedEmojiId, setSelectedEmojiId] = useState('');
|
|
114
115
|
const {
|
|
@@ -313,6 +314,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
313
314
|
isListItem: isListItem,
|
|
314
315
|
hoverableReactionPicker: hoverableSummaryView,
|
|
315
316
|
hoverableReactionPickerDelay: hoverableSummaryView ? 300 : 0,
|
|
317
|
+
reactionPickerPlacement: reactionPickerPlacement,
|
|
316
318
|
className: ax(["_1e0c1o8l _19pk1b66"])
|
|
317
319
|
}), /*#__PURE__*/React.createElement(ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/React.createElement(UFOSegment, {
|
|
318
320
|
name: "reactions-dialog"
|
|
@@ -101,7 +101,8 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
101
101
|
testId: RENDER_TRIGGER_CONTAINER_TESTID
|
|
102
102
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
103
103
|
testId: RENDER_TOOLTIP_TRIGGER_TESTID,
|
|
104
|
-
content: tooltipContent
|
|
104
|
+
content: tooltipContent,
|
|
105
|
+
canAppear: () => !showAddReactionText
|
|
105
106
|
}, isListItem ? /*#__PURE__*/React.createElement("li", {
|
|
106
107
|
"data-testid": RENDER_LIST_ITEM_WRAPPER_TESTID,
|
|
107
108
|
className: ax(["_qtt8glyw"])
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
5
5
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
6
6
|
var packageName = "@atlaskit/reactions";
|
|
7
|
-
var packageVersion = "31.
|
|
7
|
+
var packageVersion = "31.7.0";
|
|
8
8
|
/**
|
|
9
9
|
* TODO: move to utility package?
|
|
10
10
|
* A random sampling function
|
|
@@ -134,7 +134,8 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
134
134
|
_ref$hoverableSummary = _ref.hoverableSummaryView,
|
|
135
135
|
hoverableSummaryView = _ref$hoverableSummary === void 0 ? false : _ref$hoverableSummary,
|
|
136
136
|
_ref$isListItem = _ref.isListItem,
|
|
137
|
-
isListItem = _ref$isListItem === void 0 ? false : _ref$isListItem
|
|
137
|
+
isListItem = _ref$isListItem === void 0 ? false : _ref$isListItem,
|
|
138
|
+
reactionPickerPlacement = _ref.reactionPickerPlacement;
|
|
138
139
|
var _useState = useState(''),
|
|
139
140
|
_useState2 = _slicedToArray(_useState, 2),
|
|
140
141
|
selectedEmojiId = _useState2[0],
|
|
@@ -354,6 +355,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
354
355
|
isListItem: isListItem,
|
|
355
356
|
hoverableReactionPicker: hoverableSummaryView,
|
|
356
357
|
hoverableReactionPickerDelay: hoverableSummaryView ? 300 : 0,
|
|
358
|
+
reactionPickerPlacement: reactionPickerPlacement,
|
|
357
359
|
className: ax(["_1e0c1o8l _19pk1b66"])
|
|
358
360
|
}), /*#__PURE__*/React.createElement(ModalTransition, null, !!selectedEmojiId && /*#__PURE__*/React.createElement(UFOSegment, {
|
|
359
361
|
name: "reactions-dialog"
|
|
@@ -110,7 +110,10 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
110
110
|
testId: RENDER_TRIGGER_CONTAINER_TESTID
|
|
111
111
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
112
112
|
testId: RENDER_TOOLTIP_TRIGGER_TESTID,
|
|
113
|
-
content: tooltipContent
|
|
113
|
+
content: tooltipContent,
|
|
114
|
+
canAppear: function canAppear() {
|
|
115
|
+
return !showAddReactionText;
|
|
116
|
+
}
|
|
114
117
|
}, isListItem ? /*#__PURE__*/React.createElement("li", {
|
|
115
118
|
"data-testid": RENDER_LIST_ITEM_WRAPPER_TESTID,
|
|
116
119
|
className: ax(["_qtt8glyw"])
|
|
@@ -169,6 +169,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
169
169
|
* Optional prop to say if the reactions component is in a list
|
|
170
170
|
*/
|
|
171
171
|
isListItem?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Optional prop to change the placement of the reaction picker popup
|
|
174
|
+
*/
|
|
175
|
+
reactionPickerPlacement?: Placement;
|
|
172
176
|
}
|
|
173
177
|
export interface OpenReactionsDialogOptions {
|
|
174
178
|
emojiId?: string;
|
|
@@ -181,4 +185,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
181
185
|
/**
|
|
182
186
|
* Renders list of reactions
|
|
183
187
|
*/
|
|
184
|
-
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, }: ReactionsProps) => JSX.Element>;
|
|
188
|
+
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, reactionPickerPlacement, }: ReactionsProps) => JSX.Element>;
|
|
@@ -169,6 +169,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
169
169
|
* Optional prop to say if the reactions component is in a list
|
|
170
170
|
*/
|
|
171
171
|
isListItem?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Optional prop to change the placement of the reaction picker popup
|
|
174
|
+
*/
|
|
175
|
+
reactionPickerPlacement?: Placement;
|
|
172
176
|
}
|
|
173
177
|
export interface OpenReactionsDialogOptions {
|
|
174
178
|
emojiId?: string;
|
|
@@ -181,4 +185,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
|
|
|
181
185
|
/**
|
|
182
186
|
* Renders list of reactions
|
|
183
187
|
*/
|
|
184
|
-
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, }: ReactionsProps) => JSX.Element>;
|
|
188
|
+
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, reactionPickerPlacement, }: ReactionsProps) => JSX.Element>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.7.0",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/css": "^0.10.0",
|
|
41
41
|
"@atlaskit/emoji": "^69.1.0",
|
|
42
42
|
"@atlaskit/heading": "^5.2.0",
|
|
43
|
-
"@atlaskit/icon": "^25.
|
|
43
|
+
"@atlaskit/icon": "^25.8.0",
|
|
44
44
|
"@atlaskit/modal-dialog": "^14.1.0",
|
|
45
45
|
"@atlaskit/motion": "^5.1.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|