@atlaskit/editor-core 185.16.6 → 185.16.7

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
+ ## 185.16.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`1d3e0468d4c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1d3e0468d4c) - Adds a new analytics event to be implemented later
8
+
3
9
  ## 185.16.6
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getMediaResizeAnalyticsEvent = void 0;
7
+ var _analytics = require("@atlaskit/editor-common/analytics");
8
+ var getMediaResizeAnalyticsEvent = function getMediaResizeAnalyticsEvent(type, attributes) {
9
+ if (!attributes) {
10
+ return;
11
+ }
12
+ var size = attributes.size,
13
+ widthType = attributes.widthType,
14
+ layout = attributes.layout,
15
+ snapType = attributes.snapType,
16
+ parentNode = attributes.parentNode;
17
+ var actionSubject = type === 'embed' ? _analytics.ACTION_SUBJECT.EMBEDS : _analytics.ACTION_SUBJECT.MEDIA_SINGLE;
18
+ return {
19
+ action: _analytics.ACTION.EDITED,
20
+ actionSubject: actionSubject,
21
+ actionSubjectId: _analytics.ACTION_SUBJECT_ID.RESIZED,
22
+ attributes: {
23
+ size: size,
24
+ layout: layout,
25
+ widthType: widthType,
26
+ snapType: snapType,
27
+ parentNode: parentNode
28
+ },
29
+ eventType: _analytics.EVENT_TYPE.UI
30
+ };
31
+ };
32
+ exports.getMediaResizeAnalyticsEvent = getMediaResizeAnalyticsEvent;
@@ -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 = "185.16.6";
9
+ var version = "185.16.7";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "185.16.6",
3
+ "version": "185.16.7",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,27 @@
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
+ export const getMediaResizeAnalyticsEvent = (type, attributes) => {
3
+ if (!attributes) {
4
+ return;
5
+ }
6
+ const {
7
+ size,
8
+ widthType,
9
+ layout,
10
+ snapType,
11
+ parentNode
12
+ } = attributes;
13
+ const actionSubject = type === 'embed' ? ACTION_SUBJECT.EMBEDS : ACTION_SUBJECT.MEDIA_SINGLE;
14
+ return {
15
+ action: ACTION.EDITED,
16
+ actionSubject,
17
+ actionSubjectId: ACTION_SUBJECT_ID.RESIZED,
18
+ attributes: {
19
+ size,
20
+ layout,
21
+ widthType,
22
+ snapType,
23
+ parentNode
24
+ },
25
+ eventType: EVENT_TYPE.UI
26
+ };
27
+ };
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "185.16.6";
2
+ export const version = "185.16.7";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "185.16.6",
3
+ "version": "185.16.7",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,25 @@
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
2
+ export var getMediaResizeAnalyticsEvent = function getMediaResizeAnalyticsEvent(type, attributes) {
3
+ if (!attributes) {
4
+ return;
5
+ }
6
+ var size = attributes.size,
7
+ widthType = attributes.widthType,
8
+ layout = attributes.layout,
9
+ snapType = attributes.snapType,
10
+ parentNode = attributes.parentNode;
11
+ var actionSubject = type === 'embed' ? ACTION_SUBJECT.EMBEDS : ACTION_SUBJECT.MEDIA_SINGLE;
12
+ return {
13
+ action: ACTION.EDITED,
14
+ actionSubject: actionSubject,
15
+ actionSubjectId: ACTION_SUBJECT_ID.RESIZED,
16
+ attributes: {
17
+ size: size,
18
+ layout: layout,
19
+ widthType: widthType,
20
+ snapType: snapType,
21
+ parentNode: parentNode
22
+ },
23
+ eventType: EVENT_TYPE.UI
24
+ };
25
+ };
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "185.16.6";
2
+ export var version = "185.16.7";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "185.16.6",
3
+ "version": "185.16.7",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,2 @@
1
+ import { MediaEventPayload, MediaResizeTrackAction } from '@atlaskit/editor-common/analytics';
2
+ export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(type: string, attributes: T["attributes"]) => MediaEventPayload | void;
@@ -0,0 +1,2 @@
1
+ import { MediaEventPayload, MediaResizeTrackAction } from '@atlaskit/editor-common/analytics';
2
+ export declare const getMediaResizeAnalyticsEvent: <T extends MediaResizeTrackAction>(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": "185.16.6",
3
+ "version": "185.16.7",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"