@atlaskit/editor-common 103.22.2 → 103.22.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,15 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 103.22.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#149530](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/149530)
8
+ [`a432884180253`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a432884180253) -
9
+ Sends SmartLink Visited event with additional input methods depending on the way the link was
10
+ opened.
11
+ - Updated dependencies
12
+
3
13
  ## 103.22.2
4
14
 
5
15
  ### Patch Changes
@@ -291,6 +291,12 @@ Object.defineProperty(exports, "buildVisitedLinkPayload", {
291
291
  return _linkingUtils.buildVisitedLinkPayload;
292
292
  }
293
293
  });
294
+ Object.defineProperty(exports, "buildVisitedNonHyperLinkPayload", {
295
+ enumerable: true,
296
+ get: function get() {
297
+ return _linkingUtils.buildVisitedNonHyperLinkPayload;
298
+ }
299
+ });
294
300
  Object.defineProperty(exports, "editorAnalyticsChannel", {
295
301
  enumerable: true,
296
302
  get: function get() {
@@ -3,7 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.unlinkPayload = exports.buildVisitedLinkPayload = exports.buildOpenedSettingsPayload = exports.buildEditLinkPayload = void 0;
6
+ exports.unlinkPayload = exports.buildVisitedNonHyperLinkPayload = exports.buildVisitedLinkPayload = exports.buildOpenedSettingsPayload = exports.buildEditLinkPayload = void 0;
7
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
7
8
  var _enums = require("./types/enums");
8
9
  var buildEditLinkPayload = exports.buildEditLinkPayload = function buildEditLinkPayload(type) {
9
10
  return {
@@ -38,7 +39,10 @@ var mapLinkTypeToCardAppearance = function mapLinkTypeToCardAppearance(type) {
38
39
  }
39
40
  };
40
41
  var buildVisitedLinkPayload = exports.buildVisitedLinkPayload = function buildVisitedLinkPayload(type) {
41
- return type === _enums.ACTION_SUBJECT_ID.HYPERLINK ? {
42
+ return type === _enums.ACTION_SUBJECT_ID.HYPERLINK ? buildVisitedHyperLinkPayload() : buildVisitedNonHyperLinkPayload(type, _enums.INPUT_METHOD.TOOLBAR);
43
+ };
44
+ var buildVisitedHyperLinkPayload = function buildVisitedHyperLinkPayload() {
45
+ return {
42
46
  action: _enums.ACTION.VISITED,
43
47
  actionSubject: _enums.ACTION_SUBJECT.HYPERLINK,
44
48
  actionSubjectId: undefined,
@@ -46,12 +50,15 @@ var buildVisitedLinkPayload = exports.buildVisitedLinkPayload = function buildVi
46
50
  inputMethod: _enums.INPUT_METHOD.TOOLBAR
47
51
  },
48
52
  eventType: _enums.EVENT_TYPE.TRACK
49
- } : {
53
+ };
54
+ };
55
+ var buildVisitedNonHyperLinkPayload = exports.buildVisitedNonHyperLinkPayload = function buildVisitedNonHyperLinkPayload(type, inputMethod) {
56
+ return {
50
57
  action: _enums.ACTION.VISITED,
51
58
  actionSubject: _enums.ACTION_SUBJECT.SMART_LINK,
52
59
  actionSubjectId: type,
53
60
  attributes: {
54
- inputMethod: _enums.INPUT_METHOD.TOOLBAR
61
+ inputMethod: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_analytics') ? inputMethod : _enums.INPUT_METHOD.TOOLBAR
55
62
  },
56
63
  eventType: _enums.EVENT_TYPE.TRACK
57
64
  };
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "103.22.2";
20
+ var packageVersion = "103.22.3";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // Ignored via go/ees007
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "103.22.2";
26
+ var packageVersion = "103.22.3";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -18,5 +18,5 @@ export { TOOLBAR_ACTION_SUBJECT_ID } from './types/toolbar-button';
18
18
  export { SELECTION_POSITION, SELECTION_TYPE } from './types/utils';
19
19
  export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
20
20
  export { getAnalyticsEventsFromTransaction } from './utils';
21
- export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
21
+ export { buildEditLinkPayload, buildVisitedLinkPayload, buildVisitedNonHyperLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
22
22
  export { AI_SUGGESTION_TRIGGERED_FROM } from './types/ai-inline-suggestion-events';
@@ -1,3 +1,4 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from './types/enums';
2
3
  export const buildEditLinkPayload = type => {
3
4
  return {
@@ -32,7 +33,10 @@ const mapLinkTypeToCardAppearance = type => {
32
33
  }
33
34
  };
34
35
  export const buildVisitedLinkPayload = type => {
35
- return type === ACTION_SUBJECT_ID.HYPERLINK ? {
36
+ return type === ACTION_SUBJECT_ID.HYPERLINK ? buildVisitedHyperLinkPayload() : buildVisitedNonHyperLinkPayload(type, INPUT_METHOD.TOOLBAR);
37
+ };
38
+ const buildVisitedHyperLinkPayload = () => {
39
+ return {
36
40
  action: ACTION.VISITED,
37
41
  actionSubject: ACTION_SUBJECT.HYPERLINK,
38
42
  actionSubjectId: undefined,
@@ -40,12 +44,15 @@ export const buildVisitedLinkPayload = type => {
40
44
  inputMethod: INPUT_METHOD.TOOLBAR
41
45
  },
42
46
  eventType: EVENT_TYPE.TRACK
43
- } : {
47
+ };
48
+ };
49
+ export const buildVisitedNonHyperLinkPayload = (type, inputMethod) => {
50
+ return {
44
51
  action: ACTION.VISITED,
45
52
  actionSubject: ACTION_SUBJECT.SMART_LINK,
46
53
  actionSubjectId: type,
47
54
  attributes: {
48
- inputMethod: INPUT_METHOD.TOOLBAR
55
+ inputMethod: fg('platform_editor_controls_patch_analytics') ? inputMethod : INPUT_METHOD.TOOLBAR
49
56
  },
50
57
  eventType: EVENT_TYPE.TRACK
51
58
  };
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "103.22.2";
4
+ const packageVersion = "103.22.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "103.22.2";
16
+ const packageVersion = "103.22.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -18,5 +18,5 @@ export { TOOLBAR_ACTION_SUBJECT_ID } from './types/toolbar-button';
18
18
  export { SELECTION_POSITION, SELECTION_TYPE } from './types/utils';
19
19
  export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
20
20
  export { getAnalyticsEventsFromTransaction } from './utils';
21
- export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
21
+ export { buildEditLinkPayload, buildVisitedLinkPayload, buildVisitedNonHyperLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
22
22
  export { AI_SUGGESTION_TRIGGERED_FROM } from './types/ai-inline-suggestion-events';
@@ -1,3 +1,4 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from './types/enums';
2
3
  export var buildEditLinkPayload = function buildEditLinkPayload(type) {
3
4
  return {
@@ -32,7 +33,10 @@ var mapLinkTypeToCardAppearance = function mapLinkTypeToCardAppearance(type) {
32
33
  }
33
34
  };
34
35
  export var buildVisitedLinkPayload = function buildVisitedLinkPayload(type) {
35
- return type === ACTION_SUBJECT_ID.HYPERLINK ? {
36
+ return type === ACTION_SUBJECT_ID.HYPERLINK ? buildVisitedHyperLinkPayload() : buildVisitedNonHyperLinkPayload(type, INPUT_METHOD.TOOLBAR);
37
+ };
38
+ var buildVisitedHyperLinkPayload = function buildVisitedHyperLinkPayload() {
39
+ return {
36
40
  action: ACTION.VISITED,
37
41
  actionSubject: ACTION_SUBJECT.HYPERLINK,
38
42
  actionSubjectId: undefined,
@@ -40,12 +44,15 @@ export var buildVisitedLinkPayload = function buildVisitedLinkPayload(type) {
40
44
  inputMethod: INPUT_METHOD.TOOLBAR
41
45
  },
42
46
  eventType: EVENT_TYPE.TRACK
43
- } : {
47
+ };
48
+ };
49
+ export var buildVisitedNonHyperLinkPayload = function buildVisitedNonHyperLinkPayload(type, inputMethod) {
50
+ return {
44
51
  action: ACTION.VISITED,
45
52
  actionSubject: ACTION_SUBJECT.SMART_LINK,
46
53
  actionSubjectId: type,
47
54
  attributes: {
48
- inputMethod: INPUT_METHOD.TOOLBAR
55
+ inputMethod: fg('platform_editor_controls_patch_analytics') ? inputMethod : INPUT_METHOD.TOOLBAR
49
56
  },
50
57
  eventType: EVENT_TYPE.TRACK
51
58
  };
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "103.22.2";
10
+ var packageVersion = "103.22.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "103.22.2";
23
+ var packageVersion = "103.22.3";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -39,7 +39,7 @@ export type { ViewInlineCommentsButtonEventAEP, ViewEventPayload } from './types
39
39
  export type { EditorAnalyticsAPI } from './api';
40
40
  export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
41
41
  export { getAnalyticsEventsFromTransaction } from './utils';
42
- export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload, } from './linking-utils';
42
+ export { buildEditLinkPayload, buildVisitedLinkPayload, buildVisitedNonHyperLinkPayload, buildOpenedSettingsPayload, unlinkPayload, } from './linking-utils';
43
43
  export type { LinkType } from './linking-utils';
44
44
  export type { RequestToEditAEP } from './types/general-events';
45
45
  export type { AIEventPayload, AIMarkdownConversionErrorCaughtAttributes } from './types/ai-events';
@@ -3,6 +3,7 @@ import type { AnalyticsEventPayload } from './types/events';
3
3
  export declare const buildEditLinkPayload: (type: LinkType) => AnalyticsEventPayload;
4
4
  export type LinkType = ACTION_SUBJECT_ID.CARD_INLINE | ACTION_SUBJECT_ID.CARD_BLOCK | ACTION_SUBJECT_ID.EMBEDS | ACTION_SUBJECT_ID.HYPERLINK;
5
5
  export declare const buildVisitedLinkPayload: (type: LinkType) => AnalyticsEventPayload;
6
+ export declare const buildVisitedNonHyperLinkPayload: (type: LinkType, inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.BUTTON | INPUT_METHOD.DOUBLE_CLICK | INPUT_METHOD.FLOATING_TB) => AnalyticsEventPayload;
6
7
  export declare const buildOpenedSettingsPayload: (type: LinkType) => AnalyticsEventPayload;
7
8
  export declare const unlinkPayload: (type: LinkType) => {
8
9
  action: ACTION;
@@ -28,7 +28,7 @@ type ChangeSmartLinkAEP = ChangeTypeAEP<ACTION_SUBJECT.SMART_LINK, undefined, {
28
28
  previousType: SMART_LINK_TYPE;
29
29
  }, undefined>;
30
30
  type VisitedSmartLink = TrackAEP<ACTION.VISITED, ACTION_SUBJECT.SMART_LINK, ACTION_SUBJECT_ID.CARD_BLOCK | ACTION_SUBJECT_ID.CARD_INLINE, {
31
- inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.CARD;
31
+ inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.BUTTON | INPUT_METHOD.CARD | INPUT_METHOD.DOUBLE_CLICK;
32
32
  }, undefined>;
33
33
  type VisitedHyperlink = TrackAEP<ACTION.VISITED, ACTION_SUBJECT.HYPERLINK, undefined, {
34
34
  inputMethod: INPUT_METHOD.TOOLBAR;
@@ -39,7 +39,7 @@ export type { ViewInlineCommentsButtonEventAEP, ViewEventPayload } from './types
39
39
  export type { EditorAnalyticsAPI } from './api';
40
40
  export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
41
41
  export { getAnalyticsEventsFromTransaction } from './utils';
42
- export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload, } from './linking-utils';
42
+ export { buildEditLinkPayload, buildVisitedLinkPayload, buildVisitedNonHyperLinkPayload, buildOpenedSettingsPayload, unlinkPayload, } from './linking-utils';
43
43
  export type { LinkType } from './linking-utils';
44
44
  export type { RequestToEditAEP } from './types/general-events';
45
45
  export type { AIEventPayload, AIMarkdownConversionErrorCaughtAttributes } from './types/ai-events';
@@ -3,6 +3,7 @@ import type { AnalyticsEventPayload } from './types/events';
3
3
  export declare const buildEditLinkPayload: (type: LinkType) => AnalyticsEventPayload;
4
4
  export type LinkType = ACTION_SUBJECT_ID.CARD_INLINE | ACTION_SUBJECT_ID.CARD_BLOCK | ACTION_SUBJECT_ID.EMBEDS | ACTION_SUBJECT_ID.HYPERLINK;
5
5
  export declare const buildVisitedLinkPayload: (type: LinkType) => AnalyticsEventPayload;
6
+ export declare const buildVisitedNonHyperLinkPayload: (type: LinkType, inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.BUTTON | INPUT_METHOD.DOUBLE_CLICK | INPUT_METHOD.FLOATING_TB) => AnalyticsEventPayload;
6
7
  export declare const buildOpenedSettingsPayload: (type: LinkType) => AnalyticsEventPayload;
7
8
  export declare const unlinkPayload: (type: LinkType) => {
8
9
  action: ACTION;
@@ -28,7 +28,7 @@ type ChangeSmartLinkAEP = ChangeTypeAEP<ACTION_SUBJECT.SMART_LINK, undefined, {
28
28
  previousType: SMART_LINK_TYPE;
29
29
  }, undefined>;
30
30
  type VisitedSmartLink = TrackAEP<ACTION.VISITED, ACTION_SUBJECT.SMART_LINK, ACTION_SUBJECT_ID.CARD_BLOCK | ACTION_SUBJECT_ID.CARD_INLINE, {
31
- inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.CARD;
31
+ inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB | INPUT_METHOD.BUTTON | INPUT_METHOD.CARD | INPUT_METHOD.DOUBLE_CLICK;
32
32
  }, undefined>;
33
33
  type VisitedHyperlink = TrackAEP<ACTION.VISITED, ACTION_SUBJECT.HYPERLINK, undefined, {
34
34
  inputMethod: INPUT_METHOD.TOOLBAR;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "103.22.2",
3
+ "version": "103.22.3",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -155,11 +155,11 @@
155
155
  "@atlaskit/onboarding": "^14.0.0",
156
156
  "@atlaskit/platform-feature-flags": "^1.1.0",
157
157
  "@atlaskit/popper": "^7.0.0",
158
- "@atlaskit/primitives": "^14.6.0",
158
+ "@atlaskit/primitives": "^14.7.0",
159
159
  "@atlaskit/profilecard": "^23.10.0",
160
160
  "@atlaskit/react-ufo": "^3.9.0",
161
161
  "@atlaskit/section-message": "^8.2.0",
162
- "@atlaskit/smart-card": "^36.13.0",
162
+ "@atlaskit/smart-card": "^36.14.0",
163
163
  "@atlaskit/smart-user-picker": "^8.0.0",
164
164
  "@atlaskit/spinner": "^18.0.0",
165
165
  "@atlaskit/task-decision": "^19.2.0",
@@ -371,6 +371,9 @@
371
371
  },
372
372
  "platform_editor_fix_code_block_bg_color_in_macro": {
373
373
  "type": "boolean"
374
+ },
375
+ "platform_editor_controls_patch_analytics": {
376
+ "type": "boolean"
374
377
  }
375
378
  }
376
379
  }