@atlaskit/reactions 22.5.7 → 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.
Files changed (32) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/afm-cc/tsconfig.json +73 -0
  3. package/dist/cjs/MockReactionsClient.js +0 -1
  4. package/dist/cjs/analytics/index.js +1 -1
  5. package/dist/cjs/components/Counter/Counter.js +2 -2
  6. package/dist/cjs/components/FlashAnimation/FlashAnimation.js +2 -4
  7. package/dist/cjs/components/Reaction/Reaction.js +2 -2
  8. package/dist/cjs/components/ReactionDialog/ReactionsDialog.js +2 -2
  9. package/dist/cjs/components/ReactionDialog/ReactionsList.js +2 -2
  10. package/dist/cjs/components/ReactionPicker/ReactionPicker.js +2 -2
  11. package/dist/cjs/components/ReactionPicker/RepositionOnUpdate.js +2 -2
  12. package/dist/cjs/components/Reactions/Reactions.js +2 -2
  13. package/dist/cjs/components/Selector/Selector.js +2 -2
  14. package/dist/cjs/components/UfoErrorBoundary/UfoErrorBoundary.js +1 -1
  15. package/dist/cjs/containers/ConnectedReactionsView/ConnectedReactionsView.js +2 -2
  16. package/dist/cjs/store/ReactionConsumer.js +1 -1
  17. package/dist/es2019/MockReactionsClient.js +0 -1
  18. package/dist/es2019/analytics/index.js +3 -2
  19. package/dist/es2019/components/FlashAnimation/FlashAnimation.js +1 -1
  20. package/dist/esm/MockReactionsClient.js +0 -1
  21. package/dist/esm/analytics/index.js +3 -2
  22. package/dist/esm/components/FlashAnimation/FlashAnimation.js +1 -1
  23. package/dist/esm/components/UfoErrorBoundary/UfoErrorBoundary.js +1 -1
  24. package/dist/esm/store/ReactionConsumer.js +1 -1
  25. package/dist/types/components/FlashAnimation/FlashAnimation.d.ts +5 -4
  26. package/dist/types/components/ReactionPicker/RepositionOnUpdate.d.ts +4 -4
  27. package/dist/types/components/ReactionTooltip/ReactionTooltip.d.ts +5 -4
  28. package/dist/types-ts4.5/components/FlashAnimation/FlashAnimation.d.ts +5 -4
  29. package/dist/types-ts4.5/components/ReactionPicker/RepositionOnUpdate.d.ts +4 -4
  30. package/dist/types-ts4.5/components/ReactionTooltip/ReactionTooltip.d.ts +5 -4
  31. package/package.json +13 -12
  32. package/tmp/api-report-tmp.d.ts +0 -398
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
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
+
9
+ ## 22.5.8
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 22.5.7
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,73 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.confluence.json",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "composite": true,
7
+ "outDir": "../dist",
8
+ "rootDir": "../",
9
+ "baseUrl": "../"
10
+ },
11
+ "include": [
12
+ "../src/**/*.ts",
13
+ "../src/**/*.tsx"
14
+ ],
15
+ "exclude": [
16
+ "../src/**/__tests__/*",
17
+ "../src/**/*.test.*",
18
+ "../src/**/test.*"
19
+ ],
20
+ "references": [
21
+ {
22
+ "path": "../../../analytics/analytics-gas-types/afm-cc/tsconfig.json"
23
+ },
24
+ {
25
+ "path": "../../../analytics/analytics-namespaced-context/afm-cc/tsconfig.json"
26
+ },
27
+ {
28
+ "path": "../../../analytics/analytics-next/afm-cc/tsconfig.json"
29
+ },
30
+ {
31
+ "path": "../../../design-system/avatar/afm-cc/tsconfig.json"
32
+ },
33
+ {
34
+ "path": "../../../design-system/button/afm-cc/tsconfig.json"
35
+ },
36
+ {
37
+ "path": "../../emoji/afm-cc/tsconfig.json"
38
+ },
39
+ {
40
+ "path": "../../../design-system/icon/afm-cc/tsconfig.json"
41
+ },
42
+ {
43
+ "path": "../../../design-system/modal-dialog/afm-cc/tsconfig.json"
44
+ },
45
+ {
46
+ "path": "../../../design-system/motion/afm-cc/tsconfig.json"
47
+ },
48
+ {
49
+ "path": "../../../design-system/popper/afm-cc/tsconfig.json"
50
+ },
51
+ {
52
+ "path": "../../../design-system/spinner/afm-cc/tsconfig.json"
53
+ },
54
+ {
55
+ "path": "../../../design-system/tabs/afm-cc/tsconfig.json"
56
+ },
57
+ {
58
+ "path": "../../../design-system/theme/afm-cc/tsconfig.json"
59
+ },
60
+ {
61
+ "path": "../../../design-system/tokens/afm-cc/tsconfig.json"
62
+ },
63
+ {
64
+ "path": "../../../design-system/tooltip/afm-cc/tsconfig.json"
65
+ },
66
+ {
67
+ "path": "../../../data/ufo-external/afm-cc/tsconfig.json"
68
+ },
69
+ {
70
+ "path": "../../util-service-support/afm-cc/tsconfig.json"
71
+ }
72
+ ]
73
+ }
@@ -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.7";
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 = _interopRequireDefault(require("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, _react2.jsx)("div", {
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
26
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
10
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
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(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
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.7";
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.7";
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
- */ // default sampling function to determine which one to be sampled
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;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import React from 'react';
2
+
3
3
  import { jsx } from '@emotion/react';
4
4
  import { containerStyle, flashStyle } from './styles';
5
5
  /**
@@ -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";
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.7";
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
- */ // default sampling function to determine which one to be sampled
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;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import React from 'react';
2
+
3
3
  import { jsx } from '@emotion/react';
4
4
  import { containerStyle, flashStyle } from './styles';
5
5
  /**
@@ -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() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
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() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
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 React from 'react';
3
- export interface FlashAnimationProps {
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: React.FC<FlashAnimationProps>;
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 { FC } from 'react';
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: FC<RepositionOnUpdateProps>;
12
+ }>;
13
+ export declare const RepositionOnUpdate: ({ children, update, settings, }: RepositionOnUpdateProps) => JSX.Element;
@@ -1,11 +1,12 @@
1
1
  /** @jsx jsx */
2
- import React from 'react';
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 interface ReactionTooltipProps {
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: React.FC<ReactionTooltipProps>;
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 React from 'react';
3
- export interface FlashAnimationProps {
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: React.FC<FlashAnimationProps>;
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 { FC } from 'react';
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: FC<RepositionOnUpdateProps>;
12
+ }>;
13
+ export declare const RepositionOnUpdate: ({ children, update, settings, }: RepositionOnUpdateProps) => JSX.Element;
@@ -1,11 +1,12 @@
1
1
  /** @jsx jsx */
2
- import React from 'react';
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 interface ReactionTooltipProps {
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: React.FC<ReactionTooltipProps>;
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.7",
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.7.0",
37
- "@atlaskit/analytics-next": "^9.1.0",
38
- "@atlaskit/avatar": "^21.4.0",
39
- "@atlaskit/button": "^16.16.0",
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.0.0",
42
- "@atlaskit/modal-dialog": "^12.8.0",
42
+ "@atlaskit/icon": "^22.1.0",
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.28.0",
49
- "@atlaskit/tooltip": "^18.0.0",
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.8.0",
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",
@@ -1,398 +0,0 @@
1
- ## API Report File for "@atlaskit/reactions"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- /// <reference types="react" />
8
-
9
- import { AnalyticsEvent } from '@atlaskit/analytics-next';
10
- import { AriaAttributes } from 'react';
11
- import { ConcurrentExperience } from '@atlaskit/ufo';
12
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
13
- import { EmojiId } from '@atlaskit/emoji/types';
14
- import { EmojiId as EmojiId_2 } from '@atlaskit/emoji';
15
- import { EmojiProvider } from '@atlaskit/emoji';
16
- import { EmojiProvider as EmojiProvider_2 } from '@atlaskit/emoji/resource';
17
- import { OnCloseHandler } from '@atlaskit/modal-dialog';
18
- import { OnEmojiEvent } from '@atlaskit/emoji/types';
19
- import { PickerSize } from '@atlaskit/emoji/types';
20
- import { default as React_2 } from 'react';
21
- import { UFOExperience } from '@atlaskit/ufo';
22
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
23
- import { WithSamplingUFOExperience } from '@atlaskit/emoji';
24
-
25
- // @public (undocumented)
26
- type Actions = {
27
- getReactions: (containerId: string, aris: string) => void;
28
- toggleReaction: ReactionAction;
29
- addReaction: ReactionAction;
30
- getDetailedReaction: ReactionAction;
31
- };
32
-
33
- // @public
34
- enum ComponentName {
35
- // (undocumented)
36
- PICKER_RENDERED = "reactions-picker",
37
- // (undocumented)
38
- REACTION_DIALOG = "reaction-dialog",
39
- // (undocumented)
40
- REACTION_ITEM = "reaction-item",
41
- // (undocumented)
42
- REACTIONS = "reactions-list"
43
- }
44
-
45
- // @public
46
- export const ConnectedReactionPicker: React_2.FC<ConnectedReactionPickerProps>;
47
-
48
- // @public (undocumented)
49
- interface ConnectedReactionPickerProps extends Omit<ReactionPickerProps, 'onSelection'> {
50
- ari: string;
51
- containerAri: string;
52
- store: StorePropInput;
53
- }
54
-
55
- // @public (undocumented)
56
- export const ConnectedReactionsView: React_2.FC<ConnectedReactionsViewProps>;
57
-
58
- // @public (undocumented)
59
- interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'allowAllEmojis' | 'allowUserDialog' | 'emojiPickerSize' | 'emojiProvider' | 'miniMode' | 'onDialogCloseCallback' | 'onDialogOpenCallback' | 'onDialogSelectReactionCallback' | 'quickReactionEmojis'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
60
- ari: string;
61
- containerAri: string;
62
- store: StorePropInput;
63
- }
64
-
65
- // @public (undocumented)
66
- export const constants: {
67
- DefaultReactions: EmojiId_2[];
68
- DefaultReactionsByShortName: Map<string, EmojiId_2>;
69
- ExtendedReactions: EmojiId_2[];
70
- ExtendedReactionsByShortName: Map<string, EmojiId_2>;
71
- NUMBER_OF_REACTIONS_TO_DISPLAY: number;
72
- SAMPLING_RATE_REACTIONS_RENDERED_EXP: number;
73
- TOOLTIP_USERS_LIMIT: number;
74
- };
75
-
76
- // @public
77
- enum ExperienceName {
78
- // (undocumented)
79
- PICKER_OPENED = "reactions-picker-opened",
80
- // (undocumented)
81
- REACTION_ADDED = "reaction-added",
82
- // (undocumented)
83
- REACTION_DETAILS_FETCHED = "reaction-details-fetched",
84
- // (undocumented)
85
- REACTION_DIALOG_CLOSED = "reaction-dialog-closed",
86
- // (undocumented)
87
- REACTION_DIALOG_OPENED = "reaction-dialog-opened",
88
- // (undocumented)
89
- REACTION_DIALOG_SELECTED_REACTION_CHANGED = "reaction-dialog-selected-reaction-changed",
90
- // (undocumented)
91
- REACTION_REMOVED = "reaction-removed",
92
- // (undocumented)
93
- REACTIONS_RENDERED = "reactions-rendered"
94
- }
95
-
96
- // @public (undocumented)
97
- export class MemoryReactionsStore implements ReactionsStore {
98
- constructor(client: ReactionClient, state?: State, metadata?: StoreMetadata);
99
- // (undocumented)
100
- addReaction: (containerAri: string, ari: string, emojiId: string) => void;
101
- // (undocumented)
102
- getDetailedReaction: (containerAri: string, ari: string, emojiId: string) => void;
103
- // (undocumented)
104
- getReactions: (key: string, ...args: string[]) => void;
105
- // (undocumented)
106
- getState: () => State;
107
- // (undocumented)
108
- onChange: (callback: OnChangeCallback) => void;
109
- // (undocumented)
110
- removeOnChangeListener: (toRemove: OnChangeCallback) => void;
111
- // (undocumented)
112
- setCreateAnalyticsEvent: (createAnalyticsEvent?: CreateUIAnalyticsEvent) => void;
113
- // (undocumented)
114
- toggleReaction: (containerAri: string, ari: string, emojiId: string) => void;
115
- }
116
-
117
- // @public
118
- type OnChangeCallback = (state: State) => void;
119
-
120
- // @public
121
- export type onDialogSelectReactionChange = (emojiId: string, analyticsEvent: UIAnalyticsEvent) => void;
122
-
123
- // @public
124
- type ProfilePicture = {
125
- path: string;
126
- };
127
-
128
- // @public
129
- interface QuickReactionEmojiSummary {
130
- ari: string;
131
- containerAri: string;
132
- emojiIds: string[];
133
- }
134
-
135
- // @public
136
- type ReactioConsumerProps<PropsFromState, PropsFromActions> = {
137
- mapStateToProps?: (state: State) => PropsFromState;
138
- mapActionsToProps?: (actions: Actions) => PropsFromActions;
139
- children: (props: PropsFromState & PropsFromActions) => React_2.ReactNode;
140
- store: StorePropInput;
141
- };
142
-
143
- // @public
144
- export const Reaction: React_2.FC<ReactionProps>;
145
-
146
- // @public
147
- type ReactionAction = (containerAri: string, ari: string, emojiId: string) => void;
148
-
149
- // @public
150
- type ReactionClick = (id: string, event: React.MouseEvent<HTMLButtonElement>) => void;
151
-
152
- // @public (undocumented)
153
- export interface ReactionClient {
154
- addReaction: ReactionRequest<ReactionSummary[]>;
155
- deleteReaction: ReactionRequest<ReactionSummary[]>;
156
- getDetailedReaction: ReactionRequest<ReactionSummary>;
157
- getReactions(containerAri: string, aris: string[]): Promise<Reactions_2>;
158
- }
159
-
160
- // @public @deprecated
161
- export class ReactionConsumer<PropsFromState, PropsFromActions> extends React_2.PureComponent<ReactioConsumerProps<PropsFromState, PropsFromActions>, ReactionConsumerState> {
162
- constructor(props: ReactioConsumerProps<PropsFromState, PropsFromActions>);
163
- // (undocumented)
164
- componentDidMount(): void;
165
- // (undocumented)
166
- componentWillUnmount(): Promise<void>;
167
- // (undocumented)
168
- render(): React_2.ReactNode;
169
- }
170
-
171
- // @public
172
- type ReactionConsumerState = {
173
- store?: ReactionsStore;
174
- };
175
-
176
- // @public
177
- type ReactionFocused = (emojiId: string, event?: React.FocusEvent<any>) => void;
178
-
179
- // @public
180
- type ReactionMouseEnter = (emojiId: string, event?: React.MouseEvent<any>) => void;
181
-
182
- // @public
183
- export const ReactionPicker: React_2.FC<ReactionPickerProps>;
184
-
185
- // @public (undocumented)
186
- interface ReactionPickerProps extends Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Partial<Pick<TriggerProps, 'miniMode' | 'tooltipContent'>> {
187
- allowAllEmojis?: boolean;
188
- className?: string;
189
- disabled?: boolean;
190
- emojiPickerSize?: PickerSize;
191
- emojiProvider: Promise<EmojiProvider_2>;
192
- onCancel?: () => void;
193
- onOpen?: () => void;
194
- onSelection: (emojiId: string, source: ReactionSource) => void;
195
- onShowMore?: () => void;
196
- }
197
-
198
- // @public (undocumented)
199
- interface ReactionProps extends Pick<ReactionTooltipProps, 'allowUserDialog'> {
200
- className?: string;
201
- emojiProvider: Promise<EmojiProvider>;
202
- flash?: boolean;
203
- handleUserListClick?: (emojiId: string) => void;
204
- onClick: ReactionClick;
205
- onFocused?: ReactionFocused;
206
- onMouseEnter?: ReactionMouseEnter;
207
- reaction: ReactionSummary;
208
- }
209
-
210
- // @public (undocumented)
211
- export type ReactionRequest<T> = (
212
- ari: string,
213
- containerAri: string,
214
- emojiId: string,
215
- metadata?: Record<string, any>) => Promise<T>;
216
-
217
- // @public
218
- export const Reactions: React_2.FC<ReactionsProps>;
219
-
220
- // @public
221
- type Reactions_2 = Record<string, ReactionSummary[]>;
222
-
223
- // @public (undocumented)
224
- type ReactionsError = {
225
- readonly status: ReactionStatus.error;
226
- readonly message: string;
227
- };
228
-
229
- // @public
230
- export class ReactionServiceClient implements ReactionClient {
231
- constructor(baseUrl: string, sessionToken?: string);
232
- // (undocumented)
233
- addReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
234
- // (undocumented)
235
- deleteReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
236
- // (undocumented)
237
- getDetailedReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary>;
238
- // (undocumented)
239
- getReactions(containerAri: string, aris: string[]): Promise<Reactions_2>;
240
- }
241
-
242
- // @public (undocumented)
243
- type ReactionsLoading = {
244
- readonly status: ReactionStatus.loading;
245
- };
246
-
247
- // @public (undocumented)
248
- type ReactionsNotLoaded = {
249
- readonly status: ReactionStatus.notLoaded;
250
- };
251
-
252
- // @public
253
- type ReactionSource = 'emojiPicker' | 'quickSelector';
254
-
255
- // @public (undocumented)
256
- interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmojis' | 'emojiPickerSize' | 'emojiProvider' | 'miniMode'>, Pick<SelectorProps, 'pickerQuickReactionEmojiIds'>, Pick<ReactionProps, 'allowUserDialog'> {
257
- errorMessage?: string;
258
- flash?: Record<string, boolean>;
259
- getReactionDetails?: (emojiId: string) => void;
260
- loadReaction: () => void;
261
- onDialogCloseCallback?: OnCloseHandler;
262
- onDialogOpenCallback?: (emojiId: string, source?: string) => void;
263
- onDialogSelectReactionCallback?: onDialogSelectReactionChange;
264
- onReactionClick: ReactionClick;
265
- // @deprecated (undocumented)
266
- onReactionHover?: (emojiId: string) => void;
267
- onSelection: (emojiId: string) => void;
268
- quickReactionEmojis?: QuickReactionEmojiSummary;
269
- reactions?: ReactionSummary[];
270
- status: ReactionStatus;
271
- }
272
-
273
- // @public (undocumented)
274
- type ReactionsReadyState = {
275
- readonly status: ReactionStatus.ready;
276
- readonly reactions: ReactionSummary[];
277
- };
278
-
279
- // @public
280
- type ReactionsState = ReactionsError | ReactionsLoading | ReactionsNotLoaded | ReactionsReadyState;
281
-
282
- // @public
283
- export interface ReactionsStore extends Actions, StoreProps {
284
- }
285
-
286
- // @public
287
- enum ReactionStatus {
288
- // (undocumented)
289
- disabled = "DISABLED",
290
- // (undocumented)
291
- error = "ERROR",
292
- // (undocumented)
293
- loading = "LOADING",
294
- // (undocumented)
295
- notLoaded = "NOT_LOADED",
296
- // (undocumented)
297
- ready = "READY"
298
- }
299
-
300
- // @public
301
- interface ReactionSummary {
302
- ari: string;
303
- containerAri: string;
304
- count: number;
305
- emojiId: string;
306
- // @deprecated (undocumented)
307
- optimisticallyUpdated?: boolean;
308
- reacted: boolean;
309
- users?: User[];
310
- }
311
-
312
- // @public (undocumented)
313
- interface ReactionTooltipProps {
314
- allowUserDialog?: boolean;
315
- emojiName?: string;
316
- handleUserListClick?: (emojiId: string) => void;
317
- isEnabled?: boolean;
318
- maxReactions?: number;
319
- reaction: ReactionSummary;
320
- }
321
-
322
- // @public (undocumented)
323
- interface SelectorProps {
324
- emojiProvider: Promise<EmojiProvider_2>;
325
- onMoreClick?: React_2.MouseEventHandler<HTMLElement>;
326
- onSelection: OnEmojiEvent;
327
- pickerQuickReactionEmojiIds?: EmojiId[];
328
- showMore?: boolean;
329
- }
330
-
331
- // @public
332
- export type State = {
333
- reactions: {
334
- [key: string]: ReactionsState;
335
- };
336
- flash: {
337
- [key: string]: {
338
- [emojiId: string]: boolean;
339
- };
340
- };
341
- };
342
-
343
- // @public
344
- interface StoreMetadata {
345
- // (undocumented)
346
- [k: string]: any;
347
- // (undocumented)
348
- subproduct?: string;
349
- }
350
-
351
- // @public
352
- export type StorePropInput = Promise<ReactionsStore> | ReactionsStore;
353
-
354
- // @public
355
- interface StoreProps {
356
- getState: () => State;
357
- // @deprecated
358
- onChange: (callback: OnChangeCallback) => void;
359
- // @deprecated
360
- removeOnChangeListener: (callback: OnChangeCallback) => void;
361
- // @deprecated
362
- setCreateAnalyticsEvent?: (createAnalyticsEvent: CreateUIAnalyticsEvent) => void;
363
- }
364
-
365
- // @public (undocumented)
366
- interface TriggerProps {
367
- ariaAttributes?: AriaAttributes;
368
- disabled?: boolean;
369
- miniMode?: boolean;
370
- onClick?: (e: React_2.MouseEvent<HTMLElement>, analyticsEvent: AnalyticsEvent) => void;
371
- tooltipContent: React_2.ReactNode;
372
- }
373
-
374
- // @public (undocumented)
375
- export const UFO: {
376
- ComponentName: typeof ComponentName;
377
- ExperienceName: typeof ExperienceName;
378
- PickerRender: UFOExperience;
379
- ReactionsAdd: ConcurrentExperience;
380
- ReactionDetailsFetch: ConcurrentExperience;
381
- ReactionDialogClosed: UFOExperience;
382
- ReactionDialogOpened: UFOExperience;
383
- ReactionDialogSelectedReactionChanged: UFOExperience;
384
- ReactionsRemove: ConcurrentExperience;
385
- ReactionsRendered: ConcurrentExperience;
386
- sampledReactionsRendered: (instanceId: string) => WithSamplingUFOExperience;
387
- };
388
-
389
- // @public (undocumented)
390
- interface User {
391
- displayName: string;
392
- id: string;
393
- profilePicture?: ProfilePicture;
394
- }
395
-
396
- // (No @packageDocumentation comment for this package)
397
-
398
- ```