@atlaskit/mention 30.2.9 → 30.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/mention
2
2
 
3
+ ## 30.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d80c581b58fba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d80c581b58fba) -
8
+ Add optional email to mention results and show it as small subtext when no byline is already
9
+ shown, behind the platform_editor_mentions_email_search experiment's isEnabled parameter.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 30.2.9
4
16
 
5
17
  ### Patch Changes
@@ -11,6 +11,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
11
11
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
12
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
13
  var _react = _interopRequireDefault(require("react"));
14
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
14
15
  var _MentionHighlightHelpers = require("../MentionItem/MentionHighlightHelpers");
15
16
  var _styles = require("./styles");
16
17
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
@@ -25,10 +26,14 @@ var UserMentionDescriptionByline = exports.default = /*#__PURE__*/function (_Rea
25
26
  key: "render",
26
27
  value: function render() {
27
28
  var _this$props$mention = this.props.mention,
29
+ email = _this$props$mention.email,
28
30
  highlight = _this$props$mention.highlight,
29
31
  name = _this$props$mention.name,
30
32
  nickname = _this$props$mention.nickname;
31
33
  var nicknameHighlights = highlight && highlight.nickname;
34
+ if (email && (!nickname || name === nickname) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mentions_email_search')) {
35
+ return /*#__PURE__*/_react.default.createElement(_styles.DescriptionBylineStyle, null, email);
36
+ }
32
37
  if (name === nickname) {
33
38
  return null;
34
39
  }
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.packageVersion = void 0;
7
- var packageVersion = exports.packageVersion = "30.2.8";
7
+ var packageVersion = exports.packageVersion = "30.2.9";
@@ -1,14 +1,19 @@
1
1
  import React from 'react';
2
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
3
  import { renderHighlight } from '../MentionItem/MentionHighlightHelpers';
3
4
  import { DescriptionBylineStyle } from './styles';
4
5
  export default class UserMentionDescriptionByline extends React.PureComponent {
5
6
  render() {
6
7
  const {
8
+ email,
7
9
  highlight,
8
10
  name,
9
11
  nickname
10
12
  } = this.props.mention;
11
13
  const nicknameHighlights = highlight && highlight.nickname;
14
+ if (email && (!nickname || name === nickname) && isExperimentEnabled('platform_editor_mentions_email_search')) {
15
+ return /*#__PURE__*/React.createElement(DescriptionBylineStyle, null, email);
16
+ }
12
17
  if (name === nickname) {
13
18
  return null;
14
19
  }
@@ -1 +1 @@
1
- export const packageVersion = "30.2.8";
1
+ export const packageVersion = "30.2.9";
@@ -6,6 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React from 'react';
9
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
9
10
  import { renderHighlight } from '../MentionItem/MentionHighlightHelpers';
10
11
  import { DescriptionBylineStyle } from './styles';
11
12
  var UserMentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent) {
@@ -18,10 +19,14 @@ var UserMentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent)
18
19
  key: "render",
19
20
  value: function render() {
20
21
  var _this$props$mention = this.props.mention,
22
+ email = _this$props$mention.email,
21
23
  highlight = _this$props$mention.highlight,
22
24
  name = _this$props$mention.name,
23
25
  nickname = _this$props$mention.nickname;
24
26
  var nicknameHighlights = highlight && highlight.nickname;
27
+ if (email && (!nickname || name === nickname) && isExperimentEnabled('platform_editor_mentions_email_search')) {
28
+ return /*#__PURE__*/React.createElement(DescriptionBylineStyle, null, email);
29
+ }
25
30
  if (name === nickname) {
26
31
  return null;
27
32
  }
@@ -1 +1 @@
1
- export var packageVersion = "30.2.8";
1
+ export var packageVersion = "30.2.9";
@@ -222,6 +222,7 @@ export interface RealMentionDescription {
222
222
  avatarUrl?: string;
223
223
  context?: MentionDescContext;
224
224
  description?: string;
225
+ email?: string;
225
226
  highlight?: Highlight;
226
227
  id: string;
227
228
  inContext?: boolean;
package/package.json CHANGED
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/lozenge": "^17.0.0",
41
41
  "@atlaskit/platform-feature-experiments": "^0.3.0",
42
42
  "@atlaskit/platform-feature-flags": "^2.2.0",
43
- "@atlaskit/primitives": "^22.5.0",
43
+ "@atlaskit/primitives": "^22.6.0",
44
44
  "@atlaskit/react-compiler-gating": "^0.2.0",
45
45
  "@atlaskit/skeleton": "^4.4.0",
46
46
  "@atlaskit/tag": "^17.0.0",
@@ -124,5 +124,5 @@
124
124
  "*.compiled.css"
125
125
  ],
126
126
  "types": "dist/types/index.d.ts",
127
- "version": "30.2.9"
127
+ "version": "30.3.0"
128
128
  }