@atlaskit/editor-core 162.0.1 → 163.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (503) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
  3. package/dist/cjs/create-editor/ReactEditorView.js +2 -2
  4. package/dist/cjs/editor.js +3 -7
  5. package/dist/cjs/keymaps/index.js +14 -9
  6. package/dist/cjs/labs/next/full-page.js +34 -46
  7. package/dist/cjs/labs/next/presets/cxhtml.js +0 -1
  8. package/dist/cjs/nodeviews/ReactNodeView.js +16 -41
  9. package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +227 -0
  10. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +21 -0
  11. package/dist/cjs/nodeviews/getPerformanceOptions.js +64 -0
  12. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/index.js +16 -6
  13. package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +10 -17
  14. package/dist/cjs/plugins/analytics/types/enums.js +2 -0
  15. package/dist/cjs/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +9 -16
  16. package/dist/cjs/plugins/base/index.js +26 -7
  17. package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +141 -76
  18. package/dist/cjs/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -8
  19. package/dist/cjs/plugins/block-type/commands/block-type.js +21 -9
  20. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +9 -9
  21. package/dist/cjs/plugins/card/nodeviews/genericCard.js +4 -4
  22. package/dist/cjs/plugins/card/pm-plugins/doc.js +53 -6
  23. package/dist/cjs/plugins/card/pm-plugins/main.js +16 -1
  24. package/dist/cjs/plugins/card/styles.js +2 -2
  25. package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
  26. package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +7 -8
  27. package/dist/cjs/plugins/code-block/styles.js +2 -2
  28. package/dist/cjs/plugins/collab-edit/styles.js +2 -2
  29. package/dist/cjs/plugins/collab-edit/ui/avatars.js +6 -1
  30. package/dist/cjs/plugins/collab-edit/ui/colored-avatar-item.js +4 -5
  31. package/dist/cjs/plugins/collab-edit/ui/invite-to-edit.js +15 -4
  32. package/dist/cjs/plugins/collab-edit/ui/styles.js +10 -14
  33. package/dist/cjs/plugins/date/nodeviews/date.js +30 -75
  34. package/dist/cjs/plugins/date/pm-plugins/main.js +8 -11
  35. package/dist/cjs/plugins/date/styles.js +2 -2
  36. package/dist/cjs/plugins/date/ui/DatePicker/date-picker-input.js +7 -6
  37. package/dist/cjs/plugins/date/ui/DatePicker/index.js +8 -7
  38. package/dist/cjs/plugins/emoji/styles.js +3 -3
  39. package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +13 -16
  40. package/dist/cjs/plugins/expand/ui/styles.js +26 -12
  41. package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +16 -9
  42. package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +9 -6
  43. package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/index.js +7 -3
  44. package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +7 -4
  45. package/dist/cjs/plugins/extension/ui/Extension/Lozenge.js +14 -13
  46. package/dist/cjs/plugins/extension/ui/Extension/styles.js +20 -26
  47. package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +14 -17
  48. package/dist/cjs/plugins/extension/ui/styles.js +2 -2
  49. package/dist/cjs/plugins/fake-text-cursor/styles.js +2 -2
  50. package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
  51. package/dist/cjs/plugins/find-replace/styles.js +2 -2
  52. package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +6 -7
  53. package/dist/cjs/plugins/floating-toolbar/ui/styles.js +7 -1
  54. package/dist/cjs/plugins/grid/styles.js +2 -2
  55. package/dist/cjs/plugins/help-dialog/ui/index.js +134 -40
  56. package/dist/cjs/plugins/help-dialog/ui/styles.js +26 -49
  57. package/dist/cjs/plugins/hyperlink/styles.js +6 -16
  58. package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +23 -20
  59. package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +13 -10
  60. package/dist/cjs/plugins/list/commands/index.js +8 -0
  61. package/dist/cjs/plugins/list/pm-plugins/main.js +6 -0
  62. package/dist/cjs/plugins/list/styles.js +2 -2
  63. package/dist/cjs/plugins/list/utils/node.js +4 -3
  64. package/dist/cjs/plugins/media/index.js +9 -40
  65. package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +28 -23
  66. package/dist/cjs/plugins/media/pm-plugins/main.js +1 -8
  67. package/dist/cjs/plugins/media/pm-plugins/media-editor-plugin-factory.js +2 -67
  68. package/dist/cjs/plugins/media/styles.js +1 -1
  69. package/dist/cjs/plugins/media/toolbar/index.js +0 -13
  70. package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -1
  71. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +12 -8
  72. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/styled.js +7 -6
  73. package/dist/cjs/plugins/media/utils/media-single.js +8 -4
  74. package/dist/cjs/plugins/mentions/styles.js +2 -2
  75. package/dist/cjs/plugins/panel/styles.js +5 -2
  76. package/dist/cjs/plugins/placeholder/styles.js +2 -2
  77. package/dist/cjs/plugins/placeholder-text/styles.js +2 -2
  78. package/dist/cjs/plugins/rule/pm-plugins/input-rule.js +2 -1
  79. package/dist/cjs/plugins/rule/styles.js +5 -2
  80. package/dist/cjs/plugins/selection/gap-cursor/styles.js +4 -4
  81. package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +13 -30
  82. package/dist/cjs/plugins/status/index.js +9 -12
  83. package/dist/cjs/plugins/status/nodeviews/status.js +43 -126
  84. package/dist/cjs/plugins/status/plugin.js +14 -6
  85. package/dist/cjs/plugins/status/styles.js +2 -2
  86. package/dist/cjs/plugins/table/index.js +1 -1
  87. package/dist/cjs/plugins/table/ui/FloatingContextualButton/index.js +10 -16
  88. package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +2 -2
  89. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +7 -12
  90. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +2 -2
  91. package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
  92. package/dist/cjs/plugins/tasks-and-decisions/styles.js +2 -2
  93. package/dist/cjs/plugins/type-ahead/constants.js +3 -1
  94. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +8 -0
  95. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +15 -56
  96. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +48 -3
  97. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +4 -1
  98. package/dist/cjs/plugins/unsupported-content/styles.js +2 -2
  99. package/dist/cjs/profiler/render-count.js +1 -3
  100. package/dist/cjs/ui/Appearance/Comment/Toolbar.js +1 -1
  101. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +0 -1
  102. package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
  103. package/dist/cjs/ui/Appearance/FullPage/messages.js +2 -2
  104. package/dist/cjs/ui/ConfigPanel/ErrorMessage/ErrorImage.js +18 -16
  105. package/dist/cjs/ui/ConfigPanel/Fields/Boolean.js +16 -14
  106. package/dist/cjs/ui/ConfigPanel/Fields/TabGroup.js +13 -10
  107. package/dist/cjs/ui/ConfigPanel/Fields/UserSelect.js +15 -4
  108. package/dist/cjs/ui/ConfigPanel/Header.js +30 -30
  109. package/dist/cjs/ui/ContentStyles/index.js +13 -20
  110. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +5 -6
  111. package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +30 -23
  112. package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +51 -47
  113. package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +17 -14
  114. package/dist/cjs/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +18 -18
  115. package/dist/cjs/ui/ElementBrowser/components/StatelessElementBrowser.js +55 -68
  116. package/dist/cjs/ui/ElementBrowser/hooks/use-container-width.js +10 -11
  117. package/dist/cjs/ui/FloatingToolbar/styles.js +1 -1
  118. package/dist/cjs/ui/LinkSearch/LinkSearchList.js +18 -22
  119. package/dist/cjs/ui/PortalProvider/index.js +3 -3
  120. package/dist/cjs/ui/Resizer/styled.js +7 -5
  121. package/dist/cjs/ui/Toolbar/ToolbarInner.js +5 -3
  122. package/dist/cjs/ui/WithFlash/index.js +9 -17
  123. package/dist/cjs/utils/insert.js +25 -2
  124. package/dist/cjs/utils/performance/components/RenderTracking.js +52 -0
  125. package/dist/cjs/version-wrapper.js +1 -1
  126. package/dist/cjs/version.json +1 -1
  127. package/dist/es2019/create-editor/ErrorBoundary.js +2 -2
  128. package/dist/es2019/create-editor/ReactEditorView.js +1 -1
  129. package/dist/es2019/editor.js +3 -5
  130. package/dist/es2019/keymaps/index.js +10 -4
  131. package/dist/es2019/labs/next/full-page.js +44 -43
  132. package/dist/es2019/labs/next/presets/cxhtml.js +0 -1
  133. package/dist/es2019/nodeviews/ReactNodeView.js +13 -35
  134. package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +216 -0
  135. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +15 -0
  136. package/dist/es2019/nodeviews/getPerformanceOptions.js +47 -0
  137. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/index.js +18 -7
  138. package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +5 -5
  139. package/dist/es2019/plugins/analytics/types/enums.js +2 -0
  140. package/dist/es2019/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +12 -7
  141. package/dist/es2019/plugins/base/index.js +24 -5
  142. package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +135 -77
  143. package/dist/es2019/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -4
  144. package/dist/es2019/plugins/block-type/commands/block-type.js +18 -11
  145. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +10 -6
  146. package/dist/es2019/plugins/card/nodeviews/genericCard.js +5 -5
  147. package/dist/es2019/plugins/card/pm-plugins/doc.js +44 -4
  148. package/dist/es2019/plugins/card/pm-plugins/main.js +17 -1
  149. package/dist/es2019/plugins/card/styles.js +1 -1
  150. package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
  151. package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +8 -7
  152. package/dist/es2019/plugins/code-block/styles.js +4 -0
  153. package/dist/es2019/plugins/collab-edit/styles.js +1 -1
  154. package/dist/es2019/plugins/collab-edit/ui/avatars.js +6 -2
  155. package/dist/es2019/plugins/collab-edit/ui/colored-avatar-item.js +5 -4
  156. package/dist/es2019/plugins/collab-edit/ui/invite-to-edit.js +9 -5
  157. package/dist/es2019/plugins/collab-edit/ui/styles.js +5 -7
  158. package/dist/es2019/plugins/date/nodeviews/date.js +37 -48
  159. package/dist/es2019/plugins/date/pm-plugins/main.js +8 -10
  160. package/dist/es2019/plugins/date/styles.js +1 -1
  161. package/dist/es2019/plugins/date/ui/DatePicker/date-picker-input.js +8 -4
  162. package/dist/es2019/plugins/date/ui/DatePicker/index.js +9 -5
  163. package/dist/es2019/plugins/emoji/styles.js +1 -2
  164. package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +13 -14
  165. package/dist/es2019/plugins/expand/ui/styles.js +32 -22
  166. package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +17 -11
  167. package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +7 -6
  168. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/index.js +9 -5
  169. package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +5 -3
  170. package/dist/es2019/plugins/extension/ui/Extension/Lozenge.js +14 -7
  171. package/dist/es2019/plugins/extension/ui/Extension/styles.js +14 -8
  172. package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +15 -9
  173. package/dist/es2019/plugins/extension/ui/styles.js +2 -1
  174. package/dist/es2019/plugins/fake-text-cursor/styles.js +1 -1
  175. package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
  176. package/dist/es2019/plugins/find-replace/styles.js +1 -1
  177. package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +12 -8
  178. package/dist/es2019/plugins/floating-toolbar/ui/styles.js +7 -1
  179. package/dist/es2019/plugins/grid/styles.js +1 -1
  180. package/dist/es2019/plugins/help-dialog/ui/index.js +132 -37
  181. package/dist/es2019/plugins/help-dialog/ui/styles.js +13 -13
  182. package/dist/es2019/plugins/hyperlink/styles.js +1 -5
  183. package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +25 -20
  184. package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +14 -7
  185. package/dist/es2019/plugins/list/commands/index.js +7 -0
  186. package/dist/es2019/plugins/list/pm-plugins/main.js +6 -0
  187. package/dist/es2019/plugins/list/styles.js +1 -1
  188. package/dist/es2019/plugins/list/utils/node.js +4 -3
  189. package/dist/es2019/plugins/media/index.js +1 -28
  190. package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +30 -16
  191. package/dist/es2019/plugins/media/pm-plugins/main.js +1 -7
  192. package/dist/es2019/plugins/media/pm-plugins/media-editor-plugin-factory.js +1 -49
  193. package/dist/es2019/plugins/media/styles.js +1 -2
  194. package/dist/es2019/plugins/media/toolbar/index.js +0 -12
  195. package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +0 -1
  196. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +14 -9
  197. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/styled.js +4 -5
  198. package/dist/es2019/plugins/media/utils/media-single.js +9 -5
  199. package/dist/es2019/plugins/mentions/styles.js +1 -1
  200. package/dist/es2019/plugins/panel/styles.js +3 -3
  201. package/dist/es2019/plugins/placeholder/styles.js +1 -1
  202. package/dist/es2019/plugins/placeholder-text/styles.js +1 -1
  203. package/dist/es2019/plugins/rule/pm-plugins/input-rule.js +4 -1
  204. package/dist/es2019/plugins/rule/styles.js +3 -3
  205. package/dist/es2019/plugins/selection/gap-cursor/styles.js +2 -2
  206. package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +4 -20
  207. package/dist/es2019/plugins/status/index.js +1 -5
  208. package/dist/es2019/plugins/status/nodeviews/status.js +45 -82
  209. package/dist/es2019/plugins/status/plugin.js +13 -6
  210. package/dist/es2019/plugins/status/styles.js +1 -7
  211. package/dist/es2019/plugins/table/index.js +1 -1
  212. package/dist/es2019/plugins/table/ui/FloatingContextualButton/index.js +11 -10
  213. package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  214. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +7 -8
  215. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +1 -1
  216. package/dist/es2019/plugins/table/ui/common-styles.js +4 -0
  217. package/dist/es2019/plugins/tasks-and-decisions/styles.js +1 -1
  218. package/dist/es2019/plugins/type-ahead/constants.js +1 -0
  219. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +11 -1
  220. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +19 -51
  221. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +41 -3
  222. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +3 -1
  223. package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
  224. package/dist/es2019/profiler/render-count.js +1 -1
  225. package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -0
  226. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +0 -1
  227. package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
  228. package/dist/es2019/ui/Appearance/FullPage/messages.js +1 -1
  229. package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +19 -16
  230. package/dist/es2019/ui/ConfigPanel/Fields/Boolean.js +18 -13
  231. package/dist/es2019/ui/ConfigPanel/Fields/TabGroup.js +14 -8
  232. package/dist/es2019/ui/ConfigPanel/Fields/UserSelect.js +12 -3
  233. package/dist/es2019/ui/ConfigPanel/Header.js +30 -19
  234. package/dist/es2019/ui/ContentStyles/index.js +33 -38
  235. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +5 -6
  236. package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +49 -38
  237. package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +54 -33
  238. package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +18 -10
  239. package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +19 -17
  240. package/dist/es2019/ui/ElementBrowser/components/StatelessElementBrowser.js +132 -119
  241. package/dist/es2019/ui/ElementBrowser/hooks/use-container-width.js +10 -9
  242. package/dist/es2019/ui/FloatingToolbar/styles.js +2 -1
  243. package/dist/es2019/ui/LinkSearch/LinkSearchList.js +14 -9
  244. package/dist/es2019/ui/PortalProvider/index.js +3 -3
  245. package/dist/es2019/ui/Resizer/styled.js +3 -3
  246. package/dist/es2019/ui/Toolbar/ToolbarInner.js +6 -3
  247. package/dist/es2019/ui/WithFlash/index.js +15 -6
  248. package/dist/es2019/utils/insert.js +20 -0
  249. package/dist/es2019/utils/performance/components/RenderTracking.js +37 -0
  250. package/dist/es2019/version-wrapper.js +1 -1
  251. package/dist/es2019/version.json +1 -1
  252. package/dist/esm/create-editor/ErrorBoundary.js +2 -2
  253. package/dist/esm/create-editor/ReactEditorView.js +1 -1
  254. package/dist/esm/editor.js +3 -5
  255. package/dist/esm/keymaps/index.js +7 -4
  256. package/dist/esm/labs/next/full-page.js +38 -36
  257. package/dist/esm/labs/next/presets/cxhtml.js +0 -1
  258. package/dist/esm/nodeviews/ReactNodeView.js +17 -38
  259. package/dist/esm/nodeviews/getInlineNodeViewProducer.js +212 -0
  260. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +9 -0
  261. package/dist/esm/nodeviews/getPerformanceOptions.js +45 -0
  262. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/index.js +17 -7
  263. package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +5 -5
  264. package/dist/esm/plugins/analytics/types/enums.js +2 -0
  265. package/dist/esm/plugins/avatar-group/ui/AvatarGroupPluginWrapper.js +9 -9
  266. package/dist/esm/plugins/base/index.js +26 -7
  267. package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +134 -69
  268. package/dist/esm/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.js +5 -4
  269. package/dist/esm/plugins/block-type/commands/block-type.js +19 -9
  270. package/dist/esm/plugins/breakout/ui/LayoutButton.js +9 -6
  271. package/dist/esm/plugins/card/nodeviews/genericCard.js +5 -5
  272. package/dist/esm/plugins/card/pm-plugins/doc.js +47 -4
  273. package/dist/esm/plugins/card/pm-plugins/main.js +15 -1
  274. package/dist/esm/plugins/card/styles.js +1 -1
  275. package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +6 -6
  276. package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +8 -9
  277. package/dist/esm/plugins/code-block/styles.js +2 -2
  278. package/dist/esm/plugins/collab-edit/styles.js +1 -1
  279. package/dist/esm/plugins/collab-edit/ui/avatars.js +6 -2
  280. package/dist/esm/plugins/collab-edit/ui/colored-avatar-item.js +5 -4
  281. package/dist/esm/plugins/collab-edit/ui/invite-to-edit.js +9 -5
  282. package/dist/esm/plugins/collab-edit/ui/styles.js +6 -7
  283. package/dist/esm/plugins/date/nodeviews/date.js +30 -71
  284. package/dist/esm/plugins/date/pm-plugins/main.js +8 -9
  285. package/dist/esm/plugins/date/styles.js +1 -1
  286. package/dist/esm/plugins/date/ui/DatePicker/date-picker-input.js +7 -4
  287. package/dist/esm/plugins/date/ui/DatePicker/index.js +8 -5
  288. package/dist/esm/plugins/emoji/styles.js +2 -2
  289. package/dist/esm/plugins/expand/ui/ExpandIconButton.js +13 -15
  290. package/dist/esm/plugins/expand/ui/styles.js +24 -12
  291. package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +18 -11
  292. package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -5
  293. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/index.js +9 -5
  294. package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +5 -3
  295. package/dist/esm/plugins/extension/ui/Extension/Lozenge.js +13 -7
  296. package/dist/esm/plugins/extension/ui/Extension/styles.js +13 -11
  297. package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +15 -9
  298. package/dist/esm/plugins/extension/ui/styles.js +2 -2
  299. package/dist/esm/plugins/fake-text-cursor/styles.js +1 -1
  300. package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +1 -1
  301. package/dist/esm/plugins/find-replace/styles.js +1 -1
  302. package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +6 -7
  303. package/dist/esm/plugins/floating-toolbar/ui/styles.js +7 -1
  304. package/dist/esm/plugins/grid/styles.js +1 -1
  305. package/dist/esm/plugins/help-dialog/ui/index.js +135 -41
  306. package/dist/esm/plugins/help-dialog/ui/styles.js +13 -13
  307. package/dist/esm/plugins/hyperlink/styles.js +3 -5
  308. package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +24 -20
  309. package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +14 -7
  310. package/dist/esm/plugins/list/commands/index.js +7 -0
  311. package/dist/esm/plugins/list/pm-plugins/main.js +6 -0
  312. package/dist/esm/plugins/list/styles.js +1 -1
  313. package/dist/esm/plugins/list/utils/node.js +4 -3
  314. package/dist/esm/plugins/media/index.js +9 -37
  315. package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +29 -15
  316. package/dist/esm/plugins/media/pm-plugins/main.js +1 -9
  317. package/dist/esm/plugins/media/pm-plugins/media-editor-plugin-factory.js +1 -58
  318. package/dist/esm/plugins/media/styles.js +1 -1
  319. package/dist/esm/plugins/media/toolbar/index.js +0 -12
  320. package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -1
  321. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +13 -9
  322. package/dist/esm/plugins/media/ui/ResizableMediaSingle/styled.js +4 -3
  323. package/dist/esm/plugins/media/utils/media-single.js +9 -5
  324. package/dist/esm/plugins/mentions/styles.js +1 -1
  325. package/dist/esm/plugins/panel/styles.js +4 -2
  326. package/dist/esm/plugins/placeholder/styles.js +1 -1
  327. package/dist/esm/plugins/placeholder-text/styles.js +1 -1
  328. package/dist/esm/plugins/rule/pm-plugins/input-rule.js +2 -1
  329. package/dist/esm/plugins/rule/styles.js +4 -2
  330. package/dist/esm/plugins/selection/gap-cursor/styles.js +3 -3
  331. package/dist/esm/plugins/selection/pm-plugins/selection-main.js +5 -21
  332. package/dist/esm/plugins/status/index.js +9 -12
  333. package/dist/esm/plugins/status/nodeviews/status.js +37 -115
  334. package/dist/esm/plugins/status/plugin.js +13 -6
  335. package/dist/esm/plugins/status/styles.js +2 -2
  336. package/dist/esm/plugins/table/index.js +1 -1
  337. package/dist/esm/plugins/table/ui/FloatingContextualButton/index.js +10 -11
  338. package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
  339. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +7 -10
  340. package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +1 -1
  341. package/dist/esm/plugins/table/ui/common-styles.js +1 -1
  342. package/dist/esm/plugins/tasks-and-decisions/styles.js +1 -1
  343. package/dist/esm/plugins/type-ahead/constants.js +1 -0
  344. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +9 -1
  345. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +18 -56
  346. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +44 -3
  347. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +3 -1
  348. package/dist/esm/plugins/unsupported-content/styles.js +1 -1
  349. package/dist/esm/profiler/render-count.js +1 -1
  350. package/dist/esm/ui/Appearance/Comment/Toolbar.js +1 -1
  351. package/dist/esm/ui/Appearance/FullPage/FullPage.js +0 -1
  352. package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +0 -1
  353. package/dist/esm/ui/Appearance/FullPage/messages.js +1 -1
  354. package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +19 -16
  355. package/dist/esm/ui/ConfigPanel/Fields/Boolean.js +17 -13
  356. package/dist/esm/ui/ConfigPanel/Fields/TabGroup.js +13 -8
  357. package/dist/esm/ui/ConfigPanel/Fields/UserSelect.js +14 -3
  358. package/dist/esm/ui/ConfigPanel/Header.js +30 -19
  359. package/dist/esm/ui/ContentStyles/index.js +12 -17
  360. package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -6
  361. package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +29 -18
  362. package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +50 -35
  363. package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +18 -10
  364. package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +19 -17
  365. package/dist/esm/ui/ElementBrowser/components/StatelessElementBrowser.js +53 -52
  366. package/dist/esm/ui/ElementBrowser/hooks/use-container-width.js +9 -8
  367. package/dist/esm/ui/FloatingToolbar/styles.js +1 -1
  368. package/dist/esm/ui/LinkSearch/LinkSearchList.js +14 -9
  369. package/dist/esm/ui/PortalProvider/index.js +3 -3
  370. package/dist/esm/ui/Resizer/styled.js +4 -2
  371. package/dist/esm/ui/Toolbar/ToolbarInner.js +6 -3
  372. package/dist/esm/ui/WithFlash/index.js +8 -8
  373. package/dist/esm/utils/insert.js +20 -0
  374. package/dist/esm/utils/performance/components/RenderTracking.js +39 -0
  375. package/dist/esm/version-wrapper.js +1 -1
  376. package/dist/esm/version.json +1 -1
  377. package/dist/types/editor.d.ts +1 -1
  378. package/dist/types/keymaps/index.d.ts +3 -2
  379. package/dist/types/labs/next/full-page.d.ts +1 -1
  380. package/dist/types/labs/next/mobile.d.ts +1 -1
  381. package/dist/types/nodeviews/ReactNodeView.d.ts +0 -5
  382. package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +23 -0
  383. package/dist/types/nodeviews/getInlineNodeViewProducer.styles.d.ts +1 -0
  384. package/dist/types/nodeviews/getPerformanceOptions.d.ts +19 -0
  385. package/dist/types/plugins/alignment/ui/ToolbarAlignment/index.d.ts +3 -1
  386. package/dist/types/plugins/alignment/ui/ToolbarAlignment/styles.d.ts +4 -5
  387. package/dist/types/plugins/analytics/types/enums.d.ts +2 -0
  388. package/dist/types/plugins/analytics/types/events.d.ts +11 -3
  389. package/dist/types/plugins/analytics/types/general-events.d.ts +1 -1
  390. package/dist/types/plugins/analytics/types/utils.d.ts +4 -0
  391. package/dist/types/plugins/avatar-group/ui/AvatarGroupPluginWrapper.d.ts +2 -2
  392. package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +12 -6
  393. package/dist/types/plugins/before-primaryToolbar/ui/BeforePrimaryToolbarWrapper.d.ts +3 -3
  394. package/dist/types/plugins/breakout/ui/LayoutButton.d.ts +1 -0
  395. package/dist/types/plugins/card/pm-plugins/doc.d.ts +1 -0
  396. package/dist/types/plugins/card/pm-plugins/main.d.ts +1 -1
  397. package/dist/types/plugins/card/styles.d.ts +1 -1
  398. package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +1 -1
  399. package/dist/types/plugins/collab-edit/styles.d.ts +1 -1
  400. package/dist/types/plugins/collab-edit/ui/avatars.d.ts +1 -0
  401. package/dist/types/plugins/collab-edit/ui/colored-avatar-item.d.ts +3 -2
  402. package/dist/types/plugins/collab-edit/ui/invite-to-edit.d.ts +1 -0
  403. package/dist/types/plugins/collab-edit/ui/styles.d.ts +3 -8
  404. package/dist/types/plugins/date/nodeviews/date.d.ts +3 -15
  405. package/dist/types/plugins/date/styles.d.ts +1 -1
  406. package/dist/types/plugins/date/ui/DatePicker/date-picker-input.d.ts +1 -0
  407. package/dist/types/plugins/date/ui/DatePicker/index.d.ts +1 -0
  408. package/dist/types/plugins/emoji/styles.d.ts +2 -2
  409. package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +5 -3
  410. package/dist/types/plugins/expand/ui/styles.d.ts +2 -1
  411. package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +1 -0
  412. package/dist/types/plugins/extension/ui/Extension/Extension/styles.d.ts +3 -8
  413. package/dist/types/plugins/extension/ui/Extension/InlineExtension/index.d.ts +3 -1
  414. package/dist/types/plugins/extension/ui/Extension/InlineExtension/styles.d.ts +2 -2
  415. package/dist/types/plugins/extension/ui/Extension/Lozenge.d.ts +3 -1
  416. package/dist/types/plugins/extension/ui/Extension/styles.d.ts +6 -6
  417. package/dist/types/plugins/extension/ui/SaveIndicator/SaveIndicator.d.ts +1 -0
  418. package/dist/types/plugins/extension/ui/styles.d.ts +1 -1
  419. package/dist/types/plugins/fake-text-cursor/styles.d.ts +1 -1
  420. package/dist/types/plugins/find-replace/styles.d.ts +1 -1
  421. package/dist/types/plugins/floating-toolbar/ui/styles.d.ts +6 -1
  422. package/dist/types/plugins/grid/styles.d.ts +1 -1
  423. package/dist/types/plugins/help-dialog/ui/index.d.ts +3 -1
  424. package/dist/types/plugins/help-dialog/ui/styles.d.ts +12 -13
  425. package/dist/types/plugins/hyperlink/styles.d.ts +2 -4
  426. package/dist/types/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +4 -2
  427. package/dist/types/plugins/jira-issue/nodeviews/jira-issue.d.ts +3 -2
  428. package/dist/types/plugins/list/styles.d.ts +1 -1
  429. package/dist/types/plugins/list/utils/node.d.ts +0 -1
  430. package/dist/types/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.d.ts +3 -1
  431. package/dist/types/plugins/media/pm-plugins/main.d.ts +0 -1
  432. package/dist/types/plugins/media/pm-plugins/media-editor-plugin-factory.d.ts +1 -3
  433. package/dist/types/plugins/media/types.d.ts +0 -19
  434. package/dist/types/plugins/media/ui/ResizableMediaSingle/index.d.ts +3 -1
  435. package/dist/types/plugins/media/ui/ResizableMediaSingle/styled.d.ts +2 -2
  436. package/dist/types/plugins/mentions/styles.d.ts +1 -1
  437. package/dist/types/plugins/panel/styles.d.ts +2 -1
  438. package/dist/types/plugins/placeholder/styles.d.ts +1 -1
  439. package/dist/types/plugins/placeholder-text/styles.d.ts +1 -1
  440. package/dist/types/plugins/rule/styles.d.ts +2 -1
  441. package/dist/types/plugins/selection/gap-cursor/styles.d.ts +1 -1
  442. package/dist/types/plugins/status/nodeviews/status.d.ts +6 -13
  443. package/dist/types/plugins/status/plugin.d.ts +2 -3
  444. package/dist/types/plugins/status/styles.d.ts +1 -1
  445. package/dist/types/plugins/status/ui/statusPicker.d.ts +1 -1
  446. package/dist/types/plugins/table/ui/FloatingContextualButton/index.d.ts +4 -2
  447. package/dist/types/plugins/table/ui/FloatingContextualButton/styles.d.ts +1 -1
  448. package/dist/types/plugins/table/ui/FloatingContextualMenu/index.d.ts +3 -2
  449. package/dist/types/plugins/table/ui/FloatingContextualMenu/styles.d.ts +1 -1
  450. package/dist/types/plugins/tasks-and-decisions/styles.d.ts +1 -1
  451. package/dist/types/plugins/type-ahead/constants.d.ts +1 -0
  452. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +1 -0
  453. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +26 -0
  454. package/dist/types/plugins/unsupported-content/styles.d.ts +1 -1
  455. package/dist/types/types/editor-appearance-component.d.ts +0 -1
  456. package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +0 -1
  457. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +3 -9
  458. package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
  459. package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +1 -1
  460. package/dist/types/ui/ConfigPanel/ErrorMessage/ErrorImage.d.ts +1 -0
  461. package/dist/types/ui/ConfigPanel/Fields/Boolean.d.ts +2 -2
  462. package/dist/types/ui/ConfigPanel/Fields/TabGroup.d.ts +1 -0
  463. package/dist/types/ui/ConfigPanel/FormErrorBoundary.d.ts +1 -1
  464. package/dist/types/ui/ConfigPanel/Header.d.ts +3 -3
  465. package/dist/types/ui/ContentStyles/index.d.ts +1 -4
  466. package/dist/types/ui/ElementBrowser/ModalElementBrowser.d.ts +1 -0
  467. package/dist/types/ui/ElementBrowser/components/ElementList/ElementList.d.ts +1 -0
  468. package/dist/types/ui/ElementBrowser/components/ElementSearch.d.ts +1 -1
  469. package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +2 -1
  470. package/dist/types/ui/ElementBrowser/hooks/use-container-width.d.ts +1 -0
  471. package/dist/types/ui/LinkSearch/LinkSearchList.d.ts +4 -3
  472. package/dist/types/ui/Resizer/styled.d.ts +1 -2
  473. package/dist/types/ui/Toolbar/ToolbarInner.d.ts +3 -1
  474. package/dist/types/ui/ToolbarButton/index.d.ts +3 -3
  475. package/dist/types/ui/ToolbarButton/styles.d.ts +2 -2
  476. package/dist/types/ui/WithFlash/index.d.ts +3 -1
  477. package/dist/types/utils/insert.d.ts +2 -1
  478. package/dist/types/utils/performance/components/RenderTracking.d.ts +13 -0
  479. package/package.json +27 -29
  480. package/dist/cjs/plugins/media/commands/media-editor.js +0 -80
  481. package/dist/cjs/plugins/media/pm-plugins/media-editor.js +0 -106
  482. package/dist/cjs/plugins/media/toolbar/annotation.js +0 -244
  483. package/dist/cjs/plugins/media/ui/MediaEditor.js +0 -88
  484. package/dist/cjs/utils/compare.js +0 -136
  485. package/dist/cjs/utils/react-hooks/use-component-renderer-tracking/index.js +0 -83
  486. package/dist/es2019/plugins/media/commands/media-editor.js +0 -46
  487. package/dist/es2019/plugins/media/pm-plugins/media-editor.js +0 -43
  488. package/dist/es2019/plugins/media/toolbar/annotation.js +0 -136
  489. package/dist/es2019/plugins/media/ui/MediaEditor.js +0 -51
  490. package/dist/es2019/utils/compare.js +0 -99
  491. package/dist/es2019/utils/react-hooks/use-component-renderer-tracking/index.js +0 -66
  492. package/dist/esm/plugins/media/commands/media-editor.js +0 -59
  493. package/dist/esm/plugins/media/pm-plugins/media-editor.js +0 -90
  494. package/dist/esm/plugins/media/toolbar/annotation.js +0 -218
  495. package/dist/esm/plugins/media/ui/MediaEditor.js +0 -76
  496. package/dist/esm/utils/compare.js +0 -115
  497. package/dist/esm/utils/react-hooks/use-component-renderer-tracking/index.js +0 -68
  498. package/dist/types/plugins/media/commands/media-editor.d.ts +0 -7
  499. package/dist/types/plugins/media/pm-plugins/media-editor.d.ts +0 -3
  500. package/dist/types/plugins/media/toolbar/annotation.d.ts +0 -24
  501. package/dist/types/plugins/media/ui/MediaEditor.d.ts +0 -14
  502. package/dist/types/utils/compare.d.ts +0 -32
  503. package/dist/types/utils/react-hooks/use-component-renderer-tracking/index.d.ts +0 -30
@@ -1,6 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
2
  import { NodeSelection, TextSelection } from 'prosemirror-state';
3
- import { browser } from '@atlaskit/editor-common/utils';
4
3
  import { createPluginState, getPluginState } from '../plugin-factory';
5
4
  import { selectionPluginKey } from '../types';
6
5
  import { getDecorations, shouldRecalcDecorations, getNodeSelectionAnalyticsPayload, getRangeSelectionAnalyticsPayload, getAllSelectionAnalyticsPayload, getCellSelectionAnalyticsPayload } from '../utils';
@@ -118,27 +117,12 @@ export var createPlugin = function createPlugin(dispatch, dispatchAnalyticsEvent
118
117
  return false;
119
118
  },
120
119
  keydown: function keydown(editorView, event) {
121
- var state = editorView.state; // Firefox bugfix to bypass issue with editing text adjacent to a DOM node with
122
- // contenteditable="false". (See https://product-fabric.atlassian.net/browse/ED-9452)
123
- // On keypress, if the head of cursor selection touches a node with contenteditable="false",
124
- // we temporarily remove the attribute, wait one tick, then restore it with its original value.
125
-
126
- if (browser.gecko) {
127
- var node = editorView.nodeDOM(editorView.state.selection.head);
128
-
129
- if (node instanceof HTMLElement && node.getAttribute('contenteditable') === 'false') {
130
- node.removeAttribute('contenteditable');
131
- requestAnimationFrame(function () {
132
- node.setAttribute('contenteditable', 'false');
133
- });
134
- }
135
- } // Bugfix for block ReactNodeViews like table and extension
120
+ // Bugfix for block ReactNodeViews like table and extension
136
121
  // They could not be selected with Shift + ArrowDown/ArrowUp
137
122
  // Fixed when contenteditable = false, but then you couldn't edit their contents
138
123
  // Therefore, briefly set contenteditable=false to allow the selection through, then set it back to true
139
-
140
-
141
124
  if (event instanceof KeyboardEvent && event.shiftKey && (event.key === 'ArrowDown' || event.key === 'ArrowUp')) {
125
+ var state = editorView.state;
142
126
  var pos;
143
127
 
144
128
  if (event.key === 'ArrowDown') {
@@ -151,11 +135,11 @@ export var createPlugin = function createPlugin(dispatch, dispatchAnalyticsEvent
151
135
  }
152
136
  }
153
137
 
154
- var _node = editorView.nodeDOM(pos);
138
+ var node = editorView.nodeDOM(pos);
155
139
 
156
- if (_node instanceof HTMLDivElement && _node.className.includes('View-content-wrap') // class added by ReactNodeView
140
+ if (node instanceof HTMLDivElement && node.className.includes('View-content-wrap') // class added by ReactNodeView
157
141
  ) {
158
- toggleContentEditable(_node, true);
142
+ toggleContentEditable(node, true);
159
143
  }
160
144
  }
161
145
 
@@ -23,27 +23,24 @@ var baseStatusPlugin = function baseStatusPlugin(options) {
23
23
  pmPlugins: function pmPlugins() {
24
24
  return [{
25
25
  name: 'status',
26
- plugin: function plugin(_ref) {
27
- var dispatch = _ref.dispatch,
28
- portalProviderAPI = _ref.portalProviderAPI,
29
- eventDispatcher = _ref.eventDispatcher;
30
- return createStatusPlugin(dispatch, portalProviderAPI, eventDispatcher, options);
26
+ plugin: function plugin(pmPluginFactoryParams) {
27
+ return createStatusPlugin(pmPluginFactoryParams, options);
31
28
  }
32
29
  }, {
33
30
  name: 'statusKeymap',
34
31
  plugin: keymapPlugin
35
32
  }];
36
33
  },
37
- contentComponent: function contentComponent(_ref2) {
38
- var editorView = _ref2.editorView;
34
+ contentComponent: function contentComponent(_ref) {
35
+ var editorView = _ref.editorView;
39
36
  var domAtPos = editorView.domAtPos.bind(editorView);
40
37
  return /*#__PURE__*/React.createElement(WithPluginState, {
41
38
  plugins: {
42
39
  statusState: pluginKey
43
40
  },
44
- render: function render(_ref3) {
45
- var _ref3$statusState = _ref3.statusState,
46
- statusState = _ref3$statusState === void 0 ? {} : _ref3$statusState;
41
+ render: function render(_ref2) {
42
+ var _ref2$statusState = _ref2.statusState,
43
+ statusState = _ref2$statusState === void 0 ? {} : _ref2$statusState;
47
44
  var showStatusPickerAt = statusState.showStatusPickerAt;
48
45
 
49
46
  if (typeof showStatusPickerAt !== 'number') {
@@ -92,8 +89,8 @@ var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, optio
92
89
  }
93
90
 
94
91
  plugin.pluginsOptions = {
95
- quickInsert: function quickInsert(_ref4) {
96
- var formatMessage = _ref4.formatMessage;
92
+ quickInsert: function quickInsert(_ref3) {
93
+ var formatMessage = _ref3.formatMessage;
97
94
  return [{
98
95
  id: 'status',
99
96
  title: formatMessage(messages.status),
@@ -1,133 +1,55 @@
1
- import _get from "@babel/runtime/helpers/get";
2
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
10
2
 
11
3
  var _templateObject;
12
4
 
13
- 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); }; }
14
-
15
- 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; } }
16
-
17
5
  import React from 'react';
18
6
  import { injectIntl } from 'react-intl-next';
19
7
  import styled from 'styled-components';
20
- import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
21
8
  import { Status } from '@atlaskit/status/element';
22
- import { ReactNodeView } from '../../../nodeviews';
23
9
  import { messages } from './messages';
24
10
  export var StyledStatus = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n opacity: ", ";\n"])), function (props) {
25
11
  return props.placeholderStyle ? 0.5 : 1;
26
12
  });
27
13
 
28
- var StatusContainerView = /*#__PURE__*/function (_React$Component) {
29
- _inherits(StatusContainerView, _React$Component);
30
-
31
- var _super = _createSuper(StatusContainerView);
32
-
33
- function StatusContainerView(props) {
34
- var _this;
35
-
36
- _classCallCheck(this, StatusContainerView);
37
-
38
- _this = _super.call(this, props);
39
-
40
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
41
- if (event.nativeEvent.stopImmediatePropagation) {
42
- event.nativeEvent.stopImmediatePropagation();
43
- } // handling of popup is done in plugin.apply on selection change.
44
-
45
- });
14
+ var StatusContainerView = function StatusContainerView(props) {
15
+ var text = props.text,
16
+ color = props.color,
17
+ localId = props.localId,
18
+ style = props.style,
19
+ formatMessage = props.intl.formatMessage;
20
+ var statusText = text ? text : formatMessage(messages.placeholder);
46
21
 
47
- return _this;
48
- }
22
+ var handleClick = function handleClick(event) {
23
+ if (event.nativeEvent.stopImmediatePropagation) {
24
+ event.nativeEvent.stopImmediatePropagation();
25
+ } // handling of popup is done in plugin.apply on selection change.
49
26
 
50
- _createClass(StatusContainerView, [{
51
- key: "render",
52
- value: function render() {
53
- var _this$props = this.props,
54
- text = _this$props.text,
55
- color = _this$props.color,
56
- localId = _this$props.localId,
57
- style = _this$props.style,
58
- formatMessage = _this$props.intl.formatMessage;
59
- var statusText = text ? text : formatMessage(messages.placeholder);
60
- return /*#__PURE__*/React.createElement(StyledStatus, {
61
- placeholderStyle: !text
62
- }, /*#__PURE__*/React.createElement(Status, {
63
- text: statusText,
64
- color: color,
65
- localId: localId,
66
- style: style,
67
- onClick: this.handleClick
68
- }));
69
- }
70
- }]);
71
-
72
- return StatusContainerView;
73
- }(React.Component);
27
+ };
74
28
 
75
- _defineProperty(StatusContainerView, "displayName", 'StatusContainerView');
29
+ return /*#__PURE__*/React.createElement(StyledStatus, {
30
+ placeholderStyle: !text
31
+ }, /*#__PURE__*/React.createElement(Status, {
32
+ text: statusText,
33
+ color: color,
34
+ localId: localId,
35
+ style: style,
36
+ onClick: handleClick
37
+ }));
38
+ };
76
39
 
77
40
  export var IntlStatusContainerView = injectIntl(StatusContainerView);
78
- export var StatusNodeView = /*#__PURE__*/function (_ReactNodeView) {
79
- _inherits(StatusNodeView, _ReactNodeView);
80
-
81
- var _super2 = _createSuper(StatusNodeView);
82
-
83
- function StatusNodeView() {
84
- _classCallCheck(this, StatusNodeView);
85
-
86
- return _super2.apply(this, arguments);
87
- }
88
-
89
- _createClass(StatusNodeView, [{
90
- key: "createDomRef",
91
- value: function createDomRef() {
92
- return _get(_getPrototypeOf(StatusNodeView.prototype), "createDomRef", this).call(this);
93
- }
94
- }, {
95
- key: "setDomAttrs",
96
- value: function setDomAttrs(node, element) {
97
- var _node$attrs = node.attrs,
98
- color = _node$attrs.color,
99
- localId = _node$attrs.localId,
100
- style = _node$attrs.style;
101
- element.dataset.color = color;
102
- element.dataset.localId = localId;
103
- element.dataset.style = style;
104
- }
105
- }, {
106
- key: "render",
107
- value: function render(props) {
108
- var options = props.options;
109
- var _this$node$attrs = this.node.attrs,
110
- text = _this$node$attrs.text,
111
- color = _this$node$attrs.color,
112
- localId = _this$node$attrs.localId,
113
- style = _this$node$attrs.style;
114
- return /*#__PURE__*/React.createElement(React.Fragment, null, options && options.allowZeroWidthSpaceAfter && ZERO_WIDTH_SPACE, /*#__PURE__*/React.createElement(IntlStatusContainerView, {
115
- view: this.view,
116
- text: text,
117
- color: color,
118
- style: style,
119
- localId: localId
120
- }), options && options.allowZeroWidthSpaceAfter && ZERO_WIDTH_SPACE);
121
- }
122
- }]);
123
-
124
- return StatusNodeView;
125
- }(ReactNodeView);
126
- export default function statusNodeView(portalProviderAPI, eventDispatcher, options) {
127
- return function (node, view, getPos) {
128
- var hasIntlContext = true;
129
- return new StatusNodeView(node, view, getPos, portalProviderAPI, eventDispatcher, {
130
- options: options
131
- }, undefined, undefined, undefined, hasIntlContext).init();
132
- };
133
- }
41
+ export var StatusNodeView = function StatusNodeView(props) {
42
+ var view = props.view;
43
+ var _props$node$attrs = props.node.attrs,
44
+ text = _props$node$attrs.text,
45
+ color = _props$node$attrs.color,
46
+ localId = _props$node$attrs.localId,
47
+ style = _props$node$attrs.style;
48
+ return /*#__PURE__*/React.createElement(IntlStatusContainerView, {
49
+ view: view,
50
+ text: text,
51
+ color: color,
52
+ style: style,
53
+ localId: localId
54
+ });
55
+ };
@@ -6,12 +6,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
6
6
 
7
7
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
8
8
  import { NodeSelection, TextSelection } from 'prosemirror-state';
9
- import statusNodeView from './nodeviews/status';
9
+ import { getInlineNodeViewProducer } from '../../nodeviews/getInlineNodeViewProducer';
10
+ import { StatusNodeView } from './nodeviews/status';
10
11
  import { pluginKey } from './plugin-key';
11
12
  import { isEmptyStatus, mayGetStatusAtSelection } from './utils';
12
13
  export { pluginKey, pluginKeyName } from './plugin-key';
13
14
 
14
- var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispatcher, options) {
15
+ var createPlugin = function createPlugin(pmPluginFactoryParams, options) {
15
16
  return new SafePlugin({
16
17
  state: {
17
18
  init: function init() {
@@ -26,7 +27,7 @@ var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispa
26
27
  if (meta) {
27
28
  var newState = _objectSpread(_objectSpread({}, state), meta);
28
29
 
29
- dispatch(pluginKey, newState);
30
+ pmPluginFactoryParams.dispatch(pluginKey, newState);
30
31
  return newState;
31
32
  }
32
33
 
@@ -42,7 +43,7 @@ var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispa
42
43
  });
43
44
 
44
45
  if (_newState.showStatusPickerAt !== state.showStatusPickerAt) {
45
- dispatch(pluginKey, _newState);
46
+ pmPluginFactoryParams.dispatch(pluginKey, _newState);
46
47
  return _newState;
47
48
  }
48
49
  }
@@ -63,7 +64,7 @@ var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispa
63
64
  showStatusPickerAt: _showStatusPickerAt
64
65
  });
65
66
 
66
- dispatch(pluginKey, _newState2);
67
+ pmPluginFactoryParams.dispatch(pluginKey, _newState2);
67
68
  return _newState2;
68
69
  }
69
70
  }
@@ -112,7 +113,13 @@ var createPlugin = function createPlugin(dispatch, portalProviderAPI, eventDispa
112
113
  key: pluginKey,
113
114
  props: {
114
115
  nodeViews: {
115
- status: statusNodeView(portalProviderAPI, eventDispatcher, options)
116
+ status: getInlineNodeViewProducer({
117
+ pmPluginFactoryParams: pmPluginFactoryParams,
118
+ Component: StatusNodeView,
119
+ extraComponentProps: {
120
+ options: options
121
+ }
122
+ })
116
123
  }
117
124
  }
118
125
  });
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
- import { css } from 'styled-components';
5
+ import { css } from '@emotion/react';
6
6
  import { StatusSharedCssClassName, TableSharedCssClassName } from '@atlaskit/editor-common/styles';
7
7
  import { SelectionStyle, getSelectionStyles, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
8
- export var statusStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", ",\n .", ",\n [data-layout-section] {\n .", " {\n max-width: 100%;\n line-height: 0;\n\n > span {\n width: 100%;\n }\n }\n }\n .", " {\n // these two styles can be removed when displayInlineBlockForInlineNodes is enabled by default\n // as it will make all inline nodes inline-block by default\n display: inline-block;\n user-select: all;\n\n > span {\n display: inline-block;\n cursor: pointer;\n line-height: 0; /* Prevent responsive layouts increasing height of container. */\n }\n\n &.", "\n .", "\n > span {\n ", "\n }\n }\n\n .danger {\n .", " > span {\n background-color: ", ";\n }\n\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n }\n }\n"])), TableSharedCssClassName.TABLE_CELL_WRAPPER, TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER, StatusSharedCssClassName.STATUS_CONTAINER, StatusSharedCssClassName.STATUS_CONTAINER, akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, getSelectionStyles([SelectionStyle.BoxShadow]), StatusSharedCssClassName.STATUS_LOZENGE, akEditorDeleteBackgroundWithOpacity, StatusSharedCssClassName.STATUS_CONTAINER, akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, akEditorSelectedBorderSize, akEditorDeleteBorder);
8
+ export var statusStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", ",\n .", ",\n [data-layout-section] {\n .", " {\n max-width: 100%;\n line-height: 0;\n\n > span {\n width: 100%;\n }\n }\n }\n .", " {\n > span {\n cursor: pointer;\n line-height: 0; /* Prevent responsive layouts increasing height of container. */\n }\n\n &.", "\n .", "\n > span {\n ", "\n }\n }\n\n .danger {\n .", " > span {\n background-color: ", ";\n }\n\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n }\n }\n"])), TableSharedCssClassName.TABLE_CELL_WRAPPER, TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER, StatusSharedCssClassName.STATUS_CONTAINER, StatusSharedCssClassName.STATUS_CONTAINER, akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, getSelectionStyles([SelectionStyle.BoxShadow]), StatusSharedCssClassName.STATUS_LOZENGE, akEditorDeleteBackgroundWithOpacity, StatusSharedCssClassName.STATUS_CONTAINER, akEditorSelectedNodeClassName, StatusSharedCssClassName.STATUS_LOZENGE, akEditorSelectedBorderSize, akEditorDeleteBorder);
@@ -230,7 +230,7 @@ var tablesPlugin = function tablesPlugin(options) {
230
230
  id: 'table',
231
231
  title: formatMessage(messages.table),
232
232
  description: formatMessage(messages.tableDescription),
233
- keywords: ['cell'],
233
+ keywords: ['cell', 'table'],
234
234
  priority: 600,
235
235
  keyshortcut: tooltip(toggleTable),
236
236
  icon: function icon() {
@@ -5,18 +5,16 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
9
-
10
- var _templateObject;
11
8
 
12
9
  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); }; }
13
10
 
14
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; } }
15
12
 
13
+ /** @jsx jsx */
16
14
  import React from 'react';
15
+ import { jsx } from '@emotion/react';
17
16
  import { findDomRefAtPos } from 'prosemirror-utils';
18
17
  import { injectIntl } from 'react-intl-next';
19
- import styled from 'styled-components';
20
18
  import { Popup } from '@atlaskit/editor-common/ui';
21
19
  import { akEditorFloatingOverlapPanelZIndex, akEditorSmallZIndex } from '@atlaskit/editor-shared-styles';
22
20
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
@@ -29,7 +27,6 @@ import { CONTENT_COMPONENT } from '../../../analytics/types';
29
27
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../../../analytics';
30
28
  import { tableFloatingCellButtonStyles } from './styles';
31
29
  import { ErrorBoundary } from '../../../../ui/ErrorBoundary';
32
- var ButtonWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), tableFloatingCellButtonStyles);
33
30
  export var FloatingContextualButtonInner = /*#__PURE__*/function (_React$Component) {
34
31
  _inherits(FloatingContextualButtonInner, _React$Component);
35
32
 
@@ -108,12 +105,14 @@ export var FloatingContextualButtonInner = /*#__PURE__*/function (_React$Compone
108
105
 
109
106
  var tableWrapper = closestElement(targetCellRef, ".".concat(ClassName.TABLE_NODE_WRAPPER));
110
107
  var labelCellOptions = formatMessage(messages.cellOptions);
111
- var button = /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(ToolbarButton, {
108
+ var button = jsx("div", {
109
+ css: tableFloatingCellButtonStyles
110
+ }, jsx(ToolbarButton, {
112
111
  className: ClassName.CONTEXTUAL_MENU_BUTTON,
113
112
  selected: isContextualMenuOpen,
114
113
  title: labelCellOptions,
115
114
  onClick: this.handleClick,
116
- iconBefore: /*#__PURE__*/React.createElement(ExpandIcon, {
115
+ iconBefore: jsx(ExpandIcon, {
117
116
  label: ""
118
117
  }),
119
118
  "aria-label": labelCellOptions
@@ -122,7 +121,7 @@ export var FloatingContextualButtonInner = /*#__PURE__*/function (_React$Compone
122
121
 
123
122
  if (this.props.stickyHeader && parentSticky) {
124
123
  var pos = targetCellRef.getBoundingClientRect();
125
- return /*#__PURE__*/React.createElement("div", {
124
+ return jsx("div", {
126
125
  style: {
127
126
  position: 'fixed',
128
127
  top: this.props.stickyHeader.top + this.props.stickyHeader.padding + 3 + 3,
@@ -132,7 +131,7 @@ export var FloatingContextualButtonInner = /*#__PURE__*/function (_React$Compone
132
131
  }, button);
133
132
  }
134
133
 
135
- return /*#__PURE__*/React.createElement(Popup, {
134
+ return jsx(Popup, {
136
135
  alignX: "right",
137
136
  alignY: "start",
138
137
  target: targetCellRef,
@@ -159,9 +158,9 @@ _defineProperty(FloatingContextualButtonInner, "displayName", 'FloatingContextua
159
158
 
160
159
  var FloatingContextualButton = injectIntl(FloatingContextualButtonInner);
161
160
  export default function (props) {
162
- return /*#__PURE__*/React.createElement(ErrorBoundary, {
161
+ return jsx(ErrorBoundary, {
163
162
  component: ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON,
164
163
  dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
165
164
  fallbackComponent: null
166
- }, /*#__PURE__*/React.createElement(FloatingContextualButton, props));
165
+ }, jsx(FloatingContextualButton, props));
167
166
  }
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
- import { css } from 'styled-components';
5
+ import { css } from '@emotion/react';
6
6
  import { N0, N20 } from '@atlaskit/theme/colors';
7
7
  import { borderRadius } from '@atlaskit/theme/constants';
8
8
  import { contextualMenuTriggerSize } from '../consts';
@@ -1,19 +1,14 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
- var _templateObject;
4
-
5
- import React from 'react';
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
6
3
  import { findDomRefAtPos } from 'prosemirror-utils';
7
4
  import { findCellRectClosestToPos, getSelectionRect, isSelectionType } from '@atlaskit/editor-tables/utils';
8
- import styled from 'styled-components';
9
5
  import { Popup } from '@atlaskit/editor-common/ui';
10
6
  import { akEditorFloatingOverlapPanelZIndex } from '@atlaskit/editor-shared-styles';
11
7
  import { getPluginState } from '../../pm-plugins/plugin-factory';
12
8
  import { pluginKey } from '../../pm-plugins/plugin-key';
13
9
  import { contextualMenuDropdownWidth, contextualMenuTriggerSize } from '../consts';
14
10
  import { tablePopupStyles } from './styles';
15
- import ContextualMenu from './ContextualMenu';
16
- var MenuWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), tablePopupStyles); // offset of the contextual menu dropdown
11
+ import ContextualMenu from './ContextualMenu'; // offset of the contextual menu dropdown
17
12
 
18
13
  var calculateOffset = function calculateOffset(targetCellRef, state) {
19
14
  var _pluginKey$getState = pluginKey.getState(state),
@@ -64,7 +59,7 @@ var FloatingContextualMenu = function FloatingContextualMenu(_ref) {
64
59
  return null;
65
60
  }
66
61
 
67
- return /*#__PURE__*/React.createElement(Popup, {
62
+ return jsx(Popup, {
68
63
  alignX: "right",
69
64
  alignY: "top",
70
65
  target: targetCellRef,
@@ -78,7 +73,9 @@ var FloatingContextualMenu = function FloatingContextualMenu(_ref) {
78
73
  zIndex: akEditorFloatingOverlapPanelZIndex,
79
74
  forcePlacement: true,
80
75
  offset: [-7, 0]
81
- }, /*#__PURE__*/React.createElement(MenuWrapper, null, /*#__PURE__*/React.createElement(ContextualMenu, {
76
+ }, jsx("div", {
77
+ css: tablePopupStyles
78
+ }, jsx(ContextualMenu, {
82
79
  editorView: editorView,
83
80
  offset: calculateOffset(targetCellRef, editorView.state),
84
81
  isOpen: isOpen,
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
- import { css } from 'styled-components';
5
+ import { css } from '@emotion/react';
6
6
  import { tableBackgroundBorderColor } from '@atlaskit/adf-schema';
7
7
  import { N60A, N90 } from '@atlaskit/theme/colors';
8
8
  import { contextualMenuDropdownWidth } from '../consts';
@@ -18,7 +18,7 @@ var sentinelStyles = ".".concat(ClassName.TABLE_CONTAINER, " {\n > .").concat(C
18
18
  export var tableStyles = function tableStyles(props) {
19
19
  var _props$featureFlags;
20
20
 
21
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: white !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button*/\n ", "\n /* Ends Delete button*/\n\n /* sticky styles */\n .", " .", " .", ":first-child {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n\n box-shadow: 0px -", "px white;\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: white;\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid white;\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid green;\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: white;\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-child {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-child {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid white;\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-child,\n > h2:first-child,\n > h3:first-child,\n > h4:first-child,\n > h5:first-child,\n > h6:first-child {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0.3;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /*\n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n"])), ClassName.LAYOUT_BUTTON, N20A, N300, ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, B300, tableSharedStyle(props), columnControlsLineMarker(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, stickyRowOffsetTop, stickyRowZIndex, N40A, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER, InsertMarker(props, "\n right: -1px;\n top: -12px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableToolbarColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, tableToolbarDeleteColor, ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-child {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableToolbarColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, N0, ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, N0, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, R500, akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, tableInsertColumnButtonSize / 2, tableInsertColumnButtonSize / 2, tableScrollbarOffset, tableScrollbarOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR);
21
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: white !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button*/\n ", "\n /* Ends Delete button*/\n\n /* sticky styles */\n .", " .", " .", ":first-child {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n\n box-shadow: 0px -", "px white;\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: white;\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid white;\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid green;\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: white;\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: 0 6px 4px -4px ", ";\n margin-left: -1px;\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-child {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: 1px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-child {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid white;\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-child,\n > h2:first-child,\n > h3:first-child,\n > h4:first-child,\n > h5:first-child,\n > h6:first-child {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n opacity: 0.3;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n /*\n compensating for half of the insert column button\n that is aligned to the right edge initially on hover of the top right column control when table overflown,\n its center should be aligned with the edge\n */\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n .ProseMirror .pm-table-cell-content-wrap ol[data-child-count='100+'] {\n padding-left: revert;\n }\n"])), ClassName.LAYOUT_BUTTON, N20A, N300, ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, B300, tableSharedStyle(props), columnControlsLineMarker(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, stickyRowOffsetTop, stickyRowZIndex, N40A, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS_INSERT_COLUMN_MARKER, InsertMarker(props, "\n right: -1px;\n top: -12px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableToolbarColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, tableToolbarSelectedColor, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, tableToolbarDeleteColor, ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-child {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableToolbarColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, N0, ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, tableToolbarSelectedColor, akEditorUnitZIndex, N0, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableToolbarDeleteColor, tableBorderDeleteColor, R500, akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, tableInsertColumnButtonSize / 2, tableInsertColumnButtonSize / 2, tableScrollbarOffset, tableScrollbarOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR);
22
22
  };
23
23
  export var tableFullPageEditorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
24
24
  export var deprecatedTableFullPageEditorStyles = deprecatedCss(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
- import { css } from 'styled-components';
5
+ import { css } from '@emotion/react';
6
6
  import { TaskDecisionSharedCssClassName } from '@atlaskit/editor-common/styles';
7
7
  import { SelectionStyle, getSelectionStyles, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
8
8
  export var taskDecisionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [data-decision-wrapper] {\n cursor: pointer;\n }\n\n .", " > [data-decision-wrapper],\n ol[data-node-type='decisionList'].", " {\n border-radius: 4px;\n ", "\n }\n\n .danger {\n .", ".", "\n > div {\n box-shadow: 0 0 0 ", "px ", ";\n background-color: ", ";\n &::after {\n content: none; /* reset the Blanket selection style */\n }\n }\n }\n"])), akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket]), TaskDecisionSharedCssClassName.DECISION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, akEditorDeleteBackgroundWithOpacity);
@@ -1,5 +1,6 @@
1
1
  export var TYPE_AHEAD_DECORATION_KEY = 'typeahead_decoration_key';
2
2
  export var TYPE_AHEAD_DECORATION_DATA_ATTRIBUTE = 'typeaheadDecoration';
3
+ export var TYPE_AHEAD_POPUP_CONTENT_CLASS = 'fabric-editor-typeahead';
3
4
  export var NavigationDirection;
4
5
 
5
6
  (function (NavigationDirection) {
@@ -6,7 +6,7 @@ import React, { useRef, useEffect, useCallback } from 'react';
6
6
  import styled from 'styled-components';
7
7
  import { keyName as keyNameNormalized } from 'w3c-keyname';
8
8
  import { browser, ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
9
- import { CloseSelectionOptions } from '../constants';
9
+ import { CloseSelectionOptions, TYPE_AHEAD_POPUP_CONTENT_CLASS } from '../constants';
10
10
  import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
11
11
  var QuerySpan = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n"])));
12
12
 
@@ -180,6 +180,14 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
180
180
  };
181
181
 
182
182
  var onFocusOut = function onFocusOut(event) {
183
+ var relatedTarget = event.relatedTarget; // Given the user is changing the focus
184
+ // When the target is inside the TypeAhead Popup
185
+ // Then the popup should stay open
186
+
187
+ if (relatedTarget instanceof HTMLElement && relatedTarget.closest && relatedTarget.closest(".".concat(TYPE_AHEAD_POPUP_CONTENT_CLASS))) {
188
+ return;
189
+ }
190
+
183
191
  cancel({
184
192
  addPrefixTrigger: true,
185
193
  text: cleanedInputContent(),