@atlaskit/mention 23.11.2 → 23.11.3

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/mention
2
2
 
3
+ ## 23.11.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#100905](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/100905)
8
+ [`09996c6135609`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/09996c6135609) -
9
+ [EDF-2181] Cleanup platform_editor_ai_remove_mentions_record FF
10
+
3
11
  ## 23.11.2
4
12
 
5
13
  ### Patch Changes
@@ -14,7 +14,6 @@ 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");
18
17
  var _types = require("../types");
19
18
  var _logger = _interopRequireDefault(require("../util/logger"));
20
19
  var _analytics = require("../util/analytics");
@@ -271,13 +270,6 @@ var MentionResource = exports.MentionResource = /*#__PURE__*/function (_Abstract
271
270
  }
272
271
  return filter;
273
272
  }()
274
- }, {
275
- key: "recordMentionSelection",
276
- value: function recordMentionSelection(mention, contextIdentifier) {
277
- return this.recordSelection(mention, contextIdentifier).then(function () {}, function (error) {
278
- return (0, _logger.default)("error recording mention selection: ".concat(error), error);
279
- });
280
- }
281
273
  }, {
282
274
  key: "isFiltering",
283
275
  value: function isFiltering(query) {
@@ -469,53 +461,6 @@ var MentionResource = exports.MentionResource = /*#__PURE__*/function (_Abstract
469
461
  query: result.query || query
470
462
  });
471
463
  }
472
- }, {
473
- key: "recordSelection",
474
- value: function () {
475
- var _recordSelection = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(mention, contextIdentifier) {
476
- var options, sliName, result;
477
- return _regenerator.default.wrap(function _callee4$(_context4) {
478
- while (1) switch (_context4.prev = _context4.next) {
479
- case 0:
480
- if (!(0, _platformFeatureFlags.fg)('platform_editor_ai_remove_mentions_record')) {
481
- _context4.next = 2;
482
- break;
483
- }
484
- return _context4.abrupt("return");
485
- case 2:
486
- options = {
487
- path: 'record',
488
- queryParams: _objectSpread({
489
- selectedUserId: mention.id
490
- }, this.getQueryParams(contextIdentifier)),
491
- requestInit: {
492
- method: 'POST'
493
- }
494
- };
495
- sliName = (0, _types.isTeamMention)(mention) ? _types.SliNames.SELECT_TEAM : _types.SliNames.SELECT;
496
- _context4.prev = 4;
497
- _context4.next = 7;
498
- return _utilServiceSupport.utils.requestService(this.config, options);
499
- case 7:
500
- result = _context4.sent;
501
- this._notifyAnalyticsListeners(_analytics.SLI_EVENT_TYPE, sliName, _types.Actions.SUCCEEDED);
502
- return _context4.abrupt("return", result);
503
- case 12:
504
- _context4.prev = 12;
505
- _context4.t0 = _context4["catch"](4);
506
- this._notifyAnalyticsListeners(_analytics.SLI_EVENT_TYPE, sliName, _types.Actions.FAILED);
507
- throw _context4.t0;
508
- case 16:
509
- case "end":
510
- return _context4.stop();
511
- }
512
- }, _callee4, this, [[4, 12]]);
513
- }));
514
- function recordSelection(_x6, _x7) {
515
- return _recordSelection.apply(this, arguments);
516
- }
517
- return recordSelection;
518
- }()
519
464
  }]);
520
465
  }(AbstractMentionResource);
521
466
  var HttpError = exports.HttpError = /*#__PURE__*/(0, _createClass2.default)(function HttpError(statusCode, statusMessage) {
@@ -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.11.2";
15
+ var packageVersion = "23.11.3";
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,5 +1,4 @@
1
1
  import { utils as serviceUtils } from '@atlaskit/util-service-support';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { isAppMention, isTeamMention, MentionNameStatus, SliNames, Actions } from '../types';
4
3
  import debug from '../util/logger';
5
4
  const MAX_QUERY_ITEMS = 100;
@@ -183,9 +182,6 @@ export class MentionResource extends AbstractMentionResource {
183
182
  this.notifyError(error, query);
184
183
  }
185
184
  }
186
- recordMentionSelection(mention, contextIdentifier) {
187
- return this.recordSelection(mention, contextIdentifier).then(() => {}, error => debug(`error recording mention selection: ${error}`, error));
188
- }
189
185
  isFiltering(query) {
190
186
  return this.activeSearches.has(query);
191
187
  }
@@ -317,30 +313,6 @@ export class MentionResource extends AbstractMentionResource {
317
313
  query: result.query || query
318
314
  };
319
315
  }
320
- async recordSelection(mention, contextIdentifier) {
321
- if (fg('platform_editor_ai_remove_mentions_record')) {
322
- return;
323
- }
324
- const options = {
325
- path: 'record',
326
- queryParams: {
327
- selectedUserId: mention.id,
328
- ...this.getQueryParams(contextIdentifier)
329
- },
330
- requestInit: {
331
- method: 'POST'
332
- }
333
- };
334
- const sliName = isTeamMention(mention) ? SliNames.SELECT_TEAM : SliNames.SELECT;
335
- try {
336
- const result = await serviceUtils.requestService(this.config, options);
337
- this._notifyAnalyticsListeners(SLI_EVENT_TYPE, sliName, Actions.SUCCEEDED);
338
- return result;
339
- } catch (error) {
340
- this._notifyAnalyticsListeners(SLI_EVENT_TYPE, sliName, Actions.FAILED);
341
- throw error;
342
- }
343
- }
344
316
  }
345
317
  export class HttpError {
346
318
  constructor(statusCode, statusMessage) {
@@ -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.11.2";
5
+ const packageVersion = "23.11.3";
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,7 +11,6 @@ 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';
15
14
  import { isAppMention, isTeamMention, MentionNameStatus, SliNames, Actions } from '../types';
16
15
  import debug from '../util/logger';
17
16
  var MAX_QUERY_ITEMS = 100;
@@ -264,13 +263,6 @@ export var MentionResource = /*#__PURE__*/function (_AbstractMentionResou) {
264
263
  }
265
264
  return filter;
266
265
  }()
267
- }, {
268
- key: "recordMentionSelection",
269
- value: function recordMentionSelection(mention, contextIdentifier) {
270
- return this.recordSelection(mention, contextIdentifier).then(function () {}, function (error) {
271
- return debug("error recording mention selection: ".concat(error), error);
272
- });
273
- }
274
266
  }, {
275
267
  key: "isFiltering",
276
268
  value: function isFiltering(query) {
@@ -462,53 +454,6 @@ export var MentionResource = /*#__PURE__*/function (_AbstractMentionResou) {
462
454
  query: result.query || query
463
455
  });
464
456
  }
465
- }, {
466
- key: "recordSelection",
467
- value: function () {
468
- var _recordSelection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(mention, contextIdentifier) {
469
- var options, sliName, result;
470
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
471
- while (1) switch (_context4.prev = _context4.next) {
472
- case 0:
473
- if (!fg('platform_editor_ai_remove_mentions_record')) {
474
- _context4.next = 2;
475
- break;
476
- }
477
- return _context4.abrupt("return");
478
- case 2:
479
- options = {
480
- path: 'record',
481
- queryParams: _objectSpread({
482
- selectedUserId: mention.id
483
- }, this.getQueryParams(contextIdentifier)),
484
- requestInit: {
485
- method: 'POST'
486
- }
487
- };
488
- sliName = isTeamMention(mention) ? SliNames.SELECT_TEAM : SliNames.SELECT;
489
- _context4.prev = 4;
490
- _context4.next = 7;
491
- return serviceUtils.requestService(this.config, options);
492
- case 7:
493
- result = _context4.sent;
494
- this._notifyAnalyticsListeners(SLI_EVENT_TYPE, sliName, Actions.SUCCEEDED);
495
- return _context4.abrupt("return", result);
496
- case 12:
497
- _context4.prev = 12;
498
- _context4.t0 = _context4["catch"](4);
499
- this._notifyAnalyticsListeners(SLI_EVENT_TYPE, sliName, Actions.FAILED);
500
- throw _context4.t0;
501
- case 16:
502
- case "end":
503
- return _context4.stop();
504
- }
505
- }, _callee4, this, [[4, 12]]);
506
- }));
507
- function recordSelection(_x6, _x7) {
508
- return _recordSelection.apply(this, arguments);
509
- }
510
- return recordSelection;
511
- }()
512
457
  }]);
513
458
  }(AbstractMentionResource);
514
459
  export var HttpError = /*#__PURE__*/_createClass(function HttpError(statusCode, statusMessage) {
@@ -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.11.2";
8
+ var packageVersion = "23.11.3";
9
9
  export var SLI_EVENT_TYPE = 'sli';
10
10
  export var SMART_EVENT_TYPE = 'smart';
11
11
  export var fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
@@ -51,7 +51,6 @@ export declare class MentionResource extends AbstractMentionResource implements
51
51
  notify(searchTime: number, mentionResult: MentionsResult, query?: string): void;
52
52
  notifyError(error: Error, query?: string): void;
53
53
  filter(query?: string, contextIdentifier?: MentionContextIdentifier): Promise<void>;
54
- recordMentionSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
55
54
  isFiltering(query: string): boolean;
56
55
  resolveMentionName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
57
56
  cacheMentionName(id: string, mentionName: string): void;
@@ -79,7 +78,6 @@ export declare class MentionResource extends AbstractMentionResource implements
79
78
  private search;
80
79
  protected remoteSearch(query: string, contextIdentifier?: MentionContextIdentifier): Promise<MentionsResult>;
81
80
  private transformServiceResponse;
82
- recordSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
83
81
  }
84
82
  export declare class HttpError implements Error {
85
83
  name: string;
@@ -51,7 +51,6 @@ export declare class MentionResource extends AbstractMentionResource implements
51
51
  notify(searchTime: number, mentionResult: MentionsResult, query?: string): void;
52
52
  notifyError(error: Error, query?: string): void;
53
53
  filter(query?: string, contextIdentifier?: MentionContextIdentifier): Promise<void>;
54
- recordMentionSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
55
54
  isFiltering(query: string): boolean;
56
55
  resolveMentionName(id: string): Promise<MentionNameDetails> | MentionNameDetails;
57
56
  cacheMentionName(id: string, mentionName: string): void;
@@ -79,7 +78,6 @@ export declare class MentionResource extends AbstractMentionResource implements
79
78
  private search;
80
79
  protected remoteSearch(query: string, contextIdentifier?: MentionContextIdentifier): Promise<MentionsResult>;
81
80
  private transformServiceResponse;
82
- recordSelection(mention: MentionDescription, contextIdentifier?: MentionContextIdentifier): Promise<void>;
83
81
  }
84
82
  export declare class HttpError implements Error {
85
83
  name: string;
package/package.json CHANGED
@@ -36,10 +36,10 @@
36
36
  "@atlaskit/avatar": "^21.18.0",
37
37
  "@atlaskit/focus-ring": "^2.1.0",
38
38
  "@atlaskit/heading": "^4.1.0",
39
- "@atlaskit/icon": "^23.7.0",
39
+ "@atlaskit/icon": "^23.8.0",
40
40
  "@atlaskit/lozenge": "^11.13.0",
41
41
  "@atlaskit/platform-feature-flags": "^1.0.0",
42
- "@atlaskit/primitives": "^13.4.0",
42
+ "@atlaskit/primitives": "^13.5.0",
43
43
  "@atlaskit/theme": "^15.0.0",
44
44
  "@atlaskit/tokens": "^3.3.0",
45
45
  "@atlaskit/tooltip": "^19.1.0",
@@ -116,5 +116,5 @@
116
116
  ]
117
117
  }
118
118
  },
119
- "version": "23.11.2"
119
+ "version": "23.11.3"
120
120
  }