@atlaskit/editor-core 189.4.3 → 189.4.5

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,18 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 189.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#43282](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43282) [`ea6aae16859`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ea6aae16859) - Fixed extra paragraph added on pasting codeblock and modified relevant testcases
8
+
9
+ ## 189.4.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [#42839](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42839) [`7324375d4fa`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7324375d4fa) - [ux] Cleansup feature flag `prevent-popup-overflow` so that it is permanently enabled when `lp-link-picker` flag is enabled, improving the positioning of the link picker.
14
+ - Updated dependencies
15
+
3
16
  ## 189.4.3
4
17
 
5
18
  ### Patch Changes
@@ -32,7 +32,7 @@ function getSpellCheck(featureFlags) {
32
32
  * which is used by both current and archv3 editors.
33
33
  */
34
34
  function createFeatureFlagsFromProps(props) {
35
- var _props$allowLayouts, _props$performanceTra, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17;
35
+ var _props$allowLayouts, _props$performanceTra, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15;
36
36
  var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
37
37
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
38
38
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
@@ -56,7 +56,6 @@ function createFeatureFlagsFromProps(props) {
56
56
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
57
57
  // Including fallback to props.featureFlags so that mobile feature flags
58
58
  // are included (they are not kebab cased)
59
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.restartNumberedLists) === true,
60
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17['prevent-popup-overflow']) : false)
59
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.restartNumberedLists) === true
61
60
  });
62
61
  }
@@ -866,7 +866,7 @@ function handleRichText(slice, queueCardsFromChangedTr) {
866
866
  // when cursor is inside a table cell, and slice.content.lastChild is a panel, expand, or decisionList
867
867
  // need to make sure the cursor position is is right after the panel, expand, or decisionList
868
868
  // still in the same table cell, see issue: https://product-fabric.atlassian.net/browse/ED-17862
869
- var shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 || (_slice$content$lastCh = _slice$content$lastCh.type) === null || _slice$content$lastCh === void 0 ? void 0 : _slice$content$lastCh.name) || '');
869
+ var shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList', 'codeBlock'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 || (_slice$content$lastCh = _slice$content$lastCh.type) === null || _slice$content$lastCh === void 0 ? void 0 : _slice$content$lastCh.name) || '');
870
870
  if ((0, _utils3.insideTableCell)(state) && shouldUpdateCursorPosAfterPaste) {
871
871
  var nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
872
872
  tr.setSelection(new _selection.GapCursorSelection(nextPos, _selection.Side.RIGHT));
@@ -437,7 +437,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
437
437
  slice = (0, _commands.splitParagraphs)(slice, schema);
438
438
  slice = (0, _commands.upgradeTextToLists)(slice, schema);
439
439
  if (slice.content.childCount && slice.content.lastChild.type === schema.nodes.codeBlock) {
440
- slice = new _model.Slice(slice.content.append(_model.Fragment.from(schema.nodes.paragraph.createAndFill())), slice.openStart, 1);
440
+ slice = new _model.Slice(slice.content, 0, 0);
441
441
  }
442
442
  return slice;
443
443
  },
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "189.4.3";
8
+ var version = exports.version = "189.4.5";
@@ -21,7 +21,7 @@ function getSpellCheck(featureFlags) {
21
21
  * which is used by both current and archv3 editors.
22
22
  */
23
23
  export function createFeatureFlagsFromProps(props) {
24
- var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17;
24
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15;
25
25
  const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
26
26
  return {
27
27
  ...normalizedFeatureFlags,
@@ -46,7 +46,6 @@ export function createFeatureFlagsFromProps(props) {
46
46
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
47
47
  // Including fallback to props.featureFlags so that mobile feature flags
48
48
  // are included (they are not kebab cased)
49
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.restartNumberedLists) === true,
50
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17['prevent-popup-overflow']) : false)
49
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.restartNumberedLists) === true
51
50
  };
52
51
  }
@@ -848,7 +848,7 @@ export function handleRichText(slice, queueCardsFromChangedTr) {
848
848
  // when cursor is inside a table cell, and slice.content.lastChild is a panel, expand, or decisionList
849
849
  // need to make sure the cursor position is is right after the panel, expand, or decisionList
850
850
  // still in the same table cell, see issue: https://product-fabric.atlassian.net/browse/ED-17862
851
- const shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 ? void 0 : (_slice$content$lastCh2 = _slice$content$lastCh.type) === null || _slice$content$lastCh2 === void 0 ? void 0 : _slice$content$lastCh2.name) || '');
851
+ const shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList', 'codeBlock'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 ? void 0 : (_slice$content$lastCh2 = _slice$content$lastCh.type) === null || _slice$content$lastCh2 === void 0 ? void 0 : _slice$content$lastCh2.name) || '');
852
852
  if (insideTableCell(state) && shouldUpdateCursorPosAfterPaste) {
853
853
  const nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
854
854
  tr.setSelection(new GapCursorSelection(nextPos, Side.RIGHT));
@@ -404,7 +404,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
404
404
  slice = splitParagraphs(slice, schema);
405
405
  slice = upgradeTextToLists(slice, schema);
406
406
  if (slice.content.childCount && slice.content.lastChild.type === schema.nodes.codeBlock) {
407
- slice = new Slice(slice.content.append(Fragment.from(schema.nodes.paragraph.createAndFill())), slice.openStart, 1);
407
+ slice = new Slice(slice.content, 0, 0);
408
408
  }
409
409
  return slice;
410
410
  },
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "189.4.3";
2
+ export const version = "189.4.5";
@@ -25,7 +25,7 @@ function getSpellCheck(featureFlags) {
25
25
  * which is used by both current and archv3 editors.
26
26
  */
27
27
  export function createFeatureFlagsFromProps(props) {
28
- var _props$allowLayouts, _props$performanceTra, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17;
28
+ var _props$allowLayouts, _props$performanceTra, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$collabEdit, _props$collabEdit2, _props$featureFlags15;
29
29
  var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
30
30
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
31
31
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
@@ -49,7 +49,6 @@ export function createFeatureFlagsFromProps(props) {
49
49
  disableSpellcheckByBrowser: getSpellCheck(props.featureFlags),
50
50
  // Including fallback to props.featureFlags so that mobile feature flags
51
51
  // are included (they are not kebab cased)
52
- restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.restartNumberedLists) === true,
53
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags16 = props.featureFlags) === null || _props$featureFlags16 === void 0 ? void 0 : _props$featureFlags16['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags17 = props.featureFlags) !== null && _props$featureFlags17 !== void 0 && _props$featureFlags17['prevent-popup-overflow']) : false)
52
+ restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags15 = props.featureFlags) === null || _props$featureFlags15 === void 0 ? void 0 : _props$featureFlags15.restartNumberedLists) === true
54
53
  });
55
54
  }
@@ -845,7 +845,7 @@ export function handleRichText(slice, queueCardsFromChangedTr) {
845
845
  // when cursor is inside a table cell, and slice.content.lastChild is a panel, expand, or decisionList
846
846
  // need to make sure the cursor position is is right after the panel, expand, or decisionList
847
847
  // still in the same table cell, see issue: https://product-fabric.atlassian.net/browse/ED-17862
848
- var shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 || (_slice$content$lastCh = _slice$content$lastCh.type) === null || _slice$content$lastCh === void 0 ? void 0 : _slice$content$lastCh.name) || '');
848
+ var shouldUpdateCursorPosAfterPaste = ['panel', 'nestedExpand', 'decisionList', 'codeBlock'].includes(((_slice$content$lastCh = slice.content.lastChild) === null || _slice$content$lastCh === void 0 || (_slice$content$lastCh = _slice$content$lastCh.type) === null || _slice$content$lastCh === void 0 ? void 0 : _slice$content$lastCh.name) || '');
849
849
  if (insideTableCell(state) && shouldUpdateCursorPosAfterPaste) {
850
850
  var nextPos = tr.doc.resolve(tr.mapping.map(selection.$from.pos));
851
851
  tr.setSelection(new GapCursorSelection(nextPos, Side.RIGHT));
@@ -424,7 +424,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
424
424
  slice = splitParagraphs(slice, schema);
425
425
  slice = upgradeTextToLists(slice, schema);
426
426
  if (slice.content.childCount && slice.content.lastChild.type === schema.nodes.codeBlock) {
427
- slice = new Slice(slice.content.append(Fragment.from(schema.nodes.paragraph.createAndFill())), slice.openStart, 1);
427
+ slice = new Slice(slice.content, 0, 0);
428
428
  }
429
429
  return slice;
430
430
  },
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "189.4.3";
2
+ export var version = "189.4.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "189.4.3",
3
+ "version": "189.4.5",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -121,7 +121,7 @@
121
121
  "@atlaskit/icon": "^22.0.0",
122
122
  "@atlaskit/logo": "^13.14.0",
123
123
  "@atlaskit/media-card": "^77.4.0",
124
- "@atlaskit/media-client": "^25.0.0",
124
+ "@atlaskit/media-client": "^25.1.0",
125
125
  "@atlaskit/media-common": "^11.0.0",
126
126
  "@atlaskit/mention": "^22.1.0",
127
127
  "@atlaskit/platform-feature-flags": "^0.2.0",
@@ -190,7 +190,7 @@
190
190
  "@atlaskit/webdriver-runner": "*",
191
191
  "@atlassian/adf-schema-json": "^1.0.7",
192
192
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
193
- "@atlassian/editor-extension-link-create": "^0.8.0",
193
+ "@atlassian/editor-extension-link-create": "^0.9.0",
194
194
  "@atlassian/feature-flags-test-utils": "^0.1.1",
195
195
  "@atlassian/link-picker-plugins": "^24.0.0",
196
196
  "@atlassian/search-provider": "2.4.8",