@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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/api/ContextMentionResource.js +1 -2
- package/dist/cjs/api/MentionNameResolver.js +1 -2
- package/dist/cjs/api/MentionResource.js +9 -14
- package/dist/cjs/api/PresenceResource.js +11 -18
- package/dist/cjs/api/TeamMentionResource.js +11 -13
- package/dist/cjs/components/Mention/PrimitiveMention.js +7 -7
- package/dist/cjs/components/Mention/ResourcedMention.js +6 -9
- package/dist/cjs/components/Mention/index.js +9 -12
- package/dist/cjs/components/Mention/ufoExperiences.js +5 -7
- package/dist/cjs/components/MentionDescriptionByline/TeamMentionDescriptionByline.js +7 -10
- package/dist/cjs/components/MentionDescriptionByline/UserMentionDescriptionByline.js +5 -7
- package/dist/cjs/components/MentionDescriptionByline/index.js +5 -7
- package/dist/cjs/components/MentionItem/index.js +8 -11
- package/dist/cjs/components/MentionList/index.js +14 -17
- package/dist/cjs/components/MentionListError/GenericErrorIllustration.js +5 -7
- package/dist/cjs/components/MentionListError/index.js +5 -7
- package/dist/cjs/components/MentionPicker/index.js +16 -19
- package/dist/cjs/components/Popup/index.js +5 -7
- package/dist/cjs/components/ResourcedMentionList/index.js +17 -20
- package/dist/cjs/components/Scrollable/index.js +7 -10
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/components/Mention/PrimitiveMention.js +1 -1
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/api/ContextMentionResource.js +1 -2
- package/dist/esm/api/MentionNameResolver.js +1 -2
- package/dist/esm/api/MentionResource.js +9 -14
- package/dist/esm/api/PresenceResource.js +11 -18
- package/dist/esm/api/TeamMentionResource.js +11 -13
- package/dist/esm/components/Mention/PrimitiveMention.js +7 -7
- package/dist/esm/components/Mention/ResourcedMention.js +6 -9
- package/dist/esm/components/Mention/index.js +9 -12
- package/dist/esm/components/Mention/ufoExperiences.js +5 -7
- package/dist/esm/components/MentionDescriptionByline/TeamMentionDescriptionByline.js +7 -10
- package/dist/esm/components/MentionDescriptionByline/UserMentionDescriptionByline.js +5 -7
- package/dist/esm/components/MentionDescriptionByline/index.js +5 -7
- package/dist/esm/components/MentionItem/index.js +8 -11
- package/dist/esm/components/MentionList/index.js +14 -17
- package/dist/esm/components/MentionListError/GenericErrorIllustration.js +5 -7
- package/dist/esm/components/MentionListError/index.js +5 -7
- package/dist/esm/components/MentionPicker/index.js +16 -19
- package/dist/esm/components/Popup/index.js +5 -7
- package/dist/esm/components/ResourcedMentionList/index.js +17 -20
- package/dist/esm/components/Scrollable/index.js +7 -10
- package/dist/esm/util/analytics.js +1 -1
- 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
|
|
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 =
|
|
44
|
+
_this = _callSuper(this, ResourcedMentionListWithoutAnalytics, [props]);
|
|
48
45
|
// API
|
|
49
|
-
_defineProperty(
|
|
46
|
+
_defineProperty(_this, "selectNext", function () {
|
|
50
47
|
if (_this.mentionListRef) {
|
|
51
48
|
_this.mentionListRef.selectNext();
|
|
52
49
|
}
|
|
53
50
|
});
|
|
54
|
-
_defineProperty(
|
|
51
|
+
_defineProperty(_this, "selectPrevious", function () {
|
|
55
52
|
if (_this.mentionListRef) {
|
|
56
53
|
_this.mentionListRef.selectPrevious();
|
|
57
54
|
}
|
|
58
55
|
});
|
|
59
|
-
_defineProperty(
|
|
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(
|
|
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(
|
|
66
|
+
_defineProperty(_this, "chooseCurrentSelection", function () {
|
|
70
67
|
if (_this.mentionListRef) {
|
|
71
68
|
_this.mentionListRef.chooseCurrentSelection();
|
|
72
69
|
}
|
|
73
70
|
});
|
|
74
|
-
_defineProperty(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
98
|
+
_defineProperty(_this, "presenceUpdate", function (presences) {
|
|
102
99
|
_this.setState({
|
|
103
100
|
mentions: applyPresence(_this.state.mentions, presences)
|
|
104
101
|
});
|
|
105
102
|
});
|
|
106
|
-
_defineProperty(
|
|
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(
|
|
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
|
-
|
|
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
|
|
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 =
|
|
19
|
+
_this = _callSuper(this, Scrollable, [].concat(args));
|
|
23
20
|
// API
|
|
24
|
-
_defineProperty(
|
|
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(
|
|
35
|
+
_defineProperty(_this, "handleRef", function (ref) {
|
|
39
36
|
_this.scrollableDiv = ref;
|
|
40
37
|
});
|
|
41
38
|
return _this;
|
|
42
39
|
}
|
|
43
|
-
|
|
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.
|
|
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