@atlaskit/editor-core 187.37.3 → 187.37.4

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,11 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.37.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e31a001b8b8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e31a001b8b8) - Add pixel entry resize analytic event payload
8
+
3
9
  ## 187.37.3
4
10
 
5
11
  ### Patch Changes
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getMediaResizeAnalyticsEvent = void 0;
6
+ exports.getMediaResizeAnalyticsEvent = exports.getMediaInputResizeAnalyticsEvent = void 0;
7
7
  var _analytics = require("@atlaskit/editor-common/analytics");
8
8
  var getMediaResizeAnalyticsEvent = function getMediaResizeAnalyticsEvent(type, attributes) {
9
9
  if (!attributes) {
@@ -29,4 +29,27 @@ var getMediaResizeAnalyticsEvent = function getMediaResizeAnalyticsEvent(type, a
29
29
  eventType: _analytics.EVENT_TYPE.UI
30
30
  };
31
31
  };
32
- exports.getMediaResizeAnalyticsEvent = getMediaResizeAnalyticsEvent;
32
+ exports.getMediaResizeAnalyticsEvent = getMediaResizeAnalyticsEvent;
33
+ var getMediaInputResizeAnalyticsEvent = function getMediaInputResizeAnalyticsEvent(type, attributes) {
34
+ if (!attributes) {
35
+ return;
36
+ }
37
+ var width = attributes.width,
38
+ layout = attributes.layout,
39
+ validation = attributes.validation,
40
+ parentNode = attributes.parentNode;
41
+ var actionSubject = type === 'embed' ? _analytics.ACTION_SUBJECT.EMBEDS : _analytics.ACTION_SUBJECT.MEDIA_SINGLE;
42
+ return {
43
+ action: _analytics.ACTION.EDITED,
44
+ actionSubject: actionSubject,
45
+ actionSubjectId: _analytics.ACTION_SUBJECT_ID.INPUT_RESIZED,
46
+ attributes: {
47
+ width: width,
48
+ layout: layout,
49
+ validation: validation,
50
+ parentNode: parentNode
51
+ },
52
+ eventType: _analytics.EVENT_TYPE.UI
53
+ };
54
+ };
55
+ exports.getMediaInputResizeAnalyticsEvent = getMediaInputResizeAnalyticsEvent;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.37.3";
9
+ var version = "187.37.4";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -24,4 +24,28 @@ export const getMediaResizeAnalyticsEvent = (type, attributes) => {
24
24
  },
25
25
  eventType: EVENT_TYPE.UI
26
26
  };
27
+ };
28
+ export const getMediaInputResizeAnalyticsEvent = (type, attributes) => {
29
+ if (!attributes) {
30
+ return;
31
+ }
32
+ const {
33
+ width,
34
+ layout,
35
+ validation,
36
+ parentNode
37
+ } = attributes;
38
+ const actionSubject = type === 'embed' ? ACTION_SUBJECT.EMBEDS : ACTION_SUBJECT.MEDIA_SINGLE;
39
+ return {
40
+ action: ACTION.EDITED,
41
+ actionSubject,
42
+ actionSubjectId: ACTION_SUBJECT_ID.INPUT_RESIZED,
43
+ attributes: {
44
+ width,
45
+ layout,
46
+ validation,
47
+ parentNode
48
+ },
49
+ eventType: EVENT_TYPE.UI
50
+ };
27
51
  };
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.37.3";
2
+ export const version = "187.37.4";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -22,4 +22,26 @@ export var getMediaResizeAnalyticsEvent = function getMediaResizeAnalyticsEvent(
22
22
  },
23
23
  eventType: EVENT_TYPE.UI
24
24
  };
25
+ };
26
+ export var getMediaInputResizeAnalyticsEvent = function getMediaInputResizeAnalyticsEvent(type, attributes) {
27
+ if (!attributes) {
28
+ return;
29
+ }
30
+ var width = attributes.width,
31
+ layout = attributes.layout,
32
+ validation = attributes.validation,
33
+ parentNode = attributes.parentNode;
34
+ var actionSubject = type === 'embed' ? ACTION_SUBJECT.EMBEDS : ACTION_SUBJECT.MEDIA_SINGLE;
35
+ return {
36
+ action: ACTION.EDITED,
37
+ actionSubject: actionSubject,
38
+ actionSubjectId: ACTION_SUBJECT_ID.INPUT_RESIZED,
39
+ attributes: {
40
+ width: width,
41
+ layout: layout,
42
+ validation: validation,
43
+ parentNode: parentNode
44
+ },
45
+ eventType: EVENT_TYPE.UI
46
+ };
25
47
  };
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "187.37.3";
2
+ export var version = "187.37.4";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,2 +1,3 @@
1
- import type { MediaEventPayload, MediaResizeTrackAction } from '@atlaskit/editor-common/analytics';
1
+ import type { MediaEventPayload, MediaResizeTrackAction, MediaInputResizeTrackAction } from '@atlaskit/editor-common/analytics';
2
2
  export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
3
+ export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
@@ -1,2 +1,3 @@
1
- import type { MediaEventPayload, MediaResizeTrackAction } from '@atlaskit/editor-common/analytics';
1
+ import type { MediaEventPayload, MediaResizeTrackAction, MediaInputResizeTrackAction } from '@atlaskit/editor-common/analytics';
2
2
  export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
3
+ export declare const getMediaInputResizeAnalyticsEvent: <T extends MediaInputResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "187.37.3",
3
+ "version": "187.37.4",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"