@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,28 +1,25 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import React from 'react';
|
|
12
11
|
import { FormattedMessage } from 'react-intl-next';
|
|
13
12
|
import { DescriptionBylineStyle } from './styles';
|
|
14
13
|
import { messages } from '../i18n';
|
|
15
14
|
var TeamMentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent) {
|
|
16
|
-
_inherits(TeamMentionDescriptionByline, _React$PureComponent);
|
|
17
|
-
var _super = _createSuper(TeamMentionDescriptionByline);
|
|
18
15
|
function TeamMentionDescriptionByline() {
|
|
19
16
|
var _this;
|
|
20
17
|
_classCallCheck(this, TeamMentionDescriptionByline);
|
|
21
18
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22
19
|
args[_key] = arguments[_key];
|
|
23
20
|
}
|
|
24
|
-
_this =
|
|
25
|
-
_defineProperty(
|
|
21
|
+
_this = _callSuper(this, TeamMentionDescriptionByline, [].concat(args));
|
|
22
|
+
_defineProperty(_this, "renderByline", function (memberCount, includesYou) {
|
|
26
23
|
if (includesYou) {
|
|
27
24
|
if (memberCount > 50) {
|
|
28
25
|
return _this.getBylineComponent( /*#__PURE__*/React.createElement(FormattedMessage, messages.plus50MembersWithYou));
|
|
@@ -43,12 +40,13 @@ var TeamMentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent)
|
|
|
43
40
|
})));
|
|
44
41
|
}
|
|
45
42
|
});
|
|
46
|
-
_defineProperty(
|
|
43
|
+
_defineProperty(_this, "getBylineComponent", function (message) {
|
|
47
44
|
return /*#__PURE__*/React.createElement(DescriptionBylineStyle, null, message);
|
|
48
45
|
});
|
|
49
46
|
return _this;
|
|
50
47
|
}
|
|
51
|
-
|
|
48
|
+
_inherits(TeamMentionDescriptionByline, _React$PureComponent);
|
|
49
|
+
return _createClass(TeamMentionDescriptionByline, [{
|
|
52
50
|
key: "render",
|
|
53
51
|
value: function render() {
|
|
54
52
|
var context = this.props.mention.context;
|
|
@@ -60,6 +58,5 @@ var TeamMentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent)
|
|
|
60
58
|
return this.renderByline(memberCount, includesYou);
|
|
61
59
|
}
|
|
62
60
|
}]);
|
|
63
|
-
return TeamMentionDescriptionByline;
|
|
64
61
|
}(React.PureComponent);
|
|
65
62
|
export { TeamMentionDescriptionByline as default };
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
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
9
|
import { renderHighlight } from '../MentionItem/MentionHighlightHelpers';
|
|
10
10
|
import { DescriptionBylineStyle } from './styles';
|
|
11
11
|
var UserMentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent) {
|
|
12
|
-
_inherits(UserMentionDescriptionByline, _React$PureComponent);
|
|
13
|
-
var _super = _createSuper(UserMentionDescriptionByline);
|
|
14
12
|
function UserMentionDescriptionByline() {
|
|
15
13
|
_classCallCheck(this, UserMentionDescriptionByline);
|
|
16
|
-
return
|
|
14
|
+
return _callSuper(this, UserMentionDescriptionByline, arguments);
|
|
17
15
|
}
|
|
18
|
-
|
|
16
|
+
_inherits(UserMentionDescriptionByline, _React$PureComponent);
|
|
17
|
+
return _createClass(UserMentionDescriptionByline, [{
|
|
19
18
|
key: "render",
|
|
20
19
|
value: function render() {
|
|
21
20
|
var _this$props$mention = this.props.mention,
|
|
@@ -29,6 +28,5 @@ var UserMentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent)
|
|
|
29
28
|
return renderHighlight(DescriptionBylineStyle, nickname, nicknameHighlights, '@');
|
|
30
29
|
}
|
|
31
30
|
}]);
|
|
32
|
-
return UserMentionDescriptionByline;
|
|
33
31
|
}(React.PureComponent);
|
|
34
32
|
export { UserMentionDescriptionByline as default };
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
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
9
|
import { UserType } from '../../types';
|
|
10
10
|
import UserMentionDescriptionByline from './UserMentionDescriptionByline';
|
|
11
11
|
import TeamMentionDescriptionByline from './TeamMentionDescriptionByline';
|
|
12
12
|
var MentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent) {
|
|
13
|
-
_inherits(MentionDescriptionByline, _React$PureComponent);
|
|
14
|
-
var _super = _createSuper(MentionDescriptionByline);
|
|
15
13
|
function MentionDescriptionByline() {
|
|
16
14
|
_classCallCheck(this, MentionDescriptionByline);
|
|
17
|
-
return
|
|
15
|
+
return _callSuper(this, MentionDescriptionByline, arguments);
|
|
18
16
|
}
|
|
19
|
-
|
|
17
|
+
_inherits(MentionDescriptionByline, _React$PureComponent);
|
|
18
|
+
return _createClass(MentionDescriptionByline, [{
|
|
20
19
|
key: "render",
|
|
21
20
|
value: function render() {
|
|
22
21
|
var userType = this.props.mention.userType;
|
|
@@ -36,6 +35,5 @@ var MentionDescriptionByline = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
}]);
|
|
39
|
-
return MentionDescriptionByline;
|
|
40
38
|
}(React.PureComponent);
|
|
41
39
|
export { MentionDescriptionByline as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
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
7
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
9
|
-
function
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
import Avatar from '@atlaskit/avatar';
|
|
12
11
|
import Lozenge from '@atlaskit/lozenge';
|
|
@@ -42,35 +41,34 @@ function renderTime(time) {
|
|
|
42
41
|
return null;
|
|
43
42
|
}
|
|
44
43
|
var MentionItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
45
|
-
_inherits(MentionItem, _React$PureComponent);
|
|
46
|
-
var _super = _createSuper(MentionItem);
|
|
47
44
|
function MentionItem() {
|
|
48
45
|
var _this;
|
|
49
46
|
_classCallCheck(this, MentionItem);
|
|
50
47
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
51
48
|
args[_key] = arguments[_key];
|
|
52
49
|
}
|
|
53
|
-
_this =
|
|
50
|
+
_this = _callSuper(this, MentionItem, [].concat(args));
|
|
54
51
|
// internal, used for callbacks
|
|
55
|
-
_defineProperty(
|
|
52
|
+
_defineProperty(_this, "onMentionSelected", function (event) {
|
|
56
53
|
if (leftClick(event) && _this.props.onSelection) {
|
|
57
54
|
event.preventDefault();
|
|
58
55
|
_this.props.onSelection(_this.props.mention, event);
|
|
59
56
|
}
|
|
60
57
|
});
|
|
61
|
-
_defineProperty(
|
|
58
|
+
_defineProperty(_this, "onMentionMenuItemMouseMove", function (event) {
|
|
62
59
|
if (_this.props.onMouseMove) {
|
|
63
60
|
_this.props.onMouseMove(_this.props.mention, event);
|
|
64
61
|
}
|
|
65
62
|
});
|
|
66
|
-
_defineProperty(
|
|
63
|
+
_defineProperty(_this, "onMentionMenuItemMouseEnter", function (event) {
|
|
67
64
|
if (_this.props.onMouseEnter) {
|
|
68
65
|
_this.props.onMouseEnter(_this.props.mention, event);
|
|
69
66
|
}
|
|
70
67
|
});
|
|
71
68
|
return _this;
|
|
72
69
|
}
|
|
73
|
-
|
|
70
|
+
_inherits(MentionItem, _React$PureComponent);
|
|
71
|
+
return _createClass(MentionItem, [{
|
|
74
72
|
key: "render",
|
|
75
73
|
value: function render() {
|
|
76
74
|
var _this$props = this.props,
|
|
@@ -121,6 +119,5 @@ var MentionItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
121
119
|
} /* safe to cast to string given there is no value binding */)))) : null)));
|
|
122
120
|
}
|
|
123
121
|
}]);
|
|
124
|
-
return MentionItem;
|
|
125
122
|
}(React.PureComponent);
|
|
126
123
|
export { MentionItem as default };
|
|
@@ -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
|
import React from 'react';
|
|
11
10
|
import debug from '../../util/logger';
|
|
@@ -40,29 +39,27 @@ function getIndex(key, mentions) {
|
|
|
40
39
|
return index;
|
|
41
40
|
}
|
|
42
41
|
var MentionList = /*#__PURE__*/function (_React$PureComponent) {
|
|
43
|
-
_inherits(MentionList, _React$PureComponent);
|
|
44
|
-
var _super = _createSuper(MentionList);
|
|
45
42
|
function MentionList(props) {
|
|
46
43
|
var _this;
|
|
47
44
|
_classCallCheck(this, MentionList);
|
|
48
|
-
_this =
|
|
45
|
+
_this = _callSuper(this, MentionList, [props]);
|
|
49
46
|
// API
|
|
50
|
-
_defineProperty(
|
|
47
|
+
_defineProperty(_this, "selectNext", function () {
|
|
51
48
|
var newIndex = wrapIndex(_this.props.mentions, _this.state.selectedIndex + 1);
|
|
52
49
|
_this.selectIndex(newIndex);
|
|
53
50
|
});
|
|
54
|
-
_defineProperty(
|
|
51
|
+
_defineProperty(_this, "selectPrevious", function () {
|
|
55
52
|
var newIndex = wrapIndex(_this.props.mentions, _this.state.selectedIndex - 1);
|
|
56
53
|
_this.selectIndex(newIndex);
|
|
57
54
|
});
|
|
58
|
-
_defineProperty(
|
|
55
|
+
_defineProperty(_this, "selectIndex", function (index, callback) {
|
|
59
56
|
var mentions = _this.props.mentions;
|
|
60
57
|
_this.setState({
|
|
61
58
|
selectedIndex: index,
|
|
62
59
|
selectedKey: getKey(index, mentions)
|
|
63
60
|
}, callback);
|
|
64
61
|
});
|
|
65
|
-
_defineProperty(
|
|
62
|
+
_defineProperty(_this, "selectId", function (id, callback) {
|
|
66
63
|
var mentions = _this.props.mentions;
|
|
67
64
|
var index = getIndex(id, mentions);
|
|
68
65
|
if (index !== undefined) {
|
|
@@ -72,7 +69,7 @@ var MentionList = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
72
69
|
}, callback);
|
|
73
70
|
}
|
|
74
71
|
});
|
|
75
|
-
_defineProperty(
|
|
72
|
+
_defineProperty(_this, "chooseCurrentSelection", function () {
|
|
76
73
|
var _this$props = _this.props,
|
|
77
74
|
mentions = _this$props.mentions,
|
|
78
75
|
onSelection = _this$props.onSelection;
|
|
@@ -83,11 +80,11 @@ var MentionList = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
83
80
|
onSelection(selectedMention);
|
|
84
81
|
}
|
|
85
82
|
});
|
|
86
|
-
_defineProperty(
|
|
83
|
+
_defineProperty(_this, "mentionsCount", function () {
|
|
87
84
|
var mentions = _this.props.mentions;
|
|
88
85
|
return mentions && mentions.length || 0;
|
|
89
86
|
});
|
|
90
|
-
_defineProperty(
|
|
87
|
+
_defineProperty(_this, "selectIndexOnHover", function (mention, event) {
|
|
91
88
|
if (!event) {
|
|
92
89
|
return;
|
|
93
90
|
}
|
|
@@ -97,18 +94,19 @@ var MentionList = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
97
94
|
}
|
|
98
95
|
_this.lastMousePosition = mousePosition;
|
|
99
96
|
});
|
|
100
|
-
_defineProperty(
|
|
97
|
+
_defineProperty(_this, "itemSelected", function (mention) {
|
|
101
98
|
_this.selectId(mention.id, function () {
|
|
102
99
|
_this.chooseCurrentSelection();
|
|
103
100
|
});
|
|
104
101
|
});
|
|
105
|
-
_defineProperty(
|
|
102
|
+
_defineProperty(_this, "handleScrollableRef", function (ref) {
|
|
106
103
|
_this.scrollable = ref;
|
|
107
104
|
});
|
|
108
105
|
_this.setDefaultSelectionState();
|
|
109
106
|
return _this;
|
|
110
107
|
}
|
|
111
|
-
|
|
108
|
+
_inherits(MentionList, _React$PureComponent);
|
|
109
|
+
return _createClass(MentionList, [{
|
|
112
110
|
key: "UNSAFE_componentWillReceiveProps",
|
|
113
111
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
114
112
|
// adjust selection
|
|
@@ -230,6 +228,5 @@ var MentionList = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
230
228
|
}, errorSection, resultSection));
|
|
231
229
|
}
|
|
232
230
|
}]);
|
|
233
|
-
return MentionList;
|
|
234
231
|
}(React.PureComponent);
|
|
235
232
|
export { MentionList as default };
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
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
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { GenericErrorVisualStyle } from './styles';
|
|
11
11
|
export var GenericErrorIllustration = /*#__PURE__*/function (_React$PureComponent) {
|
|
12
|
-
_inherits(GenericErrorIllustration, _React$PureComponent);
|
|
13
|
-
var _super = _createSuper(GenericErrorIllustration);
|
|
14
12
|
function GenericErrorIllustration() {
|
|
15
13
|
_classCallCheck(this, GenericErrorIllustration);
|
|
16
|
-
return
|
|
14
|
+
return _callSuper(this, GenericErrorIllustration, arguments);
|
|
17
15
|
}
|
|
18
|
-
|
|
16
|
+
_inherits(GenericErrorIllustration, _React$PureComponent);
|
|
17
|
+
return _createClass(GenericErrorIllustration, [{
|
|
19
18
|
key: "render",
|
|
20
19
|
value: function render() {
|
|
21
20
|
return /*#__PURE__*/React.createElement(GenericErrorVisualStyle, null, /*#__PURE__*/React.createElement("svg", {
|
|
@@ -92,5 +91,4 @@ export var GenericErrorIllustration = /*#__PURE__*/function (_React$PureComponen
|
|
|
92
91
|
}))))));
|
|
93
92
|
}
|
|
94
93
|
}]);
|
|
95
|
-
return GenericErrorIllustration;
|
|
96
94
|
}(React.PureComponent);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
-
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
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
9
|
import { DefaultAdvisedAction, DefaultHeadline, DifferentText, LoginAgain } from '../../util/i18n';
|
|
@@ -15,13 +15,12 @@ var advisedActionMessages = {
|
|
|
15
15
|
default: DefaultAdvisedAction
|
|
16
16
|
};
|
|
17
17
|
var MentionListError = /*#__PURE__*/function (_React$PureComponent) {
|
|
18
|
-
_inherits(MentionListError, _React$PureComponent);
|
|
19
|
-
var _super = _createSuper(MentionListError);
|
|
20
18
|
function MentionListError() {
|
|
21
19
|
_classCallCheck(this, MentionListError);
|
|
22
|
-
return
|
|
20
|
+
return _callSuper(this, MentionListError, arguments);
|
|
23
21
|
}
|
|
24
|
-
|
|
22
|
+
_inherits(MentionListError, _React$PureComponent);
|
|
23
|
+
return _createClass(MentionListError, [{
|
|
25
24
|
key: "render",
|
|
26
25
|
value: function render() {
|
|
27
26
|
var error = this.props.error;
|
|
@@ -44,6 +43,5 @@ var MentionListError = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
44
43
|
return advisedActionMessages.default;
|
|
45
44
|
}
|
|
46
45
|
}]);
|
|
47
|
-
return MentionListError;
|
|
48
46
|
}(React.PureComponent);
|
|
49
47
|
export { MentionListError as default };
|
|
@@ -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
|
import { Text } from '@atlaskit/primitives';
|
|
11
10
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
@@ -21,38 +20,36 @@ import { MentionPickerInfoStyle, MentionPickerStyle } from './styles';
|
|
|
21
20
|
* @class MentionPicker
|
|
22
21
|
*/
|
|
23
22
|
export var MentionPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
24
|
-
_inherits(MentionPicker, _React$PureComponent);
|
|
25
|
-
var _super = _createSuper(MentionPicker);
|
|
26
23
|
function MentionPicker(props) {
|
|
27
24
|
var _this;
|
|
28
25
|
_classCallCheck(this, MentionPicker);
|
|
29
|
-
_this =
|
|
30
|
-
_defineProperty(
|
|
26
|
+
_this = _callSuper(this, MentionPicker, [props]);
|
|
27
|
+
_defineProperty(_this, "selectNext", function () {
|
|
31
28
|
if (_this.mentionListRef) {
|
|
32
29
|
_this.mentionListRef.selectNext();
|
|
33
30
|
}
|
|
34
31
|
});
|
|
35
|
-
_defineProperty(
|
|
32
|
+
_defineProperty(_this, "selectPrevious", function () {
|
|
36
33
|
if (_this.mentionListRef) {
|
|
37
34
|
_this.mentionListRef.selectPrevious();
|
|
38
35
|
}
|
|
39
36
|
});
|
|
40
|
-
_defineProperty(
|
|
37
|
+
_defineProperty(_this, "selectIndex", function (index, callback) {
|
|
41
38
|
if (_this.mentionListRef) {
|
|
42
39
|
_this.mentionListRef.selectIndex(index, callback);
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
|
-
_defineProperty(
|
|
42
|
+
_defineProperty(_this, "selectId", function (id, callback) {
|
|
46
43
|
if (_this.mentionListRef) {
|
|
47
44
|
_this.mentionListRef.selectId(id, callback);
|
|
48
45
|
}
|
|
49
46
|
});
|
|
50
|
-
_defineProperty(
|
|
47
|
+
_defineProperty(_this, "chooseCurrentSelection", function () {
|
|
51
48
|
if (_this.mentionListRef) {
|
|
52
49
|
_this.mentionListRef.chooseCurrentSelection();
|
|
53
50
|
}
|
|
54
51
|
});
|
|
55
|
-
_defineProperty(
|
|
52
|
+
_defineProperty(_this, "mentionsCount", function () {
|
|
56
53
|
if (_this.mentionListRef) {
|
|
57
54
|
return _this.mentionListRef.mentionsCount();
|
|
58
55
|
}
|
|
@@ -65,7 +62,7 @@ export var MentionPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
65
62
|
* It should be noted that the visible state of the component is not considered in
|
|
66
63
|
* this function. Instead the old state and new state should be passed as parameters.
|
|
67
64
|
*/
|
|
68
|
-
_defineProperty(
|
|
65
|
+
_defineProperty(_this, "onFilterVisibilityChange", function (oldVisibility, newVisibility) {
|
|
69
66
|
if (oldVisibility !== newVisibility) {
|
|
70
67
|
if (newVisibility) {
|
|
71
68
|
if (_this.props.onOpen) {
|
|
@@ -79,7 +76,7 @@ export var MentionPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
79
76
|
}
|
|
80
77
|
});
|
|
81
78
|
// internal, used for callbacks
|
|
82
|
-
_defineProperty(
|
|
79
|
+
_defineProperty(_this, "filterChange", function (mentions, query, stats) {
|
|
83
80
|
debug('ak-mention-picker.filterChange', mentions.length);
|
|
84
81
|
var wasVisible = _this.state.visible;
|
|
85
82
|
var visible = mentions.length > 0;
|
|
@@ -91,7 +88,7 @@ export var MentionPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
91
88
|
return mention.id;
|
|
92
89
|
}), query);
|
|
93
90
|
});
|
|
94
|
-
_defineProperty(
|
|
91
|
+
_defineProperty(_this, "filterError", function (error) {
|
|
95
92
|
debug('ak-mention-picker.filterError', error);
|
|
96
93
|
var wasVisible = _this.state.visible;
|
|
97
94
|
_this.setState({
|
|
@@ -100,13 +97,13 @@ export var MentionPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
100
97
|
});
|
|
101
98
|
_this.onFilterVisibilityChange(wasVisible, true);
|
|
102
99
|
});
|
|
103
|
-
_defineProperty(
|
|
100
|
+
_defineProperty(_this, "filterInfo", function (info) {
|
|
104
101
|
debug('ak-mention-picker.filterInfo', info);
|
|
105
102
|
_this.setState({
|
|
106
103
|
info: info
|
|
107
104
|
});
|
|
108
105
|
});
|
|
109
|
-
_defineProperty(
|
|
106
|
+
_defineProperty(_this, "handleMentionListRef", function (ref) {
|
|
110
107
|
_this.mentionListRef = ref;
|
|
111
108
|
});
|
|
112
109
|
_this.subscriberKey = uniqueId('ak-mention-picker');
|
|
@@ -116,7 +113,8 @@ export var MentionPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
116
113
|
_this.applyPropChanges({}, props);
|
|
117
114
|
return _this;
|
|
118
115
|
}
|
|
119
|
-
|
|
116
|
+
_inherits(MentionPicker, _React$PureComponent);
|
|
117
|
+
return _createClass(MentionPicker, [{
|
|
120
118
|
key: "componentDidMount",
|
|
121
119
|
value: function componentDidMount() {
|
|
122
120
|
this.subscribeResourceProvider(this.props.resourceProvider);
|
|
@@ -219,7 +217,6 @@ export var MentionPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
219
217
|
);
|
|
220
218
|
}
|
|
221
219
|
}]);
|
|
222
|
-
return MentionPicker;
|
|
223
220
|
}(React.PureComponent);
|
|
224
221
|
_defineProperty(MentionPicker, "defaultProps", {
|
|
225
222
|
onSelection: function onSelection() {},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
4
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
-
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)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import ReactDOM from 'react-dom';
|
|
@@ -12,13 +12,12 @@ import ReactDOM from 'react-dom';
|
|
|
12
12
|
* Simple implementation of popup while waiting for ak-inline-dialog
|
|
13
13
|
*/
|
|
14
14
|
var Popup = /*#__PURE__*/function (_React$PureComponent) {
|
|
15
|
-
_inherits(Popup, _React$PureComponent);
|
|
16
|
-
var _super = _createSuper(Popup);
|
|
17
15
|
function Popup() {
|
|
18
16
|
_classCallCheck(this, Popup);
|
|
19
|
-
return
|
|
17
|
+
return _callSuper(this, Popup, arguments);
|
|
20
18
|
}
|
|
21
|
-
|
|
19
|
+
_inherits(Popup, _React$PureComponent);
|
|
20
|
+
return _createClass(Popup, [{
|
|
22
21
|
key: "componentDidMount",
|
|
23
22
|
value: function componentDidMount() {
|
|
24
23
|
this.popup = document.createElement('div');
|
|
@@ -107,7 +106,6 @@ var Popup = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
107
106
|
return /*#__PURE__*/React.createElement("div", null);
|
|
108
107
|
}
|
|
109
108
|
}]);
|
|
110
|
-
return Popup;
|
|
111
109
|
}(React.PureComponent);
|
|
112
110
|
_defineProperty(Popup, "defaultProps", {
|
|
113
111
|
relativePosition: 'auto',
|