@atlaskit/editor-core 188.2.1 → 188.2.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,17 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 188.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#39425](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/39425) [`4c27d14af2e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4c27d14af2e) - [ED-19408] Fix issue where FocusTrap returnFocus was causing the cursor to end up at the beginning of the document when inserting elements using the element browser modal.
8
+
9
+ ## 188.2.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#41015](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41015) [`a372c39bc57`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a372c39bc57) - ED-20297 fixed nested video overlapping issue
14
+
3
15
  ## 188.2.1
4
16
 
5
17
  ### Patch Changes
@@ -504,6 +504,9 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
504
504
  // set undefined to fall back to 100%
505
505
  undefined : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
506
506
  var minWidth = this.calcMinWidth(isVideoFile, lineLength);
507
+
508
+ // while is not resizing, we take 100% as min-width if the container width is less than the min-width
509
+ var minViewWidth = isResizing ? minWidth : "min(".concat(minWidth, "px, 100%)");
507
510
  return (0, _react2.jsx)("div", {
508
511
  css: (0, _styled.wrapperStyle)({
509
512
  layout: layout,
@@ -514,7 +517,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
514
517
  isExtendedResizeExperienceOn: true
515
518
  })
516
519
  }, (0, _react2.jsx)(_resizer.ResizerNext, {
517
- minWidth: minWidth,
520
+ minWidth: minViewWidth,
518
521
  maxWidth: maxWidth,
519
522
  className: resizerNextClassName,
520
523
  snapGap: _mediaSingle.MEDIA_SINGLE_SNAP_GAP,
@@ -63,9 +63,6 @@ var InsertMenu = function InsertMenu(_ref) {
63
63
  var onInsertItem = (0, _react.useCallback)(function (item) {
64
64
  var _pluginInjectionApi$q;
65
65
  toggleVisiblity();
66
- if (!editorView.hasFocus()) {
67
- editorView.focus();
68
- }
69
66
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$q = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q === void 0 || _pluginInjectionApi$q.actions.insertItem(item)(editorView.state, editorView.dispatch);
70
67
  }, [editorView, toggleVisiblity, pluginInjectionApi]);
71
68
  var getItems = (0, _react.useCallback)(function (query, category) {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "188.2.1";
8
+ var version = exports.version = "188.2.4";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -419,6 +419,9 @@ class ResizableMediaSingleNext extends React.Component {
419
419
  // set undefined to fall back to 100%
420
420
  undefined : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
421
421
  const minWidth = this.calcMinWidth(isVideoFile, lineLength);
422
+
423
+ // while is not resizing, we take 100% as min-width if the container width is less than the min-width
424
+ const minViewWidth = isResizing ? minWidth : `min(${minWidth}px, 100%)`;
422
425
  return jsx("div", {
423
426
  css: wrapperStyle({
424
427
  layout,
@@ -429,7 +432,7 @@ class ResizableMediaSingleNext extends React.Component {
429
432
  isExtendedResizeExperienceOn: true
430
433
  })
431
434
  }, jsx(ResizerNext, {
432
- minWidth: minWidth,
435
+ minWidth: minViewWidth,
433
436
  maxWidth: maxWidth,
434
437
  className: resizerNextClassName,
435
438
  snapGap: MEDIA_SINGLE_SNAP_GAP,
@@ -44,9 +44,6 @@ const InsertMenu = ({
44
44
  const onInsertItem = useCallback(item => {
45
45
  var _pluginInjectionApi$q;
46
46
  toggleVisiblity();
47
- if (!editorView.hasFocus()) {
48
- editorView.focus();
49
- }
50
47
  pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q === void 0 ? void 0 : _pluginInjectionApi$q.actions.insertItem(item)(editorView.state, editorView.dispatch);
51
48
  }, [editorView, toggleVisiblity, pluginInjectionApi]);
52
49
  const getItems = useCallback((query, category) => {
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "188.2.1";
2
+ export const version = "188.2.4";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -498,6 +498,9 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
498
498
  // set undefined to fall back to 100%
499
499
  undefined : this.calcMaxWidth(lineLength, containerWidth, fullWidthMode);
500
500
  var minWidth = this.calcMinWidth(isVideoFile, lineLength);
501
+
502
+ // while is not resizing, we take 100% as min-width if the container width is less than the min-width
503
+ var minViewWidth = isResizing ? minWidth : "min(".concat(minWidth, "px, 100%)");
501
504
  return jsx("div", {
502
505
  css: wrapperStyle({
503
506
  layout: layout,
@@ -508,7 +511,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
508
511
  isExtendedResizeExperienceOn: true
509
512
  })
510
513
  }, jsx(ResizerNext, {
511
- minWidth: minWidth,
514
+ minWidth: minViewWidth,
512
515
  maxWidth: maxWidth,
513
516
  className: resizerNextClassName,
514
517
  snapGap: MEDIA_SINGLE_SNAP_GAP,
@@ -57,9 +57,6 @@ var InsertMenu = function InsertMenu(_ref) {
57
57
  var onInsertItem = useCallback(function (item) {
58
58
  var _pluginInjectionApi$q;
59
59
  toggleVisiblity();
60
- if (!editorView.hasFocus()) {
61
- editorView.focus();
62
- }
63
60
  pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$q = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q === void 0 || _pluginInjectionApi$q.actions.insertItem(item)(editorView.state, editorView.dispatch);
64
61
  }, [editorView, toggleVisiblity, pluginInjectionApi]);
65
62
  var getItems = useCallback(function (query, category) {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "188.2.1";
2
+ export var version = "188.2.4";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "188.2.1",
3
+ "version": "188.2.4",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -155,7 +155,7 @@
155
155
  "@af/integration-testing": "*",
156
156
  "@af/visual-regression": "*",
157
157
  "@atlaskit/code": "^14.6.0",
158
- "@atlaskit/collab-provider": "9.14.0",
158
+ "@atlaskit/collab-provider": "9.15.0",
159
159
  "@atlaskit/dropdown-menu": "^11.14.0",
160
160
  "@atlaskit/editor-extension-dropbox": "^0.4.0",
161
161
  "@atlaskit/editor-plugin-table": "^4.0.0",
@@ -169,7 +169,7 @@
169
169
  "@atlaskit/media-integration-test-helpers": "^3.0.0",
170
170
  "@atlaskit/media-test-helpers": "^33.0.0",
171
171
  "@atlaskit/menu": "^1.11.0",
172
- "@atlaskit/modal-dialog": "^12.7.0",
172
+ "@atlaskit/modal-dialog": "^12.8.0",
173
173
  "@atlaskit/platform-feature-flags": "^0.2.0",
174
174
  "@atlaskit/renderer": "^108.15.0",
175
175
  "@atlaskit/section-message": "^6.4.0",