@atlaskit/editor-core 150.0.1 → 151.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 (248) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/cjs/actions/index.js +5 -23
  3. package/dist/cjs/create-editor/ErrorBoundary.js +113 -79
  4. package/dist/cjs/create-editor/ReactEditorView.js +145 -31
  5. package/dist/cjs/create-editor/create-plugins-list.js +8 -2
  6. package/dist/cjs/editor.js +101 -40
  7. package/dist/cjs/labs/next/presets/cxhtml.js +2 -1
  8. package/dist/cjs/plugins/analytics/types/enums.js +3 -1
  9. package/dist/cjs/plugins/base/index.js +4 -3
  10. package/dist/cjs/plugins/base/pm-plugins/frozen-editor.js +66 -36
  11. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -1
  12. package/dist/cjs/plugins/card/index.js +13 -2
  13. package/dist/cjs/plugins/card/nodeviews/embedCard.js +1 -0
  14. package/dist/cjs/plugins/card/pm-plugins/main.js +7 -2
  15. package/dist/cjs/plugins/card/pm-plugins/util/resolve.js +10 -3
  16. package/dist/cjs/plugins/code-bidi-warning/index.js +25 -0
  17. package/dist/cjs/plugins/code-bidi-warning/plugin-key.js +11 -0
  18. package/dist/cjs/plugins/code-bidi-warning/pm-plugins/main.js +43 -0
  19. package/dist/cjs/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +118 -0
  20. package/dist/cjs/plugins/code-bidi-warning/pm-plugins/reducer.js +12 -0
  21. package/dist/cjs/plugins/code-bidi-warning/pm-plugins/types.js +5 -0
  22. package/dist/cjs/plugins/code-block/index.js +10 -6
  23. package/dist/cjs/plugins/code-block/nodeviews/highlighting-code-block.js +16 -5
  24. package/dist/cjs/plugins/code-block/pm-plugins/main.js +12 -3
  25. package/dist/cjs/plugins/code-block/toolbar.js +1 -1
  26. package/dist/cjs/plugins/collab-edit/ui/to-avatar.js +4 -8
  27. package/dist/cjs/plugins/emoji/styles.js +1 -1
  28. package/dist/cjs/plugins/extension/pm-plugins/main.js +1 -4
  29. package/dist/cjs/plugins/extension/toolbar.js +28 -23
  30. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +9 -3
  31. package/dist/cjs/plugins/find-replace/ui/Find.js +27 -7
  32. package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +3 -3
  33. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  34. package/dist/cjs/plugins/hyperlink/utils.js +6 -69
  35. package/dist/cjs/plugins/index.js +8 -0
  36. package/dist/cjs/plugins/media/index.js +14 -3
  37. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +24 -10
  38. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +179 -0
  39. package/dist/cjs/plugins/media/pm-plugins/main.js +18 -9
  40. package/dist/cjs/plugins/media/toolbar/index.js +49 -17
  41. package/dist/cjs/plugins/media/toolbar/utils.js +20 -2
  42. package/dist/cjs/plugins/media/utils/media-files.js +67 -1
  43. package/dist/cjs/plugins/mentions/type-ahead/index.js +39 -3
  44. package/dist/cjs/plugins/panel/index.js +2 -3
  45. package/dist/cjs/plugins/panel/message.js +47 -0
  46. package/dist/cjs/plugins/panel/toolbar.js +64 -84
  47. package/dist/cjs/plugins/panel/utils.js +2 -2
  48. package/dist/cjs/plugins/paste/linkify-md-plugin.js +3 -3
  49. package/dist/cjs/plugins/rank.js +1 -1
  50. package/dist/cjs/plugins/status/styles.js +1 -1
  51. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  52. package/dist/cjs/profiler/render-count.js +82 -0
  53. package/dist/cjs/ui/Appearance/Comment/Comment.js +6 -5
  54. package/dist/cjs/utils/react-hooks/use-component-renderer-tracking/index.js +55 -19
  55. package/dist/cjs/version-wrapper.js +1 -1
  56. package/dist/cjs/version.json +1 -1
  57. package/dist/es2019/actions/index.js +6 -28
  58. package/dist/es2019/create-editor/ErrorBoundary.js +73 -60
  59. package/dist/es2019/create-editor/ReactEditorView.js +130 -23
  60. package/dist/es2019/create-editor/create-plugins-list.js +9 -3
  61. package/dist/es2019/editor.js +74 -35
  62. package/dist/es2019/labs/next/presets/cxhtml.js +2 -1
  63. package/dist/es2019/plugins/analytics/types/enums.js +3 -1
  64. package/dist/es2019/plugins/base/index.js +4 -3
  65. package/dist/es2019/plugins/base/pm-plugins/frozen-editor.js +63 -35
  66. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -1
  67. package/dist/es2019/plugins/card/index.js +7 -2
  68. package/dist/es2019/plugins/card/nodeviews/embedCard.js +1 -0
  69. package/dist/es2019/plugins/card/pm-plugins/main.js +9 -2
  70. package/dist/es2019/plugins/card/pm-plugins/util/resolve.js +12 -5
  71. package/dist/es2019/plugins/code-bidi-warning/index.js +15 -0
  72. package/dist/es2019/plugins/code-bidi-warning/plugin-key.js +2 -0
  73. package/dist/es2019/plugins/code-bidi-warning/pm-plugins/main.js +31 -0
  74. package/dist/es2019/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +88 -0
  75. package/dist/es2019/plugins/code-bidi-warning/pm-plugins/reducer.js +3 -0
  76. package/dist/es2019/plugins/code-bidi-warning/pm-plugins/types.js +1 -0
  77. package/dist/es2019/plugins/code-block/index.js +6 -1
  78. package/dist/es2019/plugins/code-block/nodeviews/highlighting-code-block.js +16 -4
  79. package/dist/es2019/plugins/code-block/pm-plugins/main.js +50 -39
  80. package/dist/es2019/plugins/code-block/toolbar.js +1 -1
  81. package/dist/es2019/plugins/collab-edit/ui/to-avatar.js +2 -6
  82. package/dist/es2019/plugins/emoji/styles.js +2 -0
  83. package/dist/es2019/plugins/extension/pm-plugins/main.js +1 -4
  84. package/dist/es2019/plugins/extension/toolbar.js +30 -25
  85. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +9 -4
  86. package/dist/es2019/plugins/find-replace/ui/Find.js +27 -6
  87. package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +1 -1
  88. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  89. package/dist/es2019/plugins/hyperlink/utils.js +3 -59
  90. package/dist/es2019/plugins/index.js +2 -1
  91. package/dist/es2019/plugins/media/index.js +13 -4
  92. package/dist/es2019/plugins/media/nodeviews/mediaGroup.js +16 -7
  93. package/dist/es2019/plugins/media/nodeviews/mediaInline.js +88 -0
  94. package/dist/es2019/plugins/media/pm-plugins/main.js +20 -11
  95. package/dist/es2019/plugins/media/toolbar/index.js +44 -15
  96. package/dist/es2019/plugins/media/toolbar/utils.js +16 -0
  97. package/dist/es2019/plugins/media/utils/media-files.js +68 -2
  98. package/dist/es2019/plugins/mentions/type-ahead/index.js +21 -2
  99. package/dist/es2019/plugins/panel/index.js +3 -4
  100. package/dist/es2019/plugins/panel/message.js +38 -0
  101. package/dist/es2019/plugins/panel/toolbar.js +52 -71
  102. package/dist/es2019/plugins/panel/utils.js +2 -2
  103. package/dist/es2019/plugins/paste/linkify-md-plugin.js +2 -2
  104. package/dist/es2019/plugins/rank.js +1 -1
  105. package/dist/es2019/plugins/status/styles.js +2 -0
  106. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  107. package/dist/es2019/profiler/render-count.js +60 -0
  108. package/dist/es2019/ui/Appearance/Comment/Comment.js +4 -2
  109. package/dist/es2019/utils/react-hooks/use-component-renderer-tracking/index.js +51 -18
  110. package/dist/es2019/version-wrapper.js +1 -1
  111. package/dist/es2019/version.json +1 -1
  112. package/dist/esm/actions/index.js +6 -24
  113. package/dist/esm/create-editor/ErrorBoundary.js +113 -78
  114. package/dist/esm/create-editor/ReactEditorView.js +146 -31
  115. package/dist/esm/create-editor/create-plugins-list.js +9 -3
  116. package/dist/esm/editor.js +100 -40
  117. package/dist/esm/labs/next/presets/cxhtml.js +2 -1
  118. package/dist/esm/plugins/analytics/types/enums.js +3 -1
  119. package/dist/esm/plugins/base/index.js +4 -3
  120. package/dist/esm/plugins/base/pm-plugins/frozen-editor.js +64 -36
  121. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -1
  122. package/dist/esm/plugins/card/index.js +13 -2
  123. package/dist/esm/plugins/card/nodeviews/embedCard.js +1 -0
  124. package/dist/esm/plugins/card/pm-plugins/main.js +7 -2
  125. package/dist/esm/plugins/card/pm-plugins/util/resolve.js +12 -5
  126. package/dist/esm/plugins/code-bidi-warning/index.js +17 -0
  127. package/dist/esm/plugins/code-bidi-warning/plugin-key.js +2 -0
  128. package/dist/esm/plugins/code-bidi-warning/pm-plugins/main.js +30 -0
  129. package/dist/esm/plugins/code-bidi-warning/pm-plugins/plugin-factory.js +96 -0
  130. package/dist/esm/plugins/code-bidi-warning/pm-plugins/reducer.js +3 -0
  131. package/dist/esm/plugins/code-bidi-warning/pm-plugins/types.js +1 -0
  132. package/dist/esm/plugins/code-block/index.js +10 -6
  133. package/dist/esm/plugins/code-block/nodeviews/highlighting-code-block.js +16 -5
  134. package/dist/esm/plugins/code-block/pm-plugins/main.js +11 -3
  135. package/dist/esm/plugins/code-block/toolbar.js +1 -1
  136. package/dist/esm/plugins/collab-edit/ui/to-avatar.js +4 -8
  137. package/dist/esm/plugins/emoji/styles.js +1 -1
  138. package/dist/esm/plugins/extension/pm-plugins/main.js +1 -4
  139. package/dist/esm/plugins/extension/toolbar.js +28 -23
  140. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +9 -4
  141. package/dist/esm/plugins/find-replace/ui/Find.js +27 -7
  142. package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +1 -1
  143. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +7 -4
  144. package/dist/esm/plugins/hyperlink/utils.js +3 -59
  145. package/dist/esm/plugins/index.js +2 -1
  146. package/dist/esm/plugins/media/index.js +14 -4
  147. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +24 -10
  148. package/dist/esm/plugins/media/nodeviews/mediaInline.js +147 -0
  149. package/dist/esm/plugins/media/pm-plugins/main.js +19 -11
  150. package/dist/esm/plugins/media/toolbar/index.js +47 -19
  151. package/dist/esm/plugins/media/toolbar/utils.js +15 -1
  152. package/dist/esm/plugins/media/utils/media-files.js +60 -2
  153. package/dist/esm/plugins/mentions/type-ahead/index.js +39 -3
  154. package/dist/esm/plugins/panel/index.js +3 -4
  155. package/dist/esm/plugins/panel/message.js +38 -0
  156. package/dist/esm/plugins/panel/toolbar.js +57 -77
  157. package/dist/esm/plugins/panel/utils.js +2 -2
  158. package/dist/esm/plugins/paste/linkify-md-plugin.js +2 -2
  159. package/dist/esm/plugins/rank.js +1 -1
  160. package/dist/esm/plugins/status/styles.js +1 -1
  161. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +18 -2
  162. package/dist/esm/profiler/render-count.js +57 -0
  163. package/dist/esm/ui/Appearance/Comment/Comment.js +6 -5
  164. package/dist/esm/utils/react-hooks/use-component-renderer-tracking/index.js +53 -20
  165. package/dist/esm/version-wrapper.js +1 -1
  166. package/dist/esm/version.json +1 -1
  167. package/dist/types/create-editor/ErrorBoundary.d.ts +6 -6
  168. package/dist/types/create-editor/ReactEditorView.d.ts +15 -3
  169. package/dist/types/editor.d.ts +3 -1
  170. package/dist/types/plugins/analytics/analytics-queue.d.ts +1 -1
  171. package/dist/types/plugins/analytics/index.d.ts +1 -1
  172. package/dist/types/plugins/analytics/types/enums.d.ts +4 -2
  173. package/dist/types/plugins/analytics/types/events.d.ts +7 -2
  174. package/dist/types/plugins/analytics/types/general-events.d.ts +4 -1
  175. package/dist/types/plugins/analytics/types/index.d.ts +1 -1
  176. package/dist/types/plugins/analytics/types/insert-events.d.ts +6 -1
  177. package/dist/types/plugins/analytics/types/link-tool-bar-events.d.ts +1 -0
  178. package/dist/types/plugins/base/index.d.ts +1 -0
  179. package/dist/types/plugins/base/pm-plugins/frozen-editor.d.ts +3 -2
  180. package/dist/types/plugins/card/pm-plugins/main.d.ts +2 -3
  181. package/dist/types/plugins/card/pm-plugins/util/resolve.d.ts +2 -1
  182. package/dist/types/plugins/card/types.d.ts +6 -0
  183. package/dist/types/plugins/code-bidi-warning/index.d.ts +3 -0
  184. package/dist/types/plugins/code-bidi-warning/plugin-key.d.ts +2 -0
  185. package/dist/types/plugins/code-bidi-warning/pm-plugins/main.d.ts +3 -0
  186. package/dist/types/plugins/code-bidi-warning/pm-plugins/plugin-factory.d.ts +7 -0
  187. package/dist/types/plugins/code-bidi-warning/pm-plugins/reducer.d.ts +3 -0
  188. package/dist/types/plugins/code-bidi-warning/pm-plugins/types.d.ts +5 -0
  189. package/dist/types/plugins/code-block/nodeviews/highlighting-code-block.d.ts +11 -2
  190. package/dist/types/plugins/code-block/pm-plugins/main.d.ts +5 -1
  191. package/dist/types/plugins/collab-edit/ui/to-avatar.d.ts +1 -1
  192. package/dist/types/plugins/extension/types.d.ts +0 -2
  193. package/dist/types/plugins/extension/ui/Extension/ExtensionComponent.d.ts +2 -2
  194. package/dist/types/plugins/feature-flags-context/get-enabled-feature-flag-keys.d.ts +1 -1
  195. package/dist/types/plugins/floating-toolbar/types.d.ts +1 -1
  196. package/dist/types/plugins/floating-toolbar/ui/Select.d.ts +1 -1
  197. package/dist/types/plugins/hyperlink/utils.d.ts +0 -21
  198. package/dist/types/plugins/index.d.ts +1 -0
  199. package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
  200. package/dist/types/plugins/media/nodeviews/mediaInline.d.ts +27 -0
  201. package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -2
  202. package/dist/types/plugins/media/toolbar/utils.d.ts +2 -0
  203. package/dist/types/plugins/media/utils/media-files.d.ts +8 -0
  204. package/dist/types/plugins/panel/message.d.ts +37 -0
  205. package/dist/types/plugins/panel/toolbar.d.ts +4 -37
  206. package/dist/types/plugins/panel/types.d.ts +1 -0
  207. package/dist/types/plugins/quick-insert/index.d.ts +1 -1
  208. package/dist/types/profiler/render-count.d.ts +14 -0
  209. package/dist/types/types/feature-flags.d.ts +17 -0
  210. package/dist/types/ui/LinkSearch/types.d.ts +1 -0
  211. package/dist/types/utils/react-hooks/use-component-renderer-tracking/index.d.ts +17 -1
  212. package/package.json +22 -19
  213. package/dist/cjs/plugins/caption/nodeviews/index.test.js +0 -135
  214. package/dist/cjs/plugins/caption/pm-plugins/keymap.test.js +0 -203
  215. package/dist/cjs/plugins/caption/pm-plugins/main.test.js +0 -141
  216. package/dist/cjs/plugins/code-block/language-list.test.js +0 -74
  217. package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -101
  218. package/dist/cjs/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -98
  219. package/dist/cjs/plugins/media/commands/captions.test.js +0 -149
  220. package/dist/cjs/plugins/media/commands/linking.test.js +0 -296
  221. package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -50
  222. package/dist/cjs/plugins/panel/toolbar.test.js +0 -250
  223. package/dist/cjs/ui/ColorPickerButton/index.test.js +0 -123
  224. package/dist/cjs/ui/PortalProvider/index.test.js +0 -139
  225. package/dist/es2019/plugins/caption/nodeviews/index.test.js +0 -122
  226. package/dist/es2019/plugins/caption/pm-plugins/keymap.test.js +0 -193
  227. package/dist/es2019/plugins/caption/pm-plugins/main.test.js +0 -132
  228. package/dist/es2019/plugins/code-block/language-list.test.js +0 -69
  229. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -83
  230. package/dist/es2019/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -85
  231. package/dist/es2019/plugins/media/commands/captions.test.js +0 -126
  232. package/dist/es2019/plugins/media/commands/linking.test.js +0 -208
  233. package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -41
  234. package/dist/es2019/plugins/panel/toolbar.test.js +0 -200
  235. package/dist/es2019/ui/ColorPickerButton/index.test.js +0 -88
  236. package/dist/es2019/ui/PortalProvider/index.test.js +0 -115
  237. package/dist/esm/plugins/caption/nodeviews/index.test.js +0 -125
  238. package/dist/esm/plugins/caption/pm-plugins/keymap.test.js +0 -195
  239. package/dist/esm/plugins/caption/pm-plugins/main.test.js +0 -124
  240. package/dist/esm/plugins/code-block/language-list.test.js +0 -71
  241. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.test.js +0 -92
  242. package/dist/esm/plugins/floating-toolbar/ui/EmojiPickerButton.test.js +0 -85
  243. package/dist/esm/plugins/media/commands/captions.test.js +0 -135
  244. package/dist/esm/plugins/media/commands/linking.test.js +0 -268
  245. package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.test.js +0 -41
  246. package/dist/esm/plugins/panel/toolbar.test.js +0 -230
  247. package/dist/esm/ui/ColorPickerButton/index.test.js +0 -107
  248. package/dist/esm/ui/PortalProvider/index.test.js +0 -129
package/CHANGELOG.md CHANGED
@@ -1,5 +1,74 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 151.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c80c71b537d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c80c71b537d) - [ux] ED-13860 add bidi warning decorations to code components
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 151.0.0
14
+
15
+ ### Major Changes
16
+
17
+ - [`b3606652fa1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b3606652fa1) - [ux] Editor integration for Media Inline component
18
+
19
+ ### Minor Changes
20
+
21
+ - [`93da0afefce`](https://bitbucket.org/atlassian/atlassian-frontend/commits/93da0afefce) - CETI-78 Change panel nodeSpec to handle paste when feature flag is off
22
+ - [`53d2eac387d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/53d2eac387d) - ED-12705 Fail all active editor UFO experiences from the editor error boundary
23
+ - [`b58f3c24179`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b58f3c24179) - ED-13643 Instrument editor interaction UFO experience
24
+ - [`971845eac0d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/971845eac0d) - CETI-96 Added new rule to emoji to solve the duplicate icon issue when we copy from renderer
25
+ - [`7024003c42e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7024003c42e) - ED-13213 Base work to set up UFO in the editor & implement editor load UFO experience
26
+
27
+ UFO experiences are hidden behind a feature flag, to enable set
28
+
29
+ ```jsx
30
+ <Editor featureFlags={{ ufo: true }} />
31
+ ```
32
+
33
+ - [`eab5cc4f8bc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eab5cc4f8bc) - CETI-21 User should be able to see the panel Icon when user changes the background color of a predefined panel
34
+ - [`04fdcc4a097`](https://bitbucket.org/atlassian/atlassian-frontend/commits/04fdcc4a097) - Quick insert ability for Media Inline component
35
+ - [`a9e8fe41756`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a9e8fe41756) - Internationalisation for static label of Beautiful Panels Web
36
+ - [`0d8132a260a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0d8132a260a) - Fix Slack link default to block card view when editor has allowBlockCards disabled
37
+ - [`b53d0d54ac2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b53d0d54ac2) - ED-12887 Add render count profiler utilities
38
+ - [`f235d19dcdb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f235d19dcdb) - Added an api for creating a brand new editor state when replacing the document using editorActions
39
+ - [`7fc265976b2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7fc265976b2) - ED-13214 Instrument typing in editor UFO experience
40
+
41
+ ### Patch Changes
42
+
43
+ - [`53cfa98d9f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/53cfa98d9f6) - [ux] Cursors can now be placed after emojis and statuses without trailing spaces
44
+ - [`540988ac12b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/540988ac12b) - Debounce editor and reactEditorView reRendered analytics
45
+ - [`cbde8994bd4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cbde8994bd4) - ED-12846: Fix disappearing table borders in Chrome
46
+ - [`d7b4aa7c019`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d7b4aa7c019) - ED-13878: Force block-type selected menu items to be white font color
47
+ - [`25393b5c63b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/25393b5c63b) - Add prefetch proper ty analytic event to tell if the result is selected from prefetch list
48
+ - [`e9658042982`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e9658042982) - [ux] ED-7545 Fix selected language in one code snippet visually populating to other code snippets on the page
49
+ - [`99757fa97fb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/99757fa97fb) - ED-13642 added ufo session complete analytics event
50
+ - [`8c68b14866f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8c68b14866f) - ED-12700 Fix for compositions in the find input not being supported.
51
+ - [`e856b56fd31`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e856b56fd31) - ED-13669 reuse same links normalization method in plugin and adf schema
52
+ - [`e731664ad62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e731664ad62) - [ux][ed-13588] move max-height CSS from akEditor root to ak-editor-content-area so that the editor maxHeight prop actually enforces a maximum height
53
+ - [`05c9526a999`](https://bitbucket.org/atlassian/atlassian-frontend/commits/05c9526a999) - CETI-123 Web: Feature flag for editing custom panels
54
+ - [`125c6ed9212`](https://bitbucket.org/atlassian/atlassian-frontend/commits/125c6ed9212) - ED-13458 Fix for foreign input causing tables to break
55
+ - [`a113abe23e1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a113abe23e1) - [ux] The selected width of an extension is correctly highlighted in its floating toolbar when toolbar actions are un-done/re-done
56
+ - [`3fde369f5d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3fde369f5d4) - Fix a bug where sometimes the embed link will get states from other embed link
57
+ - [`a92e1f67411`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a92e1f67411) - ED-13633 Disabled editor code highting in safari
58
+ - Updated dependencies
59
+
60
+ ## 150.0.3
61
+
62
+ ### Patch Changes
63
+
64
+ - [`b52e6fa288b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b52e6fa288b) - [HOT-97127] Fix mentions getItems comunication to avoid wrong results
65
+
66
+ ## 150.0.2
67
+
68
+ ### Patch Changes
69
+
70
+ - [`b85e7ce12cd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b85e7ce12cd) - Internal upgrade of memoize-one to 6.0.0
71
+
3
72
  ## 150.0.1
4
73
 
5
74
  ### Patch Changes
@@ -264,31 +264,13 @@ var EditorActions = /*#__PURE__*/function () {
264
264
  return false;
265
265
  }
266
266
 
267
- var state = this.editorView.state;
268
- var schema = state.schema;
269
- var content = (0, _document.processRawValue)(schema, rawValue, undefined, undefined, this.contentTransformer, this.dispatchAnalyticsEvent);
270
-
271
- if (!content) {
272
- return false;
273
- } // In case of replacing a whole document, we only need a content of a top level node e.g. document.
274
-
275
-
276
- var tr = state.tr.replaceWith(0, state.doc.nodeSize - 2, content.content);
277
-
278
- if (!shouldScrollToBottom && !tr.selectionSet) {
279
- // Restore selection at start of document instead of the end.
280
- tr.setSelection(_prosemirrorState.Selection.atStart(tr.doc));
281
- }
282
-
283
- if (shouldScrollToBottom) {
284
- tr = tr.scrollIntoView();
285
- }
286
-
287
- if (!shouldAddToHistory) {
288
- tr.setMeta('addToHistory', false);
267
+ if (this.eventDispatcher) {
268
+ this.eventDispatcher.emit('resetEditorState', {
269
+ doc: rawValue,
270
+ shouldScrollToBottom: shouldScrollToBottom
271
+ });
289
272
  }
290
273
 
291
- this.editorView.dispatch(tr);
292
274
  return true;
293
275
  }
294
276
  }, {
@@ -33,6 +33,8 @@ var _memoizeOne = _interopRequireDefault(require("memoize-one"));
33
33
 
34
34
  var _editorCommon = require("@atlaskit/editor-common");
35
35
 
36
+ var _ufo = require("@atlaskit/editor-common/ufo");
37
+
36
38
  var _analytics = require("../plugins/analytics");
37
39
 
38
40
  var _consts = require("../plugins/analytics/consts");
@@ -43,6 +45,10 @@ var _documentLogger = require("../utils/document-logger");
43
45
 
44
46
  var _WithEditorView = require("./WithEditorView");
45
47
 
48
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
49
+
50
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
51
+
46
52
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
47
53
 
48
54
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -52,16 +58,11 @@ var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
52
58
 
53
59
  var _super = _createSuper(ErrorBoundaryWithEditorView);
54
60
 
55
- function ErrorBoundaryWithEditorView() {
61
+ function ErrorBoundaryWithEditorView(props) {
56
62
  var _this;
57
63
 
58
64
  (0, _classCallCheck2.default)(this, ErrorBoundaryWithEditorView);
59
-
60
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
61
- args[_key] = arguments[_key];
62
- }
63
-
64
- _this = _super.call.apply(_super, [this].concat(args));
65
+ _this = _super.call(this, props);
65
66
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "browserExtensions", undefined);
66
67
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
67
68
  error: undefined
@@ -73,100 +74,135 @@ var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
73
74
 
74
75
  return (0, _featureFlagsContext.getFeatureFlags)(editorView.state);
75
76
  }));
76
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fireAnalytics", function (analyticsErrorPayload) {
77
- var createAnalyticsEvent = _this.props.createAnalyticsEvent;
78
-
79
- _this.getProductName().then(function (product) {
80
- if (createAnalyticsEvent) {
81
- var error = analyticsErrorPayload.error,
82
- errorInfo = analyticsErrorPayload.errorInfo,
83
- errorStack = analyticsErrorPayload.errorStack;
84
- var sharedId = (0, _uuid.default)();
85
- var event = {
86
- action: _analytics.ACTION.EDITOR_CRASHED,
87
- actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
88
- eventType: _analytics.EVENT_TYPE.OPERATIONAL,
89
- attributes: {
90
- product: product,
91
- browserInfo: window && window.navigator && window.navigator.userAgent ? window.navigator.userAgent : 'unknown',
92
- error: error,
93
- errorInfo: errorInfo,
94
- errorId: sharedId,
95
- browserExtensions: _this.browserExtensions
96
- }
97
- }; // Add doc structure if the feature flag is on
77
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sendErrorData", /*#__PURE__*/function () {
78
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(analyticsErrorPayload) {
79
+ var product, error, errorInfo, errorStack, sharedId, attributes, _this$experienceStore;
98
80
 
99
- if (_this.featureFlags.errorBoundaryDocStructure && _this.props.editorView) {
100
- event.attributes.docStructure = (0, _documentLogger.getDocStructure)(_this.props.editorView.state.doc, {
101
- compact: true
102
- });
103
- }
81
+ return _regenerator.default.wrap(function _callee$(_context) {
82
+ while (1) {
83
+ switch (_context.prev = _context.next) {
84
+ case 0:
85
+ _context.next = 2;
86
+ return _this.getProductName();
87
+
88
+ case 2:
89
+ product = _context.sent;
90
+ error = analyticsErrorPayload.error, errorInfo = analyticsErrorPayload.errorInfo, errorStack = analyticsErrorPayload.errorStack;
91
+ sharedId = (0, _uuid.default)();
92
+ attributes = {
93
+ product: product,
94
+ browserInfo: window && window.navigator && window.navigator.userAgent ? window.navigator.userAgent : 'unknown',
95
+ error: error,
96
+ errorInfo: errorInfo,
97
+ errorId: sharedId,
98
+ browserExtensions: _this.browserExtensions,
99
+ docStructure: _this.featureFlags.errorBoundaryDocStructure && _this.props.editorView ? (0, _documentLogger.getDocStructure)(_this.props.editorView.state.doc, {
100
+ compact: true
101
+ }) : undefined
102
+ };
103
+
104
+ _this.fireAnalyticsEvent({
105
+ action: _analytics.ACTION.EDITOR_CRASHED,
106
+ actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
107
+ eventType: _analytics.EVENT_TYPE.OPERATIONAL,
108
+ attributes: attributes
109
+ });
110
+
111
+ _this.fireAnalyticsEvent({
112
+ action: _analytics.ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION,
113
+ actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
114
+ eventType: _analytics.EVENT_TYPE.OPERATIONAL,
115
+ attributes: {
116
+ errorStack: errorStack,
117
+ errorId: sharedId
118
+ }
119
+ });
104
120
 
105
- createAnalyticsEvent(event).fire(_consts.editorAnalyticsChannel);
106
- createAnalyticsEvent({
107
- action: _analytics.ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION,
108
- actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
109
- eventType: _analytics.EVENT_TYPE.OPERATIONAL,
110
- attributes: {
111
- errorStack: errorStack,
112
- errorId: sharedId
121
+ if (_this.featureFlags.ufo && _this.props.editorView) {
122
+ (_this$experienceStore = _this.experienceStore) === null || _this$experienceStore === void 0 ? void 0 : _this$experienceStore.failAll(_objectSpread(_objectSpread({}, _this.getExperienceMetadata(attributes)), {}, {
123
+ errorStack: errorStack
124
+ }));
125
+ }
126
+
127
+ case 9:
128
+ case "end":
129
+ return _context.stop();
113
130
  }
114
- }).fire(_consts.editorAnalyticsChannel);
115
- } else {
116
- // eslint-disable-next-line no-console
117
- console.error('Editor Error Boundary: Missing `createAnalyticsEvent` prop.', {
118
- channel: _consts.editorAnalyticsChannel,
119
- product: product,
120
- error: analyticsErrorPayload
121
- });
122
- }
123
- }).catch(function (e) {
124
- // eslint-disable-next-line no-console
125
- console.error('Failed to resolve product name from contextIdentifierProvider.', e);
126
- });
127
- });
128
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getProductName", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
131
+ }
132
+ }, _callee);
133
+ }));
134
+
135
+ return function (_x) {
136
+ return _ref.apply(this, arguments);
137
+ };
138
+ }());
139
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getProductName", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
129
140
  var contextIdentifierProvider, context;
130
- return _regenerator.default.wrap(function _callee$(_context) {
141
+ return _regenerator.default.wrap(function _callee2$(_context2) {
131
142
  while (1) {
132
- switch (_context.prev = _context.next) {
143
+ switch (_context2.prev = _context2.next) {
133
144
  case 0:
134
145
  contextIdentifierProvider = _this.props.contextIdentifierProvider;
135
146
 
136
147
  if (!contextIdentifierProvider) {
137
- _context.next = 7;
148
+ _context2.next = 7;
138
149
  break;
139
150
  }
140
151
 
141
- _context.next = 4;
152
+ _context2.next = 4;
142
153
  return contextIdentifierProvider;
143
154
 
144
155
  case 4:
145
- context = _context.sent;
156
+ context = _context2.sent;
146
157
 
147
158
  if (!context.product) {
148
- _context.next = 7;
159
+ _context2.next = 7;
149
160
  break;
150
161
  }
151
162
 
152
- return _context.abrupt("return", context.product);
163
+ return _context2.abrupt("return", context.product);
153
164
 
154
165
  case 7:
155
- return _context.abrupt("return", 'atlaskit');
166
+ return _context2.abrupt("return", 'atlaskit');
156
167
 
157
168
  case 8:
158
169
  case "end":
159
- return _context.stop();
170
+ return _context2.stop();
160
171
  }
161
172
  }
162
- }, _callee);
173
+ }, _callee2);
163
174
  })));
175
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "fireAnalyticsEvent", function (event) {
176
+ var _this$props$createAna, _this$props;
177
+
178
+ (_this$props$createAna = (_this$props = _this.props).createAnalyticsEvent) === null || _this$props$createAna === void 0 ? void 0 : _this$props$createAna.call(_this$props, event).fire(_consts.editorAnalyticsChannel);
179
+ });
180
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getExperienceMetadata", function (attributes) {
181
+ var _attributes$browserEx;
182
+
183
+ return {
184
+ browserInfo: attributes.browserInfo,
185
+ error: attributes.error.toString(),
186
+ errorInfo: {
187
+ componentStack: attributes.errorInfo.componentStack
188
+ },
189
+ errorId: attributes.errorId,
190
+ browserExtensions: (_attributes$browserEx = attributes.browserExtensions) === null || _attributes$browserEx === void 0 ? void 0 : _attributes$browserEx.toString(),
191
+ docStructure: attributes.docStructure
192
+ };
193
+ });
194
+
195
+ if (props.editorView) {
196
+ _this.experienceStore = _ufo.ExperienceStore.getInstance(props.editorView);
197
+ }
198
+
164
199
  return _this;
165
200
  }
166
201
 
167
202
  (0, _createClass2.default)(ErrorBoundaryWithEditorView, [{
168
203
  key: "featureFlags",
169
- get: function get() {
204
+ get: // Memoizing this as react alternative suggestion of https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops
205
+ function get() {
170
206
  return this.getFeatureFlags(this.props.editorView);
171
207
  }
172
208
  }, {
@@ -174,13 +210,11 @@ var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
174
210
  value: function componentDidCatch(error, errorInfo) {
175
211
  var _this2 = this;
176
212
 
177
- // Log the error
178
- this.fireAnalytics({
213
+ this.sendErrorData({
179
214
  error: error.toString(),
180
215
  errorInfo: errorInfo,
181
216
  errorStack: error.stack
182
- }); //
183
- // // Update state to allow a re-render to attempt graceful recovery (in the event that
217
+ }); // // Update state to allow a re-render to attempt graceful recovery (in the event that
184
218
  // // the error was caused by a race condition or is intermittent)
185
219
 
186
220
  this.setState({
@@ -200,12 +234,12 @@ var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
200
234
  }, {
201
235
  key: "componentDidMount",
202
236
  value: function () {
203
- var _componentDidMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
204
- return _regenerator.default.wrap(function _callee2$(_context2) {
237
+ var _componentDidMount = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
238
+ return _regenerator.default.wrap(function _callee3$(_context3) {
205
239
  while (1) {
206
- switch (_context2.prev = _context2.next) {
240
+ switch (_context3.prev = _context3.next) {
207
241
  case 0:
208
- _context2.next = 2;
242
+ _context3.next = 2;
209
243
  return (0, _editorCommon.sniffUserBrowserExtensions)({
210
244
  extensions: ['grammarly'],
211
245
  async: true,
@@ -213,14 +247,14 @@ var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
213
247
  });
214
248
 
215
249
  case 2:
216
- this.browserExtensions = _context2.sent;
250
+ this.browserExtensions = _context3.sent;
217
251
 
218
252
  case 3:
219
253
  case "end":
220
- return _context2.stop();
254
+ return _context3.stop();
221
255
  }
222
256
  }
223
- }, _callee2, this);
257
+ }, _callee3, this);
224
258
  }));
225
259
 
226
260
  function componentDidMount() {