@atlaskit/editor-core 184.0.4 → 185.0.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 (189) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/cjs/create-editor/feature-flags-from-props.js +1 -2
  3. package/dist/cjs/editor-next/index.js +41 -34
  4. package/dist/cjs/editor.js +30 -269
  5. package/dist/cjs/i18n/en_ZZ.js +32 -6
  6. package/dist/cjs/index.js +0 -7
  7. package/dist/cjs/labs/next/presets/default.js +2 -1
  8. package/dist/cjs/plugins/base/index.js +0 -12
  9. package/dist/cjs/plugins/card/nodeviews/blockCard.js +7 -0
  10. package/dist/cjs/plugins/card/nodeviews/embedCard.js +7 -0
  11. package/dist/cjs/plugins/card/nodeviews/inlineCard.js +5 -1
  12. package/dist/cjs/plugins/card/pm-plugins/doc.js +1 -2
  13. package/dist/cjs/plugins/card/toolbar.js +11 -9
  14. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +4 -4
  15. package/dist/cjs/plugins/code-block/index.js +7 -5
  16. package/dist/cjs/plugins/code-block/toolbar.js +5 -5
  17. package/dist/cjs/plugins/copy-button/commands.js +2 -3
  18. package/dist/cjs/plugins/copy-button/toolbar.js +7 -8
  19. package/dist/cjs/plugins/expand/index.js +1 -1
  20. package/dist/cjs/plugins/expand/toolbar.js +40 -39
  21. package/dist/cjs/plugins/extension/index.js +1 -1
  22. package/dist/cjs/plugins/extension/toolbar.js +5 -5
  23. package/dist/cjs/plugins/floating-toolbar/index.js +3 -2
  24. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  25. package/dist/cjs/plugins/layout/index.js +8 -4
  26. package/dist/cjs/plugins/layout/toolbar.js +5 -6
  27. package/dist/cjs/plugins/media/toolbar/index.js +31 -24
  28. package/dist/cjs/plugins/panel/index.js +2 -1
  29. package/dist/cjs/plugins/panel/toolbar.js +7 -7
  30. package/dist/cjs/plugins/placeholder-text/index.js +7 -5
  31. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +19 -0
  32. package/dist/cjs/ui/CollapsedEditor/index.js +1 -2
  33. package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  34. package/dist/cjs/version-wrapper.js +1 -1
  35. package/dist/cjs/version.json +1 -1
  36. package/dist/es2019/create-editor/feature-flags-from-props.js +1 -2
  37. package/dist/es2019/editor-next/index.js +39 -30
  38. package/dist/es2019/editor.js +29 -232
  39. package/dist/es2019/i18n/en_ZZ.js +32 -6
  40. package/dist/es2019/index.js +1 -2
  41. package/dist/es2019/labs/next/presets/default.js +2 -1
  42. package/dist/es2019/plugins/base/index.js +0 -7
  43. package/dist/es2019/plugins/card/nodeviews/blockCard.js +8 -0
  44. package/dist/es2019/plugins/card/nodeviews/embedCard.js +8 -0
  45. package/dist/es2019/plugins/card/nodeviews/inlineCard.js +5 -1
  46. package/dist/es2019/plugins/card/pm-plugins/doc.js +1 -2
  47. package/dist/es2019/plugins/card/toolbar.js +8 -6
  48. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +2 -2
  49. package/dist/es2019/plugins/code-block/index.js +7 -5
  50. package/dist/es2019/plugins/code-block/toolbar.js +5 -6
  51. package/dist/es2019/plugins/copy-button/commands.js +2 -3
  52. package/dist/es2019/plugins/copy-button/toolbar.js +7 -8
  53. package/dist/es2019/plugins/expand/index.js +1 -1
  54. package/dist/es2019/plugins/expand/toolbar.js +5 -6
  55. package/dist/es2019/plugins/extension/index.js +1 -1
  56. package/dist/es2019/plugins/extension/toolbar.js +5 -6
  57. package/dist/es2019/plugins/floating-toolbar/index.js +3 -2
  58. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  59. package/dist/es2019/plugins/layout/index.js +8 -5
  60. package/dist/es2019/plugins/layout/toolbar.js +5 -6
  61. package/dist/es2019/plugins/media/toolbar/index.js +35 -24
  62. package/dist/es2019/plugins/panel/index.js +2 -2
  63. package/dist/es2019/plugins/panel/toolbar.js +7 -8
  64. package/dist/es2019/plugins/placeholder-text/index.js +7 -5
  65. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +21 -0
  66. package/dist/es2019/ui/CollapsedEditor/index.js +1 -2
  67. package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  68. package/dist/es2019/version-wrapper.js +1 -1
  69. package/dist/es2019/version.json +1 -1
  70. package/dist/esm/create-editor/feature-flags-from-props.js +1 -2
  71. package/dist/esm/editor-next/index.js +42 -33
  72. package/dist/esm/editor.js +29 -270
  73. package/dist/esm/i18n/en_ZZ.js +32 -6
  74. package/dist/esm/index.js +1 -2
  75. package/dist/esm/labs/next/presets/default.js +2 -1
  76. package/dist/esm/plugins/base/index.js +0 -9
  77. package/dist/esm/plugins/card/nodeviews/blockCard.js +7 -0
  78. package/dist/esm/plugins/card/nodeviews/embedCard.js +7 -0
  79. package/dist/esm/plugins/card/nodeviews/inlineCard.js +5 -1
  80. package/dist/esm/plugins/card/pm-plugins/doc.js +1 -2
  81. package/dist/esm/plugins/card/toolbar.js +7 -6
  82. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +2 -2
  83. package/dist/esm/plugins/code-block/index.js +7 -5
  84. package/dist/esm/plugins/code-block/toolbar.js +5 -5
  85. package/dist/esm/plugins/copy-button/commands.js +2 -3
  86. package/dist/esm/plugins/copy-button/toolbar.js +7 -8
  87. package/dist/esm/plugins/expand/index.js +1 -1
  88. package/dist/esm/plugins/expand/toolbar.js +40 -39
  89. package/dist/esm/plugins/extension/index.js +1 -1
  90. package/dist/esm/plugins/extension/toolbar.js +5 -5
  91. package/dist/esm/plugins/floating-toolbar/index.js +3 -2
  92. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +2 -4
  93. package/dist/esm/plugins/layout/index.js +8 -4
  94. package/dist/esm/plugins/layout/toolbar.js +5 -6
  95. package/dist/esm/plugins/media/toolbar/index.js +31 -24
  96. package/dist/esm/plugins/panel/index.js +2 -1
  97. package/dist/esm/plugins/panel/toolbar.js +7 -7
  98. package/dist/esm/plugins/placeholder-text/index.js +7 -5
  99. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +19 -0
  100. package/dist/esm/ui/CollapsedEditor/index.js +1 -2
  101. package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +5 -3
  102. package/dist/esm/version-wrapper.js +1 -1
  103. package/dist/esm/version.json +1 -1
  104. package/dist/types/editor-next/index.d.ts +0 -6
  105. package/dist/types/editor.d.ts +1 -137
  106. package/dist/types/i18n/en_ZZ.d.ts +28 -2
  107. package/dist/types/index.d.ts +0 -1
  108. package/dist/types/labs/next/presets/cxhtml.d.ts +106 -0
  109. package/dist/types/labs/next/presets/default.d.ts +212 -0
  110. package/dist/types/labs/next/presets/mobile.d.ts +106 -0
  111. package/dist/types/plugins/base/index.d.ts +0 -4
  112. package/dist/types/plugins/card/index.d.ts +2 -2
  113. package/dist/types/plugins/card/nodeviews/blockCard.d.ts +3 -0
  114. package/dist/types/plugins/card/nodeviews/embedCard.d.ts +3 -0
  115. package/dist/types/plugins/card/nodeviews/inlineCard.d.ts +1 -0
  116. package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -1
  117. package/dist/types/plugins/card/pm-plugins/keymap.d.ts +1 -1
  118. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -2
  119. package/dist/types/plugins/card/toolbar.d.ts +1 -2
  120. package/dist/types/plugins/card/types.d.ts +1 -1
  121. package/dist/types/plugins/card/ui/EditLinkToolbar.d.ts +1 -2
  122. package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +1 -1
  123. package/dist/types/plugins/card/ui/types.d.ts +1 -1
  124. package/dist/types/plugins/code-block/index.d.ts +7 -1
  125. package/dist/types/plugins/code-block/toolbar.d.ts +2 -1
  126. package/dist/types/plugins/copy-button/commands.d.ts +2 -1
  127. package/dist/types/plugins/copy-button/toolbar.d.ts +3 -2
  128. package/dist/types/plugins/expand/index.d.ts +2 -1
  129. package/dist/types/plugins/expand/toolbar.d.ts +2 -1
  130. package/dist/types/plugins/extension/index.d.ts +7 -2
  131. package/dist/types/plugins/extension/toolbar.d.ts +2 -1
  132. package/dist/types/plugins/floating-toolbar/index.d.ts +2 -1
  133. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
  134. package/dist/types/plugins/layout/index.d.ts +7 -1
  135. package/dist/types/plugins/layout/toolbar.d.ts +2 -1
  136. package/dist/types/plugins/media/index.d.ts +3 -1
  137. package/dist/types/plugins/panel/index.d.ts +2 -0
  138. package/dist/types/plugins/panel/toolbar.d.ts +3 -2
  139. package/dist/types/plugins/placeholder-text/index.d.ts +3 -1
  140. package/dist/types/ui/CollapsedEditor/index.d.ts +1 -2
  141. package/dist/types-ts4.5/editor-next/index.d.ts +0 -6
  142. package/dist/types-ts4.5/editor.d.ts +1 -137
  143. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +28 -2
  144. package/dist/types-ts4.5/index.d.ts +0 -1
  145. package/dist/types-ts4.5/labs/next/presets/cxhtml.d.ts +122 -0
  146. package/dist/types-ts4.5/labs/next/presets/default.d.ts +244 -0
  147. package/dist/types-ts4.5/labs/next/presets/mobile.d.ts +122 -0
  148. package/dist/types-ts4.5/plugins/base/index.d.ts +0 -4
  149. package/dist/types-ts4.5/plugins/card/index.d.ts +2 -2
  150. package/dist/types-ts4.5/plugins/card/nodeviews/blockCard.d.ts +3 -0
  151. package/dist/types-ts4.5/plugins/card/nodeviews/embedCard.d.ts +3 -0
  152. package/dist/types-ts4.5/plugins/card/nodeviews/inlineCard.d.ts +1 -0
  153. package/dist/types-ts4.5/plugins/card/pm-plugins/doc.d.ts +1 -1
  154. package/dist/types-ts4.5/plugins/card/pm-plugins/keymap.d.ts +1 -1
  155. package/dist/types-ts4.5/plugins/card/pm-plugins/main.d.ts +1 -2
  156. package/dist/types-ts4.5/plugins/card/toolbar.d.ts +1 -2
  157. package/dist/types-ts4.5/plugins/card/types.d.ts +1 -1
  158. package/dist/types-ts4.5/plugins/card/ui/EditLinkToolbar.d.ts +1 -2
  159. package/dist/types-ts4.5/plugins/card/ui/link-toolbar-button-group-options.d.ts +1 -1
  160. package/dist/types-ts4.5/plugins/card/ui/types.d.ts +1 -1
  161. package/dist/types-ts4.5/plugins/code-block/index.d.ts +7 -1
  162. package/dist/types-ts4.5/plugins/code-block/toolbar.d.ts +2 -1
  163. package/dist/types-ts4.5/plugins/copy-button/commands.d.ts +2 -1
  164. package/dist/types-ts4.5/plugins/copy-button/toolbar.d.ts +3 -2
  165. package/dist/types-ts4.5/plugins/expand/index.d.ts +3 -1
  166. package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +2 -1
  167. package/dist/types-ts4.5/plugins/extension/index.d.ts +4 -2
  168. package/dist/types-ts4.5/plugins/extension/toolbar.d.ts +2 -1
  169. package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +3 -1
  170. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
  171. package/dist/types-ts4.5/plugins/layout/index.d.ts +7 -1
  172. package/dist/types-ts4.5/plugins/layout/toolbar.d.ts +2 -1
  173. package/dist/types-ts4.5/plugins/media/index.d.ts +3 -1
  174. package/dist/types-ts4.5/plugins/panel/index.d.ts +4 -0
  175. package/dist/types-ts4.5/plugins/panel/toolbar.d.ts +3 -2
  176. package/dist/types-ts4.5/plugins/placeholder-text/index.d.ts +5 -1
  177. package/dist/types-ts4.5/ui/CollapsedEditor/index.d.ts +1 -2
  178. package/package.json +13 -8
  179. package/report.api.md +5 -93
  180. package/dist/cjs/editor-next/editor-migration-component.js +0 -54
  181. package/dist/cjs/plugins/base/pm-plugins/decoration.js +0 -122
  182. package/dist/es2019/editor-next/editor-migration-component.js +0 -30
  183. package/dist/es2019/plugins/base/pm-plugins/decoration.js +0 -111
  184. package/dist/esm/editor-next/editor-migration-component.js +0 -47
  185. package/dist/esm/plugins/base/pm-plugins/decoration.js +0 -113
  186. package/dist/types/editor-next/editor-migration-component.d.ts +0 -6
  187. package/dist/types/plugins/base/pm-plugins/decoration.d.ts +0 -24
  188. package/dist/types-ts4.5/editor-next/editor-migration-component.d.ts +0 -6
  189. package/dist/types-ts4.5/plugins/base/pm-plugins/decoration.d.ts +0 -24
@@ -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$featureFlags, _ref, _props$featureFlags$u, _props$featureFlags2, _props$featureFlags3, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags4, _props$featureFlags5, _props$allowTables, _props$featureFlags6, _props$featureFlags7, _props$allowTables2, _props$featureFlags8, _props$featureFlags9, _props$allowTables3, _props$featureFlags10, _props$featureFlags11, _props$allowTables4, _props$allowTables5, _props$featureFlags12, _props$featureFlags13, _props$allowTables6, _props$allowExtension, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$collabEdit, _props$collabEdit2, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42, _props$featureFlags43, _props$featureFlags44, _props$featureFlags45, _props$featureFlags46, _props$featureFlags47;
24
+ var _props$featureFlags, _ref, _props$featureFlags$u, _props$featureFlags2, _props$featureFlags3, _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$featureFlags4, _props$featureFlags5, _props$allowTables, _props$featureFlags6, _props$featureFlags7, _props$allowTables2, _props$featureFlags8, _props$featureFlags9, _props$allowTables3, _props$featureFlags10, _props$featureFlags11, _props$allowTables4, _props$allowTables5, _props$featureFlags12, _props$featureFlags13, _props$allowTables6, _props$allowExtension, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29, _props$featureFlags30, _props$featureFlags31, _props$collabEdit, _props$collabEdit2, _props$featureFlags32, _props$featureFlags33, _props$featureFlags34, _props$featureFlags35, _props$featureFlags36, _props$featureFlags37, _props$featureFlags38, _props$featureFlags39, _props$featureFlags40, _props$featureFlags41, _props$featureFlags42, _props$featureFlags43, _props$featureFlags44, _props$featureFlags45, _props$featureFlags46;
25
25
  const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
26
26
  const tableCellOptionsInFloatingToolbar = normalizedFeatureFlags.tableCellOptionsInFloatingToolbar || ((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableCellOptionsInFloatingToolbar) || undefined;
27
27
 
@@ -69,7 +69,6 @@ export function createFeatureFlagsFromProps(props) {
69
69
  useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags43 = props.featureFlags) === null || _props$featureFlags43 === void 0 ? void 0 : _props$featureFlags43.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags44 = props.featureFlags) !== null && _props$featureFlags44 !== void 0 && _props$featureFlags44.useSomewhatSemanticTextColorNames) : false)),
70
70
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
71
71
  preventPopupOverflow: Boolean(typeof ((_props$featureFlags45 = props.featureFlags) === null || _props$featureFlags45 === void 0 ? void 0 : _props$featureFlags45['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags46 = props.featureFlags) !== null && _props$featureFlags46 !== void 0 && _props$featureFlags46['prevent-popup-overflow']) : false),
72
- useEditorNext: normalizedFeatureFlags.useEditorNext === true || ((_props$featureFlags47 = props.featureFlags) === null || _props$featureFlags47 === void 0 ? void 0 : _props$featureFlags47.useEditorNext) === true,
73
72
  // duplicated logic from `create-plugins-list.ts` due to presets not being finalised
74
73
  useBetterTypeaheadNavigation: Boolean(typeof pseudoNormalisedUseBetterTypeaheadNavigation === 'boolean' ? !!pseudoNormalisedUseBetterTypeaheadNavigation : true)
75
74
  };
@@ -2,13 +2,14 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /** @jsx jsx */
3
3
 
4
4
  import { WithCreateAnalyticsEvent } from '@atlaskit/editor-common/ui';
5
- import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
5
+ // import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
6
6
  import { jsx } from '@emotion/react';
7
7
  import PropTypes from 'prop-types';
8
8
  import React from 'react';
9
- import { name, version } from '../version-wrapper';
10
- import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
11
- import uuid from 'uuid/v4';
9
+ // import { name, version } from '../version-wrapper';
10
+
11
+ // import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
12
+ // import uuid from 'uuid/v4';
12
13
  import EditorActions from '../actions';
13
14
  import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
14
15
  import EditorInternal from './editor-internal';
@@ -19,6 +20,8 @@ import deprecationWarnings from './utils/deprecationWarnings';
19
20
  import { createFeatureFlagsFromProps } from '../create-editor/feature-flags-from-props';
20
21
  import { basePlugin } from '../plugins';
21
22
  export default class EditorNext extends React.Component {
23
+ // private editorSessionId: string;
24
+
22
25
  constructor(props, context) {
23
26
  super(props);
24
27
  _defineProperty(this, "handleSave", view => {
@@ -32,7 +35,7 @@ export default class EditorNext extends React.Component {
32
35
  _defineProperty(this, "getExperienceStore", () => this.experienceStore);
33
36
  deprecationWarnings(props);
34
37
  this.editorActions = (context || {}).editorActions || new EditorActions();
35
- this.editorSessionId = uuid();
38
+ // this.editorSessionId = uuid();
36
39
  this.startTime = performance.now();
37
40
  this.onEditorCreated = this.onEditorCreated.bind(this);
38
41
  this.onEditorDestroyed = this.onEditorDestroyed.bind(this);
@@ -54,34 +57,40 @@ export default class EditorNext extends React.Component {
54
57
  this.editorActions._privateUnregisterEditor();
55
58
  }
56
59
  render() {
57
- return jsx(FabricEditorAnalyticsContext, {
58
- data: {
59
- packageName: name,
60
- packageVersion: version,
61
- componentName: 'editorCore',
62
- appearance: getAnalyticsAppearance(this.props.appearance),
63
- editorSessionId: this.editorSessionId
64
- }
65
- }, jsx(WithCreateAnalyticsEvent, {
66
- render: createAnalyticsEvent => (this.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
67
- props: this.props,
68
- handleAnalyticsEvent: this.handleAnalyticsEvent,
69
- createAnalyticsEvent: this.createAnalyticsEvent,
70
- preset: this.props.preset,
71
- handleSave: this.handleSave,
72
- editorActions: this.editorActions,
73
- getExperienceStore: this.getExperienceStore,
74
- onEditorCreated: this.onEditorCreated,
75
- onEditorDestroyed: this.onEditorDestroyed
60
+ // TODO: https://product-fabric.atlassian.net/browse/ED-16979
61
+ // Move `FabricEditorAnalyticsContext` back into `EditorNext`
62
+ // This was moved out here to workaround the issue that the analytics
63
+ // context does not wrap the Preset (and therefore does not pass this context
64
+ // information to analytics calls within plugins). After this cleanup task ^ we will
65
+ // not have to generate the `createAnalyticsEvent` outside the Preset
66
+ // and we can move this back into `EditorNext`.
67
+ return (
68
+ // <FabricEditorAnalyticsContext
69
+ // data={{
70
+ // packageName: name,
71
+ // packageVersion: version,
72
+ // componentName: 'editorCore',
73
+ // appearance: getAnalyticsAppearance(this.props.appearance),
74
+ // editorSessionId: this.editorSessionId,
75
+ // }}
76
+ // >
77
+ jsx(WithCreateAnalyticsEvent, {
78
+ render: createAnalyticsEvent => (this.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
79
+ props: this.props,
80
+ handleAnalyticsEvent: this.handleAnalyticsEvent,
81
+ createAnalyticsEvent: this.createAnalyticsEvent,
82
+ preset: this.props.preset,
83
+ handleSave: this.handleSave,
84
+ editorActions: this.editorActions,
85
+ getExperienceStore: this.getExperienceStore,
86
+ onEditorCreated: this.onEditorCreated,
87
+ onEditorDestroyed: this.onEditorDestroyed
88
+ })
76
89
  })
77
- }));
90
+ // </FabricEditorAnalyticsContext>
91
+ );
78
92
  }
79
93
  }
80
- /**
81
- * WARNING: Code should be shared between Editor + EditorNext
82
- * If you are making changes that affect both, consider making them
83
- * in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
84
- */
85
94
  _defineProperty(EditorNext, "defaultProps", defaultProps);
86
95
  _defineProperty(EditorNext, "contextTypes", {
87
96
  editorActions: PropTypes.object
@@ -1,222 +1,38 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _extends from "@babel/runtime/helpers/extends";
2
3
  /** @jsx jsx */
3
4
  import { jsx } from '@emotion/react';
4
- import PropTypes from 'prop-types';
5
5
  import React from 'react';
6
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import { WithCreateAnalyticsEvent } from '@atlaskit/editor-common/ui';
8
- import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
9
- import { name, version } from './version-wrapper';
6
+ import { defaultProps } from './editor-next/utils/editorPropTypes';
7
+ import EditorNext from './editor-next';
8
+ import useUniversalPreset from './labs/next/presets/useUniversalPreset';
10
9
  import { FabricEditorAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
10
+ import { name, version } from './version-wrapper';
11
+ import { getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
11
12
  import uuid from 'uuid/v4';
12
- import EditorActions from './actions';
13
- import { EditorInternalWithoutHooks as EditorInternal } from './editor-next/editor-internal';
14
- import { defaultProps, propTypes } from './editor-next/utils/editorPropTypes';
15
- import trackEditorActions from './editor-next/utils/trackEditorActions';
16
- import onEditorCreated from './editor-next/utils/onEditorCreated';
17
- import deprecationWarnings from './editor-next/utils/deprecationWarnings';
18
- import { createFeatureFlagsFromProps } from './create-editor/feature-flags-from-props';
19
- import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics';
20
- import prepareQuickInsertProvider from './utils/prepare-quick-insert-provider';
21
- import prepareExtensionProvider from './utils/prepare-extension-provider';
22
- import handleProviders from './editor-next/utils/handleProviders';
23
- import getProvidersFromEditorProps from './editor-next/utils/getProvidersFromEditorProps';
24
- import { startMeasure, clearMeasure, stopMeasure, measureTTI } from '@atlaskit/editor-common/utils';
25
- import measurements from './utils/performance/measure-enum';
26
- import editorMeasureTTICallback from './editor-next/utils/editorMeasureTTICallback';
27
- import { ACTION } from '@atlaskit/editor-common/analytics';
28
- import sendDurationAnalytics from './editor-next/utils/sendDurationAnalytics';
29
- import { createPreset } from './create-editor/create-plugins-list';
30
- import { shouldRecreatePreset } from './create-editor/preset-utils';
13
+ const EditorNextWrapper = ({
14
+ props
15
+ }) => {
16
+ const preset = useUniversalPreset({
17
+ props
18
+ });
19
+ return jsx(EditorNext, _extends({
20
+ preset: preset
21
+ }, props));
22
+ };
31
23
  export default class Editor extends React.Component {
32
- constructor(props, context) {
33
- var _props$performanceTra, _props$performanceTra2, _props$featureFlags;
34
- super(props);
35
- /**
36
- * @private
37
- * @deprecated - Do not override this at all, this is an antipattern.
38
- * Please reach out to the Editor team if you were previously using this
39
- * and need to find a workaround.
40
- */
41
- _defineProperty(this, "prepareExtensionProvider", prepareExtensionProvider(() => this.editorActions));
42
- /**
43
- * @private
44
- * @deprecated - Do not override this at all, this is an antipattern.
45
- * Please reach out to the Editor team if you were previously using this
46
- * and need to find a workaround.
47
- */
48
- _defineProperty(this, "prepareQuickInsertProvider", (extensionProvider, quickInsert) => {
49
- return prepareQuickInsertProvider(this.editorActions, extensionProvider, quickInsert, this.createAnalyticsEvent);
50
- });
51
- /**
52
- * @private
53
- * @deprecated - Do not override this at all, this is an antipattern.
54
- * Please reach out to the Editor team if you were previously using this
55
- * and need to find a workaround.
56
- */
57
- _defineProperty(this, "handleSave", view => {
58
- var _this$props$onSave, _this$props;
59
- return (_this$props$onSave = (_this$props = this.props).onSave) === null || _this$props$onSave === void 0 ? void 0 : _this$props$onSave.call(_this$props, view);
60
- });
61
- /**
62
- * @private
63
- * @deprecated - Do not override this at all, this is an antipattern.
64
- * Please reach out to the Editor team if you were previously using this
65
- * and need to find a workaround.
66
- */
67
- _defineProperty(this, "handleAnalyticsEvent", data => fireAnalyticsEvent(this.createAnalyticsEvent)(data));
68
- _defineProperty(this, "getFeatureFlags", () => {
69
- return createFeatureFlagsFromProps(this.props);
70
- });
71
- _defineProperty(this, "getExperienceStore", () => this.experienceStore);
72
- this.providerFactory = new ProviderFactory();
73
- deprecationWarnings(props);
74
- this.editorActions = (context || {}).editorActions || new EditorActions();
75
- this.editorSessionId = uuid();
76
- this.startTime = performance.now();
77
- this.onEditorCreated = this.onEditorCreated.bind(this);
78
- this.onEditorDestroyed = this.onEditorDestroyed.bind(this);
79
- this.getExperienceStore = this.getExperienceStore.bind(this);
80
- this.trackEditorActions(this.editorActions, props);
81
-
82
- /**
83
- * Consider any changes here to corresponding file for `EditorNext` in
84
- * `useEditorConstructor` (editor-next/hooks/useEditorMeasuresConstructor.ts)
85
- */
86
- startMeasure(measurements.EDITOR_MOUNTED);
87
- if ((_props$performanceTra = props.performanceTracking) !== null && _props$performanceTra !== void 0 && (_props$performanceTra2 = _props$performanceTra.ttiTracking) !== null && _props$performanceTra2 !== void 0 && _props$performanceTra2.enabled || (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.ufo) {
88
- var _props$performanceTra3, _props$performanceTra4, _props$performanceTra5, _props$performanceTra6;
89
- measureTTI((tti, ttiFromInvocation, canceled) => {
90
- editorMeasureTTICallback(tti, ttiFromInvocation, canceled, this.props.performanceTracking, this.props.featureFlags, this.createAnalyticsEvent, this.experienceStore);
91
- }, (_props$performanceTra3 = props.performanceTracking) === null || _props$performanceTra3 === void 0 ? void 0 : (_props$performanceTra4 = _props$performanceTra3.ttiTracking) === null || _props$performanceTra4 === void 0 ? void 0 : _props$performanceTra4.ttiIdleThreshold, (_props$performanceTra5 = props.performanceTracking) === null || _props$performanceTra5 === void 0 ? void 0 : (_props$performanceTra6 = _props$performanceTra5.ttiTracking) === null || _props$performanceTra6 === void 0 ? void 0 : _props$performanceTra6.ttiCancelTimeout);
92
- }
93
-
94
- /**
95
- * Consider any changes here to corresponding file for `EditorNext` in
96
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts)
97
- */
98
- const _extensionProvider = this.prepareExtensionProvider(props.extensionProviders);
99
- const quickInsertProvider = this.prepareQuickInsertProvider(_extensionProvider, props.quickInsert);
100
- const preset = createPreset(props, undefined, this.createAnalyticsEvent);
101
- this.state = {
102
- extensionProvider: _extensionProvider,
103
- quickInsertProvider,
104
- preset
105
- };
106
- }
107
-
108
- /**
109
- * Consider any changes here to corresponding file for `EditorNext` in
110
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts) and
111
- * `useMeasureEditorMountTime` (editor-next/hooks/useMeasureEditorMountTime.ts)
112
- */
113
- componentDidMount() {
114
- stopMeasure(measurements.EDITOR_MOUNTED, sendDurationAnalytics(ACTION.EDITOR_MOUNTED, this.props, this.getExperienceStore, this.createAnalyticsEvent));
115
- handleProviders(this.providerFactory, getProvidersFromEditorProps(this.props), this.state.extensionProvider, this.state.quickInsertProvider);
116
- }
117
-
118
- /**
119
- * Consider any changes here to corresponding file for `EditorNext` in
120
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts)
121
- */
122
- componentDidUpdate(prevProps) {
123
- const needsANewPreset = shouldRecreatePreset(prevProps, this.props);
124
- const preset = needsANewPreset ? createPreset(this.props, prevProps, this.createAnalyticsEvent) : this.state.preset;
125
- const {
126
- extensionProviders,
127
- quickInsert
128
- } = this.props;
129
- if (extensionProviders && extensionProviders !== prevProps.extensionProviders ||
130
- // Though this will introduce some performance regression related to quick insert
131
- // loading but we can remove it soon when Forge will move to new API.
132
- // quickInsert={Promise.resolve(consumerQuickInsert)} is one of the main reason behind this performance issue.
133
- quickInsert && quickInsert !== prevProps.quickInsert) {
134
- const extensionProvider = this.prepareExtensionProvider(extensionProviders);
135
- const quickInsertProvider = this.prepareQuickInsertProvider(extensionProvider, quickInsert);
136
- this.setState({
137
- extensionProvider,
138
- quickInsertProvider,
139
- preset
140
- }, () => handleProviders(this.providerFactory, getProvidersFromEditorProps(this.props), this.state.extensionProvider, this.state.quickInsertProvider));
141
- return;
142
- }
143
- if (needsANewPreset) {
144
- this.setState({
145
- preset
146
- });
147
- return;
148
- }
149
- handleProviders(this.providerFactory, getProvidersFromEditorProps(this.props), this.state.extensionProvider, this.state.quickInsertProvider);
150
- }
151
-
152
- /**
153
- * Consider any changes here to corresponding file for `EditorNext` in
154
- * `useProviderFactory` (editor-next/hooks/useProviderFactory.ts) and
155
- * `useMeasureEditorMountTime` (editor-next/hooks/useMeasureEditorMountTime.ts)
156
- */
157
- componentWillUnmount() {
158
- var _this$props2, _this$props2$performa, _this$props2$performa2, _this$props$featureFl;
159
- this.unregisterEditorFromActions();
160
- this.providerFactory.destroy();
161
- clearMeasure(measurements.EDITOR_MOUNTED);
162
- ((_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$performa = _this$props2.performanceTracking) === null || _this$props2$performa === void 0 ? void 0 : (_this$props2$performa2 = _this$props2$performa.onEditorReadyCallbackTracking) === null || _this$props2$performa2 === void 0 ? void 0 : _this$props2$performa2.enabled) && clearMeasure(measurements.ON_EDITOR_READY_CALLBACK);
163
- if ((_this$props$featureFl = this.props.featureFlags) !== null && _this$props$featureFl !== void 0 && _this$props$featureFl.ufo) {
164
- var _this$experienceStore;
165
- (_this$experienceStore = this.experienceStore) === null || _this$experienceStore === void 0 ? void 0 : _this$experienceStore.abortAll({
166
- reason: 'editor component unmounted'
167
- });
168
- }
169
- }
170
-
171
- /**
172
- * @private
173
- * @deprecated - Do not override this at all, this is an anti-pattern.
174
- * Please reach out to the Editor team if you were previously using this
175
- * and need to find a workaround.
176
- */
177
- trackEditorActions(editorActions, props) {
178
- return trackEditorActions(editorActions, props.performanceTracking, value => this.handleAnalyticsEvent(value));
179
- }
180
- /**
181
- * @private
182
- * @deprecated - Do not override this at all, this is an antipattern.
183
- * Please reach out to the Editor team if you were previously using this
184
- * and need to find a workaround.
185
- */
186
- onEditorCreated(instance) {
187
- onEditorCreated(instance, this.props, experienceStore => this.experienceStore = experienceStore, this.getExperienceStore, () => this.createAnalyticsEvent, this.editorActions, this.startTime, (view, dispatcher, transformerForActions) => this.registerEditorForActions(view, dispatcher, transformerForActions));
188
- }
189
-
190
- /**
191
- * @private
192
- * @deprecated - Do not override this at all, this is an antipattern.
193
- * Please reach out to the Editor team if you were previously using this
194
- * and need to find a workaround.
195
- */
196
- onEditorDestroyed(_instance) {
197
- var _this$props$onDestroy, _this$props3;
198
- this.unregisterEditorFromActions();
199
- (_this$props$onDestroy = (_this$props3 = this.props).onDestroy) === null || _this$props$onDestroy === void 0 ? void 0 : _this$props$onDestroy.call(_this$props3);
200
- }
201
- /**
202
- * @private
203
- * @deprecated - Do not override this at all, this is an antipattern.
204
- * Please reach out to the Editor team if you were previously using this
205
- * and need to find a workaround.
206
- */
207
- registerEditorForActions(editorView, eventDispatcher, contentTransformer) {
208
- this.editorActions._privateRegisterEditor(editorView, eventDispatcher, contentTransformer, this.getFeatureFlags);
209
- }
210
- /**
211
- * @private
212
- * @deprecated - Do not override this at all, this is an antipattern.
213
- * Please reach out to the Editor team if you were previously using this
214
- * and need to find a workaround.
215
- */
216
- unregisterEditorFromActions() {
217
- this.editorActions._privateUnregisterEditor();
24
+ constructor(...args) {
25
+ super(...args);
26
+ _defineProperty(this, "editorSessionId", uuid());
218
27
  }
219
28
  render() {
29
+ // TODO: https://product-fabric.atlassian.net/browse/ED-16979
30
+ // Move `FabricEditorAnalyticsContext` back into `EditorNext`
31
+ // This was moved out here to workaround the issue that the analytics
32
+ // context does not wrap the Preset (and therefore does not pass this context
33
+ // information to analytics calls within plugins). After this cleanup task ^ we will
34
+ // not have to generate the `createAnalyticsEvent` outside the Preset
35
+ // and we can move this back into `EditorNext`.
220
36
  return jsx(FabricEditorAnalyticsContext, {
221
37
  data: {
222
38
  packageName: name,
@@ -225,28 +41,9 @@ export default class Editor extends React.Component {
225
41
  appearance: getAnalyticsAppearance(this.props.appearance),
226
42
  editorSessionId: this.editorSessionId
227
43
  }
228
- }, jsx(WithCreateAnalyticsEvent, {
229
- render: createAnalyticsEvent => (this.createAnalyticsEvent = createAnalyticsEvent) && jsx(EditorInternal, {
230
- props: this.props,
231
- handleAnalyticsEvent: this.handleAnalyticsEvent,
232
- createAnalyticsEvent: this.createAnalyticsEvent,
233
- preset: this.state.preset,
234
- handleSave: this.handleSave,
235
- editorActions: this.editorActions,
236
- providerFactory: this.providerFactory,
237
- onEditorCreated: this.onEditorCreated,
238
- onEditorDestroyed: this.onEditorDestroyed
239
- })
44
+ }, jsx(EditorNextWrapper, {
45
+ props: this.props
240
46
  }));
241
47
  }
242
48
  }
243
- /**
244
- * WARNING: Code should be shared between Editor + EditorNext
245
- * If you are making changes that affect both, consider making them
246
- * in editor-next/editor-internal.tsx or editor-next/editor-utils.ts
247
- */
248
- _defineProperty(Editor, "defaultProps", defaultProps);
249
- _defineProperty(Editor, "contextTypes", {
250
- editorActions: PropTypes.object
251
- });
252
- _defineProperty(Editor, "propTypes", propTypes('minHeight only supports editor appearance chromeless and comment for Editor'));
49
+ _defineProperty(Editor, "defaultProps", defaultProps);
@@ -8,13 +8,13 @@
8
8
  //
9
9
  export default {
10
10
  'fabric.editor.addAltText': '⁣⁢Alt text‌‍‌؜⁡؜⁡⁣⁤',
11
+ 'fabric.editor.addImageBorder': '⁣⁢Add border⁠⁠‌⁡‍⁡؜‍؜؜⁠⁣⁤',
11
12
  'fabric.editor.alignCenter': '⁣⁢Align Center؜؜؜؜⁠⁠⁠‍⁠‍⁣⁤',
12
13
  'fabric.editor.alignLeft': '⁣⁢Align left⁠؜‌‌؜⁡‍‍⁠؜⁠؜⁡⁡⁣⁤',
13
14
  'fabric.editor.alignRight': '⁣⁢Align Right⁡؜⁡⁡⁠‍‍⁠؜⁣⁤',
14
15
  'fabric.editor.alignment': '⁣⁢Text alignment؜⁠⁡‌⁠؜⁡؜⁠⁣⁤',
15
16
  'fabric.editor.altText': '⁣⁢Alt text؜⁠؜‌⁡‌⁠‍‍‍‌‌‌‌⁣⁤',
16
17
  'fabric.editor.alttext.validation': '⁣⁢Please remove any special characters in alt text.؜⁠‌‍⁡؜⁣⁤',
17
- 'fabric.editor.annotate': '⁣⁢Annotate‌⁡؜؜⁠‍⁡⁣⁤',
18
18
  'fabric.editor.annotationToolbar': '⁣⁢Annotation toolbar‍‍‍‌⁡‍⁠؜⁡‍⁠⁣⁤',
19
19
  'fabric.editor.backLink': '⁣⁢Go back‍⁡‌؜‌⁠⁣⁤',
20
20
  'fabric.editor.blockCardUnavailable': '⁣⁢The inline link is inside {node} and cannot have its view changed⁠؜⁡⁡⁠؜⁡⁠‍⁠⁠⁡‍⁣⁤',
@@ -62,6 +62,7 @@ export default {
62
62
  'fabric.editor.customPanel.description': '⁣⁢Add a note with an emoji and colored background؜؜‍‍⁠‍⁠؜⁡‌؜⁡⁣⁤',
63
63
  'fabric.editor.decisionPlaceholder': '⁣⁢Add a decision…⁡‌⁡‍؜⁡⁡⁠‍‌⁣⁤',
64
64
  'fabric.editor.defaultAltText': '⁣⁢List item⁡‍؜‌‍⁠‍⁠⁡‌⁣⁤',
65
+ 'fabric.editor.description': '⁣⁢Description⁡‍‍‍‍⁣⁤',
65
66
  'fabric.editor.displayBlock': '⁣⁢Display card‍‌؜؜⁡⁠‍؜‍‍‌⁠⁠⁣⁤',
66
67
  'fabric.editor.displayEmbed': '⁣⁢Display embed⁡⁡‍⁠⁠‌⁣⁤',
67
68
  'fabric.editor.displayInline': '⁣⁢Display inline‍⁡‌‌؜‌⁠⁣⁤',
@@ -77,6 +78,7 @@ export default {
77
78
  'fabric.editor.editStatusColor': '⁣⁢Edit Status Color‌‌⁡‌‍؜⁡‍؜⁡⁣⁤',
78
79
  'fabric.editor.editStatusText': '⁣⁢Edit Status⁡‍‌‌‍؜⁡؜‍‍؜؜⁣⁤',
79
80
  'fabric.editor.editableContentLabel': '⁣⁢Editable content⁠؜‌‍⁠⁡⁠؜⁣⁤',
81
+ 'fabric.editor.editorAssistiveLabel': '⁣⁢Main content area, start typing to enter text.‍‌⁡‌‌⁡؜؜⁣⁤',
80
82
  'fabric.editor.editorHelp': '⁣⁢Editor help‌؜‍؜؜‍‌⁠؜⁣⁤',
81
83
  'fabric.editor.editors': '⁣⁢Editors‍؜‌‍⁡‍⁠⁡؜‌‌⁡⁣⁤',
82
84
  'fabric.editor.elementBrowser.help': '⁣⁢Help⁡؜‌‍‍⁠⁠⁠⁡⁠⁣⁤',
@@ -101,14 +103,18 @@ export default {
101
103
  'fabric.editor.error': '⁣⁢Error؜‌⁡‌؜⁡‌⁣⁤',
102
104
  'fabric.editor.errorPanel': '⁣⁢Error panel⁠‍؜⁠⁠؜‍⁠⁠⁡⁣⁤',
103
105
  'fabric.editor.errorPanel.description': '⁣⁢Call out errors in a colored panel⁡⁠؜⁡‍‌‍؜‍⁣⁤',
104
- 'fabric.editor.extension.confirmDeleteLinkedModalMessage': '⁣⁢Removing this extension will break anything connected to it.⁠؜⁡‌‌‍‌⁡⁠⁡⁡⁡⁡⁣⁤',
105
- 'fabric.editor.extension.confirmDeleteLinkedModalOKButton': '⁣⁢Remove extension⁡‍‌‍⁠‌‍‍⁠⁠⁣⁤',
106
+ 'fabric.editor.extension.confirmDeleteLinkedModalMessage': '⁣⁢Deleting {nodeName} will break anything connected to it.‍‍‌؜⁠⁡⁠⁣⁤',
107
+ 'fabric.editor.extension.confirmDeleteLinkedModalOKButton': '⁣⁢Delete⁠؜‌‍⁠⁠⁣⁤',
108
+ 'fabric.editor.extension.deleteElementTitle': '⁣⁢Delete element⁠؜⁠⁡‍؜⁣⁤',
109
+ 'fabric.editor.extension.sourceNoTitledName': '⁣⁢this element‍⁠⁡؜⁡⁠؜‌⁡⁠⁣⁤',
106
110
  'fabric.editor.extensions.config-panel.save-indicator': '⁣⁢All changes are always autosaved⁠‍؜‌‌‍‍⁡‌‌‍‌‌⁣⁤',
107
111
  'fabric.editor.find': '⁣⁢Find⁠‌⁠‌⁠‍؜⁣⁤',
108
112
  'fabric.editor.findNext': '⁣⁢Find next؜‌؜‌؜⁠⁣⁤',
109
113
  'fabric.editor.findPrevious': '⁣⁢Find previous⁠⁠⁡⁡‍‍⁡⁡⁣⁤',
110
114
  'fabric.editor.findReplaceToolbarButton': '⁣⁢Find and replace؜⁠‍‌⁡⁡؜‌⁡⁠‍‌⁣⁤',
111
115
  'fabric.editor.floatingToolbar.confirmModalCancel': '⁣⁢Cancel؜⁡‌‌⁡⁡‍؜⁡؜⁣⁤',
116
+ 'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': '⁣⁢Also delete connected elements؜؜؜؜؜‍⁡‍‌؜‌‌؜‍⁣⁤',
117
+ 'fabric.editor.floatingToolbar.confirmModalConnectedUnit': '{amount, plural, =0 {⁣⁢{name}⁡⁡‌⁡؜‍⁡‍‌⁣⁤} one {⁣⁢{name} (+1 connected element)⁡⁡‌‍⁡‌⁡؜⁣⁤} other {⁣⁢{name} (+{amount,number} connected elements)⁡⁡‌‍⁡‌⁡؜⁣⁤}}',
112
118
  'fabric.editor.floatingToolbar.confirmModalHeading': '⁣⁢Are you sure?⁡⁡‌‍⁡‍⁡⁠؜‌‌⁣⁤',
113
119
  'fabric.editor.floatingToolbar.confirmModalOK': '⁣⁢OK‍‌؜⁡؜⁡‍⁡⁣⁤',
114
120
  'fabric.editor.floatingToolbar.floatingToolbarAnnouncer': '⁣⁢Floating toolbar controls have been opened⁠⁠‌‌؜‍⁣⁤',
@@ -139,6 +145,12 @@ export default {
139
145
  'fabric.editor.hyperlink.searchLinkAriaDescription': '⁣⁢Suggestions will appear below as you type into the field⁠‍‍⁠‍‌؜⁡‍‍‍؜‍‌⁣⁤',
140
146
  'fabric.editor.hyperlink.searchLinkResults': '{count, plural, =0 {⁣⁢no results found⁡⁠؜؜؜؜⁣⁤} one {⁣⁢{count,number} result found؜⁠؜‌‍⁡‍⁡؜‌⁡‌⁣⁤} other {⁣⁢{count,number} results found؜⁠؜‌‍⁡‍⁡؜‌⁡‌⁣⁤}}',
141
147
  'fabric.editor.hyperlinkToolbarPlaceholder': '⁣⁢Paste or search for link‌‌‍؜‌؜‍⁡⁠⁣⁤',
148
+ 'fabric.editor.imageBorderBold': '⁣⁢Bold‍‍‍‌⁠‍⁡‌؜‍⁡‍⁣⁤',
149
+ 'fabric.editor.imageBorderColor': '⁣⁢Color⁠⁠⁠؜؜⁠⁠‍⁡؜؜⁣⁤',
150
+ 'fabric.editor.imageBorderMedium': '⁣⁢Medium⁠‌⁠؜‍⁠؜⁠؜⁣⁤',
151
+ 'fabric.editor.imageBorderOptions': '⁣⁢Border options؜‍‍؜⁠‍⁠؜‌‍‍⁣⁤',
152
+ 'fabric.editor.imageBorderSize': '⁣⁢Size⁠⁡؜⁠⁡؜‌‍⁡⁠‍؜⁠‍⁡⁣⁤',
153
+ 'fabric.editor.imageBorderSubtle': '⁣⁢Subtle⁡⁡‌⁠؜‍‌؜⁣⁤',
142
154
  'fabric.editor.improvement': '⁣⁢Improvement⁡⁡‍‍‌⁠‍⁡⁣⁤',
143
155
  'fabric.editor.indent': '⁣⁢Indent‌⁠‌⁠‍⁡⁣⁤',
144
156
  'fabric.editor.info': '⁣⁢Info⁡⁡‌⁡⁠؜؜‌‍⁠⁣⁤',
@@ -160,9 +172,12 @@ export default {
160
172
  'fabric.editor.matchCase': '⁣⁢Match case‌‌⁠⁡‍؜‍‍‌؜⁡⁡⁠‍⁣⁤',
161
173
  'fabric.editor.mediaAddLink': '⁣⁢Add link‍⁠⁠‌‍‌⁡‌؜‍⁣⁤',
162
174
  'fabric.editor.mediaGroupDeleteLabel': '⁣⁢delete‌‌⁠⁡⁠‍⁠⁣⁤',
175
+ 'fabric.editor.mentionNode.label': '⁣⁢Tagged user⁠‍⁠‌⁡⁡‍‍‌‌⁡؜⁣⁤',
163
176
  'fabric.editor.mentionsAddLabel': '⁣⁢add-icon‌‌‌؜⁡‍‍⁡⁡‍‍⁠⁣⁤',
164
177
  'fabric.editor.mentionsIconLabel': '⁣⁢Mention⁠⁠⁠⁡‌⁠؜‍؜؜⁡⁠⁠⁣⁤',
165
178
  'fabric.editor.moreFormatting': '⁣⁢More formatting‍؜‌‌⁠‍‍؜‍⁡⁣⁤',
179
+ 'fabric.editor.navigate.toolbar.editor': '⁣⁢Navigate to editor toolbar⁠؜⁡⁡⁡‍‌‌‍⁡⁣⁤',
180
+ 'fabric.editor.navigate.toolbar.floating': '⁣⁢Navigate to floating toolbar⁠‍⁠‍⁠‍‍⁣⁤',
166
181
  'fabric.editor.noResultsFound': '⁣⁢No results‍؜‌‌‌؜⁡⁣⁤',
167
182
  'fabric.editor.noSearchResults': '⁣⁢No search results؜؜‍‍‍؜‍⁡⁣⁤',
168
183
  'fabric.editor.normal': '⁣⁢Normal text⁠⁠‍⁠⁠‌⁠‍؜⁡⁠‌⁡⁠⁣⁤',
@@ -183,6 +198,7 @@ export default {
183
198
  'fabric.editor.placeholderTextPlaceholder': '⁣⁢Add placeholder text‍‌⁠⁡‍⁡؜⁠‍⁠؜‍⁣⁤',
184
199
  'fabric.editor.quickInsert': '⁣⁢Quick insert⁠⁠⁠‌؜⁠⁣⁤',
185
200
  'fabric.editor.redo': '⁣⁢Redo⁠؜⁡؜؜⁡‌‍‍⁡⁣⁤',
201
+ 'fabric.editor.removeImageBorder': '⁣⁢Remove border؜⁡‍؜⁡⁡‌⁣⁤',
186
202
  'fabric.editor.replace': '⁣⁢Replace‌⁠؜⁠⁠⁠‌⁠⁡⁠⁣⁤',
187
203
  'fabric.editor.replaceAll': '⁣⁢Replace all‌⁡؜‍⁠⁣⁤',
188
204
  'fabric.editor.replaceWith': '⁣⁢Replace with‍‍⁡؜⁡⁠⁡؜؜⁠⁠⁣⁤',
@@ -191,6 +207,7 @@ export default {
191
207
  'fabric.editor.searchResults': '{itemsLength, plural, one {⁣⁢{itemsLength,number} search result available⁡‍‍⁠‍؜⁠؜‌⁡⁣⁤} other {⁣⁢{itemsLength,number} search results available⁡‍‍⁠‍؜⁠؜‌⁡⁣⁤}}',
192
208
  'fabric.editor.selectLanguage': '⁣⁢Select language‍⁠‌؜‌⁡‍‌⁣⁤',
193
209
  'fabric.editor.settingsLinks': '⁣⁢Go to Link Preferences؜؜‌⁡‍؜⁠⁡⁠⁠‌⁠⁣⁤',
210
+ 'fabric.editor.shortcut': '⁣⁢Text shortcut‌‌‌⁠‌‍⁠‍⁡‌‌⁣⁤',
194
211
  'fabric.editor.single': '⁣⁢Single column⁡‍⁠‌؜⁡‍‌‍⁣⁤',
195
212
  'fabric.editor.statusPlaceholder': '⁣⁢Set a status⁠؜⁠⁠⁡⁡‍⁣⁤',
196
213
  'fabric.editor.story': '⁣⁢Story‌⁡⁡؜؜⁡⁡⁠⁡⁠⁣⁤',
@@ -212,9 +229,17 @@ export default {
212
229
  'fabric.editor.threeColumns': '⁣⁢Three columns؜‍‌‍‌‌‌‌⁠؜⁣⁤',
213
230
  'fabric.editor.threeColumnsWithSidebars': '⁣⁢Three columns with sidebars؜‌⁠⁠‍⁡؜‍؜؜⁣⁤',
214
231
  'fabric.editor.toolbarLabel': '⁣⁢Editor toolbar‌‍؜‍؜⁠‌⁠‍‍⁣⁤',
215
- 'fabric.editor.toolbarMediaTitle': '⁣⁢Files & images؜⁡⁡‌⁡‌⁡⁡‍⁡⁠⁡⁣⁤',
232
+ 'fabric.editor.toolbarMediaTitle': '⁣⁢Add image, video, or file‌‍‍؜‍⁠⁣⁤',
216
233
  'fabric.editor.twoColumns': '⁣⁢Two columns⁡‌‍؜‌‍؜‍‍‍⁡⁣⁤',
217
- 'fabric.editor.typeAheadResultLabel': '⁣⁢TypeAhead results⁡‌‌⁠؜⁠‍⁠⁣⁤',
234
+ 'fabric.editor.typeAhead.popupLabel': '⁣⁢Typeahead results⁠؜⁡؜⁠‍‍⁠‌⁣⁤',
235
+ 'fabric.editor.typeAhead.quickInsertInputLabel': '⁣⁢Begin typing to search or filter shortcut options⁠⁠‍‌⁡‍⁠؜⁠⁡‍⁣⁤',
236
+ 'fabric.editor.typeAhead.quickInsertPopupLabel': '⁣⁢Shortcuts for inserts and formatting⁡؜؜‌⁡‌‌‌⁣⁤',
237
+ 'fabric.editor.typeahead.emojiInputLabel': '⁣⁢Begin typing to search or filter emoji options‌‍⁠‌⁡⁠⁡⁠‍‍⁡‍⁣⁤',
238
+ 'fabric.editor.typeahead.emojiListItemLabel': '⁣⁢Emoji {name} Text Shortcut {shortcut}⁠؜⁠⁡⁡⁡‍⁡⁡‌‌⁣⁤',
239
+ 'fabric.editor.typeahead.emojiPopupLabel': '⁣⁢Emoji shortcuts؜⁠‍⁡‍⁠⁡⁠⁡‌‍؜‍⁣⁤',
240
+ 'fabric.editor.typeahead.mentionInputLabel': '⁣⁢Begin typing to search for users to tag⁡⁡‌⁠‌؜⁡‍‍⁠‍⁠⁠‌⁣⁤',
241
+ 'fabric.editor.typeahead.mentionPopupLabel': '⁣⁢Users you can tag‌‍‌؜⁡⁡؜⁡⁣⁤',
242
+ 'fabric.editor.typeahead.metionListItemLabel': '⁣⁢User {name} @{shortName}‌‍؜⁠⁡‌‌⁡⁣⁤',
218
243
  'fabric.editor.unableToOpenLink': '⁣⁢Unable to open this link⁡؜‍‌‌⁠⁡⁡‌؜⁣⁤',
219
244
  'fabric.editor.underline': '⁣⁢Underline⁠⁠‍‍‌‌⁠‍⁣⁤',
220
245
  'fabric.editor.undo': '⁣⁢Undo⁡⁡⁡‌⁠⁡‌⁡‌⁠⁡⁣⁤',
@@ -228,5 +253,6 @@ export default {
228
253
  'fabric.editor.warningPanel': '⁣⁢Warning panel⁡‍‌؜⁠‌⁡؜⁠؜⁡⁡⁠؜⁣⁤',
229
254
  'fabric.editor.warningPanel.description': '⁣⁢Add a note of caution in a colored panel‌⁠⁡‍⁠؜‍⁡⁡⁡⁣⁤',
230
255
  'fabric.editor.wrapLeft': '⁣⁢Wrap left؜‍⁡‌⁡⁠‌‌‌⁡⁣⁤',
231
- 'fabric.editor.wrapRight': '⁣⁢Wrap right‍؜؜⁡؜⁣⁤'
256
+ 'fabric.editor.wrapRight': '⁣⁢Wrap right‍؜؜⁡؜⁣⁤',
257
+ 'fabric.emoji.label': '⁣⁢Emoji‌⁠؜‌⁠‍⁠؜⁠‌؜⁡⁣⁤'
232
258
  };
@@ -61,5 +61,4 @@ export { lightModeStatusColorPalette, darkModeStatusColorPalette } from './ui/Co
61
61
  export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
62
62
  export { default as messages, statusMessages, dateMessages } from './messages';
63
63
  export { createTypeAheadTools } from './plugins/type-ahead/api';
64
- export { createQuickInsertTools } from './plugins/quick-insert/api';
65
- export { default as EditorMigrationComponent } from './editor-next/editor-migration-component';
64
+ export { createQuickInsertTools } from './plugins/quick-insert/api';
@@ -23,6 +23,7 @@ import quickInsertPlugin from '../../../plugins/quick-insert';
23
23
  import selectionPlugin from '../../../plugins/selection';
24
24
  import codeBlockPlugin from '../../../plugins/code-block';
25
25
  import undoRedoPlugin from '../../../plugins/undo-redo';
26
+ import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
26
27
  import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
27
28
  // #endregion
28
29
 
@@ -55,7 +56,7 @@ export function createDefaultPreset(options) {
55
56
  }]);
56
57
  }
57
58
  return builder;
58
- }).add([pastePlugin, options.paste]).add(clipboardPlugin).add([basePlugin, options.base]).maybeAdd(undoRedoPlugin, (p, builder) => {
59
+ }).add([pastePlugin, options.paste]).add(clipboardPlugin).add([basePlugin, options.base]).add(decorationsPlugin).maybeAdd(undoRedoPlugin, (p, builder) => {
59
60
  var _options$featureFlags;
60
61
  // The undo redo plugin needs to be add before the blockTypePlugin
61
62
  if ((_options$featureFlags = options.featureFlags) !== null && _options$featureFlags !== void 0 && _options$featureFlags.undoRedoButtons) {
@@ -11,7 +11,6 @@ import newlinePreserveMarksPlugin from './pm-plugins/newline-preserve-marks';
11
11
  import inlineCursorTargetPlugin from './pm-plugins/inline-cursor-target';
12
12
  import betterTypeHistoryPlugin from './pm-plugins/better-type-history';
13
13
  import { plugin as reactNodeView } from './pm-plugins/react-nodeview';
14
- import decorationPlugin, { hoverDecoration } from './pm-plugins/decoration';
15
14
  import scrollGutter from './pm-plugins/scroll-gutter';
16
15
  import { keymap } from '../../utils/keymap';
17
16
  import frozenEditor from './pm-plugins/frozen-editor';
@@ -62,9 +61,6 @@ const basePlugin = (options, api) => {
62
61
  var _options$inputTrackin;
63
62
  return options !== null && options !== void 0 && (_options$inputTrackin = options.inputTracking) !== null && _options$inputTrackin !== void 0 && _options$inputTrackin.enabled || options !== null && options !== void 0 && options.ufo ? frozenEditor(dispatchAnalyticsEvent, options.inputTracking, options.browserFreezeTracking, options.ufo) : undefined;
64
63
  }
65
- }, {
66
- name: 'decorationPlugin',
67
- plugin: () => decorationPlugin()
68
64
  }, {
69
65
  name: 'history',
70
66
  plugin: () => history()
@@ -123,9 +119,6 @@ const basePlugin = (options, api) => {
123
119
  name: 'text',
124
120
  node: text
125
121
  }];
126
- },
127
- actions: {
128
- hoverDecoration
129
122
  }
130
123
  };
131
124
  };
@@ -47,6 +47,13 @@ export class BlockCardComponent extends React.PureComponent {
47
47
  contentEditable: true
48
48
  });
49
49
  });
50
+ _defineProperty(this, "onError", ({
51
+ err
52
+ }) => {
53
+ if (err) {
54
+ throw err;
55
+ }
56
+ });
50
57
  }
51
58
  UNSAFE_componentWillMount() {
52
59
  const {
@@ -74,6 +81,7 @@ export class BlockCardComponent extends React.PureComponent {
74
81
  appearance: "block",
75
82
  onClick: this.onClick,
76
83
  onResolve: this.onResolve,
84
+ onError: this.onError,
77
85
  showActions: platform === 'web',
78
86
  platform: platform,
79
87
  showServerActions: showServerActions