@atlaskit/reactions 21.2.5 → 21.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.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/analytics/ufo.js +10 -2
- package/dist/cjs/components/Counter.js +1 -1
- package/dist/cjs/components/Reaction.js +1 -0
- package/dist/cjs/components/i18n.js +2 -2
- package/dist/cjs/store/ReactionsStore.js +33 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/ufo.js +7 -0
- package/dist/es2019/components/Counter.js +2 -2
- package/dist/es2019/components/Reaction.js +1 -0
- package/dist/es2019/components/i18n.js +2 -2
- package/dist/es2019/store/ReactionsStore.js +31 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/ufo.js +7 -0
- package/dist/esm/components/Counter.js +2 -2
- package/dist/esm/components/Reaction.js +1 -0
- package/dist/esm/components/i18n.js +2 -2
- package/dist/esm/store/ReactionsStore.js +33 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/ufo.d.ts +8 -2
- package/dist/types/client/ReactionClient.d.ts +14 -0
- package/dist/types/store/ReactionsStore.d.ts +13 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 21.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1940b04de7d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1940b04de7d) - Adding new UFO experience for contents list of reacted users should be able to be fetched reliably
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 21.3.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 21.3.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [`8db47b60a8f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8db47b60a8f) - [ux] Updated reactions count color to be accessible, pluralize the more emojis tooltip, and stopped the reactions button click event from propagating into the reactions tooltip.
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 21.2.5
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ReactionsRendered = exports.ReactionsRemove = exports.ReactionsAdd = exports.PickerRender = exports.ExperienceName = exports.ComponentName = void 0;
|
|
6
|
+
exports.ReactionsRendered = exports.ReactionsRemove = exports.ReactionsAdd = exports.ReactionDetailsFetch = exports.PickerRender = exports.ExperienceName = exports.ComponentName = void 0;
|
|
7
7
|
|
|
8
8
|
var _ufo = require("@atlaskit/ufo");
|
|
9
9
|
|
|
@@ -37,6 +37,7 @@ exports.ExperienceName = ExperienceName;
|
|
|
37
37
|
ExperienceName["PICKER_OPENED"] = "reactions-picker-opened";
|
|
38
38
|
ExperienceName["REACTION_ADDED"] = "reaction-added";
|
|
39
39
|
ExperienceName["REACTION_REMOVED"] = "reaction-removed";
|
|
40
|
+
ExperienceName["REACTION_DETAILS_FETCHED"] = "reaction-details-fetched";
|
|
40
41
|
})(ExperienceName || (exports.ExperienceName = ExperienceName = {}));
|
|
41
42
|
|
|
42
43
|
var ComponentName;
|
|
@@ -49,6 +50,7 @@ exports.ComponentName = ComponentName;
|
|
|
49
50
|
(function (ComponentName) {
|
|
50
51
|
ComponentName["PICKER_RENDERED"] = "reactions-picker";
|
|
51
52
|
ComponentName["REACTIONS"] = "reactions-list";
|
|
53
|
+
ComponentName["REACTION_ITEM"] = "reaction-item";
|
|
52
54
|
})(ComponentName || (exports.ComponentName = ComponentName = {}));
|
|
53
55
|
|
|
54
56
|
var PickerRender = new _ufo.UFOExperience(ExperienceName.PICKER_OPENED, createExperienceConfig(ComponentName.PICKER_RENDERED, _ufo.ExperienceTypes.Experience, _ufo.ExperiencePerformanceTypes.InlineResult));
|
|
@@ -65,9 +67,15 @@ var ReactionsRendered = new _ufo.ConcurrentExperience(ExperienceName.REACTIONS_R
|
|
|
65
67
|
exports.ReactionsRendered = ReactionsRendered;
|
|
66
68
|
var ReactionsAdd = new _ufo.ConcurrentExperience(ExperienceName.REACTION_ADDED, createExperienceConfig(ComponentName.REACTIONS, _ufo.ExperienceTypes.Experience, _ufo.ExperiencePerformanceTypes.InlineResult));
|
|
67
69
|
/**
|
|
68
|
-
* Experience when a reaction
|
|
70
|
+
* Experience when a reaction details gets fetched
|
|
69
71
|
*/
|
|
70
72
|
|
|
71
73
|
exports.ReactionsAdd = ReactionsAdd;
|
|
74
|
+
var ReactionDetailsFetch = new _ufo.ConcurrentExperience(ExperienceName.REACTION_DETAILS_FETCHED, createExperienceConfig(ComponentName.REACTION_ITEM, _ufo.ExperienceTypes.Experience, _ufo.ExperiencePerformanceTypes.InlineResult));
|
|
75
|
+
/**
|
|
76
|
+
* Experience when a reaction emoji gets removed/decrement
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
exports.ReactionDetailsFetch = ReactionDetailsFetch;
|
|
72
80
|
var ReactionsRemove = new _ufo.ConcurrentExperience(ExperienceName.REACTION_REMOVED, createExperienceConfig(ComponentName.REACTIONS, _ufo.ExperienceTypes.Experience, _ufo.ExperiencePerformanceTypes.InlineResult));
|
|
73
81
|
exports.ReactionsRemove = ReactionsRemove;
|
|
@@ -31,7 +31,7 @@ exports.counterTestId = counterTestId;
|
|
|
31
31
|
var countStyle = (0, _core.css)({
|
|
32
32
|
fontSize: 11,
|
|
33
33
|
// TODO: nice to have a theme level token for fontSize
|
|
34
|
-
color: (0, _tokens.token)('color.text.subtlest', _colors.
|
|
34
|
+
color: (0, _tokens.token)('color.text.subtlest', _colors.N500),
|
|
35
35
|
overflow: 'hidden',
|
|
36
36
|
position: 'relative',
|
|
37
37
|
padding: '4px 8px 4px 0',
|
|
@@ -112,6 +112,7 @@ var ReactionWithoutAnalytics = /*#__PURE__*/function (_PureComponent) {
|
|
|
112
112
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mounted", false);
|
|
113
113
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMouseDown", function (event) {
|
|
114
114
|
event.preventDefault();
|
|
115
|
+
event.stopPropagation();
|
|
115
116
|
|
|
116
117
|
if (_this.props.onClick && (0, _utils.isLeftClick)(event)) {
|
|
117
118
|
var _this$props = _this.props,
|
|
@@ -14,8 +14,8 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
14
14
|
description: 'Message while reactions are being loaded'
|
|
15
15
|
},
|
|
16
16
|
moreEmoji: {
|
|
17
|
-
id: 'fabric.reactions.more.
|
|
18
|
-
defaultMessage: 'More
|
|
17
|
+
id: 'fabric.reactions.more.emojis',
|
|
18
|
+
defaultMessage: 'More emojis',
|
|
19
19
|
description: 'Tooltip of the "show more" button in the quick reaction selector. The full emoji selector is displayed when the user clicks on it.'
|
|
20
20
|
},
|
|
21
21
|
unexpectedError: {
|
|
@@ -35,9 +35,25 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
35
35
|
* Set of all available UFO experiences relating to reaction element
|
|
36
36
|
*/
|
|
37
37
|
var ufoExperiences = {
|
|
38
|
+
/**
|
|
39
|
+
* Experience when a reaction emoji gets added
|
|
40
|
+
*/
|
|
38
41
|
add: Analytics.UFO.ReactionsAdd,
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Experience when a reaction emoji gets removed/decrement
|
|
45
|
+
*/
|
|
39
46
|
remove: Analytics.UFO.ReactionsRemove,
|
|
40
|
-
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Experience when the list of reactions gets rendered
|
|
50
|
+
*/
|
|
51
|
+
render: Analytics.UFO.ReactionsRendered,
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Experience when a reaction details gets fetched
|
|
55
|
+
*/
|
|
56
|
+
fetchDetails: Analytics.UFO.ReactionDetailsFetch
|
|
41
57
|
};
|
|
42
58
|
exports.ufoExperiences = ufoExperiences;
|
|
43
59
|
|
|
@@ -220,7 +236,22 @@ var MemoryReactionsStore = /*#__PURE__*/function () {
|
|
|
220
236
|
(0, _defineProperty2.default)(this, "toggleReaction", this.withReaction(this.doRemoveReaction, this.doAddReaction));
|
|
221
237
|
(0, _defineProperty2.default)(this, "addReaction", this.withReaction(this.flash, this.doAddReaction));
|
|
222
238
|
(0, _defineProperty2.default)(this, "getDetailedReaction", function (containerAri, ari, emojiId) {
|
|
223
|
-
|
|
239
|
+
var exp = ufoExperiences.fetchDetails.getInstance("".concat(ari, "|").concat(emojiId));
|
|
240
|
+
exp.start();
|
|
241
|
+
|
|
242
|
+
_this.client.getDetailedReaction(containerAri, ari, emojiId).then(function (summary) {
|
|
243
|
+
// ufo get reaction details success
|
|
244
|
+
exp.success();
|
|
245
|
+
|
|
246
|
+
_this.handleDetailedReactionResponse(summary);
|
|
247
|
+
}).catch(function (error) {
|
|
248
|
+
// ufo get reaction details failure
|
|
249
|
+
exp.failure({
|
|
250
|
+
metadata: {
|
|
251
|
+
error: error
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
});
|
|
224
255
|
});
|
|
225
256
|
(0, _defineProperty2.default)(this, "getState", function () {
|
|
226
257
|
return _this.state;
|
package/dist/cjs/version.json
CHANGED
|
@@ -32,6 +32,7 @@ export let ExperienceName;
|
|
|
32
32
|
ExperienceName["PICKER_OPENED"] = "reactions-picker-opened";
|
|
33
33
|
ExperienceName["REACTION_ADDED"] = "reaction-added";
|
|
34
34
|
ExperienceName["REACTION_REMOVED"] = "reaction-removed";
|
|
35
|
+
ExperienceName["REACTION_DETAILS_FETCHED"] = "reaction-details-fetched";
|
|
35
36
|
})(ExperienceName || (ExperienceName = {}));
|
|
36
37
|
|
|
37
38
|
export let ComponentName;
|
|
@@ -42,6 +43,7 @@ export let ComponentName;
|
|
|
42
43
|
(function (ComponentName) {
|
|
43
44
|
ComponentName["PICKER_RENDERED"] = "reactions-picker";
|
|
44
45
|
ComponentName["REACTIONS"] = "reactions-list";
|
|
46
|
+
ComponentName["REACTION_ITEM"] = "reaction-item";
|
|
45
47
|
})(ComponentName || (ComponentName = {}));
|
|
46
48
|
|
|
47
49
|
export const PickerRender = new UFOExperience(ExperienceName.PICKER_OPENED, createExperienceConfig(ComponentName.PICKER_RENDERED, ExperienceTypes.Experience, ExperiencePerformanceTypes.InlineResult));
|
|
@@ -55,6 +57,11 @@ export const ReactionsRendered = new ConcurrentExperience(ExperienceName.REACTIO
|
|
|
55
57
|
*/
|
|
56
58
|
|
|
57
59
|
export const ReactionsAdd = new ConcurrentExperience(ExperienceName.REACTION_ADDED, createExperienceConfig(ComponentName.REACTIONS, ExperienceTypes.Experience, ExperiencePerformanceTypes.InlineResult));
|
|
60
|
+
/**
|
|
61
|
+
* Experience when a reaction details gets fetched
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
export const ReactionDetailsFetch = new ConcurrentExperience(ExperienceName.REACTION_DETAILS_FETCHED, createExperienceConfig(ComponentName.REACTION_ITEM, ExperienceTypes.Experience, ExperiencePerformanceTypes.InlineResult));
|
|
58
65
|
/**
|
|
59
66
|
* Experience when a reaction emoji gets removed/decrement
|
|
60
67
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx, css } from '@emotion/core';
|
|
3
|
-
import {
|
|
3
|
+
import { N500, B400 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { token } from '@atlaskit/tokens';
|
|
5
5
|
import React, { memo } from 'react';
|
|
6
6
|
import { SlideIn, ExitingPersistence, mediumDurationMs } from '@atlaskit/motion';
|
|
@@ -9,7 +9,7 @@ export const counterTestId = 'counter-container';
|
|
|
9
9
|
export const countStyle = css({
|
|
10
10
|
fontSize: 11,
|
|
11
11
|
// TODO: nice to have a theme level token for fontSize
|
|
12
|
-
color: token('color.text.subtlest',
|
|
12
|
+
color: token('color.text.subtlest', N500),
|
|
13
13
|
overflow: 'hidden',
|
|
14
14
|
position: 'relative',
|
|
15
15
|
padding: '4px 8px 4px 0',
|
|
@@ -6,8 +6,8 @@ export const messages = defineMessages({
|
|
|
6
6
|
description: 'Message while reactions are being loaded'
|
|
7
7
|
},
|
|
8
8
|
moreEmoji: {
|
|
9
|
-
id: 'fabric.reactions.more.
|
|
10
|
-
defaultMessage: 'More
|
|
9
|
+
id: 'fabric.reactions.more.emojis',
|
|
10
|
+
defaultMessage: 'More emojis',
|
|
11
11
|
description: 'Tooltip of the "show more" button in the quick reaction selector. The full emoji selector is displayed when the user clicks on it.'
|
|
12
12
|
},
|
|
13
13
|
unexpectedError: {
|
|
@@ -9,9 +9,25 @@ import { isRealErrorFromService } from './utils';
|
|
|
9
9
|
* Set of all available UFO experiences relating to reaction element
|
|
10
10
|
*/
|
|
11
11
|
export const ufoExperiences = {
|
|
12
|
+
/**
|
|
13
|
+
* Experience when a reaction emoji gets added
|
|
14
|
+
*/
|
|
12
15
|
add: Analytics.UFO.ReactionsAdd,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Experience when a reaction emoji gets removed/decrement
|
|
19
|
+
*/
|
|
13
20
|
remove: Analytics.UFO.ReactionsRemove,
|
|
14
|
-
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Experience when the list of reactions gets rendered
|
|
24
|
+
*/
|
|
25
|
+
render: Analytics.UFO.ReactionsRendered,
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Experience when a reaction details gets fetched
|
|
29
|
+
*/
|
|
30
|
+
fetchDetails: Analytics.UFO.ReactionDetailsFetch
|
|
15
31
|
};
|
|
16
32
|
export class MemoryReactionsStore {
|
|
17
33
|
constructor(client, state = {
|
|
@@ -188,7 +204,20 @@ export class MemoryReactionsStore {
|
|
|
188
204
|
_defineProperty(this, "addReaction", this.withReaction(this.flash, this.doAddReaction));
|
|
189
205
|
|
|
190
206
|
_defineProperty(this, "getDetailedReaction", (containerAri, ari, emojiId) => {
|
|
191
|
-
|
|
207
|
+
const exp = ufoExperiences.fetchDetails.getInstance(`${ari}|${emojiId}`);
|
|
208
|
+
exp.start();
|
|
209
|
+
this.client.getDetailedReaction(containerAri, ari, emojiId).then(summary => {
|
|
210
|
+
// ufo get reaction details success
|
|
211
|
+
exp.success();
|
|
212
|
+
this.handleDetailedReactionResponse(summary);
|
|
213
|
+
}).catch(error => {
|
|
214
|
+
// ufo get reaction details failure
|
|
215
|
+
exp.failure({
|
|
216
|
+
metadata: {
|
|
217
|
+
error
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
});
|
|
192
221
|
});
|
|
193
222
|
|
|
194
223
|
_defineProperty(this, "getState", () => this.state);
|
package/dist/es2019/version.json
CHANGED
|
@@ -32,6 +32,7 @@ export var ExperienceName;
|
|
|
32
32
|
ExperienceName["PICKER_OPENED"] = "reactions-picker-opened";
|
|
33
33
|
ExperienceName["REACTION_ADDED"] = "reaction-added";
|
|
34
34
|
ExperienceName["REACTION_REMOVED"] = "reaction-removed";
|
|
35
|
+
ExperienceName["REACTION_DETAILS_FETCHED"] = "reaction-details-fetched";
|
|
35
36
|
})(ExperienceName || (ExperienceName = {}));
|
|
36
37
|
|
|
37
38
|
export var ComponentName;
|
|
@@ -42,6 +43,7 @@ export var ComponentName;
|
|
|
42
43
|
(function (ComponentName) {
|
|
43
44
|
ComponentName["PICKER_RENDERED"] = "reactions-picker";
|
|
44
45
|
ComponentName["REACTIONS"] = "reactions-list";
|
|
46
|
+
ComponentName["REACTION_ITEM"] = "reaction-item";
|
|
45
47
|
})(ComponentName || (ComponentName = {}));
|
|
46
48
|
|
|
47
49
|
export var PickerRender = new UFOExperience(ExperienceName.PICKER_OPENED, createExperienceConfig(ComponentName.PICKER_RENDERED, ExperienceTypes.Experience, ExperiencePerformanceTypes.InlineResult));
|
|
@@ -55,6 +57,11 @@ export var ReactionsRendered = new ConcurrentExperience(ExperienceName.REACTIONS
|
|
|
55
57
|
*/
|
|
56
58
|
|
|
57
59
|
export var ReactionsAdd = new ConcurrentExperience(ExperienceName.REACTION_ADDED, createExperienceConfig(ComponentName.REACTIONS, ExperienceTypes.Experience, ExperiencePerformanceTypes.InlineResult));
|
|
60
|
+
/**
|
|
61
|
+
* Experience when a reaction details gets fetched
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
export var ReactionDetailsFetch = new ConcurrentExperience(ExperienceName.REACTION_DETAILS_FETCHED, createExperienceConfig(ComponentName.REACTION_ITEM, ExperienceTypes.Experience, ExperiencePerformanceTypes.InlineResult));
|
|
58
65
|
/**
|
|
59
66
|
* Experience when a reaction emoji gets removed/decrement
|
|
60
67
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx, css } from '@emotion/core';
|
|
3
|
-
import {
|
|
3
|
+
import { N500, B400 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { token } from '@atlaskit/tokens';
|
|
5
5
|
import React, { memo } from 'react';
|
|
6
6
|
import { SlideIn, ExitingPersistence, mediumDurationMs } from '@atlaskit/motion';
|
|
@@ -9,7 +9,7 @@ export var counterTestId = 'counter-container';
|
|
|
9
9
|
export var countStyle = css({
|
|
10
10
|
fontSize: 11,
|
|
11
11
|
// TODO: nice to have a theme level token for fontSize
|
|
12
|
-
color: token('color.text.subtlest',
|
|
12
|
+
color: token('color.text.subtlest', N500),
|
|
13
13
|
overflow: 'hidden',
|
|
14
14
|
position: 'relative',
|
|
15
15
|
padding: '4px 8px 4px 0',
|
|
@@ -86,6 +86,7 @@ var ReactionWithoutAnalytics = /*#__PURE__*/function (_PureComponent) {
|
|
|
86
86
|
|
|
87
87
|
_defineProperty(_assertThisInitialized(_this), "handleMouseDown", function (event) {
|
|
88
88
|
event.preventDefault();
|
|
89
|
+
event.stopPropagation();
|
|
89
90
|
|
|
90
91
|
if (_this.props.onClick && isLeftClick(event)) {
|
|
91
92
|
var _this$props = _this.props,
|
|
@@ -6,8 +6,8 @@ export var messages = defineMessages({
|
|
|
6
6
|
description: 'Message while reactions are being loaded'
|
|
7
7
|
},
|
|
8
8
|
moreEmoji: {
|
|
9
|
-
id: 'fabric.reactions.more.
|
|
10
|
-
defaultMessage: 'More
|
|
9
|
+
id: 'fabric.reactions.more.emojis',
|
|
10
|
+
defaultMessage: 'More emojis',
|
|
11
11
|
description: 'Tooltip of the "show more" button in the quick reaction selector. The full emoji selector is displayed when the user clicks on it.'
|
|
12
12
|
},
|
|
13
13
|
unexpectedError: {
|
|
@@ -16,9 +16,25 @@ import { isRealErrorFromService } from './utils';
|
|
|
16
16
|
* Set of all available UFO experiences relating to reaction element
|
|
17
17
|
*/
|
|
18
18
|
export var ufoExperiences = {
|
|
19
|
+
/**
|
|
20
|
+
* Experience when a reaction emoji gets added
|
|
21
|
+
*/
|
|
19
22
|
add: Analytics.UFO.ReactionsAdd,
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Experience when a reaction emoji gets removed/decrement
|
|
26
|
+
*/
|
|
20
27
|
remove: Analytics.UFO.ReactionsRemove,
|
|
21
|
-
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Experience when the list of reactions gets rendered
|
|
31
|
+
*/
|
|
32
|
+
render: Analytics.UFO.ReactionsRendered,
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Experience when a reaction details gets fetched
|
|
36
|
+
*/
|
|
37
|
+
fetchDetails: Analytics.UFO.ReactionDetailsFetch
|
|
22
38
|
};
|
|
23
39
|
export var MemoryReactionsStore = /*#__PURE__*/function () {
|
|
24
40
|
function MemoryReactionsStore(client) {
|
|
@@ -214,7 +230,22 @@ export var MemoryReactionsStore = /*#__PURE__*/function () {
|
|
|
214
230
|
_defineProperty(this, "addReaction", this.withReaction(this.flash, this.doAddReaction));
|
|
215
231
|
|
|
216
232
|
_defineProperty(this, "getDetailedReaction", function (containerAri, ari, emojiId) {
|
|
217
|
-
|
|
233
|
+
var exp = ufoExperiences.fetchDetails.getInstance("".concat(ari, "|").concat(emojiId));
|
|
234
|
+
exp.start();
|
|
235
|
+
|
|
236
|
+
_this.client.getDetailedReaction(containerAri, ari, emojiId).then(function (summary) {
|
|
237
|
+
// ufo get reaction details success
|
|
238
|
+
exp.success();
|
|
239
|
+
|
|
240
|
+
_this.handleDetailedReactionResponse(summary);
|
|
241
|
+
}).catch(function (error) {
|
|
242
|
+
// ufo get reaction details failure
|
|
243
|
+
exp.failure({
|
|
244
|
+
metadata: {
|
|
245
|
+
error: error
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
});
|
|
218
249
|
});
|
|
219
250
|
|
|
220
251
|
_defineProperty(this, "getState", function () {
|
package/dist/esm/version.json
CHANGED
|
@@ -6,14 +6,16 @@ export declare enum ExperienceName {
|
|
|
6
6
|
REACTIONS_RENDERED = "reactions-rendered",
|
|
7
7
|
PICKER_OPENED = "reactions-picker-opened",
|
|
8
8
|
REACTION_ADDED = "reaction-added",
|
|
9
|
-
REACTION_REMOVED = "reaction-removed"
|
|
9
|
+
REACTION_REMOVED = "reaction-removed",
|
|
10
|
+
REACTION_DETAILS_FETCHED = "reaction-details-fetched"
|
|
10
11
|
}
|
|
11
12
|
/**
|
|
12
13
|
* UFO types of components been instrumented
|
|
13
14
|
*/
|
|
14
15
|
export declare enum ComponentName {
|
|
15
16
|
PICKER_RENDERED = "reactions-picker",
|
|
16
|
-
REACTIONS = "reactions-list"
|
|
17
|
+
REACTIONS = "reactions-list",
|
|
18
|
+
REACTION_ITEM = "reaction-item"
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* Experience when the emoji picker is opened
|
|
@@ -27,6 +29,10 @@ export declare const ReactionsRendered: ConcurrentExperience;
|
|
|
27
29
|
* Experience when a reaction emoji gets added
|
|
28
30
|
*/
|
|
29
31
|
export declare const ReactionsAdd: ConcurrentExperience;
|
|
32
|
+
/**
|
|
33
|
+
* Experience when a reaction details gets fetched
|
|
34
|
+
*/
|
|
35
|
+
export declare const ReactionDetailsFetch: ConcurrentExperience;
|
|
30
36
|
/**
|
|
31
37
|
* Experience when a reaction emoji gets removed/decrement
|
|
32
38
|
*/
|
|
@@ -4,8 +4,22 @@ export declare type ReactionRequest<T> = (containerAri: string, ari: string, emo
|
|
|
4
4
|
[k: string]: any;
|
|
5
5
|
}) => Promise<T>;
|
|
6
6
|
export interface ReactionClient {
|
|
7
|
+
/**
|
|
8
|
+
* Fetch list of reactions for a given ARI.
|
|
9
|
+
* @param containerAri F
|
|
10
|
+
* @param aris
|
|
11
|
+
*/
|
|
7
12
|
getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
|
|
13
|
+
/**
|
|
14
|
+
* Fetch details for a given reaction.
|
|
15
|
+
*/
|
|
8
16
|
getDetailedReaction: ReactionRequest<ReactionSummary>;
|
|
17
|
+
/**
|
|
18
|
+
* Fetch request when adding a reaction to a container.
|
|
19
|
+
*/
|
|
9
20
|
addReaction: ReactionRequest<ReactionSummary[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Fetch request when removing a reaction from a container.
|
|
23
|
+
*/
|
|
10
24
|
deleteReaction: ReactionRequest<ReactionSummary[]>;
|
|
11
25
|
}
|
|
@@ -20,9 +20,22 @@ export interface StoreMetadata {
|
|
|
20
20
|
* Set of all available UFO experiences relating to reaction element
|
|
21
21
|
*/
|
|
22
22
|
export declare const ufoExperiences: {
|
|
23
|
+
/**
|
|
24
|
+
* Experience when a reaction emoji gets added
|
|
25
|
+
*/
|
|
23
26
|
add: import("@atlaskit/ufo").ConcurrentExperience;
|
|
27
|
+
/**
|
|
28
|
+
* Experience when a reaction emoji gets removed/decrement
|
|
29
|
+
*/
|
|
24
30
|
remove: import("@atlaskit/ufo").ConcurrentExperience;
|
|
31
|
+
/**
|
|
32
|
+
* Experience when the list of reactions gets rendered
|
|
33
|
+
*/
|
|
25
34
|
render: import("@atlaskit/ufo").ConcurrentExperience;
|
|
35
|
+
/**
|
|
36
|
+
* Experience when a reaction details gets fetched
|
|
37
|
+
*/
|
|
38
|
+
fetchDetails: import("@atlaskit/ufo").ConcurrentExperience;
|
|
26
39
|
};
|
|
27
40
|
export interface ReactionsStore extends Types.Actions {
|
|
28
41
|
getState: () => State;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "21.2
|
|
3
|
+
"version": "21.3.2",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
31
31
|
"@atlaskit/button": "^16.3.0",
|
|
32
32
|
"@atlaskit/ds-lib": "^1.4.0",
|
|
33
|
-
"@atlaskit/emoji": "^64.
|
|
33
|
+
"@atlaskit/emoji": "^64.7.0",
|
|
34
34
|
"@atlaskit/icon": "^21.10.0",
|
|
35
|
-
"@atlaskit/motion": "^1.0
|
|
35
|
+
"@atlaskit/motion": "^1.1.0",
|
|
36
36
|
"@atlaskit/popper": "^5.0.0",
|
|
37
37
|
"@atlaskit/theme": "^12.1.0",
|
|
38
|
-
"@atlaskit/tokens": "^0.
|
|
38
|
+
"@atlaskit/tokens": "^0.10.0",
|
|
39
39
|
"@atlaskit/tooltip": "^17.5.0",
|
|
40
40
|
"@atlaskit/ufo": "^0.1.0",
|
|
41
41
|
"@atlaskit/util-service-support": "^6.1.0",
|