@atlaskit/mention 23.4.7 → 23.6.0
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 +18 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/api/MentionResource.js +15 -8
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/api/MentionResource.js +4 -0
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/api/MentionResource.js +15 -8
- package/dist/esm/util/analytics.js +1 -1
- package/dist/types/types.d.ts +1 -0
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/package.json +9 -2
- package/tsconfig.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/mention
|
|
2
2
|
|
|
3
|
+
## 23.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#99487](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99487)
|
|
8
|
+
[`8c482c8d11e99`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8c482c8d11e99) -
|
|
9
|
+
[https://product-fabric.atlassian.net/browse/EDF-67](EDF-67) - remove
|
|
10
|
+
/api/mentions/CLOUD_ID/record endpoint call
|
|
11
|
+
|
|
12
|
+
## 23.5.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#98070](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98070)
|
|
17
|
+
[`567bc6e27663e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/567bc6e27663e) -
|
|
18
|
+
Adding option boolean flag isEligibleXProductUserInvite on MentionResourceConfig for
|
|
19
|
+
CCEDITIONS-4746(x-product user search/invite) experiment
|
|
20
|
+
|
|
3
21
|
## 23.4.7
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -14,6 +14,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
14
14
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
15
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
16
16
|
var _utilServiceSupport = require("@atlaskit/util-service-support");
|
|
17
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
18
|
var _types = require("../types");
|
|
18
19
|
var _logger = _interopRequireDefault(require("../util/logger"));
|
|
19
20
|
var _analytics = require("../util/analytics");
|
|
@@ -475,6 +476,12 @@ var MentionResource = exports.MentionResource = /*#__PURE__*/function (_Abstract
|
|
|
475
476
|
return _regenerator.default.wrap(function _callee4$(_context4) {
|
|
476
477
|
while (1) switch (_context4.prev = _context4.next) {
|
|
477
478
|
case 0:
|
|
479
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_ai_remove_mentions_record')) {
|
|
480
|
+
_context4.next = 2;
|
|
481
|
+
break;
|
|
482
|
+
}
|
|
483
|
+
return _context4.abrupt("return");
|
|
484
|
+
case 2:
|
|
478
485
|
options = {
|
|
479
486
|
path: 'record',
|
|
480
487
|
queryParams: _objectSpread({
|
|
@@ -485,23 +492,23 @@ var MentionResource = exports.MentionResource = /*#__PURE__*/function (_Abstract
|
|
|
485
492
|
}
|
|
486
493
|
};
|
|
487
494
|
sliName = (0, _types.isTeamMention)(mention) ? _types.SliNames.SELECT_TEAM : _types.SliNames.SELECT;
|
|
488
|
-
_context4.prev =
|
|
489
|
-
_context4.next =
|
|
495
|
+
_context4.prev = 4;
|
|
496
|
+
_context4.next = 7;
|
|
490
497
|
return _utilServiceSupport.utils.requestService(this.config, options);
|
|
491
|
-
case
|
|
498
|
+
case 7:
|
|
492
499
|
result = _context4.sent;
|
|
493
500
|
this._notifyAnalyticsListeners(_analytics.SLI_EVENT_TYPE, sliName, _types.Actions.SUCCEEDED);
|
|
494
501
|
return _context4.abrupt("return", result);
|
|
495
|
-
case
|
|
496
|
-
_context4.prev =
|
|
497
|
-
_context4.t0 = _context4["catch"](
|
|
502
|
+
case 12:
|
|
503
|
+
_context4.prev = 12;
|
|
504
|
+
_context4.t0 = _context4["catch"](4);
|
|
498
505
|
this._notifyAnalyticsListeners(_analytics.SLI_EVENT_TYPE, sliName, _types.Actions.FAILED);
|
|
499
506
|
throw _context4.t0;
|
|
500
|
-
case
|
|
507
|
+
case 16:
|
|
501
508
|
case "end":
|
|
502
509
|
return _context4.stop();
|
|
503
510
|
}
|
|
504
|
-
}, _callee4, this, [[
|
|
511
|
+
}, _callee4, this, [[4, 12]]);
|
|
505
512
|
}));
|
|
506
513
|
function recordSelection(_x6, _x7) {
|
|
507
514
|
return _recordSelection.apply(this, arguments);
|
|
@@ -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.
|
|
15
|
+
var packageVersion = "23.6.0";
|
|
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) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { utils as serviceUtils } from '@atlaskit/util-service-support';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
3
|
import { isAppMention, isTeamMention, MentionNameStatus, SliNames, Actions } from '../types';
|
|
3
4
|
import debug from '../util/logger';
|
|
4
5
|
const MAX_QUERY_ITEMS = 100;
|
|
@@ -316,6 +317,9 @@ export class MentionResource extends AbstractMentionResource {
|
|
|
316
317
|
};
|
|
317
318
|
}
|
|
318
319
|
async recordSelection(mention, contextIdentifier) {
|
|
320
|
+
if (fg('platform_editor_ai_remove_mentions_record')) {
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
319
323
|
const options = {
|
|
320
324
|
path: 'record',
|
|
321
325
|
queryParams: {
|
|
@@ -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.
|
|
5
|
+
const packageVersion = "23.6.0";
|
|
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) => {
|
|
@@ -11,6 +11,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
11
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
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
import { isAppMention, isTeamMention, MentionNameStatus, SliNames, Actions } from '../types';
|
|
15
16
|
import debug from '../util/logger';
|
|
16
17
|
var MAX_QUERY_ITEMS = 100;
|
|
@@ -468,6 +469,12 @@ export var MentionResource = /*#__PURE__*/function (_AbstractMentionResou) {
|
|
|
468
469
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
469
470
|
while (1) switch (_context4.prev = _context4.next) {
|
|
470
471
|
case 0:
|
|
472
|
+
if (!fg('platform_editor_ai_remove_mentions_record')) {
|
|
473
|
+
_context4.next = 2;
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
476
|
+
return _context4.abrupt("return");
|
|
477
|
+
case 2:
|
|
471
478
|
options = {
|
|
472
479
|
path: 'record',
|
|
473
480
|
queryParams: _objectSpread({
|
|
@@ -478,23 +485,23 @@ export var MentionResource = /*#__PURE__*/function (_AbstractMentionResou) {
|
|
|
478
485
|
}
|
|
479
486
|
};
|
|
480
487
|
sliName = isTeamMention(mention) ? SliNames.SELECT_TEAM : SliNames.SELECT;
|
|
481
|
-
_context4.prev =
|
|
482
|
-
_context4.next =
|
|
488
|
+
_context4.prev = 4;
|
|
489
|
+
_context4.next = 7;
|
|
483
490
|
return serviceUtils.requestService(this.config, options);
|
|
484
|
-
case
|
|
491
|
+
case 7:
|
|
485
492
|
result = _context4.sent;
|
|
486
493
|
this._notifyAnalyticsListeners(SLI_EVENT_TYPE, sliName, Actions.SUCCEEDED);
|
|
487
494
|
return _context4.abrupt("return", result);
|
|
488
|
-
case
|
|
489
|
-
_context4.prev =
|
|
490
|
-
_context4.t0 = _context4["catch"](
|
|
495
|
+
case 12:
|
|
496
|
+
_context4.prev = 12;
|
|
497
|
+
_context4.t0 = _context4["catch"](4);
|
|
491
498
|
this._notifyAnalyticsListeners(SLI_EVENT_TYPE, sliName, Actions.FAILED);
|
|
492
499
|
throw _context4.t0;
|
|
493
|
-
case
|
|
500
|
+
case 16:
|
|
494
501
|
case "end":
|
|
495
502
|
return _context4.stop();
|
|
496
503
|
}
|
|
497
|
-
}, _callee4, this, [[
|
|
504
|
+
}, _callee4, this, [[4, 12]]);
|
|
498
505
|
}));
|
|
499
506
|
function recordSelection(_x6, _x7) {
|
|
500
507
|
return _recordSelection.apply(this, arguments);
|
|
@@ -5,7 +5,7 @@ import { OPERATIONAL_EVENT_TYPE, UI_EVENT_TYPE } from '@atlaskit/analytics-gas-t
|
|
|
5
5
|
import { ELEMENTS_CHANNEL } from '../_constants';
|
|
6
6
|
import { ComponentNames, isSpecialMentionText } from '../types';
|
|
7
7
|
var packageName = "@atlaskit/mention";
|
|
8
|
-
var packageVersion = "23.
|
|
8
|
+
var packageVersion = "23.6.0";
|
|
9
9
|
export var SLI_EVENT_TYPE = 'sli';
|
|
10
10
|
export var SMART_EVENT_TYPE = 'smart';
|
|
11
11
|
export var fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
|
package/dist/types/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/mention",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.6.0",
|
|
4
4
|
"description": "A React component used to display user profiles in a list for 'Mention' functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,9 +47,10 @@
|
|
|
47
47
|
"@atlaskit/heading": "^4.0.0",
|
|
48
48
|
"@atlaskit/icon": "^23.1.0",
|
|
49
49
|
"@atlaskit/lozenge": "^11.12.0",
|
|
50
|
+
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
50
51
|
"@atlaskit/primitives": "^13.3.0",
|
|
51
52
|
"@atlaskit/theme": "^14.0.0",
|
|
52
|
-
"@atlaskit/tokens": "^2.
|
|
53
|
+
"@atlaskit/tokens": "^2.5.0",
|
|
53
54
|
"@atlaskit/tooltip": "^19.0.0",
|
|
54
55
|
"@atlaskit/ufo": "^0.3.0",
|
|
55
56
|
"@atlaskit/util-service-support": "^6.2.0",
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
"devDependencies": {
|
|
68
69
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
69
70
|
"@atlaskit/visual-regression": "*",
|
|
71
|
+
"@atlassian/feature-flags-test-utils": "*",
|
|
70
72
|
"@testing-library/react": "^12.1.5",
|
|
71
73
|
"@types/query-string": "^4.3.1",
|
|
72
74
|
"@types/serialize-javascript": "^5.0.0",
|
|
@@ -107,5 +109,10 @@
|
|
|
107
109
|
"./team-resource": "./src/team-resource.ts",
|
|
108
110
|
"./typeahead": "./src/typeahead.ts",
|
|
109
111
|
"./types": "./src/types.ts"
|
|
112
|
+
},
|
|
113
|
+
"platform-feature-flags": {
|
|
114
|
+
"platform_editor_ai_remove_mentions_record": {
|
|
115
|
+
"type": "boolean"
|
|
116
|
+
}
|
|
110
117
|
}
|
|
111
118
|
}
|