@atlaskit/editor-core 182.1.2 → 182.1.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +0 -13
  2. package/dist/cjs/analytics-api/attach-payload-into-transaction.js +0 -4
  3. package/dist/cjs/plugins/analytics/utils.js +0 -2
  4. package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  5. package/dist/cjs/plugins/media/toolbar/index.js +0 -3
  6. package/dist/cjs/plugins/media/ui/ImageBorder/index.js +1 -1
  7. package/dist/cjs/plugins/media/ui/ImageBorder/styles.js +1 -1
  8. package/dist/cjs/ui/Appearance/Comment/Comment.js +0 -2
  9. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +0 -2
  10. package/dist/cjs/version-wrapper.js +1 -1
  11. package/dist/cjs/version.json +1 -1
  12. package/dist/es2019/analytics-api/attach-payload-into-transaction.js +0 -4
  13. package/dist/es2019/plugins/analytics/utils.js +0 -2
  14. package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  15. package/dist/es2019/plugins/media/toolbar/index.js +0 -3
  16. package/dist/es2019/plugins/media/ui/ImageBorder/index.js +1 -1
  17. package/dist/es2019/plugins/media/ui/ImageBorder/styles.js +1 -1
  18. package/dist/es2019/ui/Appearance/Comment/Comment.js +0 -2
  19. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +0 -2
  20. package/dist/es2019/version-wrapper.js +1 -1
  21. package/dist/es2019/version.json +1 -1
  22. package/dist/esm/analytics-api/attach-payload-into-transaction.js +0 -4
  23. package/dist/esm/plugins/analytics/utils.js +0 -2
  24. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +1 -1
  25. package/dist/esm/plugins/media/toolbar/index.js +0 -3
  26. package/dist/esm/plugins/media/ui/ImageBorder/index.js +1 -1
  27. package/dist/esm/plugins/media/ui/ImageBorder/styles.js +1 -1
  28. package/dist/esm/ui/Appearance/Comment/Comment.js +0 -2
  29. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +0 -2
  30. package/dist/esm/version-wrapper.js +1 -1
  31. package/dist/esm/version.json +1 -1
  32. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,18 +1,5 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
- ## 182.1.2
4
-
5
- ### Patch Changes
6
-
7
- - [`a6a3544d04d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a6a3544d04d) - [ux] Fix the image border split button so that both the toggle and the dropdown buttons share the same select state; and add a divider line between it and the align left icon group
8
-
9
- ## 182.1.1
10
-
11
- ### Patch Changes
12
-
13
- - [`dc608155b35`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dc608155b35) - [ux] ED-17486 stopped event propagation on Esc key on the main toolbar so that it is only focuses editor.
14
- - Updated dependencies
15
-
16
3
  ## 182.1.0
17
4
 
18
5
  ### Minor Changes
@@ -9,10 +9,6 @@ var _mapAttributes = require("./map-attributes");
9
9
  var _steps = require("@atlaskit/adf-schema/steps");
10
10
  var _analytics = require("@atlaskit/editor-common/analytics");
11
11
  var actionsToIgnore = [_analytics.ACTION.INVOKED, _analytics.ACTION.OPENED];
12
- // This utils was taken as reference in packages/editor/editor-plugin-ai/src/analytics/utils.ts
13
- // to create new util attachPayloadIntoTransaction in above file.
14
- // If you make a change here, please review attachPayloadIntoTransaction in above
15
- // file and update it as well if needed.
16
12
  var attachPayloadIntoTransaction = function attachPayloadIntoTransaction(_ref) {
17
13
  var payload = _ref.payload,
18
14
  editorState = _ref.editorState,
@@ -52,8 +52,6 @@ function addAnalytics(state, tr, payload) {
52
52
  });
53
53
  return tr;
54
54
  }
55
- // Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
56
- // If changes are made to this function, please make the same update in the linked file.
57
55
  function withAnalytics(payload, channel) {
58
56
  return function (command) {
59
57
  return function (state, dispatch, view) {
@@ -551,7 +551,7 @@ var MediaNodeUpdater = /*#__PURE__*/function () {
551
551
  return _this.props.mediaProvider;
552
552
  case 2:
553
553
  mediaProvider = _context13.sent;
554
- if (!(!id || !collection || !(mediaProvider !== null && mediaProvider !== void 0 && mediaProvider.uploadParams))) {
554
+ if (mediaProvider !== null && mediaProvider !== void 0 && mediaProvider.uploadParams) {
555
555
  _context13.next = 5;
556
556
  break;
557
557
  }
@@ -226,9 +226,6 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
226
226
  });
227
227
  }
228
228
  });
229
- toolbarButtons.push({
230
- type: 'separator'
231
- });
232
229
  }
233
230
  if (allowAdvancedToolBarOptions) {
234
231
  toolbarButtons = [].concat((0, _toConsumableArray2.default)(toolbarButtons), (0, _toConsumableArray2.default)((0, _MediaAndEmbedsToolbar.default)(state, intl, state.schema.nodes.mediaSingle, allowResizing, allowResizingInTables)));
@@ -145,7 +145,7 @@ var ImageBorder = function ImageBorder(_ref) {
145
145
  ref: popupTarget
146
146
  }, (0, _react.jsx)(_ToolbarButton.default, {
147
147
  className: "image-border-toolbar-dropdown",
148
- selected: enabled || isOpen,
148
+ selected: isOpen,
149
149
  "aria-label": formatMessage(_messages.messages.borderOptions),
150
150
  title: formatMessage(_messages.messages.borderOptions),
151
151
  spacing: "compact",
@@ -49,6 +49,6 @@ exports.line = line;
49
49
  var toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
50
50
  var enabled = _ref.enabled,
51
51
  isOpen = _ref.isOpen;
52
- return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && !enabled && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
52
+ return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
53
53
  };
54
54
  exports.toolbarButtonWrapper = toolbarButtonWrapper;
@@ -105,8 +105,6 @@ var Editor = /*#__PURE__*/function (_React$Component) {
105
105
  if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
106
106
  editorView === null || editorView === void 0 ? void 0 : editorView.focus();
107
107
  }
108
- event.preventDefault();
109
- event.stopPropagation();
110
108
  };
111
109
  return (0, _react2.jsx)(_WithFlash.default, {
112
110
  animate: maxContentSizeReached
@@ -91,8 +91,6 @@ var EditorToolbar = /*#__PURE__*/_react.default.memo(function (props) {
91
91
  var _props$editorView2;
92
92
  (_props$editorView2 = props.editorView) === null || _props$editorView2 === void 0 ? void 0 : _props$editorView2.focus();
93
93
  }
94
- event.preventDefault();
95
- event.stopPropagation();
96
94
  };
97
95
  return (0, _react2.jsx)(_context.ContextPanelConsumer, null, function (_ref) {
98
96
  var _props$featureFlags8, _props$featureFlags9, _props$featureFlags10;
@@ -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 = "182.1.2";
9
+ var version = "182.1.3";
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": "182.1.2",
3
+ "version": "182.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -3,10 +3,6 @@ import { mapActionSubjectIdToAttributes } from './map-attributes';
3
3
  import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
4
4
  import { ACTION } from '@atlaskit/editor-common/analytics';
5
5
  const actionsToIgnore = [ACTION.INVOKED, ACTION.OPENED];
6
- // This utils was taken as reference in packages/editor/editor-plugin-ai/src/analytics/utils.ts
7
- // to create new util attachPayloadIntoTransaction in above file.
8
- // If you make a change here, please review attachPayloadIntoTransaction in above
9
- // file and update it as well if needed.
10
6
  export const attachPayloadIntoTransaction = ({
11
7
  payload,
12
8
  editorState,
@@ -21,8 +21,6 @@ export function addAnalytics(state, tr, payload, channel = editorAnalyticsChanne
21
21
  });
22
22
  return tr;
23
23
  }
24
- // Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
25
- // If changes are made to this function, please make the same update in the linked file.
26
24
  export function withAnalytics(payload, channel) {
27
25
  return command => (state, dispatch, view) => command(state, tr => {
28
26
  if (dispatch) {
@@ -268,7 +268,7 @@ export class MediaNodeUpdater {
268
268
  });
269
269
  _defineProperty(this, "copyFile", async (id, collection, traceContext) => {
270
270
  const mediaProvider = await this.props.mediaProvider;
271
- if (!id || !collection || !(mediaProvider !== null && mediaProvider !== void 0 && mediaProvider.uploadParams)) {
271
+ if (!(mediaProvider !== null && mediaProvider !== void 0 && mediaProvider.uploadParams)) {
272
272
  return;
273
273
  }
274
274
  const nodeContextId = this.getNodeContextId();
@@ -225,9 +225,6 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
225
225
  });
226
226
  }
227
227
  });
228
- toolbarButtons.push({
229
- type: 'separator'
230
- });
231
228
  }
232
229
  if (allowAdvancedToolBarOptions) {
233
230
  toolbarButtons = [...toolbarButtons, ...buildLayoutButtons(state, intl, state.schema.nodes.mediaSingle, allowResizing, allowResizingInTables)];
@@ -130,7 +130,7 @@ const ImageBorder = ({
130
130
  ref: popupTarget
131
131
  }, jsx(ToolbarButton, {
132
132
  className: "image-border-toolbar-dropdown",
133
- selected: enabled || isOpen,
133
+ selected: isOpen,
134
134
  "aria-label": formatMessage(messages.borderOptions),
135
135
  title: formatMessage(messages.borderOptions),
136
136
  spacing: "compact",
@@ -118,7 +118,7 @@ export const toolbarButtonWrapper = ({
118
118
  }
119
119
 
120
120
  .image-border-toolbar-dropdown {
121
- ${!isOpen && !enabled && `background: ${`var(--ds-background-neutral-subtle-hovered, ${colors.N30A})`};`}
121
+ ${!isOpen && `background: ${`var(--ds-background-neutral-subtle-hovered, ${colors.N30A})`};`}
122
122
  }
123
123
  }
124
124
  `;
@@ -132,8 +132,6 @@ class Editor extends React.Component {
132
132
  if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
133
133
  editorView === null || editorView === void 0 ? void 0 : editorView.focus();
134
134
  }
135
- event.preventDefault();
136
- event.stopPropagation();
137
135
  };
138
136
  return jsx(WithFlash, {
139
137
  animate: maxContentSizeReached
@@ -74,8 +74,6 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
74
74
  var _props$editorView2;
75
75
  (_props$editorView2 = props.editorView) === null || _props$editorView2 === void 0 ? void 0 : _props$editorView2.focus();
76
76
  }
77
- event.preventDefault();
78
- event.stopPropagation();
79
77
  };
80
78
  return jsx(ContextPanelConsumer, null, ({
81
79
  width: contextPanelWidth
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "182.1.2";
2
+ export const version = "182.1.3";
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": "182.1.2",
3
+ "version": "182.1.3",
4
4
  "sideEffects": false
5
5
  }
@@ -3,10 +3,6 @@ import { mapActionSubjectIdToAttributes } from './map-attributes';
3
3
  import { AnalyticsStep } from '@atlaskit/adf-schema/steps';
4
4
  import { ACTION } from '@atlaskit/editor-common/analytics';
5
5
  var actionsToIgnore = [ACTION.INVOKED, ACTION.OPENED];
6
- // This utils was taken as reference in packages/editor/editor-plugin-ai/src/analytics/utils.ts
7
- // to create new util attachPayloadIntoTransaction in above file.
8
- // If you make a change here, please review attachPayloadIntoTransaction in above
9
- // file and update it as well if needed.
10
6
  export var attachPayloadIntoTransaction = function attachPayloadIntoTransaction(_ref) {
11
7
  var payload = _ref.payload,
12
8
  editorState = _ref.editorState,
@@ -22,8 +22,6 @@ export function addAnalytics(state, tr, payload) {
22
22
  });
23
23
  return tr;
24
24
  }
25
- // Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
26
- // If changes are made to this function, please make the same update in the linked file.
27
25
  export function withAnalytics(payload, channel) {
28
26
  return function (command) {
29
27
  return function (state, dispatch, view) {
@@ -544,7 +544,7 @@ export var MediaNodeUpdater = /*#__PURE__*/function () {
544
544
  return _this.props.mediaProvider;
545
545
  case 2:
546
546
  mediaProvider = _context13.sent;
547
- if (!(!id || !collection || !(mediaProvider !== null && mediaProvider !== void 0 && mediaProvider.uploadParams))) {
547
+ if (mediaProvider !== null && mediaProvider !== void 0 && mediaProvider.uploadParams) {
548
548
  _context13.next = 5;
549
549
  break;
550
550
  }
@@ -219,9 +219,6 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
219
219
  });
220
220
  }
221
221
  });
222
- toolbarButtons.push({
223
- type: 'separator'
224
- });
225
222
  }
226
223
  if (allowAdvancedToolBarOptions) {
227
224
  toolbarButtons = [].concat(_toConsumableArray(toolbarButtons), _toConsumableArray(buildLayoutButtons(state, intl, state.schema.nodes.mediaSingle, allowResizing, allowResizingInTables)));
@@ -138,7 +138,7 @@ var ImageBorder = function ImageBorder(_ref) {
138
138
  ref: popupTarget
139
139
  }, jsx(ToolbarButton, {
140
140
  className: "image-border-toolbar-dropdown",
141
- selected: enabled || isOpen,
141
+ selected: isOpen,
142
142
  "aria-label": formatMessage(messages.borderOptions),
143
143
  title: formatMessage(messages.borderOptions),
144
144
  spacing: "compact",
@@ -33,5 +33,5 @@ export var line = function line(size, selected) {
33
33
  export var toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
34
34
  var enabled = _ref.enabled,
35
35
  isOpen = _ref.isOpen;
36
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && !enabled && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
36
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: 1px;\n }\n\n &:hover {\n .image-border-toolbar-btn {\n ", "\n }\n\n .image-border-toolbar-dropdown {\n ", "\n }\n }\n"])), !enabled && " background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"), !isOpen && "background: ".concat("var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), ";"));
37
37
  };
@@ -98,8 +98,6 @@ var Editor = /*#__PURE__*/function (_React$Component) {
98
98
  if (!(editorView !== null && editorView !== void 0 && editorView.hasFocus())) {
99
99
  editorView === null || editorView === void 0 ? void 0 : editorView.focus();
100
100
  }
101
- event.preventDefault();
102
- event.stopPropagation();
103
101
  };
104
102
  return jsx(WithFlash, {
105
103
  animate: maxContentSizeReached
@@ -80,8 +80,6 @@ export var EditorToolbar = /*#__PURE__*/React.memo(function (props) {
80
80
  var _props$editorView2;
81
81
  (_props$editorView2 = props.editorView) === null || _props$editorView2 === void 0 ? void 0 : _props$editorView2.focus();
82
82
  }
83
- event.preventDefault();
84
- event.stopPropagation();
85
83
  };
86
84
  return jsx(ContextPanelConsumer, null, function (_ref) {
87
85
  var _props$featureFlags8, _props$featureFlags9, _props$featureFlags10;
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "182.1.2";
2
+ export var version = "182.1.3";
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": "182.1.2",
3
+ "version": "182.1.3",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "182.1.2",
3
+ "version": "182.1.3",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,9 +41,9 @@
41
41
  "@atlaskit/code": "^14.5.0",
42
42
  "@atlaskit/date": "^0.9.0",
43
43
  "@atlaskit/datetime-picker": "^12.3.0",
44
- "@atlaskit/editor-common": "^72.9.0",
44
+ "@atlaskit/editor-common": "^72.8.0",
45
45
  "@atlaskit/editor-json-transformer": "^8.8.0",
46
- "@atlaskit/editor-markdown-transformer": "^5.1.0",
46
+ "@atlaskit/editor-markdown-transformer": "^5.0.0",
47
47
  "@atlaskit/editor-palette": "1.3.0",
48
48
  "@atlaskit/editor-plugin-feature-flags": "^0.0.3",
49
49
  "@atlaskit/editor-plugin-table": "^1.2.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/link-analytics": "^7.0.0",
58
58
  "@atlaskit/link-picker": "^1.18.0",
59
59
  "@atlaskit/locale": "^2.3.0",
60
- "@atlaskit/logo": "^13.13.0",
60
+ "@atlaskit/logo": "^13.12.0",
61
61
  "@atlaskit/media-card": "^74.7.0",
62
62
  "@atlaskit/media-client": "^21.0.0",
63
63
  "@atlaskit/media-common": "^4.0.0",
@@ -73,7 +73,7 @@
73
73
  "@atlaskit/radio": "^5.4.0",
74
74
  "@atlaskit/section-message": "^6.3.0",
75
75
  "@atlaskit/select": "^16.1.0",
76
- "@atlaskit/smart-card": "^25.5.0",
76
+ "@atlaskit/smart-card": "^25.4.0",
77
77
  "@atlaskit/smart-user-picker": "^6.0.0",
78
78
  "@atlaskit/spinner": "^15.4.0",
79
79
  "@atlaskit/status": "^1.2.0",
@@ -154,7 +154,7 @@
154
154
  "@atlaskit/media-integration-test-helpers": "^2.6.0",
155
155
  "@atlaskit/media-test-helpers": "^32.0.0",
156
156
  "@atlaskit/menu": "^1.5.0",
157
- "@atlaskit/page-layout": "^1.4.0",
157
+ "@atlaskit/page-layout": "^1.3.0",
158
158
  "@atlaskit/profilecard": "^19.2.0",
159
159
  "@atlaskit/pubsub": "^6.2.0",
160
160
  "@atlaskit/renderer": "^107.3.0",