@atlaskit/reactions 24.4.1 → 24.5.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 +9 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +2 -1
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/ReactionDialog/ReactionsDialog.js +1 -1
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/ReactionDialog/ReactionsDialog.js +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 24.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#109300](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109300)
|
|
8
|
+
[`e78402bbbad97`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e78402bbbad97) -
|
|
9
|
+
[ux] Fixes a minor bug where Reactions Dialog was causing reactions to be sorted in place
|
|
10
|
+
affecting the Reactions parent component. Dialog feature gate also has been updated
|
|
11
|
+
|
|
3
12
|
## 24.4.1
|
|
4
13
|
|
|
5
14
|
### 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 = "24.
|
|
14
|
+
var packageVersion = "24.5.0";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.ReactionsDialog = exports.RENDER_MODAL_TESTID = void 0;
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
12
|
var _react = require("react");
|
|
@@ -130,7 +131,7 @@ var ReactionsDialog = exports.ReactionsDialog = function ReactionsDialog(_ref2)
|
|
|
130
131
|
}, 0);
|
|
131
132
|
}, [reactions]);
|
|
132
133
|
var sortedReactions = (0, _react.useMemo)(function () {
|
|
133
|
-
return reactions.sort(function (a, b) {
|
|
134
|
+
return (0, _toConsumableArray2.default)(reactions).sort(function (a, b) {
|
|
134
135
|
return (b === null || b === void 0 ? void 0 : b.count) - (a === null || a === void 0 ? void 0 : a.count);
|
|
135
136
|
});
|
|
136
137
|
}, [reactions]);
|
|
@@ -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 = "24.
|
|
4
|
+
const packageVersion = "24.5.0";
|
|
5
5
|
/**
|
|
6
6
|
* TODO: move to utility package?
|
|
7
7
|
* A random sampling function
|
|
@@ -102,7 +102,7 @@ export const ReactionsDialog = ({
|
|
|
102
102
|
}, 0);
|
|
103
103
|
}, [reactions]);
|
|
104
104
|
const sortedReactions = useMemo(() => {
|
|
105
|
-
return reactions.sort((a, b) => (b === null || b === void 0 ? void 0 : b.count) - (a === null || a === void 0 ? void 0 : a.count));
|
|
105
|
+
return [...reactions].sort((a, b) => (b === null || b === void 0 ? void 0 : b.count) - (a === null || a === void 0 ? void 0 : a.count));
|
|
106
106
|
}, [reactions]);
|
|
107
107
|
const maxPages = Math.max(1, Math.ceil(reactions.length / NUMBER_OF_REACTIONS_TO_DISPLAY));
|
|
108
108
|
const [currentPage, setCurrentPage] = useState(1);
|
|
@@ -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 = "24.
|
|
7
|
+
var packageVersion = "24.5.0";
|
|
8
8
|
/**
|
|
9
9
|
* TODO: move to utility package?
|
|
10
10
|
* A random sampling function
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
4
|
/**
|
|
@@ -118,7 +119,7 @@ export var ReactionsDialog = function ReactionsDialog(_ref2) {
|
|
|
118
119
|
}, 0);
|
|
119
120
|
}, [reactions]);
|
|
120
121
|
var sortedReactions = useMemo(function () {
|
|
121
|
-
return reactions.sort(function (a, b) {
|
|
122
|
+
return _toConsumableArray(reactions).sort(function (a, b) {
|
|
122
123
|
return (b === null || b === void 0 ? void 0 : b.count) - (a === null || a === void 0 ? void 0 : a.count);
|
|
123
124
|
});
|
|
124
125
|
}, [reactions]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.5.0",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/button": "^20.4.0",
|
|
40
40
|
"@atlaskit/emoji": "^67.13.0",
|
|
41
41
|
"@atlaskit/heading": "^4.1.0",
|
|
42
|
-
"@atlaskit/icon": "^23.
|
|
42
|
+
"@atlaskit/icon": "^23.6.0",
|
|
43
43
|
"@atlaskit/modal-dialog": "^12.20.0",
|
|
44
44
|
"@atlaskit/motion": "^1.10.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|