@atlaskit/reactions 22.5.8 → 22.5.9
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 +6 -0
- package/dist/cjs/MockReactionsClient.js +0 -1
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/Counter/Counter.js +2 -2
- package/dist/cjs/components/FlashAnimation/FlashAnimation.js +2 -4
- package/dist/cjs/components/Reaction/Reaction.js +2 -2
- package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +2 -2
- package/dist/cjs/components/ReactionDialog/ReactionsList.js +2 -2
- package/dist/cjs/components/ReactionPicker/ReactionPicker.js +2 -2
- package/dist/cjs/components/ReactionPicker/RepositionOnUpdate.js +2 -2
- package/dist/cjs/components/Reactions/Reactions.js +2 -2
- package/dist/cjs/components/Selector/Selector.js +2 -2
- package/dist/cjs/components/UfoErrorBoundary/UfoErrorBoundary.js +1 -1
- package/dist/cjs/containers/ConnectedReactionsView/ConnectedReactionsView.js +2 -2
- package/dist/cjs/store/ReactionConsumer.js +1 -1
- package/dist/es2019/MockReactionsClient.js +0 -1
- package/dist/es2019/analytics/index.js +3 -2
- package/dist/es2019/components/FlashAnimation/FlashAnimation.js +1 -1
- package/dist/esm/MockReactionsClient.js +0 -1
- package/dist/esm/analytics/index.js +3 -2
- package/dist/esm/components/FlashAnimation/FlashAnimation.js +1 -1
- package/dist/esm/components/UfoErrorBoundary/UfoErrorBoundary.js +1 -1
- package/dist/esm/store/ReactionConsumer.js +1 -1
- package/dist/types/components/FlashAnimation/FlashAnimation.d.ts +5 -4
- package/dist/types/components/ReactionPicker/RepositionOnUpdate.d.ts +4 -4
- package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +5 -4
- package/dist/types-ts4.5/components/FlashAnimation/FlashAnimation.d.ts +5 -4
- package/dist/types-ts4.5/components/ReactionPicker/RepositionOnUpdate.d.ts +4 -4
- package/dist/types-ts4.5/components/ReactionTooltip/ReactionTooltip.d.ts +5 -4
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 22.5.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#80085](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80085) [`7febfed958dd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7febfed958dd) - Update usage of `React.FC` to explicity include `children`
|
|
8
|
+
|
|
3
9
|
## 22.5.8
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -41,7 +41,6 @@ var getReactionKey = function getReactionKey(containerAri, ari) {
|
|
|
41
41
|
var defaultUsers = [getUser('oscar', 'Oscar Wallhult'), getUser('julien', 'Julien Michel Hoarau'), getUser('craig', 'Craig Petchell'), getUser('jerome', 'Jerome Touffe-Blin'), getUser('esoares', 'Eduardo Soares'), getUser('lpereira', 'Luiz Pereira'), getUser('pcurren', 'Paul Curren'), getUser('ttjandra', 'Tara Tjandra'), getUser('severington', 'Ste Everington'), getUser('sguillope', 'Sylvain Guillope'), getUser('alunnon', 'Alex Lunnon'), getUser('bsmith', 'Bob Smith'), getUser('jdoe', 'Jane Doe'), getUser('mhomes', 'Mary Homes'), getUser('ckent', 'Clark Kent')];
|
|
42
42
|
var simpleMockData = exports.simpleMockData = (0, _defineProperty2.default)({}, getReactionKey(containerAri, ari), [getReactionSummary(':fire:', 1, true), getReactionSummary(':thumbsup:', 33, false), getReactionSummary(':astonished:', 99, false), getReactionSummary(':heart:', 44, false) // Widest character
|
|
43
43
|
]);
|
|
44
|
-
|
|
45
44
|
var extendedMockData = (0, _defineProperty2.default)({}, getReactionKey(containerAri, ari), [getReactionSummary(':fire:', 1, true, true), getReactionSummary(':thumbsup:', 999, false, true), getReactionSummary(':astonished:', 9, false, true), getReactionSummary(':heart:', 99, false, true), getReactionSummary(':thinking:', 10, false, true), getReactionSummary(':clap:', 99, false, true), getReactionSummary(':thumbsdown:', 2, false, true), getReactionSummary(':bulb:', 16, false, true), getReactionSummary(':star:', 9999, false, true), getReactionSummary(':green_heart:', 9, false, true), getReactionSummary(':blue_heart:', 8392, false, true), getReactionSummary(':broken_heart:', 1, false, true), getReactionSummary(':grinning:', 10601, false, true), getReactionSummary(':slight_smile:', 99, false, true)]);
|
|
46
45
|
|
|
47
46
|
/**
|
|
@@ -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.5.
|
|
14
|
+
var packageVersion = "22.5.9";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -10,8 +10,8 @@ var _react2 = require("@emotion/react");
|
|
|
10
10
|
var _motion = require("@atlaskit/motion");
|
|
11
11
|
var _utils = require("../../shared/utils");
|
|
12
12
|
var _styles = require("./styles");
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
15
|
/** @jsx jsx */
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line @atlaskit/design-system/no-banned-imports
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.RENDER_FLASHANIMATION_TESTID = exports.FlashAnimation = void 0;
|
|
8
|
-
var _react =
|
|
9
|
-
var _react2 = require("@emotion/react");
|
|
7
|
+
var _react = require("@emotion/react");
|
|
10
8
|
var _styles = require("./styles");
|
|
11
9
|
/** @jsx jsx */
|
|
12
10
|
|
|
@@ -19,7 +17,7 @@ var RENDER_FLASHANIMATION_TESTID = exports.RENDER_FLASHANIMATION_TESTID = 'flash
|
|
|
19
17
|
* Flash animation background component. See Reaction component for usage.
|
|
20
18
|
*/
|
|
21
19
|
var FlashAnimation = exports.FlashAnimation = function FlashAnimation(props) {
|
|
22
|
-
return (0,
|
|
20
|
+
return (0, _react.jsx)("div", {
|
|
23
21
|
className: props.className,
|
|
24
22
|
css: [_styles.containerStyle, props.flash && _styles.flashStyle],
|
|
25
23
|
"data-testid": RENDER_FLASHANIMATION_TESTID
|
|
@@ -21,8 +21,8 @@ var _ReactionTooltip = require("../ReactionTooltip");
|
|
|
21
21
|
var _i18n = require("../../shared/i18n");
|
|
22
22
|
var _utils = require("../../shared/utils");
|
|
23
23
|
var _styles = require("./styles");
|
|
24
|
-
function _getRequireWildcardCache(
|
|
25
|
-
function _interopRequireWildcard(
|
|
24
|
+
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); }
|
|
25
|
+
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; }
|
|
26
26
|
/** @jsx jsx */
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -16,8 +16,8 @@ var _constants = require("../../shared/constants");
|
|
|
16
16
|
var _i18n = require("../../shared/i18n");
|
|
17
17
|
var _ReactionsList = require("./ReactionsList");
|
|
18
18
|
var _styles = require("./styles");
|
|
19
|
-
function _getRequireWildcardCache(
|
|
20
|
-
function _interopRequireWildcard(
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
21
|
/** @jsx jsx */
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -15,8 +15,8 @@ var _tokens = require("@atlaskit/tokens");
|
|
|
15
15
|
var _Counter = require("../Counter");
|
|
16
16
|
var _styles = require("./styles");
|
|
17
17
|
var _ReactionView = require("./ReactionView");
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
20
|
/** @jsx jsx */
|
|
21
21
|
|
|
22
22
|
var ReactionsList = exports.ReactionsList = function ReactionsList(_ref) {
|
|
@@ -22,8 +22,8 @@ var _Selector = require("../Selector");
|
|
|
22
22
|
var _Trigger = require("../Trigger");
|
|
23
23
|
var _styles = require("./styles");
|
|
24
24
|
var _RepositionOnUpdate = require("./RepositionOnUpdate");
|
|
25
|
-
function _getRequireWildcardCache(
|
|
26
|
-
function _interopRequireWildcard(
|
|
25
|
+
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); }
|
|
26
|
+
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; }
|
|
27
27
|
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; }
|
|
28
28
|
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; } /** @jsx jsx */
|
|
29
29
|
/**
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.RepositionOnUpdate = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
function _getRequireWildcardCache(
|
|
10
|
-
function _interopRequireWildcard(
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
11
|
/**
|
|
12
12
|
* Copied from ADS popup component with some tweeks for our use
|
|
13
13
|
*/
|
|
@@ -25,8 +25,8 @@ var _Reaction = require("../Reaction");
|
|
|
25
25
|
var _ReactionDialog = require("../ReactionDialog");
|
|
26
26
|
var _ReactionPicker = require("../ReactionPicker");
|
|
27
27
|
var _styles = require("./styles");
|
|
28
|
-
function _getRequireWildcardCache(
|
|
29
|
-
function _interopRequireWildcard(
|
|
28
|
+
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); }
|
|
29
|
+
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; }
|
|
30
30
|
/** @jsx jsx */
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -14,8 +14,8 @@ var _constants = require("../../shared/constants");
|
|
|
14
14
|
var _EmojiButton = require("../EmojiButton");
|
|
15
15
|
var _ShowMore = require("../ShowMore");
|
|
16
16
|
var _styles = require("./styles");
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
17
|
+
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); }
|
|
18
|
+
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; }
|
|
19
19
|
/** @jsx jsx */
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -15,7 +15,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
15
15
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
16
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
18
|
-
function _isNativeReflectConstruct() {
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
19
|
/**
|
|
20
20
|
* Error boundary wrapper to notify "failure" for UFO events of components when there was a re-rendering exception caught inside the `componentDidCatch` event handler
|
|
21
21
|
*/
|
|
@@ -18,8 +18,8 @@ var _components = require("../../components");
|
|
|
18
18
|
var _store2 = require("../../store");
|
|
19
19
|
var _types = require("../../types");
|
|
20
20
|
var _excluded = ["ari", "containerAri", "store"];
|
|
21
|
-
function _getRequireWildcardCache(
|
|
22
|
-
function _interopRequireWildcard(
|
|
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
|
+
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
|
/**
|
|
24
24
|
* State Props required for <Reactions />
|
|
25
25
|
*/
|
|
@@ -16,7 +16,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _react = _interopRequireDefault(require("react"));
|
|
18
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
19
|
-
function _isNativeReflectConstruct() {
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
20
|
/**
|
|
21
21
|
* Props type for the ReactionConsumer class component
|
|
22
22
|
*/
|
|
@@ -27,7 +27,6 @@ export const simpleMockData = {
|
|
|
27
27
|
[getReactionKey(containerAri, ari)]: [getReactionSummary(':fire:', 1, true), getReactionSummary(':thumbsup:', 33, false), getReactionSummary(':astonished:', 99, false), getReactionSummary(':heart:', 44, false) // Widest character
|
|
28
28
|
]
|
|
29
29
|
};
|
|
30
|
-
|
|
31
30
|
const extendedMockData = {
|
|
32
31
|
[getReactionKey(containerAri, ari)]: [getReactionSummary(':fire:', 1, true, true), getReactionSummary(':thumbsup:', 999, false, true), getReactionSummary(':astonished:', 9, false, true), getReactionSummary(':heart:', 99, false, true), getReactionSummary(':thinking:', 10, false, true), getReactionSummary(':clap:', 99, false, true), getReactionSummary(':thumbsdown:', 2, false, true), getReactionSummary(':bulb:', 16, false, true), getReactionSummary(':star:', 9999, false, true), getReactionSummary(':green_heart:', 9, false, true), getReactionSummary(':blue_heart:', 8392, false, true), getReactionSummary(':broken_heart:', 1, false, true), getReactionSummary(':grinning:', 10601, false, true), getReactionSummary(':slight_smile:', 99, false, true)]
|
|
33
32
|
};
|
|
@@ -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.5.
|
|
4
|
+
const packageVersion = "22.5.9";
|
|
5
5
|
/**
|
|
6
6
|
* TODO: move to utility package?
|
|
7
7
|
* A random sampling function
|
|
@@ -9,7 +9,8 @@ const packageVersion = "22.5.8";
|
|
|
9
9
|
* E.g. isSampled(2) will pass 50% of the time
|
|
10
10
|
* @param rate The chance that it will pass (1 in <rate> times)
|
|
11
11
|
* @returns bool, if it passes or not
|
|
12
|
-
*/
|
|
12
|
+
*/
|
|
13
|
+
// default sampling function to determine which one to be sampled
|
|
13
14
|
export const isSampled = rate => {
|
|
14
15
|
if (rate === 1) {
|
|
15
16
|
return true;
|
|
@@ -34,7 +34,6 @@ var getReactionKey = function getReactionKey(containerAri, ari) {
|
|
|
34
34
|
var defaultUsers = [getUser('oscar', 'Oscar Wallhult'), getUser('julien', 'Julien Michel Hoarau'), getUser('craig', 'Craig Petchell'), getUser('jerome', 'Jerome Touffe-Blin'), getUser('esoares', 'Eduardo Soares'), getUser('lpereira', 'Luiz Pereira'), getUser('pcurren', 'Paul Curren'), getUser('ttjandra', 'Tara Tjandra'), getUser('severington', 'Ste Everington'), getUser('sguillope', 'Sylvain Guillope'), getUser('alunnon', 'Alex Lunnon'), getUser('bsmith', 'Bob Smith'), getUser('jdoe', 'Jane Doe'), getUser('mhomes', 'Mary Homes'), getUser('ckent', 'Clark Kent')];
|
|
35
35
|
export var simpleMockData = _defineProperty({}, getReactionKey(containerAri, ari), [getReactionSummary(':fire:', 1, true), getReactionSummary(':thumbsup:', 33, false), getReactionSummary(':astonished:', 99, false), getReactionSummary(':heart:', 44, false) // Widest character
|
|
36
36
|
]);
|
|
37
|
-
|
|
38
37
|
var extendedMockData = _defineProperty({}, getReactionKey(containerAri, ari), [getReactionSummary(':fire:', 1, true, true), getReactionSummary(':thumbsup:', 999, false, true), getReactionSummary(':astonished:', 9, false, true), getReactionSummary(':heart:', 99, false, true), getReactionSummary(':thinking:', 10, false, true), getReactionSummary(':clap:', 99, false, true), getReactionSummary(':thumbsdown:', 2, false, true), getReactionSummary(':bulb:', 16, false, true), getReactionSummary(':star:', 9999, false, true), getReactionSummary(':green_heart:', 9, false, true), getReactionSummary(':blue_heart:', 8392, false, true), getReactionSummary(':broken_heart:', 1, false, true), getReactionSummary(':grinning:', 10601, false, true), getReactionSummary(':slight_smile:', 99, false, true)]);
|
|
39
38
|
|
|
40
39
|
/**
|
|
@@ -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.5.
|
|
7
|
+
var packageVersion = "22.5.9";
|
|
8
8
|
/**
|
|
9
9
|
* TODO: move to utility package?
|
|
10
10
|
* A random sampling function
|
|
@@ -12,7 +12,8 @@ var packageVersion = "22.5.8";
|
|
|
12
12
|
* E.g. isSampled(2) will pass 50% of the time
|
|
13
13
|
* @param rate The chance that it will pass (1 in <rate> times)
|
|
14
14
|
* @returns bool, if it passes or not
|
|
15
|
-
*/
|
|
15
|
+
*/
|
|
16
|
+
// default sampling function to determine which one to be sampled
|
|
16
17
|
export var isSampled = function isSampled(rate) {
|
|
17
18
|
if (rate === 1) {
|
|
18
19
|
return true;
|
|
@@ -7,7 +7,7 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
7
7
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
/**
|
|
13
13
|
* Error boundary wrapper to notify "failure" for UFO events of components when there was a re-rendering exception caught inside the `componentDidCatch` event handler
|
|
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
8
8
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
9
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
import React from 'react';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
export type FlashAnimationProps = PropsWithChildren<{
|
|
4
5
|
/**
|
|
5
6
|
* Optional wrapper div class anme
|
|
6
7
|
*/
|
|
@@ -9,7 +10,7 @@ export interface FlashAnimationProps {
|
|
|
9
10
|
* Show custom animation or render as standard without animation (defaults to false)
|
|
10
11
|
*/
|
|
11
12
|
flash?: boolean;
|
|
12
|
-
}
|
|
13
|
+
}>;
|
|
13
14
|
/**
|
|
14
15
|
* Test id for wrapper FlashAnimation div
|
|
15
16
|
*/
|
|
@@ -17,4 +18,4 @@ export declare const RENDER_FLASHANIMATION_TESTID = "flash-animation";
|
|
|
17
18
|
/**
|
|
18
19
|
* Flash animation background component. See Reaction component for usage.
|
|
19
20
|
*/
|
|
20
|
-
export declare const FlashAnimation:
|
|
21
|
+
export declare const FlashAnimation: (props: FlashAnimationProps) => jsx.JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copied from ADS popup component with some tweeks for our use
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
5
5
|
import { PopperChildrenProps } from '@atlaskit/popper';
|
|
6
|
-
export type RepositionOnUpdateProps = {
|
|
6
|
+
export type RepositionOnUpdateProps = PropsWithChildren<{
|
|
7
7
|
update: PopperChildrenProps['update'];
|
|
8
8
|
settings: {
|
|
9
9
|
isOpen: boolean;
|
|
10
10
|
showFullPicker: boolean;
|
|
11
11
|
};
|
|
12
|
-
}
|
|
13
|
-
export declare const RepositionOnUpdate:
|
|
12
|
+
}>;
|
|
13
|
+
export declare const RepositionOnUpdate: ({ children, update, settings, }: RepositionOnUpdateProps) => JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
import { ReactionSummary } from '../../types';
|
|
4
5
|
/**
|
|
5
6
|
* Test id for wrapper ReactionTooltip div
|
|
6
7
|
*/
|
|
7
8
|
export declare const RENDER_REACTIONTOOLTIP_TESTID = "render-reactionTooltip";
|
|
8
|
-
export
|
|
9
|
+
export type ReactionTooltipProps = PropsWithChildren<{
|
|
9
10
|
/**
|
|
10
11
|
* Optional name for the reaction emoji
|
|
11
12
|
*/
|
|
@@ -30,5 +31,5 @@ export interface ReactionTooltipProps {
|
|
|
30
31
|
* Optional flag for enabling tooltip (defaults to true)
|
|
31
32
|
*/
|
|
32
33
|
isEnabled?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export declare const ReactionTooltip:
|
|
34
|
+
}>;
|
|
35
|
+
export declare const ReactionTooltip: ({ children, emojiName, reaction: { users, emojiId }, maxReactions, handleUserListClick, allowUserDialog, isEnabled, }: ReactionTooltipProps) => jsx.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
export type FlashAnimationProps = PropsWithChildren<{
|
|
4
5
|
/**
|
|
5
6
|
* Optional wrapper div class anme
|
|
6
7
|
*/
|
|
@@ -9,7 +10,7 @@ export interface FlashAnimationProps {
|
|
|
9
10
|
* Show custom animation or render as standard without animation (defaults to false)
|
|
10
11
|
*/
|
|
11
12
|
flash?: boolean;
|
|
12
|
-
}
|
|
13
|
+
}>;
|
|
13
14
|
/**
|
|
14
15
|
* Test id for wrapper FlashAnimation div
|
|
15
16
|
*/
|
|
@@ -17,4 +18,4 @@ export declare const RENDER_FLASHANIMATION_TESTID = "flash-animation";
|
|
|
17
18
|
/**
|
|
18
19
|
* Flash animation background component. See Reaction component for usage.
|
|
19
20
|
*/
|
|
20
|
-
export declare const FlashAnimation:
|
|
21
|
+
export declare const FlashAnimation: (props: FlashAnimationProps) => jsx.JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copied from ADS popup component with some tweeks for our use
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
5
5
|
import { PopperChildrenProps } from '@atlaskit/popper';
|
|
6
|
-
export type RepositionOnUpdateProps = {
|
|
6
|
+
export type RepositionOnUpdateProps = PropsWithChildren<{
|
|
7
7
|
update: PopperChildrenProps['update'];
|
|
8
8
|
settings: {
|
|
9
9
|
isOpen: boolean;
|
|
10
10
|
showFullPicker: boolean;
|
|
11
11
|
};
|
|
12
|
-
}
|
|
13
|
-
export declare const RepositionOnUpdate:
|
|
12
|
+
}>;
|
|
13
|
+
export declare const RepositionOnUpdate: ({ children, update, settings, }: RepositionOnUpdateProps) => JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
import { ReactionSummary } from '../../types';
|
|
4
5
|
/**
|
|
5
6
|
* Test id for wrapper ReactionTooltip div
|
|
6
7
|
*/
|
|
7
8
|
export declare const RENDER_REACTIONTOOLTIP_TESTID = "render-reactionTooltip";
|
|
8
|
-
export
|
|
9
|
+
export type ReactionTooltipProps = PropsWithChildren<{
|
|
9
10
|
/**
|
|
10
11
|
* Optional name for the reaction emoji
|
|
11
12
|
*/
|
|
@@ -30,5 +31,5 @@ export interface ReactionTooltipProps {
|
|
|
30
31
|
* Optional flag for enabling tooltip (defaults to true)
|
|
31
32
|
*/
|
|
32
33
|
isEnabled?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export declare const ReactionTooltip:
|
|
34
|
+
}>;
|
|
35
|
+
export declare const ReactionTooltip: ({ children, emojiName, reaction: { users, emojiId }, maxReactions, handleUserListClick, allowUserDialog, isEnabled, }: ReactionTooltipProps) => jsx.JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "22.5.
|
|
3
|
+
"version": "22.5.9",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
@@ -26,27 +26,28 @@
|
|
|
26
26
|
"releaseModel": "continuous",
|
|
27
27
|
"website": {
|
|
28
28
|
"name": "Reactions"
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"runReact18": false
|
|
30
31
|
},
|
|
31
32
|
"config": {
|
|
32
33
|
"access": "public"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
36
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
36
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
37
|
-
"@atlaskit/analytics-next": "^9.
|
|
38
|
-
"@atlaskit/avatar": "^21.
|
|
39
|
-
"@atlaskit/button": "^17.
|
|
37
|
+
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
38
|
+
"@atlaskit/analytics-next": "^9.2.0",
|
|
39
|
+
"@atlaskit/avatar": "^21.5.0",
|
|
40
|
+
"@atlaskit/button": "^17.7.0",
|
|
40
41
|
"@atlaskit/emoji": "^67.6.0",
|
|
41
|
-
"@atlaskit/icon": "^22.
|
|
42
|
+
"@atlaskit/icon": "^22.1.0",
|
|
42
43
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
43
44
|
"@atlaskit/motion": "^1.5.0",
|
|
44
45
|
"@atlaskit/popper": "^5.5.0",
|
|
45
46
|
"@atlaskit/spinner": "^16.0.0",
|
|
46
47
|
"@atlaskit/tabs": "^14.0.0",
|
|
47
48
|
"@atlaskit/theme": "^12.6.0",
|
|
48
|
-
"@atlaskit/tokens": "^1.
|
|
49
|
-
"@atlaskit/tooltip": "^18.
|
|
49
|
+
"@atlaskit/tokens": "^1.41.0",
|
|
50
|
+
"@atlaskit/tooltip": "^18.1.0",
|
|
50
51
|
"@atlaskit/ufo": "^0.2.0",
|
|
51
52
|
"@atlaskit/util-service-support": "^6.2.0",
|
|
52
53
|
"@babel/runtime": "^7.0.0",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
63
|
-
"@atlaskit/util-data-test": "^17.
|
|
64
|
+
"@atlaskit/util-data-test": "^17.9.0",
|
|
64
65
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
65
66
|
"@emotion/jest": "^11.8.0",
|
|
66
67
|
"@testing-library/dom": "^8.17.1",
|