@atlaskit/editor-core 182.1.2 → 182.2.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 (402) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/actions/index.js +90 -98
  3. package/dist/cjs/create-editor/ErrorBoundary.js +86 -93
  4. package/dist/cjs/create-editor/ReactEditorViewInternal.js +8 -6
  5. package/dist/cjs/editor-next/index.js +5 -6
  6. package/dist/cjs/editor-next/utils/sendDurationAnalytics.js +34 -37
  7. package/dist/cjs/editor-next/utils/trackEditorActions.js +48 -51
  8. package/dist/cjs/editor.js +29 -34
  9. package/dist/cjs/i18n/cs.js +34 -6
  10. package/dist/cjs/i18n/da.js +34 -6
  11. package/dist/cjs/i18n/de.js +34 -7
  12. package/dist/cjs/i18n/en.js +31 -4
  13. package/dist/cjs/i18n/en_GB.js +34 -7
  14. package/dist/cjs/i18n/en_ZZ.js +35 -8
  15. package/dist/cjs/i18n/es.js +33 -6
  16. package/dist/cjs/i18n/fi.js +33 -6
  17. package/dist/cjs/i18n/fr.js +34 -7
  18. package/dist/cjs/i18n/hu.js +33 -6
  19. package/dist/cjs/i18n/it.js +34 -7
  20. package/dist/cjs/i18n/ja.js +33 -6
  21. package/dist/cjs/i18n/ko.js +33 -6
  22. package/dist/cjs/i18n/nb.js +35 -8
  23. package/dist/cjs/i18n/nl.js +34 -7
  24. package/dist/cjs/i18n/pl.js +34 -7
  25. package/dist/cjs/i18n/pt_BR.js +34 -7
  26. package/dist/cjs/i18n/ru.js +34 -7
  27. package/dist/cjs/i18n/sv.js +33 -6
  28. package/dist/cjs/i18n/th.js +34 -7
  29. package/dist/cjs/i18n/tr.js +33 -6
  30. package/dist/cjs/i18n/uk.js +34 -7
  31. package/dist/cjs/i18n/vi.js +35 -8
  32. package/dist/cjs/i18n/zh.js +33 -4
  33. package/dist/cjs/i18n/zh_TW.js +33 -6
  34. package/dist/cjs/labs/CollapsedEditor/index.js +1 -1
  35. package/dist/cjs/plugins/analytics/plugin.js +1 -1
  36. package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +39 -44
  37. package/dist/cjs/plugins/annotation/pm-plugins/types.js +4 -4
  38. package/dist/cjs/plugins/annotation/types.js +4 -4
  39. package/dist/cjs/plugins/base/pm-plugins/decoration.js +4 -4
  40. package/dist/cjs/plugins/block-type/commands/block-type.js +1 -1
  41. package/dist/cjs/plugins/card/nodeviews/embedCard.js +5 -6
  42. package/dist/cjs/plugins/card/ui/EditLinkToolbar.js +3 -4
  43. package/dist/cjs/plugins/card/ui/EditorSmartCardEventsNext.js +16 -1
  44. package/dist/cjs/plugins/collab-edit/index.js +29 -32
  45. package/dist/cjs/plugins/collab-edit/plugin-state.js +2 -4
  46. package/dist/cjs/plugins/custom-autoformat/doc.js +28 -31
  47. package/dist/cjs/plugins/custom-autoformat/index.js +20 -23
  48. package/dist/cjs/plugins/date/index.js +1 -1
  49. package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -10
  50. package/dist/cjs/plugins/date/utils/internal.js +1 -1
  51. package/dist/cjs/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
  52. package/dist/cjs/plugins/extension/actions.js +36 -39
  53. package/dist/cjs/plugins/extension/context-panel.js +123 -130
  54. package/dist/cjs/plugins/extension/pm-plugins/main.js +82 -89
  55. package/dist/cjs/plugins/extension/pm-plugins/utils.js +46 -51
  56. package/dist/cjs/plugins/extension/ui/Extension/ExtensionComponent.js +44 -48
  57. package/dist/cjs/plugins/feedback-dialog/index.js +52 -57
  58. package/dist/cjs/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +44 -47
  59. package/dist/cjs/plugins/find-replace/actions.js +4 -4
  60. package/dist/cjs/plugins/find-replace/utils/batch-decorations.js +144 -153
  61. package/dist/cjs/plugins/find-replace/utils/index.js +2 -2
  62. package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +40 -46
  63. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -1
  64. package/dist/cjs/plugins/floating-toolbar/ui/ToolbarLoader.js +2 -1
  65. package/dist/cjs/plugins/fragment/pm-plugins/fragment-consistency.js +86 -86
  66. package/dist/cjs/plugins/help-dialog/ui/HelpDialogLoader.js +2 -1
  67. package/dist/cjs/plugins/history/actions.js +4 -4
  68. package/dist/cjs/plugins/hyperlink/HyperlinkToolbarAppearance.js +76 -82
  69. package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
  70. package/dist/cjs/plugins/hyperlink/pm-plugins/main.js +16 -16
  71. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +339 -352
  72. package/dist/cjs/plugins/hyperlink/utils.js +3 -0
  73. package/dist/cjs/plugins/image-upload/pm-plugins/main.js +24 -27
  74. package/dist/cjs/plugins/list/utils/node.js +4 -4
  75. package/dist/cjs/plugins/macro/actions.js +107 -112
  76. package/dist/cjs/plugins/media/nodeviews/mediaGroup.js +43 -46
  77. package/dist/cjs/plugins/media/nodeviews/mediaInline.js +62 -66
  78. package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +544 -575
  79. package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +38 -42
  80. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +108 -113
  81. package/dist/cjs/plugins/media/picker-facade.js +22 -25
  82. package/dist/cjs/plugins/media/pm-plugins/linking/actions.js +4 -4
  83. package/dist/cjs/plugins/media/pm-plugins/main.js +159 -172
  84. package/dist/cjs/plugins/media/pm-plugins/mediaTaskManager.js +36 -39
  85. package/dist/cjs/plugins/media/toolbar/utils.js +30 -33
  86. package/dist/cjs/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +71 -74
  87. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +52 -57
  88. package/dist/cjs/plugins/media/utils/check-media-type.js +37 -40
  89. package/dist/cjs/plugins/mentions/nodeviews/mention.js +29 -31
  90. package/dist/cjs/plugins/mentions/type-ahead/index.js +1 -1
  91. package/dist/cjs/plugins/mobile-dimensions/actions.js +4 -4
  92. package/dist/cjs/plugins/paste/actions.js +4 -4
  93. package/dist/cjs/plugins/paste/handlers.js +23 -26
  94. package/dist/cjs/plugins/paste/linkify-md-plugin.js +3 -0
  95. package/dist/cjs/plugins/paste/md.js +3 -0
  96. package/dist/cjs/plugins/paste/newline-md-plugin.js +3 -0
  97. package/dist/cjs/plugins/paste/paragraph-md-plugin.js +3 -0
  98. package/dist/cjs/plugins/paste/pm-plugins/main.js +25 -27
  99. package/dist/cjs/plugins/quick-insert/assets/index.js +63 -39
  100. package/dist/cjs/plugins/quick-insert/index.js +30 -33
  101. package/dist/cjs/plugins/selection/actions.js +4 -4
  102. package/dist/cjs/plugins/selection/gap-cursor/direction.js +4 -4
  103. package/dist/cjs/plugins/selection/types.js +4 -4
  104. package/dist/cjs/plugins/status/ui/statusPicker.js +7 -8
  105. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -10
  106. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/commands.js +16 -6
  107. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +12 -20
  108. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
  109. package/dist/cjs/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +41 -42
  110. package/dist/cjs/plugins/tasks-and-decisions/utils.js +31 -2
  111. package/dist/cjs/plugins/text-color/pm-plugins/main.js +4 -4
  112. package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
  113. package/dist/cjs/plugins/text-formatting/ui/Toolbar/types.js +4 -4
  114. package/dist/cjs/plugins/type-ahead/constants.js +4 -4
  115. package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +4 -4
  116. package/dist/cjs/plugins/undo-redo/enums.js +4 -4
  117. package/dist/cjs/ui/Appearance/Comment/Comment.js +3 -3
  118. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -2
  119. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  120. package/dist/cjs/ui/ColorPickerButton/index.js +3 -2
  121. package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +68 -73
  122. package/dist/cjs/ui/ConfigPanel/ConfigPanelLoader.js +2 -1
  123. package/dist/cjs/ui/ConfigPanel/Fields/CustomSelect.js +54 -56
  124. package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +51 -55
  125. package/dist/cjs/ui/ConfigPanel/FormErrorBoundary.js +24 -27
  126. package/dist/cjs/ui/ConfigPanel/transformers.js +344 -363
  127. package/dist/cjs/ui/ConfigPanel/types.js +8 -8
  128. package/dist/cjs/ui/Dropdown/index.js +2 -1
  129. package/dist/cjs/ui/DropdownMenu/index.js +2 -1
  130. package/dist/cjs/ui/ElementBrowser/components/ElementBrowserLoader.js +1 -1
  131. package/dist/cjs/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +4 -4
  132. package/dist/cjs/ui/ElementBrowser/types.js +4 -4
  133. package/dist/cjs/ui/LinkSearch/index.js +94 -101
  134. package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +19 -2
  135. package/dist/cjs/ui/ToolbarFeedback/index.js +27 -31
  136. package/dist/cjs/utils/action.js +31 -36
  137. package/dist/cjs/utils/clipboard.js +82 -86
  138. package/dist/cjs/utils/deprecation-warnings.js +1 -1
  139. package/dist/cjs/utils/extensions.js +62 -67
  140. package/dist/cjs/utils/insert.js +4 -4
  141. package/dist/cjs/utils/mark.js +2 -2
  142. package/dist/cjs/utils/performance/simple-measure-to-entries.js +1 -2
  143. package/dist/cjs/utils/performance/track-transactions.js +3 -2
  144. package/dist/cjs/version-wrapper.js +1 -1
  145. package/dist/cjs/version.json +1 -1
  146. package/dist/es2019/actions/index.js +8 -9
  147. package/dist/es2019/create-editor/ReactEditorViewInternal.js +5 -3
  148. package/dist/es2019/editor-next/index.js +5 -6
  149. package/dist/es2019/editor.js +29 -36
  150. package/dist/es2019/i18n/cs.js +34 -6
  151. package/dist/es2019/i18n/da.js +34 -6
  152. package/dist/es2019/i18n/de.js +34 -7
  153. package/dist/es2019/i18n/en.js +31 -4
  154. package/dist/es2019/i18n/en_GB.js +34 -7
  155. package/dist/es2019/i18n/en_ZZ.js +35 -8
  156. package/dist/es2019/i18n/es.js +33 -6
  157. package/dist/es2019/i18n/fi.js +33 -6
  158. package/dist/es2019/i18n/fr.js +34 -7
  159. package/dist/es2019/i18n/hu.js +33 -6
  160. package/dist/es2019/i18n/it.js +34 -7
  161. package/dist/es2019/i18n/ja.js +33 -6
  162. package/dist/es2019/i18n/ko.js +33 -6
  163. package/dist/es2019/i18n/nb.js +35 -8
  164. package/dist/es2019/i18n/nl.js +34 -7
  165. package/dist/es2019/i18n/pl.js +34 -7
  166. package/dist/es2019/i18n/pt_BR.js +34 -7
  167. package/dist/es2019/i18n/ru.js +34 -7
  168. package/dist/es2019/i18n/sv.js +33 -6
  169. package/dist/es2019/i18n/th.js +34 -7
  170. package/dist/es2019/i18n/tr.js +33 -6
  171. package/dist/es2019/i18n/uk.js +34 -7
  172. package/dist/es2019/i18n/vi.js +35 -8
  173. package/dist/es2019/i18n/zh.js +33 -4
  174. package/dist/es2019/i18n/zh_TW.js +33 -6
  175. package/dist/es2019/plugins/annotation/pm-plugins/types.js +3 -3
  176. package/dist/es2019/plugins/annotation/types.js +3 -3
  177. package/dist/es2019/plugins/base/pm-plugins/decoration.js +3 -3
  178. package/dist/es2019/plugins/card/nodeviews/embedCard.js +5 -7
  179. package/dist/es2019/plugins/card/ui/EditLinkToolbar.js +3 -5
  180. package/dist/es2019/plugins/card/ui/EditorSmartCardEventsNext.js +17 -2
  181. package/dist/es2019/plugins/collab-edit/plugin-state.js +1 -2
  182. package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +7 -11
  183. package/dist/es2019/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
  184. package/dist/es2019/plugins/extension/ui/Extension/ExtensionComponent.js +8 -12
  185. package/dist/es2019/plugins/find-replace/actions.js +3 -3
  186. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +2 -1
  187. package/dist/es2019/plugins/fragment/pm-plugins/fragment-consistency.js +56 -71
  188. package/dist/es2019/plugins/history/actions.js +3 -3
  189. package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
  190. package/dist/es2019/plugins/hyperlink/pm-plugins/main.js +6 -6
  191. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -2
  192. package/dist/es2019/plugins/hyperlink/utils.js +3 -0
  193. package/dist/es2019/plugins/list/utils/node.js +3 -3
  194. package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +4 -8
  195. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -3
  196. package/dist/es2019/plugins/media/pm-plugins/linking/actions.js +3 -3
  197. package/dist/es2019/plugins/media/pm-plugins/main.js +22 -31
  198. package/dist/es2019/plugins/mobile-dimensions/actions.js +3 -3
  199. package/dist/es2019/plugins/paste/actions.js +3 -3
  200. package/dist/es2019/plugins/paste/linkify-md-plugin.js +3 -0
  201. package/dist/es2019/plugins/paste/md.js +3 -0
  202. package/dist/es2019/plugins/paste/newline-md-plugin.js +3 -0
  203. package/dist/es2019/plugins/paste/paragraph-md-plugin.js +3 -0
  204. package/dist/es2019/plugins/selection/actions.js +3 -3
  205. package/dist/es2019/plugins/selection/gap-cursor/direction.js +3 -3
  206. package/dist/es2019/plugins/selection/types.js +3 -3
  207. package/dist/es2019/plugins/status/ui/statusPicker.js +6 -7
  208. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -11
  209. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/commands.js +15 -3
  210. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +6 -16
  211. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
  212. package/dist/es2019/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +6 -5
  213. package/dist/es2019/plugins/tasks-and-decisions/utils.js +30 -0
  214. package/dist/es2019/plugins/text-color/pm-plugins/main.js +3 -3
  215. package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
  216. package/dist/es2019/plugins/text-formatting/ui/Toolbar/types.js +3 -3
  217. package/dist/es2019/plugins/type-ahead/constants.js +3 -3
  218. package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +3 -3
  219. package/dist/es2019/plugins/undo-redo/enums.js +3 -3
  220. package/dist/es2019/ui/Appearance/Comment/Comment.js +3 -3
  221. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -2
  222. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  223. package/dist/es2019/ui/ColorPickerButton/index.js +5 -3
  224. package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +3 -4
  225. package/dist/es2019/ui/ConfigPanel/types.js +6 -6
  226. package/dist/es2019/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -3
  227. package/dist/es2019/ui/ElementBrowser/types.js +3 -3
  228. package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +18 -2
  229. package/dist/es2019/ui/ToolbarFeedback/index.js +1 -3
  230. package/dist/es2019/utils/insert.js +3 -3
  231. package/dist/es2019/utils/performance/simple-measure-to-entries.js +1 -1
  232. package/dist/es2019/utils/performance/track-transactions.js +3 -2
  233. package/dist/es2019/version-wrapper.js +1 -1
  234. package/dist/es2019/version.json +1 -1
  235. package/dist/esm/actions/index.js +90 -98
  236. package/dist/esm/create-editor/ErrorBoundary.js +86 -93
  237. package/dist/esm/create-editor/ReactEditorViewInternal.js +6 -5
  238. package/dist/esm/editor-next/index.js +5 -6
  239. package/dist/esm/editor-next/utils/sendDurationAnalytics.js +34 -37
  240. package/dist/esm/editor-next/utils/trackEditorActions.js +48 -51
  241. package/dist/esm/editor.js +29 -34
  242. package/dist/esm/i18n/cs.js +34 -6
  243. package/dist/esm/i18n/da.js +34 -6
  244. package/dist/esm/i18n/de.js +34 -7
  245. package/dist/esm/i18n/en.js +31 -4
  246. package/dist/esm/i18n/en_GB.js +34 -7
  247. package/dist/esm/i18n/en_ZZ.js +35 -8
  248. package/dist/esm/i18n/es.js +33 -6
  249. package/dist/esm/i18n/fi.js +33 -6
  250. package/dist/esm/i18n/fr.js +34 -7
  251. package/dist/esm/i18n/hu.js +33 -6
  252. package/dist/esm/i18n/it.js +34 -7
  253. package/dist/esm/i18n/ja.js +33 -6
  254. package/dist/esm/i18n/ko.js +33 -6
  255. package/dist/esm/i18n/nb.js +35 -8
  256. package/dist/esm/i18n/nl.js +34 -7
  257. package/dist/esm/i18n/pl.js +34 -7
  258. package/dist/esm/i18n/pt_BR.js +34 -7
  259. package/dist/esm/i18n/ru.js +34 -7
  260. package/dist/esm/i18n/sv.js +33 -6
  261. package/dist/esm/i18n/th.js +34 -7
  262. package/dist/esm/i18n/tr.js +33 -6
  263. package/dist/esm/i18n/uk.js +34 -7
  264. package/dist/esm/i18n/vi.js +35 -8
  265. package/dist/esm/i18n/zh.js +33 -4
  266. package/dist/esm/i18n/zh_TW.js +33 -6
  267. package/dist/esm/plugins/analytics/plugin.js +1 -1
  268. package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +39 -44
  269. package/dist/esm/plugins/annotation/pm-plugins/types.js +3 -3
  270. package/dist/esm/plugins/annotation/types.js +3 -3
  271. package/dist/esm/plugins/base/pm-plugins/decoration.js +3 -3
  272. package/dist/esm/plugins/block-type/commands/block-type.js +1 -1
  273. package/dist/esm/plugins/card/nodeviews/embedCard.js +5 -6
  274. package/dist/esm/plugins/card/ui/EditLinkToolbar.js +3 -4
  275. package/dist/esm/plugins/card/ui/EditorSmartCardEventsNext.js +17 -2
  276. package/dist/esm/plugins/collab-edit/index.js +29 -32
  277. package/dist/esm/plugins/collab-edit/plugin-state.js +2 -4
  278. package/dist/esm/plugins/custom-autoformat/doc.js +28 -31
  279. package/dist/esm/plugins/custom-autoformat/index.js +20 -23
  280. package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +7 -10
  281. package/dist/esm/plugins/date/utils/internal.js +1 -1
  282. package/dist/esm/plugins/emoji/pm-plugins/ascii-input-rules.js +27 -28
  283. package/dist/esm/plugins/extension/actions.js +36 -39
  284. package/dist/esm/plugins/extension/context-panel.js +123 -129
  285. package/dist/esm/plugins/extension/pm-plugins/main.js +82 -88
  286. package/dist/esm/plugins/extension/pm-plugins/utils.js +46 -51
  287. package/dist/esm/plugins/extension/ui/Extension/ExtensionComponent.js +44 -49
  288. package/dist/esm/plugins/feedback-dialog/index.js +52 -57
  289. package/dist/esm/plugins/feedback-dialog/loadJiraCollectorDialogScript.js +44 -47
  290. package/dist/esm/plugins/find-replace/actions.js +3 -3
  291. package/dist/esm/plugins/find-replace/utils/batch-decorations.js +144 -153
  292. package/dist/esm/plugins/find-replace/utils/index.js +2 -2
  293. package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +40 -47
  294. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +2 -1
  295. package/dist/esm/plugins/fragment/pm-plugins/fragment-consistency.js +78 -76
  296. package/dist/esm/plugins/history/actions.js +3 -3
  297. package/dist/esm/plugins/hyperlink/HyperlinkToolbarAppearance.js +76 -83
  298. package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +3 -0
  299. package/dist/esm/plugins/hyperlink/pm-plugins/main.js +14 -14
  300. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +339 -353
  301. package/dist/esm/plugins/hyperlink/utils.js +3 -0
  302. package/dist/esm/plugins/image-upload/pm-plugins/main.js +24 -27
  303. package/dist/esm/plugins/list/utils/node.js +3 -3
  304. package/dist/esm/plugins/macro/actions.js +107 -112
  305. package/dist/esm/plugins/media/nodeviews/mediaGroup.js +43 -46
  306. package/dist/esm/plugins/media/nodeviews/mediaInline.js +62 -67
  307. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +544 -575
  308. package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +38 -43
  309. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +108 -114
  310. package/dist/esm/plugins/media/picker-facade.js +22 -25
  311. package/dist/esm/plugins/media/pm-plugins/linking/actions.js +3 -3
  312. package/dist/esm/plugins/media/pm-plugins/main.js +159 -173
  313. package/dist/esm/plugins/media/pm-plugins/mediaTaskManager.js +36 -39
  314. package/dist/esm/plugins/media/toolbar/utils.js +30 -33
  315. package/dist/esm/plugins/media/ui/MediaPicker/PickerFacadeProvider.js +71 -74
  316. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +52 -57
  317. package/dist/esm/plugins/media/utils/check-media-type.js +37 -40
  318. package/dist/esm/plugins/mentions/nodeviews/mention.js +29 -32
  319. package/dist/esm/plugins/mentions/type-ahead/index.js +1 -1
  320. package/dist/esm/plugins/mobile-dimensions/actions.js +3 -3
  321. package/dist/esm/plugins/paste/actions.js +3 -3
  322. package/dist/esm/plugins/paste/handlers.js +23 -26
  323. package/dist/esm/plugins/paste/linkify-md-plugin.js +3 -0
  324. package/dist/esm/plugins/paste/md.js +3 -0
  325. package/dist/esm/plugins/paste/newline-md-plugin.js +3 -0
  326. package/dist/esm/plugins/paste/paragraph-md-plugin.js +3 -0
  327. package/dist/esm/plugins/paste/pm-plugins/main.js +25 -28
  328. package/dist/esm/plugins/quick-insert/index.js +30 -33
  329. package/dist/esm/plugins/selection/actions.js +3 -3
  330. package/dist/esm/plugins/selection/gap-cursor/direction.js +3 -3
  331. package/dist/esm/plugins/selection/types.js +3 -3
  332. package/dist/esm/plugins/status/ui/statusPicker.js +6 -7
  333. package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +9 -10
  334. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/commands.js +17 -7
  335. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +13 -21
  336. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +3 -3
  337. package/dist/esm/plugins/tasks-and-decisions/ui/Task/task-item-with-providers.js +41 -43
  338. package/dist/esm/plugins/tasks-and-decisions/utils.js +28 -0
  339. package/dist/esm/plugins/text-color/pm-plugins/main.js +3 -3
  340. package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +3 -3
  341. package/dist/esm/plugins/text-formatting/ui/Toolbar/types.js +3 -3
  342. package/dist/esm/plugins/type-ahead/constants.js +3 -3
  343. package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +3 -3
  344. package/dist/esm/plugins/undo-redo/enums.js +3 -3
  345. package/dist/esm/ui/Appearance/Comment/Comment.js +3 -3
  346. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -2
  347. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -1
  348. package/dist/esm/ui/ColorPickerButton/index.js +3 -2
  349. package/dist/esm/ui/ConfigPanel/ConfigPanel.js +68 -74
  350. package/dist/esm/ui/ConfigPanel/Fields/CustomSelect.js +54 -57
  351. package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +51 -56
  352. package/dist/esm/ui/ConfigPanel/FormErrorBoundary.js +24 -27
  353. package/dist/esm/ui/ConfigPanel/transformers.js +344 -362
  354. package/dist/esm/ui/ConfigPanel/types.js +6 -6
  355. package/dist/esm/ui/Dropdown/index.js +2 -1
  356. package/dist/esm/ui/DropdownMenu/index.js +2 -1
  357. package/dist/esm/ui/ElementBrowser/hooks/use-select-and-focus-on-arrow-navigation.js +3 -3
  358. package/dist/esm/ui/ElementBrowser/types.js +3 -3
  359. package/dist/esm/ui/LinkSearch/index.js +94 -101
  360. package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +18 -2
  361. package/dist/esm/ui/ToolbarFeedback/index.js +27 -31
  362. package/dist/esm/utils/action.js +31 -36
  363. package/dist/esm/utils/clipboard.js +82 -87
  364. package/dist/esm/utils/deprecation-warnings.js +1 -1
  365. package/dist/esm/utils/extensions.js +62 -67
  366. package/dist/esm/utils/insert.js +3 -3
  367. package/dist/esm/utils/mark.js +2 -2
  368. package/dist/esm/utils/performance/simple-measure-to-entries.js +1 -2
  369. package/dist/esm/utils/performance/track-transactions.js +3 -2
  370. package/dist/esm/version-wrapper.js +1 -1
  371. package/dist/esm/version.json +1 -1
  372. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +1 -0
  373. package/dist/types/i18n/cs.d.ts +29 -2
  374. package/dist/types/i18n/da.d.ts +29 -2
  375. package/dist/types/i18n/de.d.ts +28 -2
  376. package/dist/types/i18n/en.d.ts +28 -2
  377. package/dist/types/i18n/en_GB.d.ts +31 -5
  378. package/dist/types/i18n/en_ZZ.d.ts +28 -2
  379. package/dist/types/i18n/es.d.ts +28 -2
  380. package/dist/types/i18n/fi.d.ts +28 -2
  381. package/dist/types/i18n/fr.d.ts +28 -2
  382. package/dist/types/i18n/hu.d.ts +28 -2
  383. package/dist/types/i18n/it.d.ts +28 -2
  384. package/dist/types/i18n/ja.d.ts +28 -2
  385. package/dist/types/i18n/ko.d.ts +28 -2
  386. package/dist/types/i18n/nb.d.ts +28 -2
  387. package/dist/types/i18n/nl.d.ts +28 -2
  388. package/dist/types/i18n/pl.d.ts +28 -2
  389. package/dist/types/i18n/pt_BR.d.ts +28 -2
  390. package/dist/types/i18n/ru.d.ts +28 -2
  391. package/dist/types/i18n/sv.d.ts +28 -2
  392. package/dist/types/i18n/th.d.ts +28 -2
  393. package/dist/types/i18n/tr.d.ts +28 -2
  394. package/dist/types/i18n/uk.d.ts +28 -2
  395. package/dist/types/i18n/vi.d.ts +28 -2
  396. package/dist/types/i18n/zh.d.ts +30 -2
  397. package/dist/types/i18n/zh_TW.d.ts +28 -2
  398. package/dist/types/plugins/tasks-and-decisions/utils.d.ts +2 -0
  399. package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +3 -1
  400. package/dist/types/utils/document.d.ts +2 -2
  401. package/package.json +14 -14
  402. package/report.api.md +1 -1
@@ -1,9 +1,9 @@
1
- export var ValidationError;
2
- (function (ValidationError) {
1
+ export var ValidationError = /*#__PURE__*/function (ValidationError) {
3
2
  ValidationError["Required"] = "required";
4
3
  ValidationError["Invalid"] = "invalid";
5
- })(ValidationError || (ValidationError = {}));
6
- export var FieldTypeError;
7
- (function (FieldTypeError) {
4
+ return ValidationError;
5
+ }({});
6
+ export var FieldTypeError = /*#__PURE__*/function (FieldTypeError) {
8
7
  FieldTypeError["isMultipleAndRadio"] = "isMultipleAndRadio";
9
- })(FieldTypeError || (FieldTypeError = {}));
8
+ return FieldTypeError;
9
+ }({});
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
2
3
  import _extends from "@babel/runtime/helpers/extends";
3
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -6,7 +7,7 @@ import { Dropdown as DropdownComponent } from '@atlaskit/editor-common/ui-menu';
6
7
  import React, { useContext } from 'react';
7
8
  import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
8
9
  var Dropdown = /*#__PURE__*/React.memo(function (_ref) {
9
- var props = _extends({}, _ref);
10
+ var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
10
11
  var keyDownHandlerContext = useContext(KeyDownHandlerContext);
11
12
  return (
12
13
  /*#__PURE__*/
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
2
3
  import _extends from "@babel/runtime/helpers/extends";
3
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -6,7 +7,7 @@ import { DropdownMenu as DropdownComponent } from '@atlaskit/editor-common/ui-me
6
7
  import React, { useContext } from 'react';
7
8
  import { KeyDownHandlerContext } from '../ToolbarArrowKeyNavigationProvider';
8
9
  var DropdownMenu = /*#__PURE__*/React.memo(function (_ref) {
9
- var props = _extends({}, _ref);
10
+ var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
10
11
  var keyDownHandlerContext = useContext(KeyDownHandlerContext);
11
12
  //This context is to handle the tab, Arrow Right/Left key events for dropdown.
12
13
  //Default context has the void callbacks for above key events
@@ -43,12 +43,12 @@ import { useCallback, useEffect, useRef, useReducer } from 'react';
43
43
  *
44
44
  */
45
45
 
46
- export var ACTIONS;
47
- (function (ACTIONS) {
46
+ export var ACTIONS = /*#__PURE__*/function (ACTIONS) {
48
47
  ACTIONS["FOCUS_SEARCH"] = "focusOnSearch";
49
48
  ACTIONS["UPDATE_STATE"] = "updateState";
50
49
  ACTIONS["MOVE"] = "move";
51
- })(ACTIONS || (ACTIONS = {}));
50
+ return ACTIONS;
51
+ }({});
52
52
  var reducer = function reducer(state, action) {
53
53
  switch (action.type) {
54
54
  case ACTIONS.UPDATE_STATE:
@@ -1,5 +1,5 @@
1
- export var Modes;
2
- (function (Modes) {
1
+ export var Modes = /*#__PURE__*/function (Modes) {
3
2
  Modes["full"] = "full";
4
3
  Modes["inline"] = "inline";
5
- })(Modes || (Modes = {}));
4
+ return Modes;
5
+ }({});
@@ -1,4 +1,3 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
11
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
11
  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; } }
13
12
  import React from 'react';
@@ -81,56 +80,54 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
81
80
  }
82
81
  });
83
82
  _defineProperty(_assertThisInitialized(_this), "handleChange", /*#__PURE__*/function () {
84
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(input) {
85
- return _regeneratorRuntime().wrap(function _callee$(_context) {
86
- while (1) {
87
- switch (_context.prev = _context.next) {
88
- case 0:
89
- _this.setState({
90
- url: input
91
- });
92
- if (!_this.activityProvider) {
93
- _context.next = 24;
94
- break;
95
- }
96
- if (!(input.length === 0)) {
97
- _context.next = 15;
98
- break;
99
- }
100
- _context.t0 = _this;
101
- _context.t1 = limit;
102
- _context.next = 7;
103
- return _this.activityProvider.getRecentItems();
104
- case 7:
105
- _context.t2 = _context.sent;
106
- _context.t3 = _this.props.limit;
107
- _context.t4 = (0, _context.t1)(_context.t2, _context.t3);
108
- _context.t5 = -1;
109
- _context.t6 = {
110
- items: _context.t4,
111
- selectedIndex: _context.t5
112
- };
113
- _context.t0.setState.call(_context.t0, _context.t6);
83
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(input) {
84
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
85
+ while (1) switch (_context.prev = _context.next) {
86
+ case 0:
87
+ _this.setState({
88
+ url: input
89
+ });
90
+ if (!_this.activityProvider) {
114
91
  _context.next = 24;
115
92
  break;
116
- case 15:
117
- _context.t7 = _this;
118
- _context.t8 = limit;
119
- _context.next = 19;
120
- return _this.activityProvider.searchRecent(input);
121
- case 19:
122
- _context.t9 = _context.sent;
123
- _context.t10 = _this.props.limit;
124
- _context.t11 = (0, _context.t8)(_context.t9, _context.t10);
125
- _context.t12 = {
126
- items: _context.t11,
127
- selectedIndex: 0
128
- };
129
- _context.t7.setState.call(_context.t7, _context.t12);
130
- case 24:
131
- case "end":
132
- return _context.stop();
133
- }
93
+ }
94
+ if (!(input.length === 0)) {
95
+ _context.next = 15;
96
+ break;
97
+ }
98
+ _context.t0 = _this;
99
+ _context.t1 = limit;
100
+ _context.next = 7;
101
+ return _this.activityProvider.getRecentItems();
102
+ case 7:
103
+ _context.t2 = _context.sent;
104
+ _context.t3 = _this.props.limit;
105
+ _context.t4 = (0, _context.t1)(_context.t2, _context.t3);
106
+ _context.t5 = -1;
107
+ _context.t6 = {
108
+ items: _context.t4,
109
+ selectedIndex: _context.t5
110
+ };
111
+ _context.t0.setState.call(_context.t0, _context.t6);
112
+ _context.next = 24;
113
+ break;
114
+ case 15:
115
+ _context.t7 = _this;
116
+ _context.t8 = limit;
117
+ _context.next = 19;
118
+ return _this.activityProvider.searchRecent(input);
119
+ case 19:
120
+ _context.t9 = _context.sent;
121
+ _context.t10 = _this.props.limit;
122
+ _context.t11 = (0, _context.t8)(_context.t9, _context.t10);
123
+ _context.t12 = {
124
+ items: _context.t11,
125
+ selectedIndex: 0
126
+ };
127
+ _context.t7.setState.call(_context.t7, _context.t12);
128
+ case 24:
129
+ case "end":
130
+ return _context.stop();
134
131
  }
135
132
  }, _callee);
136
133
  }));
@@ -215,25 +212,23 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
215
212
  }, {
216
213
  key: "componentDidMount",
217
214
  value: function () {
218
- var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
219
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
220
- while (1) {
221
- switch (_context2.prev = _context2.next) {
222
- case 0:
223
- if (!this.props.activityProvider) {
224
- _context2.next = 6;
225
- break;
226
- }
227
- _context2.next = 3;
228
- return this.props.activityProvider;
229
- case 3:
230
- this.activityProvider = _context2.sent;
215
+ var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
216
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
217
+ while (1) switch (_context2.prev = _context2.next) {
218
+ case 0:
219
+ if (!this.props.activityProvider) {
231
220
  _context2.next = 6;
232
- return this.loadRecentItems(this.activityProvider);
233
- case 6:
234
- case "end":
235
- return _context2.stop();
236
- }
221
+ break;
222
+ }
223
+ _context2.next = 3;
224
+ return this.props.activityProvider;
225
+ case 3:
226
+ this.activityProvider = _context2.sent;
227
+ _context2.next = 6;
228
+ return this.loadRecentItems(this.activityProvider);
229
+ case 6:
230
+ case "end":
231
+ return _context2.stop();
237
232
  }
238
233
  }, _callee2, this);
239
234
  }));
@@ -245,39 +240,37 @@ var RecentLink = /*#__PURE__*/function (_React$Component) {
245
240
  }, {
246
241
  key: "loadRecentItems",
247
242
  value: function () {
248
- var _loadRecentItems = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(activityProvider) {
249
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
250
- while (1) {
251
- switch (_context3.prev = _context3.next) {
252
- case 0:
253
- _context3.prev = 0;
254
- if (this.state.url) {
255
- _context3.next = 11;
256
- break;
257
- }
258
- _context3.t0 = this;
259
- _context3.t1 = limit;
260
- _context3.next = 6;
261
- return activityProvider.getRecentItems();
262
- case 6:
263
- _context3.t2 = _context3.sent;
264
- _context3.t3 = this.props.limit;
265
- _context3.t4 = (0, _context3.t1)(_context3.t2, _context3.t3);
266
- _context3.t5 = {
267
- isLoading: true,
268
- items: _context3.t4
269
- };
270
- _context3.t0.setState.call(_context3.t0, _context3.t5);
271
- case 11:
272
- _context3.prev = 11;
273
- this.setState({
274
- isLoading: false
275
- });
276
- return _context3.finish(11);
277
- case 14:
278
- case "end":
279
- return _context3.stop();
280
- }
243
+ var _loadRecentItems = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(activityProvider) {
244
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
245
+ while (1) switch (_context3.prev = _context3.next) {
246
+ case 0:
247
+ _context3.prev = 0;
248
+ if (this.state.url) {
249
+ _context3.next = 11;
250
+ break;
251
+ }
252
+ _context3.t0 = this;
253
+ _context3.t1 = limit;
254
+ _context3.next = 6;
255
+ return activityProvider.getRecentItems();
256
+ case 6:
257
+ _context3.t2 = _context3.sent;
258
+ _context3.t3 = this.props.limit;
259
+ _context3.t4 = (0, _context3.t1)(_context3.t2, _context3.t3);
260
+ _context3.t5 = {
261
+ isLoading: true,
262
+ items: _context3.t4
263
+ };
264
+ _context3.t0.setState.call(_context3.t0, _context3.t5);
265
+ case 11:
266
+ _context3.prev = 11;
267
+ this.setState({
268
+ isLoading: false
269
+ });
270
+ return _context3.finish(11);
271
+ case 14:
272
+ case "end":
273
+ return _context3.stop();
281
274
  }
282
275
  }, _callee3, this, [[0,, 11, 14]]);
283
276
  }));
@@ -3,6 +3,8 @@
3
3
  import { jsx } from '@emotion/react';
4
4
  import { centeredToolbarContainer } from '../styles';
5
5
  import React, { useCallback, useLayoutEffect, useRef } from 'react';
6
+ import { EDIT_AREA_ID } from '../../create-editor/ReactEditorViewInternal';
7
+ import messages from '../Appearance/FullPage/messages';
6
8
  /*
7
9
  ** The context is used to handle the keydown events of submenus.
8
10
  ** Because the keyboard navigation is explicitly managed for main toolbar items
@@ -28,7 +30,8 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
28
30
  disableArrowKeyNavigation = _ref.disableArrowKeyNavigation,
29
31
  isShortcutToFocusToolbar = _ref.isShortcutToFocusToolbar,
30
32
  editorAppearance = _ref.editorAppearance,
31
- useStickyToolbar = _ref.useStickyToolbar;
33
+ useStickyToolbar = _ref.useStickyToolbar,
34
+ intl = _ref.intl;
32
35
  var wrapperRef = useRef(null);
33
36
  var selectedItemIndex = useRef(0);
34
37
  var incrementIndex = useCallback(function (list) {
@@ -64,6 +67,13 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
64
67
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
65
68
  (_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
66
69
  };
70
+ var handleTabLocal = function handleTabLocal() {
71
+ var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
72
+ filteredFocusableElements.forEach(function (element) {
73
+ element.setAttribute('tabindex', '-1');
74
+ });
75
+ filteredFocusableElements[selectedItemIndex.current].setAttribute('tabindex', '0');
76
+ };
67
77
  var focusAndScrollToElement = function focusAndScrollToElement(element) {
68
78
  var scrollToElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
69
79
  if (scrollToElement) {
@@ -135,6 +145,9 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
135
145
  focusAndScrollToElement(filteredFocusableElements[selectedItemIndex.current], allowScrollToElement);
136
146
  event.preventDefault();
137
147
  break;
148
+ case 'Tab':
149
+ handleTabLocal();
150
+ break;
138
151
  case 'Escape':
139
152
  handleEscape(event);
140
153
  break;
@@ -169,7 +182,10 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
169
182
  return jsx("div", {
170
183
  css: editorAppearance === 'comment' && centeredToolbarContainer,
171
184
  className: "custom-key-handler-wrapper",
172
- ref: wrapperRef
185
+ ref: wrapperRef,
186
+ role: "toolbar",
187
+ "aria-label": intl.formatMessage(messages.toolbarLabel),
188
+ "aria-controls": EDIT_AREA_ID
173
189
  }, jsx(KeyDownHandlerContext.Provider, {
174
190
  value: submenuKeydownHandleContext
175
191
  }, children));
@@ -1,4 +1,3 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -7,7 +6,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
9
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
11
10
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
11
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
13
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -69,6 +68,7 @@ var ToolbarFeedback = /*#__PURE__*/function (_PureComponent) {
69
68
  });
70
69
  }
71
70
  });
71
+ // Create a FeedbackInfo instance from props.
72
72
  _defineProperty(_assertThisInitialized(_this), "getFeedbackInfo", function () {
73
73
  var isFeedbackInfoAttr = function isFeedbackInfoAttr(attr) {
74
74
  return ['product', 'packageVersion', 'packageName', 'labels'].indexOf(attr) >= 0;
@@ -91,35 +91,33 @@ var ToolbarFeedback = /*#__PURE__*/function (_PureComponent) {
91
91
  showOptOutOption: !_this.state.showOptOutOption
92
92
  });
93
93
  });
94
- _defineProperty(_assertThisInitialized(_this), "openJiraIssueCollector", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
94
+ _defineProperty(_assertThisInitialized(_this), "openJiraIssueCollector", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
95
95
  var _window$localStorage$, _getContextIdentifier;
96
96
  var editorView, sessionId, contentId, tabId;
97
- return _regeneratorRuntime().wrap(function _callee$(_context) {
98
- while (1) {
99
- switch (_context.prev = _context.next) {
100
- case 0:
101
- _this.setState({
102
- jiraIssueCollectorScriptLoading: true,
103
- showOptOutOption: false
104
- });
105
- editorView = _this.context.editorActions.editorView;
106
- sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
107
- contentId = (_getContextIdentifier = getContextIdentifier(editorView === null || editorView === void 0 ? void 0 : editorView.state)) === null || _getContextIdentifier === void 0 ? void 0 : _getContextIdentifier.objectId;
108
- tabId = window.sessionStorage['awc.tab.id'];
109
- _context.next = 7;
110
- return openFeedbackDialog(_objectSpread(_objectSpread({}, _this.getFeedbackInfo()), {}, {
111
- sessionId: sessionId,
112
- contentId: contentId,
113
- tabId: tabId
114
- }));
115
- case 7:
116
- _this.setState({
117
- jiraIssueCollectorScriptLoading: false
118
- });
119
- case 8:
120
- case "end":
121
- return _context.stop();
122
- }
97
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
98
+ while (1) switch (_context.prev = _context.next) {
99
+ case 0:
100
+ _this.setState({
101
+ jiraIssueCollectorScriptLoading: true,
102
+ showOptOutOption: false
103
+ });
104
+ editorView = _this.context.editorActions.editorView;
105
+ sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
106
+ contentId = (_getContextIdentifier = getContextIdentifier(editorView === null || editorView === void 0 ? void 0 : editorView.state)) === null || _getContextIdentifier === void 0 ? void 0 : _getContextIdentifier.objectId;
107
+ tabId = window.sessionStorage['awc.tab.id'];
108
+ _context.next = 7;
109
+ return openFeedbackDialog(_objectSpread(_objectSpread({}, _this.getFeedbackInfo()), {}, {
110
+ sessionId: sessionId,
111
+ contentId: contentId,
112
+ tabId: tabId
113
+ }));
114
+ case 7:
115
+ _this.setState({
116
+ jiraIssueCollectorScriptLoading: false
117
+ });
118
+ case 8:
119
+ case "end":
120
+ return _context.stop();
123
121
  }
124
122
  }, _callee);
125
123
  })));
@@ -146,8 +144,6 @@ var ToolbarFeedback = /*#__PURE__*/function (_PureComponent) {
146
144
  deprecationWarnings(ToolbarFeedback.name, props, deprecations);
147
145
  return _this;
148
146
  }
149
-
150
- // Create a FeedbackInfo instance from props.
151
147
  _createClass(ToolbarFeedback, [{
152
148
  key: "render",
153
149
  value: function render() {
@@ -1,6 +1,5 @@
1
- import _typeof from "@babel/runtime/helpers/typeof";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
3
  import { Selection } from 'prosemirror-state';
5
4
  import { pluginKey as extensionPluginKey } from '../plugins/extension/plugin-key';
6
5
  import { forceAutoSave } from '../plugins/extension/commands';
@@ -9,25 +8,23 @@ export function __temporaryFixForConfigPanel(_x) {
9
8
  return _temporaryFixForConfigPanel.apply(this, arguments);
10
9
  }
11
10
  function _temporaryFixForConfigPanel() {
12
- _temporaryFixForConfigPanel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(editorView) {
11
+ _temporaryFixForConfigPanel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(editorView) {
13
12
  var extensionPluginState;
14
- return _regeneratorRuntime().wrap(function _callee$(_context) {
15
- while (1) {
16
- switch (_context.prev = _context.next) {
17
- case 0:
18
- extensionPluginState = editorView.state && extensionPluginKey.getState(editorView.state);
19
- if (!(extensionPluginState && extensionPluginState.showContextPanel)) {
20
- _context.next = 4;
21
- break;
22
- }
13
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
14
+ while (1) switch (_context.prev = _context.next) {
15
+ case 0:
16
+ extensionPluginState = editorView.state && extensionPluginKey.getState(editorView.state);
17
+ if (!(extensionPluginState && extensionPluginState.showContextPanel)) {
23
18
  _context.next = 4;
24
- return new Promise(function (resolve) {
25
- forceAutoSave(resolve)(editorView.state, editorView.dispatch);
26
- });
27
- case 4:
28
- case "end":
29
- return _context.stop();
30
- }
19
+ break;
20
+ }
21
+ _context.next = 4;
22
+ return new Promise(function (resolve) {
23
+ forceAutoSave(resolve)(editorView.state, editorView.dispatch);
24
+ });
25
+ case 4:
26
+ case "end":
27
+ return _context.stop();
31
28
  }
32
29
  }, _callee);
33
30
  }));
@@ -42,25 +39,23 @@ export function getEditorValueWithMedia(_x2) {
42
39
  * passes the tr through and dispatches the cumulated transaction
43
40
  */
44
41
  function _getEditorValueWithMedia() {
45
- _getEditorValueWithMedia = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(editorView) {
42
+ _getEditorValueWithMedia = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(editorView) {
46
43
  var mediaPluginState;
47
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
48
- while (1) {
49
- switch (_context2.prev = _context2.next) {
50
- case 0:
51
- mediaPluginState = editorView.state && mediaPluginKey.getState(editorView.state);
52
- if (!(mediaPluginState && mediaPluginState.waitForMediaUpload)) {
53
- _context2.next = 4;
54
- break;
55
- }
44
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
45
+ while (1) switch (_context2.prev = _context2.next) {
46
+ case 0:
47
+ mediaPluginState = editorView.state && mediaPluginKey.getState(editorView.state);
48
+ if (!(mediaPluginState && mediaPluginState.waitForMediaUpload)) {
56
49
  _context2.next = 4;
57
- return mediaPluginState.waitForPendingTasks();
58
- case 4:
59
- return _context2.abrupt("return", editorView.state.doc);
60
- case 5:
61
- case "end":
62
- return _context2.stop();
63
- }
50
+ break;
51
+ }
52
+ _context2.next = 4;
53
+ return mediaPluginState.waitForPendingTasks();
54
+ case 4:
55
+ return _context2.abrupt("return", editorView.state.doc);
56
+ case 5:
57
+ case "end":
58
+ return _context2.stop();
64
59
  }
65
60
  }, _callee2);
66
61
  }));