@atlaskit/editor-core 189.6.26 → 190.1.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/create-editor/feature-flags-from-props.js +2 -5
  3. package/dist/cjs/i18n/cs.js +1 -0
  4. package/dist/cjs/i18n/da.js +1 -0
  5. package/dist/cjs/i18n/de.js +1 -0
  6. package/dist/cjs/i18n/es.js +1 -0
  7. package/dist/cjs/i18n/fi.js +1 -0
  8. package/dist/cjs/i18n/fr.js +1 -0
  9. package/dist/cjs/i18n/hu.js +1 -0
  10. package/dist/cjs/i18n/it.js +1 -0
  11. package/dist/cjs/i18n/ko.js +1 -0
  12. package/dist/cjs/i18n/nb.js +1 -0
  13. package/dist/cjs/i18n/nl.js +1 -0
  14. package/dist/cjs/i18n/pl.js +1 -0
  15. package/dist/cjs/i18n/pt_BR.js +1 -0
  16. package/dist/cjs/i18n/ru.js +1 -0
  17. package/dist/cjs/i18n/sv.js +1 -0
  18. package/dist/cjs/i18n/th.js +1 -0
  19. package/dist/cjs/i18n/tr.js +1 -0
  20. package/dist/cjs/i18n/uk.js +1 -0
  21. package/dist/cjs/i18n/vi.js +1 -0
  22. package/dist/cjs/i18n/zh.js +1 -0
  23. package/dist/cjs/i18n/zh_TW.js +1 -0
  24. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +0 -6
  25. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +7 -2
  26. package/dist/cjs/plugins/annotation/pm-plugins/plugin-factory.js +43 -2
  27. package/dist/cjs/plugins/annotation/pm-plugins/reducer.js +10 -2
  28. package/dist/cjs/plugins/annotation/ui/InlineCommentView.js +4 -2
  29. package/dist/cjs/plugins/annotation/utils.js +17 -1
  30. package/dist/cjs/plugins/paste/handlers.js +1 -1
  31. package/dist/cjs/plugins/paste/pm-plugins/main.js +1 -1
  32. package/dist/cjs/presets/universal.js +1 -3
  33. package/dist/cjs/ui/Alignment/index.js +1 -0
  34. package/dist/cjs/version-wrapper.js +1 -1
  35. package/dist/es2019/create-editor/feature-flags-from-props.js +2 -5
  36. package/dist/es2019/i18n/cs.js +1 -0
  37. package/dist/es2019/i18n/da.js +1 -0
  38. package/dist/es2019/i18n/de.js +1 -0
  39. package/dist/es2019/i18n/es.js +1 -0
  40. package/dist/es2019/i18n/fi.js +1 -0
  41. package/dist/es2019/i18n/fr.js +1 -0
  42. package/dist/es2019/i18n/hu.js +1 -0
  43. package/dist/es2019/i18n/it.js +1 -0
  44. package/dist/es2019/i18n/ko.js +1 -0
  45. package/dist/es2019/i18n/nb.js +1 -0
  46. package/dist/es2019/i18n/nl.js +1 -0
  47. package/dist/es2019/i18n/pl.js +1 -0
  48. package/dist/es2019/i18n/pt_BR.js +1 -0
  49. package/dist/es2019/i18n/ru.js +1 -0
  50. package/dist/es2019/i18n/sv.js +1 -0
  51. package/dist/es2019/i18n/th.js +1 -0
  52. package/dist/es2019/i18n/tr.js +1 -0
  53. package/dist/es2019/i18n/uk.js +1 -0
  54. package/dist/es2019/i18n/vi.js +1 -0
  55. package/dist/es2019/i18n/zh.js +1 -0
  56. package/dist/es2019/i18n/zh_TW.js +1 -0
  57. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +0 -7
  58. package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +5 -2
  59. package/dist/es2019/plugins/annotation/pm-plugins/plugin-factory.js +50 -3
  60. package/dist/es2019/plugins/annotation/pm-plugins/reducer.js +15 -4
  61. package/dist/es2019/plugins/annotation/ui/InlineCommentView.js +4 -2
  62. package/dist/es2019/plugins/annotation/utils.js +10 -0
  63. package/dist/es2019/plugins/paste/handlers.js +1 -1
  64. package/dist/es2019/plugins/paste/pm-plugins/main.js +1 -1
  65. package/dist/es2019/presets/universal.js +1 -3
  66. package/dist/es2019/ui/Alignment/index.js +1 -0
  67. package/dist/es2019/version-wrapper.js +1 -1
  68. package/dist/esm/create-editor/feature-flags-from-props.js +2 -5
  69. package/dist/esm/i18n/cs.js +1 -0
  70. package/dist/esm/i18n/da.js +1 -0
  71. package/dist/esm/i18n/de.js +1 -0
  72. package/dist/esm/i18n/es.js +1 -0
  73. package/dist/esm/i18n/fi.js +1 -0
  74. package/dist/esm/i18n/fr.js +1 -0
  75. package/dist/esm/i18n/hu.js +1 -0
  76. package/dist/esm/i18n/it.js +1 -0
  77. package/dist/esm/i18n/ko.js +1 -0
  78. package/dist/esm/i18n/nb.js +1 -0
  79. package/dist/esm/i18n/nl.js +1 -0
  80. package/dist/esm/i18n/pl.js +1 -0
  81. package/dist/esm/i18n/pt_BR.js +1 -0
  82. package/dist/esm/i18n/ru.js +1 -0
  83. package/dist/esm/i18n/sv.js +1 -0
  84. package/dist/esm/i18n/th.js +1 -0
  85. package/dist/esm/i18n/tr.js +1 -0
  86. package/dist/esm/i18n/uk.js +1 -0
  87. package/dist/esm/i18n/vi.js +1 -0
  88. package/dist/esm/i18n/zh.js +1 -0
  89. package/dist/esm/i18n/zh_TW.js +1 -0
  90. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +0 -6
  91. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +7 -2
  92. package/dist/esm/plugins/annotation/pm-plugins/plugin-factory.js +44 -3
  93. package/dist/esm/plugins/annotation/pm-plugins/reducer.js +10 -2
  94. package/dist/esm/plugins/annotation/ui/InlineCommentView.js +4 -2
  95. package/dist/esm/plugins/annotation/utils.js +14 -0
  96. package/dist/esm/plugins/paste/handlers.js +1 -1
  97. package/dist/esm/plugins/paste/pm-plugins/main.js +1 -1
  98. package/dist/esm/presets/universal.js +1 -3
  99. package/dist/esm/ui/Alignment/index.js +1 -0
  100. package/dist/esm/version-wrapper.js +1 -1
  101. package/dist/types/i18n/cs.d.ts +1 -0
  102. package/dist/types/i18n/da.d.ts +1 -0
  103. package/dist/types/i18n/de.d.ts +1 -0
  104. package/dist/types/i18n/es.d.ts +1 -0
  105. package/dist/types/i18n/fi.d.ts +1 -0
  106. package/dist/types/i18n/fr.d.ts +1 -0
  107. package/dist/types/i18n/hu.d.ts +1 -0
  108. package/dist/types/i18n/it.d.ts +1 -0
  109. package/dist/types/i18n/ko.d.ts +1 -0
  110. package/dist/types/i18n/nb.d.ts +1 -0
  111. package/dist/types/i18n/nl.d.ts +1 -0
  112. package/dist/types/i18n/pl.d.ts +1 -0
  113. package/dist/types/i18n/pt_BR.d.ts +1 -0
  114. package/dist/types/i18n/ru.d.ts +1 -0
  115. package/dist/types/i18n/sv.d.ts +1 -0
  116. package/dist/types/i18n/th.d.ts +1 -0
  117. package/dist/types/i18n/tr.d.ts +1 -0
  118. package/dist/types/i18n/uk.d.ts +1 -0
  119. package/dist/types/i18n/vi.d.ts +1 -0
  120. package/dist/types/i18n/zh.d.ts +1 -0
  121. package/dist/types/i18n/zh_TW.d.ts +1 -0
  122. package/dist/types/plugins/annotation/pm-plugins/types.d.ts +1 -0
  123. package/dist/types/plugins/annotation/utils.d.ts +5 -0
  124. package/dist/types-ts4.5/i18n/cs.d.ts +1 -0
  125. package/dist/types-ts4.5/i18n/da.d.ts +1 -0
  126. package/dist/types-ts4.5/i18n/de.d.ts +1 -0
  127. package/dist/types-ts4.5/i18n/es.d.ts +1 -0
  128. package/dist/types-ts4.5/i18n/fi.d.ts +1 -0
  129. package/dist/types-ts4.5/i18n/fr.d.ts +1 -0
  130. package/dist/types-ts4.5/i18n/hu.d.ts +1 -0
  131. package/dist/types-ts4.5/i18n/it.d.ts +1 -0
  132. package/dist/types-ts4.5/i18n/ko.d.ts +1 -0
  133. package/dist/types-ts4.5/i18n/nb.d.ts +1 -0
  134. package/dist/types-ts4.5/i18n/nl.d.ts +1 -0
  135. package/dist/types-ts4.5/i18n/pl.d.ts +1 -0
  136. package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -0
  137. package/dist/types-ts4.5/i18n/ru.d.ts +1 -0
  138. package/dist/types-ts4.5/i18n/sv.d.ts +1 -0
  139. package/dist/types-ts4.5/i18n/th.d.ts +1 -0
  140. package/dist/types-ts4.5/i18n/tr.d.ts +1 -0
  141. package/dist/types-ts4.5/i18n/uk.d.ts +1 -0
  142. package/dist/types-ts4.5/i18n/vi.d.ts +1 -0
  143. package/dist/types-ts4.5/i18n/zh.d.ts +1 -0
  144. package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -0
  145. package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +1 -0
  146. package/dist/types-ts4.5/plugins/annotation/utils.d.ts +5 -0
  147. package/package.json +6 -3
@@ -6,6 +6,7 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
6
6
  import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
7
7
  import { AnnotationTypes } from '@atlaskit/adf-schema';
8
8
  import { AnnotationNodeView, getAnnotationViewClassname } from '../nodeviews';
9
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
10
  import { updateInlineCommentResolvedState, updateMouseState, clearDirtyMark, setInlineCommentsVisibility, setSelectedAnnotation, closeComponent } from '../commands';
10
11
  import { getAllAnnotations, inlineCommentPluginKey, getPluginState } from '../utils';
11
12
  import { createPluginState } from './plugin-factory';
@@ -77,6 +78,7 @@ var initialState = function initialState() {
77
78
  isSelecting: false
78
79
  },
79
80
  disallowOnWhitespace: disallowOnWhitespace,
81
+ isInlineCommentViewClosed: false,
80
82
  isVisible: true,
81
83
  skipSelectionHandling: false
82
84
  };
@@ -204,14 +206,17 @@ export var inlineCommentPlugin = function inlineCommentPlugin(options) {
204
206
  draftDecorationSet = _ref5.draftDecorationSet,
205
207
  annotations = _ref5.annotations,
206
208
  selectedAnnotations = _ref5.selectedAnnotations,
207
- isVisible = _ref5.isVisible;
209
+ isVisible = _ref5.isVisible,
210
+ isInlineCommentViewClosed = _ref5.isInlineCommentViewClosed;
208
211
  var decorations = draftDecorationSet !== null && draftDecorationSet !== void 0 ? draftDecorationSet : DecorationSet.empty;
209
212
  var focusDecorations = [];
210
213
  state.doc.descendants(function (node, pos) {
211
214
  node.marks.filter(function (mark) {
212
215
  return mark.type === state.schema.marks.annotation;
213
216
  }).forEach(function (mark) {
214
- var isSelected = !!(selectedAnnotations !== null && selectedAnnotations !== void 0 && selectedAnnotations.some(function (selectedAnnotation) {
217
+ var isSelected = getBooleanFF('platform.editor.annotation.decouple-inline-comment-closed_flmox') ? !isInlineCommentViewClosed && !!(selectedAnnotations !== null && selectedAnnotations !== void 0 && selectedAnnotations.some(function (selectedAnnotation) {
218
+ return selectedAnnotation.id === mark.attrs.id;
219
+ })) : !!(selectedAnnotations !== null && selectedAnnotations !== void 0 && selectedAnnotations.some(function (selectedAnnotation) {
215
220
  return selectedAnnotation.id === mark.attrs.id;
216
221
  }));
217
222
  var isUnresolved = !!annotations && annotations[mark.attrs.id] === false;
@@ -2,11 +2,12 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  import { pluginFactory } from '../../../utils/plugin-state-factory';
5
- import { findAnnotationsInSelection, inlineCommentPluginKey } from '../utils';
5
+ import { findAnnotationsInSelection, inlineCommentPluginKey, isSelectedAnnotationsChanged } from '../utils';
6
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
6
7
  import reducer from './reducer';
7
8
  var handleDocChanged = function handleDocChanged(tr, prevPluginState) {
8
9
  if (!tr.getMeta('replaceDocument')) {
9
- return handleSelectionChanged(tr, prevPluginState);
10
+ return getBooleanFF('platform.editor.annotation.decouple-inline-comment-closed_flmox') ? getSelectionChangedHandler(false)(tr, prevPluginState) : handleSelectionChanged(tr, prevPluginState);
10
11
  }
11
12
  return _objectSpread(_objectSpread({}, prevPluginState), {}, {
12
13
  dirtyAnnotations: true
@@ -31,8 +32,48 @@ var handleSelectionChanged = function handleSelectionChanged(tr, pluginState) {
31
32
  }
32
33
  return pluginState;
33
34
  };
35
+ var getSelectionChangedHandler = function getSelectionChangedHandler(reopenCommentView) {
36
+ return function (tr, pluginState) {
37
+ /**
38
+ * If feature flag is **OFF** we want to keep the old behavior. Note that
39
+ * reopenCommentView is not relevant here when using old behaviour.
40
+ *
41
+ * Feature flag is evaluated here rather than directly in onSelectionChanged where it is assigned
42
+ * to prevent the plugin from setting up the handler before the feature flag is evaluated.
43
+ *
44
+ * This comment / logic can be cleaned up once the feature flag is removed.
45
+ */
46
+ if (!getBooleanFF('platform.editor.annotation.decouple-inline-comment-closed_flmox')) {
47
+ return handleSelectionChanged(tr, pluginState);
48
+ }
49
+ if (pluginState.skipSelectionHandling) {
50
+ return _objectSpread(_objectSpread({}, pluginState), {}, {
51
+ skipSelectionHandling: false
52
+ }, reopenCommentView && {
53
+ isInlineCommentViewClosed: false
54
+ });
55
+ }
56
+ var selectedAnnotations = findAnnotationsInSelection(tr.selection, tr.doc);
57
+ if (selectedAnnotations.length === 0) {
58
+ return _objectSpread(_objectSpread({}, pluginState), {}, {
59
+ selectedAnnotations: selectedAnnotations,
60
+ isInlineCommentViewClosed: true
61
+ });
62
+ }
63
+ if (isSelectedAnnotationsChanged(selectedAnnotations, pluginState.selectedAnnotations)) {
64
+ return _objectSpread(_objectSpread({}, pluginState), {}, {
65
+ selectedAnnotations: selectedAnnotations
66
+ }, reopenCommentView && {
67
+ isInlineCommentViewClosed: false
68
+ });
69
+ }
70
+ return _objectSpread(_objectSpread({}, pluginState), reopenCommentView && {
71
+ isInlineCommentViewClosed: false
72
+ });
73
+ };
74
+ };
34
75
  var _pluginFactory = pluginFactory(inlineCommentPluginKey, reducer, {
35
- onSelectionChanged: handleSelectionChanged,
76
+ onSelectionChanged: getSelectionChangedHandler(true),
36
77
  onDocChanged: handleDocChanged,
37
78
  mapping: function mapping(tr, pluginState) {
38
79
  var draftDecorationSet = pluginState.draftDecorationSet,
@@ -2,9 +2,10 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
- import { ACTIONS } from './types';
6
5
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
6
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
7
7
  import { addDraftDecoration } from '../utils';
8
+ import { ACTIONS } from './types';
8
9
  export default (function (pluginState, action) {
9
10
  switch (action.type) {
10
11
  case ACTIONS.UPDATE_INLINE_COMMENT_STATE:
@@ -24,7 +25,9 @@ export default (function (pluginState, action) {
24
25
  annotations: {}
25
26
  });
26
27
  case ACTIONS.CLOSE_COMPONENT:
27
- return _objectSpread(_objectSpread({}, pluginState), {}, {
28
+ return getBooleanFF('platform.editor.annotation.decouple-inline-comment-closed_flmox') ? _objectSpread(_objectSpread({}, pluginState), {}, {
29
+ isInlineCommentViewClosed: true
30
+ }) : _objectSpread(_objectSpread({}, pluginState), {}, {
28
31
  selectedAnnotations: []
29
32
  });
30
33
  case ACTIONS.ADD_INLINE_COMMENT:
@@ -32,6 +35,8 @@ export default (function (pluginState, action) {
32
35
  return _objectSpread(_objectSpread({}, updatedPluginState), {}, {
33
36
  selectedAnnotations: [].concat(_toConsumableArray(updatedPluginState.selectedAnnotations), _toConsumableArray(action.data.selectedAnnotations)),
34
37
  annotations: _objectSpread(_objectSpread({}, pluginState.annotations), action.data.inlineComments)
38
+ }, getBooleanFF('platform.editor.annotation.decouple-inline-comment-closed_flmox') && {
39
+ isInlineCommentViewClosed: false
35
40
  });
36
41
  case ACTIONS.INLINE_COMMENT_SET_VISIBLE:
37
42
  var isVisible = action.data.isVisible;
@@ -45,6 +50,9 @@ export default (function (pluginState, action) {
45
50
  return _objectSpread(_objectSpread({}, pluginState), {}, {
46
51
  selectedAnnotations: _toConsumableArray(action.data.selectedAnnotations),
47
52
  skipSelectionHandling: true
53
+ }, getBooleanFF('platform.editor.annotation.decouple-inline-comment-closed_flmox') && {
54
+ // if selecting annotation explicitly, reopen the comment view
55
+ isInlineCommentViewClosed: false
48
56
  });
49
57
  default:
50
58
  return pluginState;
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
4
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
5
  import { AnnotationViewWrapper } from './AnnotationViewWrapper';
5
6
  import { AnnotationTestIds } from '../types';
6
7
  import { getAnnotationViewKey, getSelectionPositions, getPluginState, getAllAnnotations } from '../utils';
@@ -39,7 +40,8 @@ export function InlineCommentView(_ref) {
39
40
  var _ref2 = inlineCommentState || {},
40
41
  bookmark = _ref2.bookmark,
41
42
  selectedAnnotations = _ref2.selectedAnnotations,
42
- annotations = _ref2.annotations;
43
+ annotations = _ref2.annotations,
44
+ isInlineCommentViewClosed = _ref2.isInlineCommentViewClosed;
43
45
  var annotationsList = getAllAnnotations(editorView.state.doc);
44
46
  var selection = getSelectionPositions(state, inlineCommentState);
45
47
  var position = findPosForDOM(selection);
@@ -117,7 +119,7 @@ export function InlineCommentView(_ref) {
117
119
  };
118
120
  dispatchAnalyticsEvent(payload);
119
121
  };
120
- if (!selectedAnnotations) {
122
+ if (getBooleanFF('platform.editor.annotation.decouple-inline-comment-closed_flmox') && isInlineCommentViewClosed || !selectedAnnotations) {
121
123
  return null;
122
124
  }
123
125
  return /*#__PURE__*/React.createElement(AnnotationViewWrapper, {
@@ -328,4 +328,18 @@ function stripNonExistingAnnotationsFromNode(node, state) {
328
328
  });
329
329
  }
330
330
  return node;
331
+ }
332
+
333
+ /**
334
+ * Compares two sets of annotationInfos to see if the annotations have changed
335
+ * This function assumes annotations will have unique id's for simplicity
336
+ */
337
+ export function isSelectedAnnotationsChanged(oldSelectedAnnotations, newSelectedAnnotations) {
338
+ return newSelectedAnnotations.length !== oldSelectedAnnotations.length ||
339
+ // assuming annotations have unique id's for simplicity
340
+ newSelectedAnnotations.some(function (annotation) {
341
+ return !oldSelectedAnnotations.find(function (pluginStateAnnotation) {
342
+ return annotation.id === pluginStateAnnotation.id && annotation.type === pluginStateAnnotation.type;
343
+ });
344
+ });
331
345
  }
@@ -158,7 +158,7 @@ export function handlePasteNonNestableBlockNodesIntoList(slice) {
158
158
  var sliceContainsBlockNodesOtherThanThoseAllowedInListItem = false;
159
159
  slice.content.forEach(function (child) {
160
160
  var _listItem$spec$conten;
161
- if (child.isBlock && !((_listItem$spec$conten = listItem.spec.content) !== null && _listItem$spec$conten !== void 0 && _listItem$spec$conten.includes(child.type.name))) {
161
+ if (!listItem || child.isBlock && !((_listItem$spec$conten = listItem.spec.content) !== null && _listItem$spec$conten !== void 0 && _listItem$spec$conten.includes(child.type.name))) {
162
162
  sliceContainsBlockNodesOtherThanThoseAllowedInListItem = true;
163
163
  }
164
164
  });
@@ -397,7 +397,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
397
397
  if (handlePastePanelOrDecisionIntoListWithAnalytics(editorAnalyticsAPI)(view, event, slice, pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$l = pluginInjectionApi.list) === null || _pluginInjectionApi$l === void 0 ? void 0 : _pluginInjectionApi$l.actions.findRootParentListNode)(state, dispatch)) {
398
398
  return true;
399
399
  }
400
- if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists && handlePasteNonNestableBlockNodesIntoListWithAnalytics(editorAnalyticsAPI)(view, event, slice)(state, dispatch)) {
400
+ if (handlePasteNonNestableBlockNodesIntoListWithAnalytics(editorAnalyticsAPI)(view, event, slice)(state, dispatch)) {
401
401
  return true;
402
402
  }
403
403
  return handleRichTextWithAnalytics(view, event, slice, pluginInjectionApi)(state, dispatch);
@@ -87,9 +87,7 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
87
87
  return builder.add([plugin, props.allowTextColor]);
88
88
  }
89
89
  return builder;
90
- }).add([listPlugin, {
91
- restartNumberedLists: featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.restartNumberedLists
92
- }]).maybeAdd(rulePlugin, function (plugin, builder) {
90
+ }).add(listPlugin).maybeAdd(rulePlugin, function (plugin, builder) {
93
91
  if (props.allowRule) {
94
92
  return builder.add(plugin);
95
93
  }
@@ -41,6 +41,7 @@ var Alignment = /*#__PURE__*/function (_PureComponent) {
41
41
  className = _this$props.className,
42
42
  intl = _this$props.intl;
43
43
  return jsx("div", {
44
+ "data-testid": "alignment-buttons",
44
45
  css: alignmentWrapper,
45
46
  className: className
46
47
  }, alignmentOptions.map(function (alignment) {
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "189.6.26";
2
+ export var version = "190.1.0";
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -72,6 +72,7 @@ export type InlineCommentPluginState = {
72
72
  draftDecorationSet?: DecorationSet;
73
73
  bookmark?: SelectionBookmark;
74
74
  disallowOnWhitespace: boolean;
75
+ isInlineCommentViewClosed: boolean;
75
76
  isVisible: boolean;
76
77
  skipSelectionHandling: boolean;
77
78
  };
@@ -38,3 +38,8 @@ export declare const hasInvalidNodes: (state: EditorState) => boolean;
38
38
  export declare function hasInvalidWhitespaceNode(selection: TextSelection | AllSelection, schema: Schema): boolean;
39
39
  export declare function annotationExists(annotationId: string, state: EditorState): boolean;
40
40
  export declare function stripNonExistingAnnotations(slice: Slice, state: EditorState): false | undefined;
41
+ /**
42
+ * Compares two sets of annotationInfos to see if the annotations have changed
43
+ * This function assumes annotations will have unique id's for simplicity
44
+ */
45
+ export declare function isSelectedAnnotationsChanged(oldSelectedAnnotations: AnnotationInfo[], newSelectedAnnotations: AnnotationInfo[]): boolean;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;
@@ -25,6 +25,7 @@ declare const _default: {
25
25
  'fabric.editor.configPanel.fieldTypeError.isMultipleAndRadio': string;
26
26
  'fabric.editor.configPanel.formType.addField': string;
27
27
  'fabric.editor.configPanel.formType.removeField': string;
28
+ 'fabric.editor.configPanel.help': string;
28
29
  'fabric.editor.configPanel.invalid': string;
29
30
  'fabric.editor.configPanel.required': string;
30
31
  'fabric.editor.configPanel.submit': string;