@atlaskit/reactions 22.9.0 → 22.10.1

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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 22.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#119960](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119960)
8
+ [`77542b34dfee2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77542b34dfee2) -
9
+ Exposed particleEffectByEmoji prop in ConnectedReactionsView to support particle effect
10
+ - Updated dependencies
11
+
12
+ ## 22.10.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#120418](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/120418)
17
+ [`a0121db0d5a1c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a0121db0d5a1c) -
18
+ [ux] Add support for quick reactions to summary view
19
+
3
20
  ## 22.9.0
4
21
 
5
22
  ### Minor 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 = "22.9.0";
14
+ var packageVersion = "22.10.1";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -272,7 +272,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
272
272
  });
273
273
  return reactions.concat(items);
274
274
  }, [quickReactionEmojis, reactions]);
275
- var shouldShowSummaryView = summaryViewEnabled && memorizedReactions.length >= summaryViewThreshold && memorizedReactions.length > 0;
275
+ var shouldShowSummaryView = summaryViewEnabled && memorizedReactions.length >= summaryViewThreshold && reactions.length > 0;
276
276
  return (
277
277
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
278
278
  (0, _react2.jsx)("div", {
@@ -17,7 +17,7 @@ var _analyticsNext = require("@atlaskit/analytics-next");
17
17
  var _components = require("../../components");
18
18
  var _store2 = require("../../store");
19
19
  var _types = require("../../types");
20
- var _excluded = ["ari", "containerAri", "store"];
20
+ var _excluded = ["ari", "containerAri", "store", "particleEffectByEmojiEnabled"];
21
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
23
  /**
@@ -31,7 +31,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
31
31
  /**
32
32
  * Export the mapper function outside the component so easier to do unit tests
33
33
  */
34
- var mapStateToPropsHelper = exports.mapStateToPropsHelper = function mapStateToPropsHelper(containerAri, ari, state) {
34
+ var mapStateToPropsHelper = exports.mapStateToPropsHelper = function mapStateToPropsHelper(containerAri, ari, particleEffectByEmojiEnabled, state) {
35
35
  var reactionsState = state && state.reactions["".concat(containerAri, "|").concat(ari)];
36
36
  if (!state || !reactionsState) {
37
37
  return {
@@ -44,7 +44,8 @@ var mapStateToPropsHelper = exports.mapStateToPropsHelper = function mapStateToP
44
44
  return {
45
45
  reactions: reactionsState.reactions,
46
46
  status: reactionsState.status,
47
- flash: state.flash["".concat(containerAri, "|").concat(ari)]
47
+ flash: state.flash["".concat(containerAri, "|").concat(ari)],
48
+ particleEffectByEmoji: particleEffectByEmojiEnabled ? state.particleEffectByEmoji["".concat(containerAri, "|").concat(ari)] : {}
48
49
  };
49
50
  case _types.ReactionStatus.error:
50
51
  return {
@@ -82,6 +83,7 @@ var ConnectedReactionsView = exports.ConnectedReactionsView = function Connected
82
83
  var ari = props.ari,
83
84
  containerAri = props.containerAri,
84
85
  store = props.store,
86
+ particleEffectByEmojiEnabled = props.particleEffectByEmojiEnabled,
85
87
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
86
88
  /**
87
89
  * Reference to the <Reactions /> component instance mandatory props
@@ -122,8 +124,8 @@ var ConnectedReactionsView = exports.ConnectedReactionsView = function Connected
122
124
  * @param state store instance latest data
123
125
  */
124
126
  var mapStateToProps = (0, _react.useCallback)(function (state) {
125
- return mapStateToPropsHelper(containerAri, ari, state);
126
- }, [containerAri, ari]);
127
+ return mapStateToPropsHelper(containerAri, ari, particleEffectByEmojiEnabled, state);
128
+ }, [containerAri, ari, particleEffectByEmojiEnabled]);
127
129
 
128
130
  /**
129
131
  * Map the store instance "actions" methods to the <Reactions /> component actions methods
@@ -53,7 +53,8 @@ var MemoryReactionsStore = exports.MemoryReactionsStore = /*#__PURE__*/function
53
53
  */
54
54
  (0, _defineProperty2.default)(this, "initialState", {
55
55
  reactions: {},
56
- flash: {}
56
+ flash: {},
57
+ particleEffectByEmoji: {}
57
58
  });
58
59
  /**
59
60
  * Update the store state data with a new data
@@ -132,6 +133,7 @@ var MemoryReactionsStore = exports.MemoryReactionsStore = /*#__PURE__*/function
132
133
  emojiId = reaction.emojiId;
133
134
  _this.optmisticUpdate(containerAri, ari, emojiId)(_utils.addOne);
134
135
  _this.flash(reaction);
136
+ _this.setParticleEffectForEmoji(containerAri, ari, emojiId, true);
135
137
  var exp = ufoExperiences.add.getInstance("".concat(ari, "|").concat(emojiId));
136
138
  // ufo start reaction experience
137
139
  exp.start();
@@ -167,6 +169,7 @@ var MemoryReactionsStore = exports.MemoryReactionsStore = /*#__PURE__*/function
167
169
  ari = reaction.ari,
168
170
  emojiId = reaction.emojiId;
169
171
  var exp = ufoExperiences.remove.getInstance("".concat(ari, "|").concat(emojiId));
172
+ _this.setParticleEffectForEmoji(containerAri, ari, emojiId, false);
170
173
 
171
174
  // ufo start reaction experience
172
175
 
@@ -299,6 +302,13 @@ var MemoryReactionsStore = exports.MemoryReactionsStore = /*#__PURE__*/function
299
302
  flash: _objectSpread(_objectSpread({}, this.state.flash), {}, (0, _defineProperty2.default)({}, "".concat(containerAri, "|").concat(ari), _objectSpread(_objectSpread({}, this.state.flash["".concat(containerAri, "|").concat(ari)]), {}, (0, _defineProperty2.default)({}, emojiId, flash))))
300
303
  });
301
304
  }
305
+ }, {
306
+ key: "setParticleEffectForEmoji",
307
+ value: function setParticleEffectForEmoji(containerAri, ari, emojiId, enable) {
308
+ this.setState({
309
+ particleEffectByEmoji: _objectSpread(_objectSpread({}, this.state.particleEffectByEmoji), {}, (0, _defineProperty2.default)({}, "".concat(containerAri, "|").concat(ari), _objectSpread(_objectSpread({}, this.state.particleEffectByEmoji["".concat(containerAri, "|").concat(ari)]), {}, (0, _defineProperty2.default)({}, emojiId, enable))))
310
+ });
311
+ }
302
312
  }, {
303
313
  key: "withReadyReaction",
304
314
  value:
@@ -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 = "22.9.0";
4
+ const packageVersion = "22.10.1";
5
5
  /**
6
6
  * TODO: move to utility package?
7
7
  * A random sampling function
@@ -241,7 +241,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
241
241
  });
242
242
  return reactions.concat(items);
243
243
  }, [quickReactionEmojis, reactions]);
244
- const shouldShowSummaryView = summaryViewEnabled && memorizedReactions.length >= summaryViewThreshold && memorizedReactions.length > 0;
244
+ const shouldShowSummaryView = summaryViewEnabled && memorizedReactions.length >= summaryViewThreshold && reactions.length > 0;
245
245
  return (
246
246
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
247
247
  jsx("div", {
@@ -17,7 +17,7 @@ import { ReactionStatus } from '../../types';
17
17
  /**
18
18
  * Export the mapper function outside the component so easier to do unit tests
19
19
  */
20
- export const mapStateToPropsHelper = (containerAri, ari, state) => {
20
+ export const mapStateToPropsHelper = (containerAri, ari, particleEffectByEmojiEnabled, state) => {
21
21
  const reactionsState = state && state.reactions[`${containerAri}|${ari}`];
22
22
  if (!state || !reactionsState) {
23
23
  return {
@@ -30,7 +30,8 @@ export const mapStateToPropsHelper = (containerAri, ari, state) => {
30
30
  return {
31
31
  reactions: reactionsState.reactions,
32
32
  status: reactionsState.status,
33
- flash: state.flash[`${containerAri}|${ari}`]
33
+ flash: state.flash[`${containerAri}|${ari}`],
34
+ particleEffectByEmoji: particleEffectByEmojiEnabled ? state.particleEffectByEmoji[`${containerAri}|${ari}`] : {}
34
35
  };
35
36
  case ReactionStatus.error:
36
37
  return {
@@ -69,6 +70,7 @@ export const ConnectedReactionsView = props => {
69
70
  ari,
70
71
  containerAri,
71
72
  store,
73
+ particleEffectByEmojiEnabled,
72
74
  ...rest
73
75
  } = props;
74
76
  /**
@@ -105,8 +107,8 @@ export const ConnectedReactionsView = props => {
105
107
  * @param state store instance latest data
106
108
  */
107
109
  const mapStateToProps = useCallback(state => {
108
- return mapStateToPropsHelper(containerAri, ari, state);
109
- }, [containerAri, ari]);
110
+ return mapStateToPropsHelper(containerAri, ari, particleEffectByEmojiEnabled, state);
111
+ }, [containerAri, ari, particleEffectByEmojiEnabled]);
110
112
 
111
113
  /**
112
114
  * Map the store instance "actions" methods to the <Reactions /> component actions methods
@@ -40,7 +40,8 @@ export class MemoryReactionsStore {
40
40
  */
41
41
  _defineProperty(this, "initialState", {
42
42
  reactions: {},
43
- flash: {}
43
+ flash: {},
44
+ particleEffectByEmoji: {}
44
45
  });
45
46
  /**
46
47
  * Update the store state data with a new data
@@ -122,6 +123,7 @@ export class MemoryReactionsStore {
122
123
  } = reaction;
123
124
  this.optmisticUpdate(containerAri, ari, emojiId)(addOne);
124
125
  this.flash(reaction);
126
+ this.setParticleEffectForEmoji(containerAri, ari, emojiId, true);
125
127
  const exp = ufoExperiences.add.getInstance(`${ari}|${emojiId}`);
126
128
  // ufo start reaction experience
127
129
  exp.start();
@@ -159,6 +161,7 @@ export class MemoryReactionsStore {
159
161
  emojiId
160
162
  } = reaction;
161
163
  const exp = ufoExperiences.remove.getInstance(`${ari}|${emojiId}`);
164
+ this.setParticleEffectForEmoji(containerAri, ari, emojiId, false);
162
165
 
163
166
  // ufo start reaction experience
164
167
 
@@ -294,6 +297,17 @@ export class MemoryReactionsStore {
294
297
  }
295
298
  });
296
299
  }
300
+ setParticleEffectForEmoji(containerAri, ari, emojiId, enable) {
301
+ this.setState({
302
+ particleEffectByEmoji: {
303
+ ...this.state.particleEffectByEmoji,
304
+ [`${containerAri}|${ari}`]: {
305
+ ...this.state.particleEffectByEmoji[`${containerAri}|${ari}`],
306
+ [emojiId]: enable
307
+ }
308
+ }
309
+ });
310
+ }
297
311
  /**
298
312
  * Utility function to help execute a callback to Reaction if its state is ready.
299
313
  *
@@ -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 = "22.9.0";
7
+ var packageVersion = "22.10.1";
8
8
  /**
9
9
  * TODO: move to utility package?
10
10
  * A random sampling function
@@ -259,7 +259,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
259
259
  });
260
260
  return reactions.concat(items);
261
261
  }, [quickReactionEmojis, reactions]);
262
- var shouldShowSummaryView = summaryViewEnabled && memorizedReactions.length >= summaryViewThreshold && memorizedReactions.length > 0;
262
+ var shouldShowSummaryView = summaryViewEnabled && memorizedReactions.length >= summaryViewThreshold && reactions.length > 0;
263
263
  return (
264
264
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
265
265
  jsx("div", {
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["ari", "containerAri", "store"];
5
+ var _excluded = ["ari", "containerAri", "store", "particleEffectByEmojiEnabled"];
6
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
7
7
  import React, { useCallback, useEffect, useRef, useState } from 'react';
8
8
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
@@ -22,7 +22,7 @@ import { ReactionStatus } from '../../types';
22
22
  /**
23
23
  * Export the mapper function outside the component so easier to do unit tests
24
24
  */
25
- export var mapStateToPropsHelper = function mapStateToPropsHelper(containerAri, ari, state) {
25
+ export var mapStateToPropsHelper = function mapStateToPropsHelper(containerAri, ari, particleEffectByEmojiEnabled, state) {
26
26
  var reactionsState = state && state.reactions["".concat(containerAri, "|").concat(ari)];
27
27
  if (!state || !reactionsState) {
28
28
  return {
@@ -35,7 +35,8 @@ export var mapStateToPropsHelper = function mapStateToPropsHelper(containerAri,
35
35
  return {
36
36
  reactions: reactionsState.reactions,
37
37
  status: reactionsState.status,
38
- flash: state.flash["".concat(containerAri, "|").concat(ari)]
38
+ flash: state.flash["".concat(containerAri, "|").concat(ari)],
39
+ particleEffectByEmoji: particleEffectByEmojiEnabled ? state.particleEffectByEmoji["".concat(containerAri, "|").concat(ari)] : {}
39
40
  };
40
41
  case ReactionStatus.error:
41
42
  return {
@@ -73,6 +74,7 @@ export var ConnectedReactionsView = function ConnectedReactionsView(props) {
73
74
  var ari = props.ari,
74
75
  containerAri = props.containerAri,
75
76
  store = props.store,
77
+ particleEffectByEmojiEnabled = props.particleEffectByEmojiEnabled,
76
78
  rest = _objectWithoutProperties(props, _excluded);
77
79
  /**
78
80
  * Reference to the <Reactions /> component instance mandatory props
@@ -113,8 +115,8 @@ export var ConnectedReactionsView = function ConnectedReactionsView(props) {
113
115
  * @param state store instance latest data
114
116
  */
115
117
  var mapStateToProps = useCallback(function (state) {
116
- return mapStateToPropsHelper(containerAri, ari, state);
117
- }, [containerAri, ari]);
118
+ return mapStateToPropsHelper(containerAri, ari, particleEffectByEmojiEnabled, state);
119
+ }, [containerAri, ari, particleEffectByEmojiEnabled]);
118
120
 
119
121
  /**
120
122
  * Map the store instance "actions" methods to the <Reactions /> component actions methods
@@ -48,7 +48,8 @@ export var MemoryReactionsStore = /*#__PURE__*/function () {
48
48
  */
49
49
  _defineProperty(this, "initialState", {
50
50
  reactions: {},
51
- flash: {}
51
+ flash: {},
52
+ particleEffectByEmoji: {}
52
53
  });
53
54
  /**
54
55
  * Update the store state data with a new data
@@ -127,6 +128,7 @@ export var MemoryReactionsStore = /*#__PURE__*/function () {
127
128
  emojiId = reaction.emojiId;
128
129
  _this.optmisticUpdate(containerAri, ari, emojiId)(addOne);
129
130
  _this.flash(reaction);
131
+ _this.setParticleEffectForEmoji(containerAri, ari, emojiId, true);
130
132
  var exp = ufoExperiences.add.getInstance("".concat(ari, "|").concat(emojiId));
131
133
  // ufo start reaction experience
132
134
  exp.start();
@@ -162,6 +164,7 @@ export var MemoryReactionsStore = /*#__PURE__*/function () {
162
164
  ari = reaction.ari,
163
165
  emojiId = reaction.emojiId;
164
166
  var exp = ufoExperiences.remove.getInstance("".concat(ari, "|").concat(emojiId));
167
+ _this.setParticleEffectForEmoji(containerAri, ari, emojiId, false);
165
168
 
166
169
  // ufo start reaction experience
167
170
 
@@ -294,6 +297,13 @@ export var MemoryReactionsStore = /*#__PURE__*/function () {
294
297
  flash: _objectSpread(_objectSpread({}, this.state.flash), {}, _defineProperty({}, "".concat(containerAri, "|").concat(ari), _objectSpread(_objectSpread({}, this.state.flash["".concat(containerAri, "|").concat(ari)]), {}, _defineProperty({}, emojiId, flash))))
295
298
  });
296
299
  }
300
+ }, {
301
+ key: "setParticleEffectForEmoji",
302
+ value: function setParticleEffectForEmoji(containerAri, ari, emojiId, enable) {
303
+ this.setState({
304
+ particleEffectByEmoji: _objectSpread(_objectSpread({}, this.state.particleEffectByEmoji), {}, _defineProperty({}, "".concat(containerAri, "|").concat(ari), _objectSpread(_objectSpread({}, this.state.particleEffectByEmoji["".concat(containerAri, "|").concat(ari)]), {}, _defineProperty({}, emojiId, enable))))
305
+ });
306
+ }
297
307
  }, {
298
308
  key: "withReadyReaction",
299
309
  value:
@@ -16,20 +16,28 @@ export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quick
16
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
17
  */
18
18
  store: StorePropInput;
19
+ /**
20
+ * Optional boolean to control if particle animation on reactions appear
21
+ */
22
+ particleEffectByEmojiEnabled?: boolean;
19
23
  }
20
24
  /**
21
25
  * Export the mapper function outside the component so easier to do unit tests
22
26
  */
23
- export declare const mapStateToPropsHelper: (containerAri: string, ari: string, state?: State) => {
27
+ export declare const mapStateToPropsHelper: (containerAri: string, ari: string, particleEffectByEmojiEnabled?: boolean, state?: State) => {
24
28
  status: ReactionStatus;
25
29
  reactions: never[];
26
30
  flash?: undefined;
31
+ particleEffectByEmoji?: undefined;
27
32
  } | {
28
33
  reactions: import("../../types").ReactionSummary[];
29
34
  status: ReactionStatus.ready;
30
35
  flash: {
31
36
  [emojiId: string]: boolean;
32
37
  };
38
+ particleEffectByEmoji: {
39
+ [emojiId: string]: boolean;
40
+ };
33
41
  };
34
42
  /**
35
43
  * Export the mapper function outside the component so easier to do unit tests
@@ -53,6 +53,7 @@ export declare class MemoryReactionsStore implements Store {
53
53
  private handleDetailedReactionResponse;
54
54
  private setFlash;
55
55
  private flash;
56
+ private setParticleEffectForEmoji;
56
57
  private optmisticUpdate;
57
58
  /**
58
59
  * Utility function to help execute a callback to Reaction if its state is ready.
@@ -60,4 +60,12 @@ export type State = {
60
60
  [emojiId: string]: boolean;
61
61
  };
62
62
  };
63
+ /**
64
+ * floating reactions for given emojis as true|false (key => unique id, value => collection of emojiIds and true|false to apply floating animation)
65
+ */
66
+ particleEffectByEmoji: {
67
+ [key: string]: {
68
+ [emojiId: string]: boolean;
69
+ };
70
+ };
63
71
  };
@@ -16,20 +16,28 @@ export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quick
16
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
17
  */
18
18
  store: StorePropInput;
19
+ /**
20
+ * Optional boolean to control if particle animation on reactions appear
21
+ */
22
+ particleEffectByEmojiEnabled?: boolean;
19
23
  }
20
24
  /**
21
25
  * Export the mapper function outside the component so easier to do unit tests
22
26
  */
23
- export declare const mapStateToPropsHelper: (containerAri: string, ari: string, state?: State) => {
27
+ export declare const mapStateToPropsHelper: (containerAri: string, ari: string, particleEffectByEmojiEnabled?: boolean, state?: State) => {
24
28
  status: ReactionStatus;
25
29
  reactions: never[];
26
30
  flash?: undefined;
31
+ particleEffectByEmoji?: undefined;
27
32
  } | {
28
33
  reactions: import("../../types").ReactionSummary[];
29
34
  status: ReactionStatus.ready;
30
35
  flash: {
31
36
  [emojiId: string]: boolean;
32
37
  };
38
+ particleEffectByEmoji: {
39
+ [emojiId: string]: boolean;
40
+ };
33
41
  };
34
42
  /**
35
43
  * Export the mapper function outside the component so easier to do unit tests
@@ -53,6 +53,7 @@ export declare class MemoryReactionsStore implements Store {
53
53
  private handleDetailedReactionResponse;
54
54
  private setFlash;
55
55
  private flash;
56
+ private setParticleEffectForEmoji;
56
57
  private optmisticUpdate;
57
58
  /**
58
59
  * Utility function to help execute a callback to Reaction if its state is ready.
@@ -60,4 +60,12 @@ export type State = {
60
60
  [emojiId: string]: boolean;
61
61
  };
62
62
  };
63
+ /**
64
+ * floating reactions for given emojis as true|false (key => unique id, value => collection of emojiIds and true|false to apply floating animation)
65
+ */
66
+ particleEffectByEmoji: {
67
+ [key: string]: {
68
+ [emojiId: string]: boolean;
69
+ };
70
+ };
63
71
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "22.9.0",
3
+ "version": "22.10.1",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/analytics-namespaced-context": "^6.10.0",
38
38
  "@atlaskit/analytics-next": "^9.3.0",
39
39
  "@atlaskit/avatar": "^21.11.0",
40
- "@atlaskit/button": "^18.4.0",
40
+ "@atlaskit/button": "^19.0.0",
41
41
  "@atlaskit/emoji": "^67.6.0",
42
42
  "@atlaskit/icon": "^22.6.0",
43
43
  "@atlaskit/modal-dialog": "^12.14.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/spinner": "^16.2.0",
49
49
  "@atlaskit/tabs": "^16.3.0",
50
50
  "@atlaskit/theme": "^12.11.0",
51
- "@atlaskit/tokens": "^1.54.0",
51
+ "@atlaskit/tokens": "^1.56.0",
52
52
  "@atlaskit/tooltip": "^18.5.0",
53
53
  "@atlaskit/ufo": "^0.2.0",
54
54
  "@atlaskit/util-service-support": "^6.2.0",