@atlaskit/mention 30.1.7 → 30.1.9
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 +19 -0
- package/dist/cjs/api/MentionResource.js +3 -3
- package/dist/cjs/api/TeamMentionResource.js +3 -3
- package/dist/cjs/components/Mention/index.js +18 -9
- package/dist/cjs/components/Mention/ufoExperiences.js +29 -2
- package/dist/cjs/components/MentionListError/index.js +9 -5
- package/dist/cjs/components/MentionPicker/MentionPicker.js +2 -2
- package/dist/cjs/components/MentionPicker/index.js +12 -2
- package/dist/cjs/components/ResourcedMentionList/index.js +12 -2
- package/dist/cjs/util/package-version.js +1 -1
- package/dist/es2019/api/MentionResource.js +1 -1
- package/dist/es2019/api/TeamMentionResource.js +1 -1
- package/dist/es2019/components/Mention/index.js +20 -9
- package/dist/es2019/components/Mention/ufoExperiences.js +22 -1
- package/dist/es2019/components/MentionListError/index.js +5 -1
- package/dist/es2019/components/MentionPicker/MentionPicker.js +1 -1
- package/dist/es2019/components/MentionPicker/index.js +13 -2
- package/dist/es2019/components/ResourcedMentionList/index.js +13 -2
- package/dist/es2019/util/package-version.js +1 -1
- package/dist/esm/api/MentionResource.js +1 -1
- package/dist/esm/api/TeamMentionResource.js +1 -1
- package/dist/esm/components/Mention/index.js +18 -9
- package/dist/esm/components/Mention/ufoExperiences.js +29 -2
- package/dist/esm/components/MentionListError/index.js +5 -1
- package/dist/esm/components/MentionPicker/MentionPicker.js +1 -1
- package/dist/esm/components/MentionPicker/index.js +12 -2
- package/dist/esm/components/ResourcedMentionList/index.js +12 -2
- package/dist/esm/util/package-version.js +1 -1
- package/dist/types/components/LockCircleIcon/index.d.ts +2 -1
- package/dist/types/components/Mention/index.d.ts +1 -6
- package/dist/types/components/Mention/ufoExperiences.d.ts +11 -2
- package/dist/types/components/MentionPicker/index.d.ts +1 -1
- package/dist/types/components/ResourcedMentionList/index.d.ts +1 -1
- package/docs/1-in-editor.tsx +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/mention
|
|
2
2
|
|
|
3
|
+
## 30.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7375271ebdd21`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7375271ebdd21) -
|
|
8
|
+
Add an explicit error fallback to the mention UFO boundary while preserving retries on parent
|
|
9
|
+
updates and UFO failure reporting.
|
|
10
|
+
|
|
11
|
+
Replace mention analytics HOCs with hook wrappers while preserving event decoration and forwarded
|
|
12
|
+
refs.
|
|
13
|
+
|
|
14
|
+
Use the scoped React.JSX namespace for element type annotations.
|
|
15
|
+
|
|
16
|
+
## 30.1.8
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 30.1.7
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -38,7 +38,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
38
38
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
39
39
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
40
40
|
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
41
|
-
var
|
|
41
|
+
var _constants = require("@atlaskit/util-service-support/constants");
|
|
42
42
|
var _isAppMention = require("../is-app-mention");
|
|
43
43
|
var _isTeamMention = require("../is-team-mention");
|
|
44
44
|
var _types = require("../types");
|
|
@@ -287,7 +287,7 @@ var MentionResource = exports.MentionResource = /*#__PURE__*/function (_Abstract
|
|
|
287
287
|
});
|
|
288
288
|
_context2.prev = 1;
|
|
289
289
|
_context2.next = 2;
|
|
290
|
-
return
|
|
290
|
+
return _constants.utils.requestService(this.config, options);
|
|
291
291
|
case 2:
|
|
292
292
|
result = _context2.sent;
|
|
293
293
|
this._notifyAnalyticsListeners(_analytics.SLI_EVENT_TYPE, _types.SliNames.INITIAL_STATE, _types.Actions.SUCCEEDED);
|
|
@@ -337,7 +337,7 @@ var MentionResource = exports.MentionResource = /*#__PURE__*/function (_Abstract
|
|
|
337
337
|
});
|
|
338
338
|
_context3.prev = 1;
|
|
339
339
|
_context3.next = 2;
|
|
340
|
-
return
|
|
340
|
+
return _constants.utils.requestService(this.config, options);
|
|
341
341
|
case 2:
|
|
342
342
|
result = _context3.sent;
|
|
343
343
|
this._notifyAnalyticsListeners(_analytics.SLI_EVENT_TYPE, _types.SliNames.SEARCH, _types.Actions.SUCCEEDED);
|
|
@@ -15,7 +15,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
15
15
|
var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
|
|
16
16
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
|
-
var
|
|
18
|
+
var _constants = require("@atlaskit/util-service-support/constants");
|
|
19
19
|
var _types = require("../types");
|
|
20
20
|
var _logger = _interopRequireDefault(require("../util/logger"));
|
|
21
21
|
var _analytics = require("./../util/analytics");
|
|
@@ -84,7 +84,7 @@ var TeamMentionResource = exports.default = /*#__PURE__*/function (_MentionResou
|
|
|
84
84
|
headers: configHeaders
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
-
getTeamsPromise =
|
|
87
|
+
getTeamsPromise = _constants.utils.requestService(this.teamMentionConfig, options);
|
|
88
88
|
this.handleBothRequests(emptyQuery, getUserPromise, getTeamsPromise);
|
|
89
89
|
case 1:
|
|
90
90
|
case "end":
|
|
@@ -237,7 +237,7 @@ var TeamMentionResource = exports.default = /*#__PURE__*/function (_MentionResou
|
|
|
237
237
|
});
|
|
238
238
|
_context3.prev = 1;
|
|
239
239
|
_context3.next = 2;
|
|
240
|
-
return
|
|
240
|
+
return _constants.utils.requestService(this.teamMentionConfig, options);
|
|
241
241
|
case 2:
|
|
242
242
|
teamResult = _context3.sent;
|
|
243
243
|
this._notifyAnalyticsListeners(_analytics.SLI_EVENT_TYPE, _types.SliNames.SEARCH_TEAM, _types.Actions.SUCCEEDED);
|
|
@@ -18,16 +18,14 @@ Object.defineProperty(exports, "UNKNOWN_USER_ID", {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
exports.default = void 0;
|
|
21
|
-
var
|
|
21
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
22
|
+
var _react = _interopRequireDefault(require("react"));
|
|
23
|
+
var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
|
|
24
|
+
var _usePatchedProps2 = require("@atlaskit/analytics-next/usePatchedProps");
|
|
22
25
|
var _fireAnalyticsMentionEvent = require("../../util/fire-analytics-mention-event");
|
|
23
26
|
var _MentionInternal = require("./MentionInternal");
|
|
24
27
|
var _constants = require("../../_constants");
|
|
25
28
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
26
|
-
/**
|
|
27
|
-
* @jsxRuntime classic
|
|
28
|
-
* @jsx jsx
|
|
29
|
-
* @jsxFrag React.Fragment
|
|
30
|
-
*/
|
|
31
29
|
/* eslint-disable @atlaskit/design-system/no-deprecated-imports, @typescript-eslint/no-restricted-types -- Preserve existing mention implementation while focus-ring usage is reviewed separately. */
|
|
32
30
|
|
|
33
31
|
var ANALYTICS_HOVER_DELAY = exports.ANALYTICS_HOVER_DELAY = 1000;
|
|
@@ -36,7 +34,7 @@ var ANALYTICS_HOVER_DELAY = exports.ANALYTICS_HOVER_DELAY = 1000;
|
|
|
36
34
|
* @deprecated Use `import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants'` instead.
|
|
37
35
|
*/
|
|
38
36
|
|
|
39
|
-
var
|
|
37
|
+
var mentionEventMap = {
|
|
40
38
|
onClick: function onClick(createEvent, props) {
|
|
41
39
|
var id = props.id,
|
|
42
40
|
text = props.text,
|
|
@@ -51,10 +49,21 @@ var MentionWithAnalytics = (0, _withAnalyticsEvents.default)({
|
|
|
51
49
|
var event = (0, _fireAnalyticsMentionEvent.fireAnalyticsMentionEvent)(createEvent)('mention', 'hovered', text, id, accessLevel);
|
|
52
50
|
return event;
|
|
53
51
|
}
|
|
54
|
-
}
|
|
52
|
+
};
|
|
55
53
|
|
|
56
54
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
57
|
-
var Mention =
|
|
55
|
+
var Mention = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
56
|
+
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
57
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
58
|
+
// Keep the existing event decoration, including the analytics argument passed to callbacks.
|
|
59
|
+
var _usePatchedProps = (0, _usePatchedProps2.usePatchedProps)(mentionEventMap, props),
|
|
60
|
+
patchedEventProps = _usePatchedProps.patchedEventProps;
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_MentionInternal.MentionInternal, (0, _extends2.default)({}, props, patchedEventProps, {
|
|
62
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
63
|
+
ref: ref
|
|
64
|
+
}));
|
|
65
|
+
});
|
|
66
|
+
Mention.displayName = 'Mention';
|
|
58
67
|
var _default = exports.default = Mention;
|
|
59
68
|
/**
|
|
60
69
|
* @deprecated Use `import { MentionInternal } from '@atlaskit/mention/mention'` instead.
|
|
@@ -10,6 +10,7 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
10
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
11
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
14
|
var _react = _interopRequireDefault(require("react"));
|
|
14
15
|
var _concurrentExperience = require("@atlaskit/ufo/concurrent-experience");
|
|
15
16
|
var _experienceTypes = require("@atlaskit/ufo/experience-types");
|
|
@@ -24,8 +25,17 @@ var mentionRenderedUfoExperience = exports.mentionRenderedUfoExperience = new _c
|
|
|
24
25
|
});
|
|
25
26
|
var UfoErrorBoundary = exports.UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
26
27
|
function UfoErrorBoundary() {
|
|
28
|
+
var _this;
|
|
27
29
|
(0, _classCallCheck2.default)(this, UfoErrorBoundary);
|
|
28
|
-
|
|
30
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
+
args[_key] = arguments[_key];
|
|
32
|
+
}
|
|
33
|
+
_this = _callSuper(this, UfoErrorBoundary, [].concat(args));
|
|
34
|
+
(0, _defineProperty2.default)(_this, "state", {
|
|
35
|
+
hasError: false,
|
|
36
|
+
previousProps: _this.props
|
|
37
|
+
});
|
|
38
|
+
return _this;
|
|
29
39
|
}
|
|
30
40
|
(0, _inherits2.default)(UfoErrorBoundary, _React$Component);
|
|
31
41
|
return (0, _createClass2.default)(UfoErrorBoundary, [{
|
|
@@ -36,7 +46,24 @@ var UfoErrorBoundary = exports.UfoErrorBoundary = /*#__PURE__*/function (_React$
|
|
|
36
46
|
}, {
|
|
37
47
|
key: "render",
|
|
38
48
|
value: function render() {
|
|
39
|
-
return this.props.children;
|
|
49
|
+
return this.state.hasError ? null : this.props.children;
|
|
50
|
+
}
|
|
51
|
+
}], [{
|
|
52
|
+
key: "getDerivedStateFromProps",
|
|
53
|
+
value: function getDerivedStateFromProps(props, state) {
|
|
54
|
+
// Preserve the original boundary's retry on parent updates, even when children are memoized.
|
|
55
|
+
// Error recovery uses the same props, so it must retain the fallback instead of retrying.
|
|
56
|
+
return props !== state.previousProps ? {
|
|
57
|
+
hasError: false,
|
|
58
|
+
previousProps: props
|
|
59
|
+
} : null;
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
key: "getDerivedStateFromError",
|
|
63
|
+
value: function getDerivedStateFromError() {
|
|
64
|
+
return {
|
|
65
|
+
hasError: true
|
|
66
|
+
};
|
|
40
67
|
}
|
|
41
68
|
}]);
|
|
42
69
|
}(_react.default.Component);
|
|
@@ -12,11 +12,15 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
12
12
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
14
|
var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
|
|
15
|
-
var
|
|
15
|
+
var _stack = require("@atlaskit/primitives/stack");
|
|
16
|
+
var _text = require("@atlaskit/primitives/text");
|
|
17
|
+
var _xcss = require("@atlaskit/primitives/xcss/xcss");
|
|
16
18
|
var _i18n = require("../../util/i18n");
|
|
17
19
|
var _GenericErrorIllustration = require("./GenericErrorIllustration");
|
|
18
20
|
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
21
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
20
24
|
var advisedActionMessages = {
|
|
21
25
|
'401': _i18n.LoginAgain,
|
|
22
26
|
'403': _i18n.DifferentText,
|
|
@@ -33,17 +37,17 @@ var MentionListError = exports.default = /*#__PURE__*/function (_React$PureCompo
|
|
|
33
37
|
value: function render() {
|
|
34
38
|
var error = this.props.error;
|
|
35
39
|
var ErrorMessage = MentionListError.getAdvisedActionMessage(error);
|
|
36
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_stack.Stack, {
|
|
37
41
|
space: "space.400",
|
|
38
42
|
alignBlock: "center",
|
|
39
43
|
alignInline: "center",
|
|
40
44
|
xcss: mentionListErrorStyles
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement(_GenericErrorIllustration.GenericErrorIllustration, null), /*#__PURE__*/_react.default.createElement(
|
|
45
|
+
}, /*#__PURE__*/_react.default.createElement(_GenericErrorIllustration.GenericErrorIllustration, null), /*#__PURE__*/_react.default.createElement(_stack.Stack, {
|
|
42
46
|
space: "space.100"
|
|
43
47
|
}, /*#__PURE__*/_react.default.createElement(_heading.default, {
|
|
44
48
|
size: "xsmall",
|
|
45
49
|
as: "div"
|
|
46
|
-
}, /*#__PURE__*/_react.default.createElement(_i18n.DefaultHeadline, null)), /*#__PURE__*/_react.default.createElement(
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_i18n.DefaultHeadline, null)), /*#__PURE__*/_react.default.createElement(_text.Text, {
|
|
47
51
|
as: "p",
|
|
48
52
|
color: "color.text.subtle"
|
|
49
53
|
}, /*#__PURE__*/_react.default.createElement(ErrorMessage, null))));
|
|
@@ -65,7 +69,7 @@ var MentionListError = exports.default = /*#__PURE__*/function (_React$PureCompo
|
|
|
65
69
|
}
|
|
66
70
|
}]);
|
|
67
71
|
}(_react.default.PureComponent);
|
|
68
|
-
var mentionListErrorStyles = (0,
|
|
72
|
+
var mentionListErrorStyles = (0, _xcss.xcss)({
|
|
69
73
|
paddingBlock: 'space.500',
|
|
70
74
|
textAlign: 'center'
|
|
71
75
|
});
|
|
@@ -13,7 +13,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
var _reactIntl = require("react-intl");
|
|
16
|
-
var
|
|
16
|
+
var _text = require("@atlaskit/primitives/compiled/text");
|
|
17
17
|
var _fireAnalyticsMentionTypeaheadEvent = require("../../util/fire-analytics-mention-typeahead-event");
|
|
18
18
|
var _id = _interopRequireDefault(require("../../util/id"));
|
|
19
19
|
var _logger = _interopRequireDefault(require("../../util/logger"));
|
|
@@ -188,7 +188,7 @@ var MentionPicker = exports.MentionPicker = /*#__PURE__*/function (_React$PureCo
|
|
|
188
188
|
query: query,
|
|
189
189
|
ref: this.handleMentionListRef
|
|
190
190
|
});
|
|
191
|
-
var infoContent = info && !visible ? /*#__PURE__*/_react.default.createElement(_styles.MentionPickerInfoStyle, null, /*#__PURE__*/_react.default.createElement(
|
|
191
|
+
var infoContent = info && !visible ? /*#__PURE__*/_react.default.createElement(_styles.MentionPickerInfoStyle, null, /*#__PURE__*/_react.default.createElement(_text.Text, {
|
|
192
192
|
as: "p"
|
|
193
193
|
}, info)) : null;
|
|
194
194
|
var content;
|
|
@@ -5,15 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.MentionPickerWithAnalytics = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
10
|
var _reactIntl = require("react-intl");
|
|
9
|
-
var
|
|
11
|
+
var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
|
|
10
12
|
var _MentionPicker = require("./MentionPicker");
|
|
11
13
|
var MentionPickerWithIntl = (0, _reactIntl.injectIntl)(_MentionPicker.MentionPicker, {
|
|
12
14
|
forwardRef: true
|
|
13
15
|
});
|
|
14
16
|
|
|
15
17
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
16
|
-
var MentionPickerWithAnalytics = exports.MentionPickerWithAnalytics = (
|
|
18
|
+
var MentionPickerWithAnalytics = exports.MentionPickerWithAnalytics = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
19
|
+
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
20
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(MentionPickerWithIntl, (0, _extends2.default)({}, props, {
|
|
22
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
23
|
+
ref: ref
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
MentionPickerWithAnalytics.displayName = 'MentionPickerWithAnalytics';
|
|
17
27
|
|
|
18
28
|
// Merges with the `const` above so that `MentionPickerWithAnalytics` is usable in a type
|
|
19
29
|
// position as the component instance type (e.g. for refs). Both halves of a declaration
|
|
@@ -5,8 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
|
|
9
11
|
var _ResourcedMentionListWithoutAnalytics = require("./ResourcedMentionListWithoutAnalytics");
|
|
10
12
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
11
|
-
var ResourcedMentionList = (
|
|
13
|
+
var ResourcedMentionList = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
14
|
+
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
15
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement(_ResourcedMentionListWithoutAnalytics.ResourcedMentionListWithoutAnalytics, (0, _extends2.default)({}, props, {
|
|
17
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
18
|
+
ref: ref
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
ResourcedMentionList.displayName = 'ResourcedMentionList';
|
|
12
22
|
var _default = exports.default = ResourcedMentionList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
2
2
|
|
|
3
3
|
import debounce from 'lodash/debounce';
|
|
4
|
-
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
4
|
+
import { utils as serviceUtils } from '@atlaskit/util-service-support/constants';
|
|
5
5
|
import { isAppMention } from '../is-app-mention';
|
|
6
6
|
import { isTeamMention } from '../is-team-mention';
|
|
7
7
|
import { MentionNameStatus, SliNames, Actions } from '../types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
2
|
+
import { utils as serviceUtils } from '@atlaskit/util-service-support/constants';
|
|
3
3
|
import { UserType, UserAccessLevel, SliNames, Actions } from '../types';
|
|
4
4
|
import debug from '../util/logger';
|
|
5
5
|
import { SLI_EVENT_TYPE } from './../util/analytics';
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
* @jsxFrag React.Fragment
|
|
6
|
-
*/
|
|
7
3
|
/* eslint-disable @atlaskit/design-system/no-deprecated-imports, @typescript-eslint/no-restricted-types -- Preserve existing mention implementation while focus-ring usage is reviewed separately. */
|
|
8
4
|
|
|
9
|
-
import
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
7
|
+
import { usePatchedProps } from '@atlaskit/analytics-next/usePatchedProps';
|
|
10
8
|
import { fireAnalyticsMentionEvent } from '../../util/fire-analytics-mention-event';
|
|
11
9
|
import { MentionInternal } from './MentionInternal';
|
|
12
10
|
export const ANALYTICS_HOVER_DELAY = 1000;
|
|
@@ -15,7 +13,7 @@ export const ANALYTICS_HOVER_DELAY = 1000;
|
|
|
15
13
|
* @deprecated Use `import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants'` instead.
|
|
16
14
|
*/
|
|
17
15
|
export { UNKNOWN_USER_ID } from '../../_constants';
|
|
18
|
-
const
|
|
16
|
+
const mentionEventMap = {
|
|
19
17
|
onClick: (createEvent, props) => {
|
|
20
18
|
const {
|
|
21
19
|
id,
|
|
@@ -34,10 +32,23 @@ const MentionWithAnalytics = withAnalyticsEvents({
|
|
|
34
32
|
const event = fireAnalyticsMentionEvent(createEvent)('mention', 'hovered', text, id, accessLevel);
|
|
35
33
|
return event;
|
|
36
34
|
}
|
|
37
|
-
}
|
|
35
|
+
};
|
|
38
36
|
|
|
39
37
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
40
|
-
const Mention =
|
|
38
|
+
const Mention = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
39
|
+
const {
|
|
40
|
+
createAnalyticsEvent
|
|
41
|
+
} = useAnalyticsEvents();
|
|
42
|
+
// Keep the existing event decoration, including the analytics argument passed to callbacks.
|
|
43
|
+
const {
|
|
44
|
+
patchedEventProps
|
|
45
|
+
} = usePatchedProps(mentionEventMap, props);
|
|
46
|
+
return /*#__PURE__*/React.createElement(MentionInternal, _extends({}, props, patchedEventProps, {
|
|
47
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
48
|
+
ref: ref
|
|
49
|
+
}));
|
|
50
|
+
});
|
|
51
|
+
Mention.displayName = 'Mention';
|
|
41
52
|
export default Mention;
|
|
42
53
|
|
|
43
54
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { ConcurrentExperience } from '@atlaskit/ufo/concurrent-experience';
|
|
3
4
|
import { ExperiencePerformanceTypes, ExperienceTypes } from '@atlaskit/ufo/experience-types';
|
|
@@ -9,10 +10,30 @@ export const mentionRenderedUfoExperience = new ConcurrentExperience('mention-re
|
|
|
9
10
|
performanceType: ExperiencePerformanceTypes.PageSegmentLoad
|
|
10
11
|
});
|
|
11
12
|
export class UfoErrorBoundary extends React.Component {
|
|
13
|
+
constructor(...args) {
|
|
14
|
+
super(...args);
|
|
15
|
+
_defineProperty(this, "state", {
|
|
16
|
+
hasError: false,
|
|
17
|
+
previousProps: this.props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
static getDerivedStateFromProps(props, state) {
|
|
21
|
+
// Preserve the original boundary's retry on parent updates, even when children are memoized.
|
|
22
|
+
// Error recovery uses the same props, so it must retain the fallback instead of retrying.
|
|
23
|
+
return props !== state.previousProps ? {
|
|
24
|
+
hasError: false,
|
|
25
|
+
previousProps: props
|
|
26
|
+
} : null;
|
|
27
|
+
}
|
|
28
|
+
static getDerivedStateFromError() {
|
|
29
|
+
return {
|
|
30
|
+
hasError: true
|
|
31
|
+
};
|
|
32
|
+
}
|
|
12
33
|
componentDidCatch() {
|
|
13
34
|
mentionRenderedUfoExperience.getInstance(this.props.id).failure();
|
|
14
35
|
}
|
|
15
36
|
render() {
|
|
16
|
-
return this.props.children;
|
|
37
|
+
return this.state.hasError ? null : this.props.children;
|
|
17
38
|
}
|
|
18
39
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Heading from '@atlaskit/heading/heading';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
4
|
-
import { Stack
|
|
4
|
+
import { Stack } from '@atlaskit/primitives/stack';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
6
|
+
import { Text } from '@atlaskit/primitives/text';
|
|
7
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
8
|
+
import { xcss } from '@atlaskit/primitives/xcss/xcss';
|
|
5
9
|
import { DefaultAdvisedAction, DefaultHeadline, DifferentText, LoginAgain } from '../../util/i18n';
|
|
6
10
|
import { GenericErrorIllustration } from './GenericErrorIllustration';
|
|
7
11
|
const advisedActionMessages = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { IntlProvider } from 'react-intl';
|
|
4
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
4
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
5
5
|
import { fireAnalyticsMentionTypeaheadEvent } from '../../util/fire-analytics-mention-typeahead-event';
|
|
6
6
|
import uniqueId from '../../util/id';
|
|
7
7
|
import debug from '../../util/logger';
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
1
3
|
import { injectIntl } from 'react-intl';
|
|
2
|
-
import
|
|
4
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
5
|
import { MentionPicker } from './MentionPicker';
|
|
4
6
|
const MentionPickerWithIntl = injectIntl(MentionPicker, {
|
|
5
7
|
forwardRef: true
|
|
6
8
|
});
|
|
7
9
|
|
|
8
10
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
9
|
-
export const MentionPickerWithAnalytics =
|
|
11
|
+
export const MentionPickerWithAnalytics = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
12
|
+
const {
|
|
13
|
+
createAnalyticsEvent
|
|
14
|
+
} = useAnalyticsEvents();
|
|
15
|
+
return /*#__PURE__*/React.createElement(MentionPickerWithIntl, _extends({}, props, {
|
|
16
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
17
|
+
ref: ref
|
|
18
|
+
}));
|
|
19
|
+
});
|
|
20
|
+
MentionPickerWithAnalytics.displayName = 'MentionPickerWithAnalytics';
|
|
10
21
|
|
|
11
22
|
// Merges with the `const` above so that `MentionPickerWithAnalytics` is usable in a type
|
|
12
23
|
// position as the component instance type (e.g. for refs). Both halves of a declaration
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
2
4
|
import { ResourcedMentionListWithoutAnalytics } from './ResourcedMentionListWithoutAnalytics';
|
|
3
5
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
4
|
-
const ResourcedMentionList =
|
|
6
|
+
const ResourcedMentionList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const {
|
|
8
|
+
createAnalyticsEvent
|
|
9
|
+
} = useAnalyticsEvents();
|
|
10
|
+
return /*#__PURE__*/React.createElement(ResourcedMentionListWithoutAnalytics, _extends({}, props, {
|
|
11
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
12
|
+
ref: ref
|
|
13
|
+
}));
|
|
14
|
+
});
|
|
15
|
+
ResourcedMentionList.displayName = 'ResourcedMentionList';
|
|
5
16
|
export default ResourcedMentionList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageVersion = "30.1.
|
|
1
|
+
export const packageVersion = "30.1.8";
|
|
@@ -13,7 +13,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
13
13
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
14
14
|
|
|
15
15
|
import debounce from 'lodash/debounce';
|
|
16
|
-
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
16
|
+
import { utils as serviceUtils } from '@atlaskit/util-service-support/constants';
|
|
17
17
|
import { isAppMention } from '../is-app-mention';
|
|
18
18
|
import { isTeamMention } from '../is-team-mention';
|
|
19
19
|
import { MentionNameStatus, SliNames, Actions } from '../types';
|
|
@@ -13,7 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
13
13
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
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
|
-
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
16
|
+
import { utils as serviceUtils } from '@atlaskit/util-service-support/constants';
|
|
17
17
|
import { UserType, UserAccessLevel, SliNames, Actions } from '../types';
|
|
18
18
|
import debug from '../util/logger';
|
|
19
19
|
import { SLI_EVENT_TYPE } from './../util/analytics';
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
/* eslint-disable @repo/internal/deprecations/deprecation-ticket-required -- VOLTC-139 tracks removal of these deprecated re-export shims. */
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
* @jsxFrag React.Fragment
|
|
6
|
-
*/
|
|
7
3
|
/* eslint-disable @atlaskit/design-system/no-deprecated-imports, @typescript-eslint/no-restricted-types -- Preserve existing mention implementation while focus-ring usage is reviewed separately. */
|
|
8
4
|
|
|
9
|
-
import
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
7
|
+
import { usePatchedProps } from '@atlaskit/analytics-next/usePatchedProps';
|
|
10
8
|
import { fireAnalyticsMentionEvent } from '../../util/fire-analytics-mention-event';
|
|
11
9
|
import { MentionInternal } from './MentionInternal';
|
|
12
10
|
export var ANALYTICS_HOVER_DELAY = 1000;
|
|
@@ -15,7 +13,7 @@ export var ANALYTICS_HOVER_DELAY = 1000;
|
|
|
15
13
|
* @deprecated Use `import { UNKNOWN_USER_ID } from '@atlaskit/mention/constants'` instead.
|
|
16
14
|
*/
|
|
17
15
|
export { UNKNOWN_USER_ID } from '../../_constants';
|
|
18
|
-
var
|
|
16
|
+
var mentionEventMap = {
|
|
19
17
|
onClick: function onClick(createEvent, props) {
|
|
20
18
|
var id = props.id,
|
|
21
19
|
text = props.text,
|
|
@@ -30,10 +28,21 @@ var MentionWithAnalytics = withAnalyticsEvents({
|
|
|
30
28
|
var event = fireAnalyticsMentionEvent(createEvent)('mention', 'hovered', text, id, accessLevel);
|
|
31
29
|
return event;
|
|
32
30
|
}
|
|
33
|
-
}
|
|
31
|
+
};
|
|
34
32
|
|
|
35
33
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
36
|
-
var Mention =
|
|
34
|
+
var Mention = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
35
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
36
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
37
|
+
// Keep the existing event decoration, including the analytics argument passed to callbacks.
|
|
38
|
+
var _usePatchedProps = usePatchedProps(mentionEventMap, props),
|
|
39
|
+
patchedEventProps = _usePatchedProps.patchedEventProps;
|
|
40
|
+
return /*#__PURE__*/React.createElement(MentionInternal, _extends({}, props, patchedEventProps, {
|
|
41
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
42
|
+
ref: ref
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
Mention.displayName = 'Mention';
|
|
37
46
|
export default Mention;
|
|
38
47
|
|
|
39
48
|
/**
|
|
@@ -3,6 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
4
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
5
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
9
|
import React from 'react';
|
|
@@ -17,8 +18,17 @@ export var mentionRenderedUfoExperience = new ConcurrentExperience('mention-rend
|
|
|
17
18
|
});
|
|
18
19
|
export var UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
19
20
|
function UfoErrorBoundary() {
|
|
21
|
+
var _this;
|
|
20
22
|
_classCallCheck(this, UfoErrorBoundary);
|
|
21
|
-
|
|
23
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
24
|
+
args[_key] = arguments[_key];
|
|
25
|
+
}
|
|
26
|
+
_this = _callSuper(this, UfoErrorBoundary, [].concat(args));
|
|
27
|
+
_defineProperty(_this, "state", {
|
|
28
|
+
hasError: false,
|
|
29
|
+
previousProps: _this.props
|
|
30
|
+
});
|
|
31
|
+
return _this;
|
|
22
32
|
}
|
|
23
33
|
_inherits(UfoErrorBoundary, _React$Component);
|
|
24
34
|
return _createClass(UfoErrorBoundary, [{
|
|
@@ -29,7 +39,24 @@ export var UfoErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
29
39
|
}, {
|
|
30
40
|
key: "render",
|
|
31
41
|
value: function render() {
|
|
32
|
-
return this.props.children;
|
|
42
|
+
return this.state.hasError ? null : this.props.children;
|
|
43
|
+
}
|
|
44
|
+
}], [{
|
|
45
|
+
key: "getDerivedStateFromProps",
|
|
46
|
+
value: function getDerivedStateFromProps(props, state) {
|
|
47
|
+
// Preserve the original boundary's retry on parent updates, even when children are memoized.
|
|
48
|
+
// Error recovery uses the same props, so it must retain the fallback instead of retrying.
|
|
49
|
+
return props !== state.previousProps ? {
|
|
50
|
+
hasError: false,
|
|
51
|
+
previousProps: props
|
|
52
|
+
} : null;
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
key: "getDerivedStateFromError",
|
|
56
|
+
value: function getDerivedStateFromError() {
|
|
57
|
+
return {
|
|
58
|
+
hasError: true
|
|
59
|
+
};
|
|
33
60
|
}
|
|
34
61
|
}]);
|
|
35
62
|
}(React.Component);
|
|
@@ -8,7 +8,11 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Heading from '@atlaskit/heading/heading';
|
|
10
10
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
11
|
-
import { Stack
|
|
11
|
+
import { Stack } from '@atlaskit/primitives/stack';
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
13
|
+
import { Text } from '@atlaskit/primitives/text';
|
|
14
|
+
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
15
|
+
import { xcss } from '@atlaskit/primitives/xcss/xcss';
|
|
12
16
|
import { DefaultAdvisedAction, DefaultHeadline, DifferentText, LoginAgain } from '../../util/i18n';
|
|
13
17
|
import { GenericErrorIllustration } from './GenericErrorIllustration';
|
|
14
18
|
var advisedActionMessages = {
|
|
@@ -8,7 +8,7 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
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 { IntlProvider } from 'react-intl';
|
|
11
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
11
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
12
12
|
import { fireAnalyticsMentionTypeaheadEvent } from '../../util/fire-analytics-mention-typeahead-event';
|
|
13
13
|
import uniqueId from '../../util/id';
|
|
14
14
|
import debug from '../../util/logger';
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
1
3
|
import { injectIntl } from 'react-intl';
|
|
2
|
-
import
|
|
4
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
3
5
|
import { MentionPicker } from './MentionPicker';
|
|
4
6
|
var MentionPickerWithIntl = injectIntl(MentionPicker, {
|
|
5
7
|
forwardRef: true
|
|
6
8
|
});
|
|
7
9
|
|
|
8
10
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
9
|
-
export var MentionPickerWithAnalytics =
|
|
11
|
+
export var MentionPickerWithAnalytics = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
12
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
13
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
14
|
+
return /*#__PURE__*/React.createElement(MentionPickerWithIntl, _extends({}, props, {
|
|
15
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
16
|
+
ref: ref
|
|
17
|
+
}));
|
|
18
|
+
});
|
|
19
|
+
MentionPickerWithAnalytics.displayName = 'MentionPickerWithAnalytics';
|
|
10
20
|
|
|
11
21
|
// Merges with the `const` above so that `MentionPickerWithAnalytics` is usable in a type
|
|
12
22
|
// position as the component instance type (e.g. for refs). Both halves of a declaration
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
|
|
2
4
|
import { ResourcedMentionListWithoutAnalytics } from './ResourcedMentionListWithoutAnalytics';
|
|
3
5
|
// oxlint-disable-next-line eslint/no-redeclare
|
|
4
|
-
var ResourcedMentionList =
|
|
6
|
+
var ResourcedMentionList = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
7
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
8
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
9
|
+
return /*#__PURE__*/React.createElement(ResourcedMentionListWithoutAnalytics, _extends({}, props, {
|
|
10
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
11
|
+
ref: ref
|
|
12
|
+
}));
|
|
13
|
+
});
|
|
14
|
+
ResourcedMentionList.displayName = 'ResourcedMentionList';
|
|
5
15
|
export default ResourcedMentionList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export var packageVersion = "30.1.
|
|
1
|
+
export var packageVersion = "30.1.8";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
1
2
|
import { type LazyExoticComponent } from 'react';
|
|
2
3
|
import type { NewCoreIconProps } from '@atlaskit/icon/types';
|
|
3
4
|
declare const AsyncLockCircleIcon: LazyExoticComponent<{
|
|
4
|
-
(props: NewCoreIconProps): JSX.Element;
|
|
5
|
+
(props: NewCoreIconProps): React.JSX.Element;
|
|
5
6
|
displayName: string;
|
|
6
7
|
}>;
|
|
7
8
|
export default AsyncLockCircleIcon;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
* @jsxFrag React.Fragment
|
|
5
|
-
*/
|
|
6
1
|
import React from 'react';
|
|
7
|
-
import {
|
|
2
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
8
3
|
import { type MentionEventHandler } from '../../types';
|
|
9
4
|
import { MentionInternal } from './MentionInternal';
|
|
10
5
|
export declare const ANALYTICS_HOVER_DELAY = 1000;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ConcurrentExperience } from '@atlaskit/ufo/concurrent-experience';
|
|
3
3
|
export declare const mentionRenderedUfoExperience: ConcurrentExperience;
|
|
4
|
-
|
|
4
|
+
type Props = React.PropsWithChildren<{
|
|
5
5
|
id: string;
|
|
6
|
-
}
|
|
6
|
+
}>;
|
|
7
|
+
type State = {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
previousProps: Props;
|
|
10
|
+
};
|
|
11
|
+
export declare class UfoErrorBoundary extends React.Component<Props, State> {
|
|
12
|
+
state: State;
|
|
13
|
+
static getDerivedStateFromProps(props: Props, state: State): State | null;
|
|
14
|
+
static getDerivedStateFromError(): Partial<State>;
|
|
7
15
|
componentDidCatch(): void;
|
|
8
16
|
render(): React.ReactNode;
|
|
9
17
|
}
|
|
18
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type IntlShape, type WithIntlProps } from 'react-intl';
|
|
3
|
-
import {
|
|
3
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
4
4
|
import { type MentionProvider } from '../../api/MentionResource';
|
|
5
5
|
import { type PresenceProvider } from '../../api/PresenceResource';
|
|
6
6
|
import { type OnMentionEvent } from '../../types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
3
3
|
import { type MentionProvider } from '../../api/MentionResource';
|
|
4
4
|
import { type PresenceProvider } from '../../api/PresenceResource';
|
|
5
5
|
import { type MentionDescription, type OnMentionEvent } from '../../types';
|
package/docs/1-in-editor.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Link from '@atlaskit/link/link';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
3
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
4
4
|
import { md, Example, code, AtlassianInternalWarning } from '@atlaskit/docs';
|
|
5
5
|
|
|
6
6
|
import MentionWithEditorExample from '../examples/14-mention-with-editor-extending-abstract-mention-resource';
|
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/skeleton": "^4.4.0",
|
|
46
46
|
"@atlaskit/tag": "^17.0.0",
|
|
47
47
|
"@atlaskit/teams-avatar": "^4.1.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^229.0.0",
|
|
49
49
|
"@atlaskit/tokens": "^20.4.0",
|
|
50
50
|
"@atlaskit/tooltip": "^24.4.0",
|
|
51
51
|
"@atlaskit/ufo": "^2.0.0",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"*.compiled.css"
|
|
125
125
|
],
|
|
126
126
|
"types": "dist/types/index.d.ts",
|
|
127
|
-
"version": "30.1.
|
|
127
|
+
"version": "30.1.9"
|
|
128
128
|
}
|