@atlaskit/mention 23.4.5 → 23.4.6

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 (46) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/api/ContextMentionResource.js +1 -2
  3. package/dist/cjs/api/MentionNameResolver.js +1 -2
  4. package/dist/cjs/api/MentionResource.js +9 -14
  5. package/dist/cjs/api/PresenceResource.js +11 -18
  6. package/dist/cjs/api/TeamMentionResource.js +11 -13
  7. package/dist/cjs/components/Mention/PrimitiveMention.js +7 -7
  8. package/dist/cjs/components/Mention/ResourcedMention.js +6 -9
  9. package/dist/cjs/components/Mention/index.js +9 -12
  10. package/dist/cjs/components/Mention/ufoExperiences.js +5 -7
  11. package/dist/cjs/components/MentionDescriptionByline/TeamMentionDescriptionByline.js +7 -10
  12. package/dist/cjs/components/MentionDescriptionByline/UserMentionDescriptionByline.js +5 -7
  13. package/dist/cjs/components/MentionDescriptionByline/index.js +5 -7
  14. package/dist/cjs/components/MentionItem/index.js +8 -11
  15. package/dist/cjs/components/MentionList/index.js +14 -17
  16. package/dist/cjs/components/MentionListError/GenericErrorIllustration.js +5 -7
  17. package/dist/cjs/components/MentionListError/index.js +5 -7
  18. package/dist/cjs/components/MentionPicker/index.js +16 -19
  19. package/dist/cjs/components/Popup/index.js +5 -7
  20. package/dist/cjs/components/ResourcedMentionList/index.js +17 -20
  21. package/dist/cjs/components/Scrollable/index.js +7 -10
  22. package/dist/cjs/util/analytics.js +1 -1
  23. package/dist/es2019/components/Mention/PrimitiveMention.js +1 -1
  24. package/dist/es2019/util/analytics.js +1 -1
  25. package/dist/esm/api/ContextMentionResource.js +1 -2
  26. package/dist/esm/api/MentionNameResolver.js +1 -2
  27. package/dist/esm/api/MentionResource.js +9 -14
  28. package/dist/esm/api/PresenceResource.js +11 -18
  29. package/dist/esm/api/TeamMentionResource.js +11 -13
  30. package/dist/esm/components/Mention/PrimitiveMention.js +7 -7
  31. package/dist/esm/components/Mention/ResourcedMention.js +6 -9
  32. package/dist/esm/components/Mention/index.js +9 -12
  33. package/dist/esm/components/Mention/ufoExperiences.js +5 -7
  34. package/dist/esm/components/MentionDescriptionByline/TeamMentionDescriptionByline.js +7 -10
  35. package/dist/esm/components/MentionDescriptionByline/UserMentionDescriptionByline.js +5 -7
  36. package/dist/esm/components/MentionDescriptionByline/index.js +5 -7
  37. package/dist/esm/components/MentionItem/index.js +8 -11
  38. package/dist/esm/components/MentionList/index.js +14 -17
  39. package/dist/esm/components/MentionListError/GenericErrorIllustration.js +5 -7
  40. package/dist/esm/components/MentionListError/index.js +5 -7
  41. package/dist/esm/components/MentionPicker/index.js +16 -19
  42. package/dist/esm/components/Popup/index.js +5 -7
  43. package/dist/esm/components/ResourcedMentionList/index.js +17 -20
  44. package/dist/esm/components/Scrollable/index.js +7 -10
  45. package/dist/esm/util/analytics.js +1 -1
  46. package/package.json +1 -1
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  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; }
11
10
  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) { _defineProperty(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; }
@@ -39,46 +38,44 @@ function extractPresences(mentions) {
39
38
  return presences;
40
39
  }
41
40
  export var ResourcedMentionListWithoutAnalytics = /*#__PURE__*/function (_React$PureComponent) {
42
- _inherits(ResourcedMentionListWithoutAnalytics, _React$PureComponent);
43
- var _super = _createSuper(ResourcedMentionListWithoutAnalytics);
44
41
  function ResourcedMentionListWithoutAnalytics(props) {
45
42
  var _this;
46
43
  _classCallCheck(this, ResourcedMentionListWithoutAnalytics);
47
- _this = _super.call(this, props);
44
+ _this = _callSuper(this, ResourcedMentionListWithoutAnalytics, [props]);
48
45
  // API
49
- _defineProperty(_assertThisInitialized(_this), "selectNext", function () {
46
+ _defineProperty(_this, "selectNext", function () {
50
47
  if (_this.mentionListRef) {
51
48
  _this.mentionListRef.selectNext();
52
49
  }
53
50
  });
54
- _defineProperty(_assertThisInitialized(_this), "selectPrevious", function () {
51
+ _defineProperty(_this, "selectPrevious", function () {
55
52
  if (_this.mentionListRef) {
56
53
  _this.mentionListRef.selectPrevious();
57
54
  }
58
55
  });
59
- _defineProperty(_assertThisInitialized(_this), "selectIndex", function (index, callback) {
56
+ _defineProperty(_this, "selectIndex", function (index, callback) {
60
57
  if (_this.mentionListRef) {
61
58
  _this.mentionListRef.selectIndex(index, callback);
62
59
  }
63
60
  });
64
- _defineProperty(_assertThisInitialized(_this), "selectId", function (id, callback) {
61
+ _defineProperty(_this, "selectId", function (id, callback) {
65
62
  if (_this.mentionListRef) {
66
63
  _this.mentionListRef.selectId(id, callback);
67
64
  }
68
65
  });
69
- _defineProperty(_assertThisInitialized(_this), "chooseCurrentSelection", function () {
66
+ _defineProperty(_this, "chooseCurrentSelection", function () {
70
67
  if (_this.mentionListRef) {
71
68
  _this.mentionListRef.chooseCurrentSelection();
72
69
  }
73
70
  });
74
- _defineProperty(_assertThisInitialized(_this), "mentionsCount", function () {
71
+ _defineProperty(_this, "mentionsCount", function () {
75
72
  if (_this.mentionListRef) {
76
73
  return _this.mentionListRef.mentionsCount();
77
74
  }
78
75
  return 0;
79
76
  });
80
77
  // internal, used for callbacks
81
- _defineProperty(_assertThisInitialized(_this), "filterChange", function (mentions) {
78
+ _defineProperty(_this, "filterChange", function (mentions) {
82
79
  // Retain known presence
83
80
  var currentPresences = extractPresences(_this.state.mentions);
84
81
  _this.setState({
@@ -87,29 +84,29 @@ export var ResourcedMentionListWithoutAnalytics = /*#__PURE__*/function (_React$
87
84
  });
88
85
  _this.refreshPresences(mentions);
89
86
  });
90
- _defineProperty(_assertThisInitialized(_this), "sendAnalytics", function (event, actionSubject, action) {
87
+ _defineProperty(_this, "sendAnalytics", function (event, actionSubject, action) {
91
88
  if (event === SLI_EVENT_TYPE) {
92
89
  fireSliAnalyticsEvent(_this.props)(actionSubject, action);
93
90
  }
94
91
  });
95
- _defineProperty(_assertThisInitialized(_this), "filterError", function (error) {
92
+ _defineProperty(_this, "filterError", function (error) {
96
93
  debug('ak-resourced-mentions-list._filterError', error);
97
94
  _this.setState({
98
95
  resourceError: error
99
96
  });
100
97
  });
101
- _defineProperty(_assertThisInitialized(_this), "presenceUpdate", function (presences) {
98
+ _defineProperty(_this, "presenceUpdate", function (presences) {
102
99
  _this.setState({
103
100
  mentions: applyPresence(_this.state.mentions, presences)
104
101
  });
105
102
  });
106
- _defineProperty(_assertThisInitialized(_this), "notifySelection", function (mention) {
103
+ _defineProperty(_this, "notifySelection", function (mention) {
107
104
  _this.props.resourceProvider.recordMentionSelection(mention);
108
105
  if (_this.props.onSelection) {
109
106
  _this.props.onSelection(mention);
110
107
  }
111
108
  });
112
- _defineProperty(_assertThisInitialized(_this), "handleMentionListRef", function (ref) {
109
+ _defineProperty(_this, "handleMentionListRef", function (ref) {
113
110
  _this.mentionListRef = ref;
114
111
  });
115
112
  _this.subscriberKey = uniqueId('ak-resourced-mention-list');
@@ -120,7 +117,8 @@ export var ResourcedMentionListWithoutAnalytics = /*#__PURE__*/function (_React$
120
117
  _this.applyPropChanges({}, props);
121
118
  return _this;
122
119
  }
123
- _createClass(ResourcedMentionListWithoutAnalytics, [{
120
+ _inherits(ResourcedMentionListWithoutAnalytics, _React$PureComponent);
121
+ return _createClass(ResourcedMentionListWithoutAnalytics, [{
124
122
  key: "componentDidMount",
125
123
  value: function componentDidMount() {
126
124
  this.subscribeMentionProvider(this.props.resourceProvider);
@@ -220,7 +218,6 @@ export var ResourcedMentionListWithoutAnalytics = /*#__PURE__*/function (_React$
220
218
  });
221
219
  }
222
220
  }]);
223
- return ResourcedMentionListWithoutAnalytics;
224
221
  }(React.PureComponent);
225
222
  var ResourcedMentionList = withAnalyticsEvents({})(ResourcedMentionListWithoutAnalytics);
226
223
  export default ResourcedMentionList;
@@ -1,27 +1,24 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  import React from 'react';
11
10
  import { findDOMNode } from 'react-dom';
12
11
  import { ScrollableStyle } from './styles';
13
12
  var Scrollable = /*#__PURE__*/function (_React$PureComponent) {
14
- _inherits(Scrollable, _React$PureComponent);
15
- var _super = _createSuper(Scrollable);
16
13
  function Scrollable() {
17
14
  var _this;
18
15
  _classCallCheck(this, Scrollable);
19
16
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
20
17
  args[_key] = arguments[_key];
21
18
  }
22
- _this = _super.call.apply(_super, [this].concat(args));
19
+ _this = _callSuper(this, Scrollable, [].concat(args));
23
20
  // API
24
- _defineProperty(_assertThisInitialized(_this), "reveal", function (child) {
21
+ _defineProperty(_this, "reveal", function (child) {
25
22
  if (child && _this.scrollableDiv) {
26
23
  var childNode = findDOMNode(child);
27
24
  // Not using Element.scrollIntoView as it scrolls even to top/bottom of view even if
@@ -35,12 +32,13 @@ var Scrollable = /*#__PURE__*/function (_React$PureComponent) {
35
32
  }
36
33
  }
37
34
  });
38
- _defineProperty(_assertThisInitialized(_this), "handleRef", function (ref) {
35
+ _defineProperty(_this, "handleRef", function (ref) {
39
36
  _this.scrollableDiv = ref;
40
37
  });
41
38
  return _this;
42
39
  }
43
- _createClass(Scrollable, [{
40
+ _inherits(Scrollable, _React$PureComponent);
41
+ return _createClass(Scrollable, [{
44
42
  key: "render",
45
43
  value: function render() {
46
44
  return /*#__PURE__*/React.createElement(ScrollableStyle, {
@@ -48,6 +46,5 @@ var Scrollable = /*#__PURE__*/function (_React$PureComponent) {
48
46
  }, this.props.children);
49
47
  }
50
48
  }]);
51
- return Scrollable;
52
49
  }(React.PureComponent);
53
50
  export { Scrollable as default };
@@ -5,7 +5,7 @@ import { OPERATIONAL_EVENT_TYPE, UI_EVENT_TYPE } from '@atlaskit/analytics-gas-t
5
5
  import { ELEMENTS_CHANNEL } from '../_constants';
6
6
  import { ComponentNames, isSpecialMentionText } from '../types';
7
7
  var packageName = "@atlaskit/mention";
8
- var packageVersion = "23.4.5";
8
+ var packageVersion = "23.4.6";
9
9
  export var SLI_EVENT_TYPE = 'sli';
10
10
  export var SMART_EVENT_TYPE = 'smart';
11
11
  export var fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/mention",
3
- "version": "23.4.5",
3
+ "version": "23.4.6",
4
4
  "description": "A React component used to display user profiles in a list for 'Mention' functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"