@atlaskit/editor-core 185.16.6 → 185.17.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 185.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`464745a92e6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/464745a92e6) - [ux] Updated the Editor Table plugin to use the new guidelines plugin when custom-table-widths FF is enabled
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 185.16.7
14
+
15
+ ### Patch Changes
16
+
17
+ - [`1d3e0468d4c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1d3e0468d4c) - Adds a new analytics event to be implemented later
18
+
3
19
  ## 185.16.6
4
20
 
5
21
  ### Patch Changes
@@ -9,6 +9,7 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _api = require("../../../selection-api/api");
11
11
  var _plugins = require("../../../plugins");
12
+ var _editorPluginGuideline = require("@atlaskit/editor-plugin-guideline");
12
13
  var _editorPluginContextPanel = require("@atlaskit/editor-plugin-context-panel");
13
14
  var _editorPluginGrid = require("@atlaskit/editor-plugin-grid");
14
15
  var _editorPluginCard = require("@atlaskit/editor-plugin-card");
@@ -84,6 +85,11 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
84
85
  }]);
85
86
  }
86
87
  return builder;
88
+ }).maybeAdd(_editorPluginGuideline.guidelinePlugin, function (plugin, builder) {
89
+ if (props.media || props.allowTables) {
90
+ return builder.add(plugin);
91
+ }
92
+ return builder;
87
93
  }).maybeAdd(_editorPluginGrid.gridPlugin, function (plugin, builder) {
88
94
  if (props.media) {
89
95
  return builder.add([plugin, {
@@ -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.17.0";
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.17.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,6 @@
1
1
  import { createEditorSelectionAPI } from '../../../selection-api/api';
2
2
  import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
3
+ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
3
4
  import { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
4
5
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
5
6
  import { cardPlugin } from '@atlaskit/editor-plugin-card';
@@ -72,6 +73,11 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
72
73
  }]);
73
74
  }
74
75
  return builder;
76
+ }).maybeAdd(guidelinePlugin, (plugin, builder) => {
77
+ if (props.media || props.allowTables) {
78
+ return builder.add(plugin);
79
+ }
80
+ return builder;
75
81
  }).maybeAdd(gridPlugin, (plugin, builder) => {
76
82
  if (props.media) {
77
83
  return builder.add([plugin, {
@@ -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.17.0";
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.17.0",
4
4
  "sideEffects": false
5
5
  }
@@ -4,6 +4,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
4
4
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
5
  import { createEditorSelectionAPI } from '../../../selection-api/api';
6
6
  import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, datePlugin, emojiPlugin, extensionPlugin, fragmentMarkPlugin, helpDialogPlugin, imageUploadPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, listPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, mediaPlugin, mentionsPlugin, panelPlugin, placeholderTextPlugin, rulePlugin, saveOnEnterPlugin, tasksAndDecisionsPlugin, textColorPlugin, statusPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, historyPlugin, expandPlugin, isExpandInsertionEnabled, scrollIntoViewPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, captionPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin, copyButtonPlugin, borderPlugin } from '../../../plugins';
7
+ import { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
7
8
  import { contextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
8
9
  import { gridPlugin } from '@atlaskit/editor-plugin-grid';
9
10
  import { cardPlugin } from '@atlaskit/editor-plugin-card';
@@ -77,6 +78,11 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
77
78
  }]);
78
79
  }
79
80
  return builder;
81
+ }).maybeAdd(guidelinePlugin, function (plugin, builder) {
82
+ if (props.media || props.allowTables) {
83
+ return builder.add(plugin);
84
+ }
85
+ return builder;
80
86
  }).maybeAdd(gridPlugin, function (plugin, builder) {
81
87
  if (props.media) {
82
88
  return builder.add([plugin, {
@@ -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.17.0";
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.17.0",
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.17.0",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/code": "^14.6.0",
56
56
  "@atlaskit/date": "^0.10.0",
57
57
  "@atlaskit/datetime-picker": "^12.7.0",
58
- "@atlaskit/editor-common": "^74.21.0",
58
+ "@atlaskit/editor-common": "^74.22.0",
59
59
  "@atlaskit/editor-json-transformer": "^8.10.0",
60
60
  "@atlaskit/editor-markdown-transformer": "^5.2.5",
61
61
  "@atlaskit/editor-palette": "1.5.1",
@@ -67,8 +67,9 @@
67
67
  "@atlaskit/editor-plugin-feature-flags": "^0.1.0",
68
68
  "@atlaskit/editor-plugin-floating-toolbar": "^0.2.0",
69
69
  "@atlaskit/editor-plugin-grid": "^0.1.0",
70
+ "@atlaskit/editor-plugin-guideline": "^0.3.4",
70
71
  "@atlaskit/editor-plugin-hyperlink": "^0.1.0",
71
- "@atlaskit/editor-plugin-table": "^2.1.0",
72
+ "@atlaskit/editor-plugin-table": "^2.2.0",
72
73
  "@atlaskit/editor-plugin-width": "^0.1.0",
73
74
  "@atlaskit/editor-shared-styles": "^2.4.0",
74
75
  "@atlaskit/editor-tables": "^2.3.0",
@@ -148,7 +149,7 @@
148
149
  "@atlaskit/collab-provider": "9.7.1",
149
150
  "@atlaskit/dropdown-menu": "^11.10.0",
150
151
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
151
- "@atlaskit/editor-plugin-table": "^2.1.0",
152
+ "@atlaskit/editor-plugin-table": "^2.2.0",
152
153
  "@atlaskit/editor-test-helpers": "^18.10.0",
153
154
  "@atlaskit/flag": "^15.2.0",
154
155
  "@atlaskit/icon-object": "^6.3.0",