@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
|
@@ -7,28 +7,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
14
|
var _react = _interopRequireDefault(require("react"));
|
|
16
15
|
var _reactDom = require("react-dom");
|
|
17
16
|
var _styles = require("./styles");
|
|
18
|
-
function
|
|
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)); }
|
|
19
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
20
19
|
var Scrollable = exports.default = /*#__PURE__*/function (_React$PureComponent) {
|
|
21
|
-
(0, _inherits2.default)(Scrollable, _React$PureComponent);
|
|
22
|
-
var _super = _createSuper(Scrollable);
|
|
23
20
|
function Scrollable() {
|
|
24
21
|
var _this;
|
|
25
22
|
(0, _classCallCheck2.default)(this, Scrollable);
|
|
26
23
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
27
24
|
args[_key] = arguments[_key];
|
|
28
25
|
}
|
|
29
|
-
_this =
|
|
26
|
+
_this = _callSuper(this, Scrollable, [].concat(args));
|
|
30
27
|
// API
|
|
31
|
-
(0, _defineProperty2.default)(
|
|
28
|
+
(0, _defineProperty2.default)(_this, "reveal", function (child) {
|
|
32
29
|
if (child && _this.scrollableDiv) {
|
|
33
30
|
var childNode = (0, _reactDom.findDOMNode)(child);
|
|
34
31
|
// Not using Element.scrollIntoView as it scrolls even to top/bottom of view even if
|
|
@@ -42,12 +39,13 @@ var Scrollable = exports.default = /*#__PURE__*/function (_React$PureComponent)
|
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
|
-
(0, _defineProperty2.default)(
|
|
42
|
+
(0, _defineProperty2.default)(_this, "handleRef", function (ref) {
|
|
46
43
|
_this.scrollableDiv = ref;
|
|
47
44
|
});
|
|
48
45
|
return _this;
|
|
49
46
|
}
|
|
50
|
-
(0,
|
|
47
|
+
(0, _inherits2.default)(Scrollable, _React$PureComponent);
|
|
48
|
+
return (0, _createClass2.default)(Scrollable, [{
|
|
51
49
|
key: "render",
|
|
52
50
|
value: function render() {
|
|
53
51
|
return /*#__PURE__*/_react.default.createElement(_styles.ScrollableStyle, {
|
|
@@ -55,5 +53,4 @@ var Scrollable = exports.default = /*#__PURE__*/function (_React$PureComponent)
|
|
|
55
53
|
}, this.props.children);
|
|
56
54
|
}
|
|
57
55
|
}]);
|
|
58
|
-
return Scrollable;
|
|
59
56
|
}(_react.default.PureComponent);
|
|
@@ -12,7 +12,7 @@ var _types = require("../types");
|
|
|
12
12
|
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; }
|
|
13
13
|
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; }
|
|
14
14
|
var packageName = "@atlaskit/mention";
|
|
15
|
-
var packageVersion = "23.4.
|
|
15
|
+
var packageVersion = "23.4.6";
|
|
16
16
|
var SLI_EVENT_TYPE = exports.SLI_EVENT_TYPE = 'sli';
|
|
17
17
|
var SMART_EVENT_TYPE = exports.SMART_EVENT_TYPE = 'smart';
|
|
18
18
|
var fireAnalyticsMentionTypeaheadEvent = exports.fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
|
|
@@ -61,7 +61,7 @@ const PrimitiveMention = /*#__PURE__*/forwardRef(({
|
|
|
61
61
|
padding: 0 0.3em 2px 0.23em;
|
|
62
62
|
line-height: 1.714;
|
|
63
63
|
font-size: 1em;
|
|
64
|
-
font-weight:
|
|
64
|
+
font-weight: ${"var(--ds-font-weight-regular, 400)"};
|
|
65
65
|
word-break: break-word;
|
|
66
66
|
&:hover {
|
|
67
67
|
background: ${getStyle({
|
|
@@ -2,7 +2,7 @@ import { OPERATIONAL_EVENT_TYPE, UI_EVENT_TYPE } from '@atlaskit/analytics-gas-t
|
|
|
2
2
|
import { ELEMENTS_CHANNEL } from '../_constants';
|
|
3
3
|
import { ComponentNames, isSpecialMentionText } from '../types';
|
|
4
4
|
const packageName = "@atlaskit/mention";
|
|
5
|
-
const packageVersion = "23.4.
|
|
5
|
+
const packageVersion = "23.4.6";
|
|
6
6
|
export const SLI_EVENT_TYPE = 'sli';
|
|
7
7
|
export const SMART_EVENT_TYPE = 'smart';
|
|
8
8
|
export const fireAnalyticsMentionTypeaheadEvent = props => (action, duration, userIds = [], query) => {
|
|
@@ -38,12 +38,11 @@ var ContextMentionResource = /*#__PURE__*/function () {
|
|
|
38
38
|
this.mentionProvider = mentionProvider;
|
|
39
39
|
this.contextIdentifier = contextIdentifier;
|
|
40
40
|
}
|
|
41
|
-
_createClass(ContextMentionResource, [{
|
|
41
|
+
return _createClass(ContextMentionResource, [{
|
|
42
42
|
key: "getContextIdentifier",
|
|
43
43
|
value: function getContextIdentifier() {
|
|
44
44
|
return this.contextIdentifier;
|
|
45
45
|
}
|
|
46
46
|
}]);
|
|
47
|
-
return ContextMentionResource;
|
|
48
47
|
}();
|
|
49
48
|
export { ContextMentionResource as default };
|
|
@@ -65,7 +65,7 @@ export var DefaultMentionNameResolver = /*#__PURE__*/function () {
|
|
|
65
65
|
// A sample usage is scrolling to a mention on page load, after the mentions have loadad.
|
|
66
66
|
this.onResolvedAll = onResolvedAll;
|
|
67
67
|
}
|
|
68
|
-
_createClass(DefaultMentionNameResolver, [{
|
|
68
|
+
return _createClass(DefaultMentionNameResolver, [{
|
|
69
69
|
key: "lookupName",
|
|
70
70
|
value: function lookupName(id) {
|
|
71
71
|
var _this2 = this;
|
|
@@ -168,7 +168,6 @@ export var DefaultMentionNameResolver = /*#__PURE__*/function () {
|
|
|
168
168
|
this.fireHydrationEvent(action, id, fromCache, duration);
|
|
169
169
|
}
|
|
170
170
|
}]);
|
|
171
|
-
return DefaultMentionNameResolver;
|
|
172
171
|
}();
|
|
173
172
|
|
|
174
173
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
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 _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
7
7
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
10
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
|
-
function
|
|
11
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
12
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
13
13
|
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
14
14
|
import { isAppMention, isTeamMention, MentionNameStatus, SliNames, Actions } from '../types';
|
|
@@ -40,7 +40,7 @@ var AbstractResource = /*#__PURE__*/function () {
|
|
|
40
40
|
this.infoListeners = new Map();
|
|
41
41
|
this.analyticsListeners = new Map();
|
|
42
42
|
}
|
|
43
|
-
_createClass(AbstractResource, [{
|
|
43
|
+
return _createClass(AbstractResource, [{
|
|
44
44
|
key: "subscribe",
|
|
45
45
|
value: function subscribe(key, callback, errCallback, infoCallback, allResultsCallback, analyticsListeners) {
|
|
46
46
|
if (callback) {
|
|
@@ -69,16 +69,14 @@ var AbstractResource = /*#__PURE__*/function () {
|
|
|
69
69
|
this.analyticsListeners.delete(key);
|
|
70
70
|
}
|
|
71
71
|
}]);
|
|
72
|
-
return AbstractResource;
|
|
73
72
|
}();
|
|
74
73
|
var AbstractMentionResource = /*#__PURE__*/function (_ref) {
|
|
75
|
-
_inherits(AbstractMentionResource, _ref);
|
|
76
|
-
var _super = _createSuper(AbstractMentionResource);
|
|
77
74
|
function AbstractMentionResource() {
|
|
78
75
|
_classCallCheck(this, AbstractMentionResource);
|
|
79
|
-
return
|
|
76
|
+
return _callSuper(this, AbstractMentionResource, arguments);
|
|
80
77
|
}
|
|
81
|
-
|
|
78
|
+
_inherits(AbstractMentionResource, _ref);
|
|
79
|
+
return _createClass(AbstractMentionResource, [{
|
|
82
80
|
key: "shouldHighlightMention",
|
|
83
81
|
value: function shouldHighlightMention(_mention) {
|
|
84
82
|
return false;
|
|
@@ -165,18 +163,15 @@ var AbstractMentionResource = /*#__PURE__*/function (_ref) {
|
|
|
165
163
|
});
|
|
166
164
|
}
|
|
167
165
|
}]);
|
|
168
|
-
return AbstractMentionResource;
|
|
169
166
|
}(AbstractResource);
|
|
170
167
|
/**
|
|
171
168
|
* Provides a Javascript API
|
|
172
169
|
*/
|
|
173
170
|
export var MentionResource = /*#__PURE__*/function (_AbstractMentionResou) {
|
|
174
|
-
_inherits(MentionResource, _AbstractMentionResou);
|
|
175
|
-
var _super2 = _createSuper(MentionResource);
|
|
176
171
|
function MentionResource(config) {
|
|
177
172
|
var _this;
|
|
178
173
|
_classCallCheck(this, MentionResource);
|
|
179
|
-
_this =
|
|
174
|
+
_this = _callSuper(this, MentionResource);
|
|
180
175
|
_this.verifyMentionConfig(config);
|
|
181
176
|
_this.config = config;
|
|
182
177
|
_this.lastReturnedSearch = 0;
|
|
@@ -190,7 +185,8 @@ export var MentionResource = /*#__PURE__*/function (_AbstractMentionResou) {
|
|
|
190
185
|
}
|
|
191
186
|
return _this;
|
|
192
187
|
}
|
|
193
|
-
|
|
188
|
+
_inherits(MentionResource, _AbstractMentionResou);
|
|
189
|
+
return _createClass(MentionResource, [{
|
|
194
190
|
key: "shouldHighlightMention",
|
|
195
191
|
value: function shouldHighlightMention(mention) {
|
|
196
192
|
if (this.config.shouldHighlightMention) {
|
|
@@ -506,7 +502,6 @@ export var MentionResource = /*#__PURE__*/function (_AbstractMentionResou) {
|
|
|
506
502
|
return recordSelection;
|
|
507
503
|
}()
|
|
508
504
|
}]);
|
|
509
|
-
return MentionResource;
|
|
510
505
|
}(AbstractMentionResource);
|
|
511
506
|
export var HttpError = /*#__PURE__*/_createClass(function HttpError(statusCode, statusMessage) {
|
|
512
507
|
_classCallCheck(this, HttpError);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
3
2
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
3
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
4
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
5
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
6
6
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
7
7
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
8
8
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
9
9
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
10
|
-
function
|
|
10
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
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 debug from '../util/logger';
|
|
13
13
|
import { AbstractResource } from './MentionResource';
|
|
@@ -17,22 +17,20 @@ var CacheEntry = /*#__PURE__*/function () {
|
|
|
17
17
|
this.presence = pres;
|
|
18
18
|
this.expiry = Date.now() + timeout;
|
|
19
19
|
}
|
|
20
|
-
_createClass(CacheEntry, [{
|
|
20
|
+
return _createClass(CacheEntry, [{
|
|
21
21
|
key: "expired",
|
|
22
22
|
value: function expired() {
|
|
23
23
|
return Date.now() > this.expiry;
|
|
24
24
|
}
|
|
25
25
|
}]);
|
|
26
|
-
return CacheEntry;
|
|
27
26
|
}();
|
|
28
27
|
var AbstractPresenceResource = /*#__PURE__*/function (_AbstractResource) {
|
|
29
|
-
_inherits(AbstractPresenceResource, _AbstractResource);
|
|
30
|
-
var _super = _createSuper(AbstractPresenceResource);
|
|
31
28
|
function AbstractPresenceResource() {
|
|
32
29
|
_classCallCheck(this, AbstractPresenceResource);
|
|
33
|
-
return
|
|
30
|
+
return _callSuper(this, AbstractPresenceResource, arguments);
|
|
34
31
|
}
|
|
35
|
-
|
|
32
|
+
_inherits(AbstractPresenceResource, _AbstractResource);
|
|
33
|
+
return _createClass(AbstractPresenceResource, [{
|
|
36
34
|
key: "refreshPresence",
|
|
37
35
|
value: function refreshPresence(userIds) {
|
|
38
36
|
throw new Error("not yet implemented.\nParams: userIds=".concat(userIds));
|
|
@@ -50,15 +48,12 @@ var AbstractPresenceResource = /*#__PURE__*/function (_AbstractResource) {
|
|
|
50
48
|
});
|
|
51
49
|
}
|
|
52
50
|
}]);
|
|
53
|
-
return AbstractPresenceResource;
|
|
54
51
|
}(AbstractResource);
|
|
55
52
|
var PresenceResource = /*#__PURE__*/function (_AbstractPresenceReso) {
|
|
56
|
-
_inherits(PresenceResource, _AbstractPresenceReso);
|
|
57
|
-
var _super2 = _createSuper(PresenceResource);
|
|
58
53
|
function PresenceResource(config) {
|
|
59
54
|
var _this;
|
|
60
55
|
_classCallCheck(this, PresenceResource);
|
|
61
|
-
_this =
|
|
56
|
+
_this = _callSuper(this, PresenceResource);
|
|
62
57
|
if (!config.url) {
|
|
63
58
|
throw new Error('config.url is a required parameter');
|
|
64
59
|
}
|
|
@@ -71,7 +66,8 @@ var PresenceResource = /*#__PURE__*/function (_AbstractPresenceReso) {
|
|
|
71
66
|
_this.presenceParser = config.parser || new DefaultPresenceParser();
|
|
72
67
|
return _this;
|
|
73
68
|
}
|
|
74
|
-
|
|
69
|
+
_inherits(PresenceResource, _AbstractPresenceReso);
|
|
70
|
+
return _createClass(PresenceResource, [{
|
|
75
71
|
key: "refreshPresence",
|
|
76
72
|
value: function refreshPresence(userIds) {
|
|
77
73
|
var cacheHits = this.presenceCache.getBulk(userIds);
|
|
@@ -126,7 +122,6 @@ var PresenceResource = /*#__PURE__*/function (_AbstractPresenceReso) {
|
|
|
126
122
|
return url;
|
|
127
123
|
}
|
|
128
124
|
}]);
|
|
129
|
-
return PresenceResource;
|
|
130
125
|
}(AbstractPresenceResource);
|
|
131
126
|
export var DefaultPresenceCache = /*#__PURE__*/function () {
|
|
132
127
|
function DefaultPresenceCache(cacheTimeout, cacheTrigger) {
|
|
@@ -142,7 +137,7 @@ export var DefaultPresenceCache = /*#__PURE__*/function () {
|
|
|
142
137
|
* Removes cache entry
|
|
143
138
|
* @param userId
|
|
144
139
|
*/
|
|
145
|
-
_createClass(DefaultPresenceCache, [{
|
|
140
|
+
return _createClass(DefaultPresenceCache, [{
|
|
146
141
|
key: "_delete",
|
|
147
142
|
value: function _delete(userId) {
|
|
148
143
|
delete this.cache[userId];
|
|
@@ -258,7 +253,6 @@ export var DefaultPresenceCache = /*#__PURE__*/function () {
|
|
|
258
253
|
});
|
|
259
254
|
}
|
|
260
255
|
}]);
|
|
261
|
-
return DefaultPresenceCache;
|
|
262
256
|
}();
|
|
263
257
|
_defineProperty(DefaultPresenceCache, "defaultTimeout", 20000);
|
|
264
258
|
_defineProperty(DefaultPresenceCache, "defaultFlushTrigger", 50);
|
|
@@ -266,7 +260,7 @@ export var DefaultPresenceParser = /*#__PURE__*/function () {
|
|
|
266
260
|
function DefaultPresenceParser() {
|
|
267
261
|
_classCallCheck(this, DefaultPresenceParser);
|
|
268
262
|
}
|
|
269
|
-
_createClass(DefaultPresenceParser, [{
|
|
263
|
+
return _createClass(DefaultPresenceParser, [{
|
|
270
264
|
key: "mapState",
|
|
271
265
|
value: function mapState(state) {
|
|
272
266
|
if (state === 'unavailable') {
|
|
@@ -338,7 +332,6 @@ export var DefaultPresenceParser = /*#__PURE__*/function () {
|
|
|
338
332
|
return false;
|
|
339
333
|
}
|
|
340
334
|
}]);
|
|
341
|
-
return DefaultPresenceParser;
|
|
342
335
|
}();
|
|
343
336
|
_defineProperty(DefaultPresenceParser, "FOCUS_STATE", 'focus');
|
|
344
337
|
export { AbstractPresenceResource };
|
|
@@ -2,17 +2,17 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
3
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
4
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _get from "@babel/runtime/helpers/get";
|
|
7
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _get from "@babel/runtime/helpers/get";
|
|
8
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
10
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
10
|
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
11
|
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; }
|
|
13
12
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
14
|
-
function
|
|
13
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
15
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
|
+
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
16
16
|
import { SLI_EVENT_TYPE } from './../util/analytics';
|
|
17
17
|
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
18
18
|
import { UserType, UserAccessLevel, SliNames, Actions } from '../types';
|
|
@@ -26,19 +26,18 @@ var MAX_QUERY_TEAMS = 20;
|
|
|
26
26
|
* remove this class at this point
|
|
27
27
|
*/
|
|
28
28
|
var TeamMentionResource = /*#__PURE__*/function (_MentionResource) {
|
|
29
|
-
_inherits(TeamMentionResource, _MentionResource);
|
|
30
|
-
var _super = _createSuper(TeamMentionResource);
|
|
31
29
|
function TeamMentionResource(userMentionConfig, teamMentionConfig) {
|
|
32
30
|
var _this;
|
|
33
31
|
_classCallCheck(this, TeamMentionResource);
|
|
34
|
-
_this =
|
|
35
|
-
_defineProperty(
|
|
32
|
+
_this = _callSuper(this, TeamMentionResource, [userMentionConfig]);
|
|
33
|
+
_defineProperty(_this, "lastSearchQuery", '');
|
|
36
34
|
_this.verifyMentionConfig(teamMentionConfig);
|
|
37
35
|
_this.teamMentionConfig = teamMentionConfig;
|
|
38
36
|
_this.lastReturnedSearchTeam = 0;
|
|
39
37
|
return _this;
|
|
40
38
|
}
|
|
41
|
-
|
|
39
|
+
_inherits(TeamMentionResource, _MentionResource);
|
|
40
|
+
return _createClass(TeamMentionResource, [{
|
|
42
41
|
key: "filter",
|
|
43
42
|
value: function filter(query, contextIdentifier) {
|
|
44
43
|
this.lastSearchQuery = query;
|
|
@@ -67,7 +66,7 @@ var TeamMentionResource = /*#__PURE__*/function (_MentionResource) {
|
|
|
67
66
|
while (1) switch (_context.prev = _context.next) {
|
|
68
67
|
case 0:
|
|
69
68
|
emptyQuery = '';
|
|
70
|
-
getUserPromise =
|
|
69
|
+
getUserPromise = _superPropGet(TeamMentionResource, "remoteInitialState", this, 3)([contextIdentifier]);
|
|
71
70
|
queryParams = this.getQueryParamsOfTeamMentionConfig(contextIdentifier);
|
|
72
71
|
options = {
|
|
73
72
|
path: 'bootstrap',
|
|
@@ -122,7 +121,7 @@ var TeamMentionResource = /*#__PURE__*/function (_MentionResource) {
|
|
|
122
121
|
if (hasTeamResults) {
|
|
123
122
|
_this2.notify(searchTime, accumulatedResults, query);
|
|
124
123
|
} else {
|
|
125
|
-
|
|
124
|
+
_superPropGet(TeamMentionResource, "notify", _this2, 3)([searchTime, accumulatedResults, query]);
|
|
126
125
|
}
|
|
127
126
|
};
|
|
128
127
|
userRequestError = null;
|
|
@@ -202,7 +201,7 @@ var TeamMentionResource = /*#__PURE__*/function (_MentionResource) {
|
|
|
202
201
|
}, {
|
|
203
202
|
key: "remoteUserSearch",
|
|
204
203
|
value: function remoteUserSearch(query, contextIdentifier) {
|
|
205
|
-
return
|
|
204
|
+
return _superPropGet(TeamMentionResource, "remoteSearch", this, 3)([query, contextIdentifier]);
|
|
206
205
|
}
|
|
207
206
|
}, {
|
|
208
207
|
key: "remoteTeamSearch",
|
|
@@ -282,6 +281,5 @@ var TeamMentionResource = /*#__PURE__*/function (_MentionResource) {
|
|
|
282
281
|
return teamId.replace(TEAM_ARI_PREFIX, '').replace(IDENTITY_TEAM_ARI_PREFIX, '');
|
|
283
282
|
}
|
|
284
283
|
}]);
|
|
285
|
-
return TeamMentionResource;
|
|
286
284
|
}(MentionResource);
|
|
287
285
|
export { TeamMentionResource as default };
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
var _templateObject;
|
|
5
6
|
var _excluded = ["mentionType"];
|
|
6
|
-
var _mentionStyle, _templateObject;
|
|
7
7
|
/**
|
|
8
8
|
* @jsxRuntime classic
|
|
9
9
|
* @jsx jsx
|
|
@@ -13,25 +13,25 @@ import { jsx, css } from '@emotion/react';
|
|
|
13
13
|
import { B400, N500, N30A, N20 } from '@atlaskit/theme/colors';
|
|
14
14
|
import { MentionType } from '../../types';
|
|
15
15
|
import { forwardRef } from 'react';
|
|
16
|
-
var mentionStyle = (
|
|
16
|
+
var mentionStyle = _defineProperty(_defineProperty(_defineProperty({}, MentionType.SELF, {
|
|
17
17
|
background: "var(--ds-background-brand-bold, ".concat(B400, ")"),
|
|
18
18
|
borderColor: 'transparent',
|
|
19
19
|
text: "var(--ds-text-inverse, ".concat(N20, ")"),
|
|
20
20
|
hoveredBackground: "var(--ds-background-brand-bold-hovered, ".concat(B400, ")"),
|
|
21
21
|
pressedBackground: "var(--ds-background-brand-bold-pressed, ".concat(B400, ")")
|
|
22
|
-
}),
|
|
22
|
+
}), MentionType.RESTRICTED, {
|
|
23
23
|
background: 'transparent',
|
|
24
24
|
borderColor: "var(--ds-border-bold, ".concat(N500, ")"),
|
|
25
25
|
text: "var(--ds-text, ".concat(N500, ")"),
|
|
26
26
|
hoveredBackground: 'transparent',
|
|
27
27
|
pressedBackground: 'transparent'
|
|
28
|
-
}),
|
|
28
|
+
}), MentionType.DEFAULT, {
|
|
29
29
|
background: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
30
30
|
borderColor: 'transparent',
|
|
31
31
|
text: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
32
32
|
hoveredBackground: "var(--ds-background-neutral-hovered, ".concat(N30A, ")"),
|
|
33
33
|
pressedBackground: "var(--ds-background-neutral-pressed, ".concat(N30A, ")")
|
|
34
|
-
})
|
|
34
|
+
});
|
|
35
35
|
var getStyle = function getStyle(_ref, property) {
|
|
36
36
|
var mentionType = _ref.mentionType;
|
|
37
37
|
var obj = mentionStyle[mentionType][property];
|
|
@@ -44,13 +44,13 @@ var PrimitiveMention = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
44
44
|
ref: ref
|
|
45
45
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
46
46
|
,
|
|
47
|
-
css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\t\tdisplay: inline;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tborder-radius: 20px;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tpadding: 0 0.3em 2px 0.23em;\n\t\t\t\t\tline-height: 1.714;\n\t\t\t\t\tfont-size: 1em;\n\t\t\t\t\tfont-weight:
|
|
47
|
+
css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\t\tdisplay: inline;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tborder-radius: 20px;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tpadding: 0 0.3em 2px 0.23em;\n\t\t\t\t\tline-height: 1.714;\n\t\t\t\t\tfont-size: 1em;\n\t\t\t\t\tfont-weight: ", ";\n\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t&:hover {\n\t\t\t\t\t\tbackground: ", ";\n\t\t\t\t\t}\n\t\t\t\t\t&:active {\n\t\t\t\t\t\tbackground: ", ";\n\t\t\t\t\t}\n\t\t\t\t"])), getStyle({
|
|
48
48
|
mentionType: mentionType
|
|
49
49
|
}, 'borderColor'), getStyle({
|
|
50
50
|
mentionType: mentionType
|
|
51
51
|
}, 'background'), getStyle({
|
|
52
52
|
mentionType: mentionType
|
|
53
|
-
}, 'text'), getStyle({
|
|
53
|
+
}, 'text'), "var(--ds-font-weight-regular, 400)", getStyle({
|
|
54
54
|
mentionType: mentionType
|
|
55
55
|
}, 'hoveredBackground'), getStyle({
|
|
56
56
|
mentionType: mentionType
|
|
@@ -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 { isResolvingMentionProvider } from '../../api/MentionResource';
|
|
@@ -13,13 +12,11 @@ import { isPromise, MentionNameStatus } from '../../types';
|
|
|
13
12
|
import Mention, { UNKNOWN_USER_ID } from './';
|
|
14
13
|
import debug from '../../util/logger';
|
|
15
14
|
var ResourcedMention = /*#__PURE__*/function (_React$PureComponent) {
|
|
16
|
-
_inherits(ResourcedMention, _React$PureComponent);
|
|
17
|
-
var _super = _createSuper(ResourcedMention);
|
|
18
15
|
function ResourcedMention(_props) {
|
|
19
16
|
var _this;
|
|
20
17
|
_classCallCheck(this, ResourcedMention);
|
|
21
|
-
_this =
|
|
22
|
-
_defineProperty(
|
|
18
|
+
_this = _callSuper(this, ResourcedMention, [_props]);
|
|
19
|
+
_defineProperty(_this, "handleMentionProvider", function (props) {
|
|
23
20
|
var id = props.id,
|
|
24
21
|
mentionProvider = props.mentionProvider,
|
|
25
22
|
text = props.text;
|
|
@@ -60,7 +57,8 @@ var ResourcedMention = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
60
57
|
};
|
|
61
58
|
return _this;
|
|
62
59
|
}
|
|
63
|
-
|
|
60
|
+
_inherits(ResourcedMention, _React$PureComponent);
|
|
61
|
+
return _createClass(ResourcedMention, [{
|
|
64
62
|
key: "componentDidMount",
|
|
65
63
|
value: function componentDidMount() {
|
|
66
64
|
this.handleMentionProvider(this.props);
|
|
@@ -121,6 +119,5 @@ var ResourcedMention = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
121
119
|
});
|
|
122
120
|
}
|
|
123
121
|
}]);
|
|
124
|
-
return ResourcedMention;
|
|
125
122
|
}(React.PureComponent);
|
|
126
123
|
export { ResourcedMention 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 FocusRing from '@atlaskit/focus-ring';
|
|
@@ -21,13 +20,11 @@ import { UfoErrorBoundary, mentionRenderedUfoExperience } from './ufoExperiences
|
|
|
21
20
|
export var ANALYTICS_HOVER_DELAY = 1000;
|
|
22
21
|
export var UNKNOWN_USER_ID = '_|unknown|_';
|
|
23
22
|
export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
24
|
-
_inherits(MentionInternal, _React$PureComponent);
|
|
25
|
-
var _super = _createSuper(MentionInternal);
|
|
26
23
|
function MentionInternal(props) {
|
|
27
24
|
var _this;
|
|
28
25
|
_classCallCheck(this, MentionInternal);
|
|
29
|
-
_this =
|
|
30
|
-
_defineProperty(
|
|
26
|
+
_this = _callSuper(this, MentionInternal, [props]);
|
|
27
|
+
_defineProperty(_this, "handleOnClick", function (e) {
|
|
31
28
|
var _this$props = _this.props,
|
|
32
29
|
id = _this$props.id,
|
|
33
30
|
text = _this$props.text,
|
|
@@ -36,7 +33,7 @@ export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
36
33
|
onClick(id, text, e);
|
|
37
34
|
}
|
|
38
35
|
});
|
|
39
|
-
_defineProperty(
|
|
36
|
+
_defineProperty(_this, "handleOnMouseEnter", function (e) {
|
|
40
37
|
var _this$props2 = _this.props,
|
|
41
38
|
id = _this$props2.id,
|
|
42
39
|
text = _this$props2.text,
|
|
@@ -52,7 +49,7 @@ export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
52
49
|
_this.hoverTimeout = undefined;
|
|
53
50
|
}, ANALYTICS_HOVER_DELAY);
|
|
54
51
|
});
|
|
55
|
-
_defineProperty(
|
|
52
|
+
_defineProperty(_this, "handleOnMouseLeave", function (e) {
|
|
56
53
|
var _this$props3 = _this.props,
|
|
57
54
|
id = _this$props3.id,
|
|
58
55
|
text = _this$props3.text,
|
|
@@ -64,7 +61,7 @@ export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
64
61
|
clearTimeout(_this.hoverTimeout);
|
|
65
62
|
}
|
|
66
63
|
});
|
|
67
|
-
_defineProperty(
|
|
64
|
+
_defineProperty(_this, "getMentionType", function () {
|
|
68
65
|
var _this$props4 = _this.props,
|
|
69
66
|
accessLevel = _this$props4.accessLevel,
|
|
70
67
|
isHighlighted = _this$props4.isHighlighted;
|
|
@@ -79,7 +76,8 @@ export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
79
76
|
mentionRenderedUfoExperience.getInstance(props.id).start();
|
|
80
77
|
return _this;
|
|
81
78
|
}
|
|
82
|
-
|
|
79
|
+
_inherits(MentionInternal, _React$PureComponent);
|
|
80
|
+
return _createClass(MentionInternal, [{
|
|
83
81
|
key: "componentDidMount",
|
|
84
82
|
value: function componentDidMount() {
|
|
85
83
|
mentionRenderedUfoExperience.getInstance(this.props.id).success();
|
|
@@ -141,7 +139,6 @@ export var MentionInternal = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
141
139
|
}, mentionComponent)) : mentionComponent)));
|
|
142
140
|
}
|
|
143
141
|
}]);
|
|
144
|
-
return MentionInternal;
|
|
145
142
|
}(React.PureComponent);
|
|
146
143
|
var MentionWithAnalytics = withAnalyticsEvents({
|
|
147
144
|
onClick: function onClick(createEvent, props) {
|
|
@@ -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 { ExperiencePerformanceTypes, ExperienceTypes, ConcurrentExperience } from '@atlaskit/ufo';
|
|
@@ -15,13 +15,12 @@ export var mentionRenderedUfoExperience = new ConcurrentExperience('mention-rend
|
|
|
15
15
|
performanceType: ExperiencePerformanceTypes.PageSegmentLoad
|
|
16
16
|
});
|
|
17
17
|
export var UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
18
|
-
_inherits(UfoErrorBoundary, _React$Component);
|
|
19
|
-
var _super = _createSuper(UfoErrorBoundary);
|
|
20
18
|
function UfoErrorBoundary() {
|
|
21
19
|
_classCallCheck(this, UfoErrorBoundary);
|
|
22
|
-
return
|
|
20
|
+
return _callSuper(this, UfoErrorBoundary, arguments);
|
|
23
21
|
}
|
|
24
|
-
|
|
22
|
+
_inherits(UfoErrorBoundary, _React$Component);
|
|
23
|
+
return _createClass(UfoErrorBoundary, [{
|
|
25
24
|
key: "componentDidCatch",
|
|
26
25
|
value: function componentDidCatch() {
|
|
27
26
|
mentionRenderedUfoExperience.getInstance(this.props.id).failure();
|
|
@@ -32,5 +31,4 @@ export var UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
32
31
|
return this.props.children;
|
|
33
32
|
}
|
|
34
33
|
}]);
|
|
35
|
-
return UfoErrorBoundary;
|
|
36
34
|
}(React.Component);
|