@atlaskit/editor-core 161.0.0 → 162.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 (295) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/cjs/actions/index.js +76 -48
  3. package/dist/cjs/extensibility.js +2 -2
  4. package/dist/cjs/labs/next/full-page.js +1 -1
  5. package/dist/cjs/plugins/block-type/styles.js +5 -2
  6. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +13 -11
  7. package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +11 -7
  8. package/dist/cjs/plugins/card/messages.js +4 -4
  9. package/dist/cjs/plugins/card/ui/LinkToolbarAppearance.js +29 -11
  10. package/dist/cjs/plugins/card/ui/LinkToolbarButtonGroup.js +66 -7
  11. package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +166 -7
  12. package/dist/cjs/plugins/card/ui/ResizableEmbedCard.js +9 -6
  13. package/dist/cjs/plugins/card/ui/assets/card.js +1 -1
  14. package/dist/cjs/plugins/card/ui/assets/embed.js +1 -1
  15. package/dist/cjs/plugins/card/ui/assets/inline.js +1 -1
  16. package/dist/cjs/plugins/card/ui/assets/url.js +1 -1
  17. package/dist/cjs/plugins/card/ui/link-toolbar-button-group-options.js +60 -0
  18. package/dist/cjs/plugins/card/ui/link-toolbar-icon-dropdown-options.js +66 -0
  19. package/dist/cjs/plugins/card/ui/styled.js +5 -13
  20. package/dist/cjs/plugins/card/ui/types.js +5 -0
  21. package/dist/cjs/plugins/clipboard/pm-plugins/main.js +99 -3
  22. package/dist/cjs/plugins/code-block/styles.js +45 -38
  23. package/dist/cjs/plugins/extension/plugin-factory.js +4 -1
  24. package/dist/cjs/plugins/extension/pm-plugins/main.js +34 -11
  25. package/dist/cjs/plugins/extension/utils.js +57 -12
  26. package/dist/cjs/plugins/find-replace/ui/Find.js +12 -12
  27. package/dist/cjs/plugins/find-replace/ui/FindReplace.js +5 -5
  28. package/dist/cjs/plugins/find-replace/ui/Replace.js +5 -5
  29. package/dist/cjs/plugins/find-replace/ui/styles.js +12 -15
  30. package/dist/cjs/plugins/layout/styles.js +2 -2
  31. package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +180 -0
  32. package/dist/cjs/plugins/list/commands/index.js +35 -38
  33. package/dist/cjs/plugins/list/utils/replace-content.js +31 -0
  34. package/dist/cjs/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
  35. package/dist/cjs/plugins/media/styles.js +2 -2
  36. package/dist/cjs/plugins/media/utils/media-single.js +15 -2
  37. package/dist/cjs/plugins/paste/handlers.js +19 -5
  38. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +1 -1
  39. package/dist/cjs/plugins/placeholder-text/index.js +45 -1
  40. package/dist/cjs/plugins/placeholder-text/placeholder-text-nodeview.js +66 -22
  41. package/dist/cjs/plugins/placeholder-text/selection-utils.js +19 -0
  42. package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
  43. package/dist/cjs/plugins/table/commands/index.js +0 -6
  44. package/dist/cjs/plugins/table/commands/insert.js +1 -1
  45. package/dist/cjs/plugins/table/commands/misc.js +5 -18
  46. package/dist/cjs/plugins/table/commands-with-analytics.js +1 -1
  47. package/dist/cjs/plugins/table/handlers.js +6 -2
  48. package/dist/cjs/plugins/table/index.js +7 -13
  49. package/dist/cjs/plugins/table/nodeviews/TableComponent.js +2 -2
  50. package/dist/cjs/plugins/table/nodeviews/table.js +7 -38
  51. package/dist/cjs/plugins/table/pm-plugins/decorations/plugin.js +2 -2
  52. package/dist/cjs/plugins/table/pm-plugins/main.js +3 -1
  53. package/dist/cjs/plugins/table/pm-plugins/plugin-factory.js +4 -7
  54. package/dist/cjs/plugins/table/pm-plugins/plugin-key.js +11 -0
  55. package/dist/cjs/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
  56. package/dist/cjs/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +3 -3
  57. package/dist/cjs/plugins/table/reducer.js +0 -7
  58. package/dist/cjs/plugins/table/toolbar.js +5 -15
  59. package/dist/cjs/plugins/table/transforms/metadata.js +2 -2
  60. package/dist/cjs/plugins/table/ui/FloatingContextualMenu/index.js +3 -1
  61. package/dist/cjs/plugins/table/ui/FloatingInsertButton/index.js +1 -1
  62. package/dist/cjs/plugins/table/ui/LayoutButton/index.js +1 -2
  63. package/dist/cjs/plugins/table/ui/common-styles.css.js +17 -8
  64. package/dist/cjs/plugins/table/ui/ui-styles.css.js +39 -25
  65. package/dist/cjs/plugins/table/utils/nodes.js +15 -15
  66. package/dist/cjs/plugins/tasks-and-decisions/commands.js +15 -1
  67. package/dist/cjs/plugins/text-formatting/styles.js +5 -2
  68. package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +71 -1
  69. package/dist/cjs/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
  70. package/dist/cjs/plugins/text-formatting/utils.js +30 -2
  71. package/dist/cjs/plugins/type-ahead/api.js +32 -1
  72. package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +20 -5
  73. package/dist/cjs/plugins/type-ahead/utils.js +22 -4
  74. package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
  75. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +1 -1
  76. package/dist/cjs/ui/ContentStyles/index.js +32 -9
  77. package/dist/cjs/utils/index.js +1 -8
  78. package/dist/cjs/utils/insert.js +1 -9
  79. package/dist/cjs/utils/selection.js +2 -9
  80. package/dist/cjs/version-wrapper.js +1 -1
  81. package/dist/cjs/version.json +1 -1
  82. package/dist/es2019/actions/index.js +20 -23
  83. package/dist/es2019/extensibility.js +1 -1
  84. package/dist/es2019/labs/next/full-page.js +2 -2
  85. package/dist/es2019/plugins/block-type/styles.js +3 -3
  86. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +15 -12
  87. package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +19 -14
  88. package/dist/es2019/plugins/card/messages.js +4 -4
  89. package/dist/es2019/plugins/card/ui/LinkToolbarAppearance.js +21 -9
  90. package/dist/es2019/plugins/card/ui/LinkToolbarButtonGroup.js +54 -3
  91. package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +145 -3
  92. package/dist/es2019/plugins/card/ui/ResizableEmbedCard.js +10 -6
  93. package/dist/es2019/plugins/card/ui/assets/card.js +1 -1
  94. package/dist/es2019/plugins/card/ui/assets/embed.js +1 -1
  95. package/dist/es2019/plugins/card/ui/assets/inline.js +1 -1
  96. package/dist/es2019/plugins/card/ui/assets/url.js +1 -1
  97. package/dist/es2019/plugins/card/ui/link-toolbar-button-group-options.js +45 -0
  98. package/dist/es2019/plugins/card/ui/link-toolbar-icon-dropdown-options.js +51 -0
  99. package/dist/es2019/plugins/card/ui/styled.js +2 -2
  100. package/dist/es2019/plugins/card/ui/types.js +1 -0
  101. package/dist/es2019/plugins/clipboard/pm-plugins/main.js +91 -9
  102. package/dist/es2019/plugins/code-block/styles.js +14 -14
  103. package/dist/es2019/plugins/extension/plugin-factory.js +3 -1
  104. package/dist/es2019/plugins/extension/pm-plugins/main.js +38 -12
  105. package/dist/es2019/plugins/extension/utils.js +37 -2
  106. package/dist/es2019/plugins/find-replace/ui/Find.js +1 -1
  107. package/dist/es2019/plugins/find-replace/ui/FindReplace.js +1 -1
  108. package/dist/es2019/plugins/find-replace/ui/Replace.js +1 -1
  109. package/dist/es2019/plugins/find-replace/ui/styles.js +14 -9
  110. package/dist/es2019/plugins/layout/styles.js +5 -1
  111. package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +163 -0
  112. package/dist/es2019/plugins/list/commands/index.js +29 -28
  113. package/dist/es2019/plugins/list/utils/replace-content.js +22 -0
  114. package/dist/es2019/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
  115. package/dist/es2019/plugins/media/styles.js +1 -1
  116. package/dist/es2019/plugins/media/utils/media-single.js +14 -1
  117. package/dist/es2019/plugins/paste/handlers.js +19 -5
  118. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
  119. package/dist/es2019/plugins/placeholder-text/index.js +46 -1
  120. package/dist/es2019/plugins/placeholder-text/placeholder-text-nodeview.js +66 -20
  121. package/dist/es2019/plugins/placeholder-text/selection-utils.js +9 -0
  122. package/dist/es2019/plugins/placeholder-text/styles.js +22 -0
  123. package/dist/es2019/plugins/table/commands/index.js +1 -1
  124. package/dist/es2019/plugins/table/commands/insert.js +1 -1
  125. package/dist/es2019/plugins/table/commands/misc.js +5 -11
  126. package/dist/es2019/plugins/table/commands-with-analytics.js +1 -1
  127. package/dist/es2019/plugins/table/handlers.js +6 -2
  128. package/dist/es2019/plugins/table/index.js +4 -8
  129. package/dist/es2019/plugins/table/nodeviews/TableComponent.js +2 -2
  130. package/dist/es2019/plugins/table/nodeviews/table.js +2 -16
  131. package/dist/es2019/plugins/table/pm-plugins/decorations/plugin.js +1 -1
  132. package/dist/es2019/plugins/table/pm-plugins/main.js +2 -1
  133. package/dist/es2019/plugins/table/pm-plugins/plugin-factory.js +1 -2
  134. package/dist/es2019/plugins/table/pm-plugins/plugin-key.js +2 -0
  135. package/dist/es2019/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
  136. package/dist/es2019/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +1 -1
  137. package/dist/es2019/plugins/table/reducer.js +0 -9
  138. package/dist/es2019/plugins/table/toolbar.js +1 -4
  139. package/dist/es2019/plugins/table/transforms/metadata.js +1 -1
  140. package/dist/es2019/plugins/table/ui/FloatingContextualMenu/index.js +2 -1
  141. package/dist/es2019/plugins/table/ui/FloatingInsertButton/index.js +1 -1
  142. package/dist/es2019/plugins/table/ui/LayoutButton/index.js +1 -2
  143. package/dist/es2019/plugins/table/ui/common-styles.css.js +51 -26
  144. package/dist/es2019/plugins/table/ui/ui-styles.css.js +57 -56
  145. package/dist/es2019/plugins/table/utils/nodes.js +11 -11
  146. package/dist/es2019/plugins/tasks-and-decisions/commands.js +13 -1
  147. package/dist/es2019/plugins/text-formatting/styles.js +3 -3
  148. package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +61 -2
  149. package/dist/es2019/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
  150. package/dist/es2019/plugins/text-formatting/utils.js +13 -1
  151. package/dist/es2019/plugins/type-ahead/api.js +31 -2
  152. package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +17 -5
  153. package/dist/es2019/plugins/type-ahead/utils.js +15 -0
  154. package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -2
  155. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
  156. package/dist/es2019/ui/ContentStyles/index.js +45 -23
  157. package/dist/es2019/utils/index.js +1 -1
  158. package/dist/es2019/utils/insert.js +2 -10
  159. package/dist/es2019/utils/selection.js +1 -6
  160. package/dist/es2019/version-wrapper.js +1 -1
  161. package/dist/es2019/version.json +1 -1
  162. package/dist/esm/actions/index.js +76 -48
  163. package/dist/esm/extensibility.js +1 -1
  164. package/dist/esm/labs/next/full-page.js +2 -2
  165. package/dist/esm/plugins/block-type/styles.js +4 -2
  166. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +14 -12
  167. package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +9 -5
  168. package/dist/esm/plugins/card/messages.js +4 -4
  169. package/dist/esm/plugins/card/ui/LinkToolbarAppearance.js +25 -9
  170. package/dist/esm/plugins/card/ui/LinkToolbarButtonGroup.js +57 -5
  171. package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +154 -5
  172. package/dist/esm/plugins/card/ui/ResizableEmbedCard.js +9 -6
  173. package/dist/esm/plugins/card/ui/assets/card.js +1 -1
  174. package/dist/esm/plugins/card/ui/assets/embed.js +1 -1
  175. package/dist/esm/plugins/card/ui/assets/inline.js +1 -1
  176. package/dist/esm/plugins/card/ui/assets/url.js +1 -1
  177. package/dist/esm/plugins/card/ui/link-toolbar-button-group-options.js +45 -0
  178. package/dist/esm/plugins/card/ui/link-toolbar-icon-dropdown-options.js +51 -0
  179. package/dist/esm/plugins/card/ui/styled.js +2 -2
  180. package/dist/esm/plugins/card/ui/types.js +1 -0
  181. package/dist/esm/plugins/clipboard/pm-plugins/main.js +91 -2
  182. package/dist/esm/plugins/code-block/styles.js +42 -38
  183. package/dist/esm/plugins/extension/plugin-factory.js +3 -1
  184. package/dist/esm/plugins/extension/pm-plugins/main.js +34 -11
  185. package/dist/esm/plugins/extension/utils.js +51 -9
  186. package/dist/esm/plugins/find-replace/ui/Find.js +1 -1
  187. package/dist/esm/plugins/find-replace/ui/FindReplace.js +1 -1
  188. package/dist/esm/plugins/find-replace/ui/Replace.js +1 -1
  189. package/dist/esm/plugins/find-replace/ui/styles.js +6 -10
  190. package/dist/esm/plugins/layout/styles.js +2 -2
  191. package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +168 -0
  192. package/dist/esm/plugins/list/commands/index.js +33 -34
  193. package/dist/esm/plugins/list/utils/replace-content.js +21 -0
  194. package/dist/esm/plugins/media/nodeviews/mediaNodeUpdater.js +3 -3
  195. package/dist/esm/plugins/media/styles.js +1 -1
  196. package/dist/esm/plugins/media/utils/media-single.js +12 -1
  197. package/dist/esm/plugins/paste/handlers.js +19 -5
  198. package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
  199. package/dist/esm/plugins/placeholder-text/index.js +44 -1
  200. package/dist/esm/plugins/placeholder-text/placeholder-text-nodeview.js +67 -20
  201. package/dist/esm/plugins/placeholder-text/selection-utils.js +9 -0
  202. package/dist/esm/plugins/placeholder-text/styles.js +2 -1
  203. package/dist/esm/plugins/table/commands/index.js +1 -1
  204. package/dist/esm/plugins/table/commands/insert.js +1 -1
  205. package/dist/esm/plugins/table/commands/misc.js +5 -15
  206. package/dist/esm/plugins/table/commands-with-analytics.js +1 -1
  207. package/dist/esm/plugins/table/handlers.js +6 -2
  208. package/dist/esm/plugins/table/index.js +6 -11
  209. package/dist/esm/plugins/table/nodeviews/TableComponent.js +2 -2
  210. package/dist/esm/plugins/table/nodeviews/table.js +6 -37
  211. package/dist/esm/plugins/table/pm-plugins/decorations/plugin.js +1 -1
  212. package/dist/esm/plugins/table/pm-plugins/main.js +2 -1
  213. package/dist/esm/plugins/table/pm-plugins/plugin-factory.js +1 -2
  214. package/dist/esm/plugins/table/pm-plugins/plugin-key.js +2 -0
  215. package/dist/esm/plugins/table/pm-plugins/safari-delayed-dom-selection-syncing-workaround.js +2 -0
  216. package/dist/esm/plugins/table/pm-plugins/sticky-headers/nodeviews/tableRow.js +1 -1
  217. package/dist/esm/plugins/table/reducer.js +0 -7
  218. package/dist/esm/plugins/table/toolbar.js +1 -10
  219. package/dist/esm/plugins/table/transforms/metadata.js +1 -1
  220. package/dist/esm/plugins/table/ui/FloatingContextualMenu/index.js +2 -1
  221. package/dist/esm/plugins/table/ui/FloatingInsertButton/index.js +1 -1
  222. package/dist/esm/plugins/table/ui/LayoutButton/index.js +1 -2
  223. package/dist/esm/plugins/table/ui/common-styles.css.js +10 -6
  224. package/dist/esm/plugins/table/ui/ui-styles.css.js +20 -11
  225. package/dist/esm/plugins/table/utils/nodes.js +14 -14
  226. package/dist/esm/plugins/tasks-and-decisions/commands.js +13 -1
  227. package/dist/esm/plugins/text-formatting/styles.js +4 -2
  228. package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +69 -2
  229. package/dist/esm/plugins/text-formatting/ui/Toolbar/toolbar-messages.js +30 -0
  230. package/dist/esm/plugins/text-formatting/utils.js +18 -0
  231. package/dist/esm/plugins/type-ahead/api.js +30 -2
  232. package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +16 -4
  233. package/dist/esm/plugins/type-ahead/utils.js +17 -3
  234. package/dist/esm/ui/Appearance/Comment/Comment.js +2 -2
  235. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
  236. package/dist/esm/ui/ContentStyles/index.js +27 -9
  237. package/dist/esm/utils/index.js +1 -1
  238. package/dist/esm/utils/insert.js +2 -10
  239. package/dist/esm/utils/selection.js +1 -6
  240. package/dist/esm/version-wrapper.js +1 -1
  241. package/dist/esm/version.json +1 -1
  242. package/dist/types/actions/index.d.ts +2 -2
  243. package/dist/types/extensibility.d.ts +1 -1
  244. package/dist/types/plugins/analytics/types/list-events.d.ts +0 -1
  245. package/dist/types/plugins/block-type/styles.d.ts +2 -1
  246. package/dist/types/plugins/block-type/ui/ToolbarBlockType/index.d.ts +1 -0
  247. package/dist/types/plugins/block-type/ui/ToolbarBlockType/styled.d.ts +2 -7
  248. package/dist/types/plugins/card/messages.d.ts +2 -2
  249. package/dist/types/plugins/card/ui/LinkToolbarButtonGroup.d.ts +18 -2
  250. package/dist/types/plugins/card/ui/LinkToolbarIconDropdown.d.ts +23 -3
  251. package/dist/types/plugins/card/ui/ResizableEmbedCard.d.ts +3 -1
  252. package/dist/types/plugins/card/ui/link-toolbar-button-group-options.d.ts +5 -0
  253. package/dist/types/plugins/card/ui/link-toolbar-icon-dropdown-options.d.ts +5 -0
  254. package/dist/types/plugins/card/ui/styled.d.ts +2 -3
  255. package/dist/types/plugins/card/ui/types.d.ts +12 -0
  256. package/dist/types/plugins/clipboard/pm-plugins/main.d.ts +10 -1
  257. package/dist/types/plugins/code-block/styles.d.ts +3 -2
  258. package/dist/types/plugins/extension/pm-plugins/main.d.ts +2 -1
  259. package/dist/types/plugins/extension/types.d.ts +1 -0
  260. package/dist/types/plugins/extension/utils.d.ts +3 -1
  261. package/dist/types/plugins/find-replace/ui/FindReplace.d.ts +2 -1
  262. package/dist/types/plugins/find-replace/ui/styles.d.ts +5 -5
  263. package/dist/types/plugins/layout/styles.d.ts +1 -1
  264. package/dist/types/plugins/list/actions/wrap-and-join-lists.d.ts +25 -0
  265. package/dist/types/plugins/list/commands/index.d.ts +0 -1
  266. package/dist/types/plugins/list/utils/replace-content.d.ts +8 -0
  267. package/dist/types/plugins/media/nodeviews/mediaNodeUpdater.d.ts +2 -2
  268. package/dist/types/plugins/media/styles.d.ts +1 -1
  269. package/dist/types/plugins/media/utils/media-single.d.ts +1 -0
  270. package/dist/types/plugins/panel/styles.d.ts +1 -1
  271. package/dist/types/plugins/paste/handlers.d.ts +1 -1
  272. package/dist/types/plugins/placeholder-text/placeholder-text-nodeview.d.ts +3 -2
  273. package/dist/types/plugins/placeholder-text/selection-utils.d.ts +2 -0
  274. package/dist/types/plugins/rule/styles.d.ts +1 -1
  275. package/dist/types/plugins/table/commands/index.d.ts +1 -1
  276. package/dist/types/plugins/table/commands/misc.d.ts +0 -1
  277. package/dist/types/plugins/table/nodeviews/table.d.ts +0 -1
  278. package/dist/types/plugins/table/pm-plugins/plugin-factory.d.ts +1 -4
  279. package/dist/types/plugins/table/pm-plugins/plugin-key.d.ts +3 -0
  280. package/dist/types/plugins/table/types.d.ts +1 -8
  281. package/dist/types/plugins/table/ui/LayoutButton/index.d.ts +0 -1
  282. package/dist/types/plugins/table/ui/common-styles.css.d.ts +6 -3
  283. package/dist/types/plugins/table/ui/ui-styles.css.d.ts +15 -14
  284. package/dist/types/plugins/table/utils/nodes.d.ts +6 -6
  285. package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
  286. package/dist/types/plugins/text-formatting/styles.d.ts +2 -1
  287. package/dist/types/plugins/text-formatting/ui/Toolbar/toolbar-messages.d.ts +30 -0
  288. package/dist/types/plugins/text-formatting/utils.d.ts +4 -0
  289. package/dist/types/plugins/type-ahead/api.d.ts +11 -1
  290. package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +1 -0
  291. package/dist/types/plugins/type-ahead/utils.d.ts +4 -0
  292. package/dist/types/ui/ContentStyles/index.d.ts +1 -0
  293. package/dist/types/utils/index.d.ts +1 -1
  294. package/dist/types/utils/selection.d.ts +0 -1
  295. package/package.json +28 -26
@@ -32,36 +32,64 @@ var EditorActions = /*#__PURE__*/function () {
32
32
  }
33
33
  });
34
34
 
35
- _defineProperty(this, "getResolvedEditorState", function () {
36
- return new Promise(function (resolver, reject) {
37
- var _getCollabProvider;
38
-
39
- if (!_this.editorView) {
40
- reject();
41
- return;
42
- }
43
-
44
- var featureFlags = getFeatureFlags(_this.editorView.state);
45
-
46
- if (!featureFlags.useNativeCollabPlugin) {
47
- var _this$getValue;
48
-
49
- return (_this$getValue = _this.getValue()) === null || _this$getValue === void 0 ? void 0 : _this$getValue.then(function (content) {
50
- resolver({
51
- content: content,
52
- title: null,
53
- stepVersion: -1
54
- });
55
- });
35
+ _defineProperty(this, "getResolvedEditorState", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
36
+ var _getCollabProvider;
37
+
38
+ var featureFlags, editorValue, editorView;
39
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
40
+ while (1) {
41
+ switch (_context.prev = _context.next) {
42
+ case 0:
43
+ if (_this.editorView) {
44
+ _context.next = 2;
45
+ break;
46
+ }
47
+
48
+ throw new Error('Called getResolvedEditorState before editorView is ready');
49
+
50
+ case 2:
51
+ featureFlags = getFeatureFlags(_this.editorView.state);
52
+
53
+ if (featureFlags.useNativeCollabPlugin) {
54
+ _context.next = 10;
55
+ break;
56
+ }
57
+
58
+ _context.next = 6;
59
+ return _this.getValue();
60
+
61
+ case 6:
62
+ editorValue = _context.sent;
63
+
64
+ if (editorValue) {
65
+ _context.next = 9;
66
+ break;
67
+ }
68
+
69
+ throw new Error('editorValue is undefined');
70
+
71
+ case 9:
72
+ return _context.abrupt("return", {
73
+ content: editorValue,
74
+ title: null,
75
+ stepVersion: -1
76
+ });
77
+
78
+ case 10:
79
+ editorView = _this.editorView;
80
+ _context.next = 13;
81
+ return getEditorValueWithMedia(editorView);
82
+
83
+ case 13:
84
+ return _context.abrupt("return", (_getCollabProvider = getCollabProvider(editorView.state)) === null || _getCollabProvider === void 0 ? void 0 : _getCollabProvider.getFinalAcknowledgedState());
85
+
86
+ case 14:
87
+ case "end":
88
+ return _context.stop();
89
+ }
56
90
  }
57
-
58
- (_getCollabProvider = getCollabProvider(_this.editorView.state)) === null || _getCollabProvider === void 0 ? void 0 : _getCollabProvider.getFinalAcknowledgedState().then(function (resolvedEditorState) {
59
- resolver(resolvedEditorState);
60
- }).catch(function (error) {
61
- reject(error);
62
- });
63
- });
64
- });
91
+ }, _callee);
92
+ })));
65
93
  }
66
94
 
67
95
  _createClass(EditorActions, [{
@@ -161,30 +189,30 @@ var EditorActions = /*#__PURE__*/function () {
161
189
  }, {
162
190
  key: "__temporaryFixForConfigPanel",
163
191
  value: function () {
164
- var _temporaryFixForConfigPanel2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
192
+ var _temporaryFixForConfigPanel2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
165
193
  var editorView;
166
- return _regeneratorRuntime.wrap(function _callee$(_context) {
194
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
167
195
  while (1) {
168
- switch (_context.prev = _context.next) {
196
+ switch (_context2.prev = _context2.next) {
169
197
  case 0:
170
198
  editorView = this.editorView;
171
199
 
172
200
  if (editorView) {
173
- _context.next = 3;
201
+ _context2.next = 3;
174
202
  break;
175
203
  }
176
204
 
177
- return _context.abrupt("return");
205
+ return _context2.abrupt("return");
178
206
 
179
207
  case 3:
180
208
  _temporaryFixForConfigPanel(editorView);
181
209
 
182
210
  case 4:
183
211
  case "end":
184
- return _context.stop();
212
+ return _context2.stop();
185
213
  }
186
214
  }
187
- }, _callee, this);
215
+ }, _callee2, this);
188
216
  }));
189
217
 
190
218
  function __temporaryFixForConfigPanel() {
@@ -197,46 +225,46 @@ var EditorActions = /*#__PURE__*/function () {
197
225
  }, {
198
226
  key: "getValue",
199
227
  value: function () {
200
- var _getValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
228
+ var _getValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
201
229
  var editorView, doc, json, nodeSanitized;
202
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
230
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
203
231
  while (1) {
204
- switch (_context2.prev = _context2.next) {
232
+ switch (_context3.prev = _context3.next) {
205
233
  case 0:
206
234
  editorView = this.editorView;
207
235
 
208
236
  if (editorView) {
209
- _context2.next = 3;
237
+ _context3.next = 3;
210
238
  break;
211
239
  }
212
240
 
213
- return _context2.abrupt("return");
241
+ return _context3.abrupt("return");
214
242
 
215
243
  case 3:
216
- _context2.next = 5;
244
+ _context3.next = 5;
217
245
  return getEditorValueWithMedia(editorView);
218
246
 
219
247
  case 5:
220
- doc = _context2.sent;
248
+ doc = _context3.sent;
221
249
  json = toJSON(doc);
222
250
 
223
251
  if (this.contentEncode) {
224
- _context2.next = 9;
252
+ _context3.next = 9;
225
253
  break;
226
254
  }
227
255
 
228
- return _context2.abrupt("return", json);
256
+ return _context3.abrupt("return", json);
229
257
 
230
258
  case 9:
231
259
  nodeSanitized = Node.fromJSON(this.editorView.state.schema, json);
232
- return _context2.abrupt("return", this.contentEncode(nodeSanitized));
260
+ return _context3.abrupt("return", this.contentEncode(nodeSanitized));
233
261
 
234
262
  case 11:
235
263
  case "end":
236
- return _context2.stop();
264
+ return _context3.stop();
237
265
  }
238
266
  }
239
- }, _callee2, this);
267
+ }, _callee3, this);
240
268
  }));
241
269
 
242
270
  function getValue() {
@@ -4,7 +4,7 @@ export { toJSON } from './utils';
4
4
  export { default as Extension } from './plugins/extension/ui/Extension';
5
5
  export { default as ExtensionNodeWrapper } from './plugins/extension/ui/Extension/ExtensionNodeWrapper';
6
6
  export { ExtensionNode } from './plugins/extension/nodeviews/extension';
7
- export { pluginKey as tablePluginKey } from './plugins/table/pm-plugins/plugin-factory';
7
+ export { pluginKey as tablePluginKey } from './plugins/table/pm-plugins/plugin-key';
8
8
  export var EmitterEvents = {
9
9
  TABLE_DELETED: 'TABLE_DELETED'
10
10
  };
@@ -15,7 +15,7 @@ import ContentStyles from '../../ui/ContentStyles';
15
15
  import WidthEmitter from '../../ui/WidthEmitter';
16
16
  import { ClickAreaBlock } from '../../ui/Addon';
17
17
  import { scrollbarStyles } from '../../ui/styles';
18
- import { tableFullPageEditorStyles } from '../../plugins/table/ui/common-styles.css';
18
+ import { deprecatedTableFullPageEditorStyles } from '../../plugins/table/ui/common-styles.css';
19
19
  import AvatarsWithPluginState from '../../plugins/collab-edit/ui';
20
20
  import { Editor, EditorContent, useEditorSharedConfig } from './Editor';
21
21
  import { Toolbar } from './Toolbar';
@@ -35,7 +35,7 @@ ContentArea.displayName = 'ContentArea';
35
35
  var EditorContentArea = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n line-height: 24px;\n height: 100%;\n width: 100%;\n max-width: ", "px;\n padding-top: 50px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n padding-bottom: 55px;\n\n & .ProseMirror {\n flex-grow: 1;\n box-sizing: border-box;\n }\n\n && .ProseMirror {\n & > * {\n clear: both;\n }\n > p,\n > ul,\n > ol,\n > h1,\n > h2,\n > h3,\n > h4,\n > h5,\n > h6 {\n clear: none;\n }\n }\n ", ";\n"])), function (_ref) {
36
36
  var theme = _ref.theme;
37
37
  return theme.layoutMaxWidth + GUTTER_PADDING * 2;
38
- }, tableFullPageEditorStyles);
38
+ }, deprecatedTableFullPageEditorStyles);
39
39
  EditorContentArea.displayName = 'EditorContentArea';
40
40
  var MainToolbar = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n box-shadow: ", ";\n transition: box-shadow 200ms;\n z-index: ", ";\n display: flex;\n height: 80px;\n flex-shrink: 0;\n background-color: white;\n\n & object {\n height: 0 !important;\n }\n"])), function (props) {
41
41
  return props.showKeyline ? "0 ".concat(akEditorToolbarKeylineHeight, "px 0 0 ").concat(N30) : 'none';
@@ -2,6 +2,8 @@ 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 { blockquoteSharedStyles, headingsSharedStyles } from '@atlaskit/editor-common/styles';
7
- export var blocktypeStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n ", ";\n }\n"])), blockquoteSharedStyles, headingsSharedStyles);
7
+ export var blocktypeStyles = function blocktypeStyles(props) {
8
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", ";\n ", ";\n }\n"])), blockquoteSharedStyles, headingsSharedStyles(props));
9
+ };
@@ -11,13 +11,15 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
11
11
 
12
12
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
13
 
14
+ /** @jsx jsx */
14
15
  import React from 'react';
16
+ import { jsx } from '@emotion/react';
15
17
  import { injectIntl } from 'react-intl-next';
16
18
  import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
17
19
  import DropdownMenu from '../../../../ui/DropdownMenu';
18
20
  import { Separator, Wrapper, MenuWrapper } from '../../../../ui/styles';
19
21
  import { NORMAL_TEXT } from '../../types';
20
- import { BlockTypeMenuItem, KeyboardShortcut } from './styled';
22
+ import { blockTypeMenuItemStyle, KeyboardShortcut } from './styled';
21
23
  import { tooltip, findKeymapByDescription } from '../../../../keymaps';
22
24
  import { BlockTypeButton } from './blocktype-button';
23
25
 
@@ -60,16 +62,16 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
60
62
  availableBlockTypes = _this$props$pluginSta.availableBlockTypes;
61
63
  var items = availableBlockTypes.map(function (blockType, index) {
62
64
  var isActive = currentBlockType === blockType;
63
- var Tag = blockType.tagName || 'p';
65
+ var tagName = blockType.tagName || 'p';
66
+ var Tag = tagName;
64
67
  return {
65
- content: /*#__PURE__*/React.createElement(BlockTypeMenuItem, {
66
- tagName: Tag,
67
- selected: isActive
68
- }, /*#__PURE__*/React.createElement(Tag, null, formatMessage(blockType.title))),
68
+ content: jsx("div", {
69
+ css: blockTypeMenuItemStyle(tagName, isActive)
70
+ }, jsx(Tag, null, formatMessage(blockType.title))),
69
71
  value: blockType,
70
72
  label: formatMessage(blockType.title),
71
73
  key: "".concat(blockType.name, "-").concat(index),
72
- elemAfter: /*#__PURE__*/React.createElement(KeyboardShortcut, {
74
+ elemAfter: jsx(KeyboardShortcut, {
73
75
  selected: isActive
74
76
  }, tooltip(findKeymapByDescription(blockType.title.defaultMessage))),
75
77
  isActive: isActive
@@ -129,7 +131,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
129
131
 
130
132
  if (!this.props.isDisabled && !blockTypesDisabled) {
131
133
  var items = this.createItems();
132
- return /*#__PURE__*/React.createElement(MenuWrapper, null, /*#__PURE__*/React.createElement(DropdownMenu, {
134
+ return jsx(MenuWrapper, null, jsx(DropdownMenu, {
133
135
  items: items,
134
136
  onOpenChange: this.onOpenChange,
135
137
  onItemActivated: this.handleSelectBlockType,
@@ -141,7 +143,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
141
143
  fitHeight: 360,
142
144
  fitWidth: 106,
143
145
  shouldUseDefaultRole: true
144
- }, /*#__PURE__*/React.createElement(BlockTypeButton, {
146
+ }, jsx(BlockTypeButton, {
145
147
  isSmall: isSmall,
146
148
  isReducedSpacing: isReducedSpacing,
147
149
  selected: active,
@@ -150,10 +152,10 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
150
152
  onClick: this.handleTriggerClick,
151
153
  formatMessage: formatMessage,
152
154
  "aria-expanded": active
153
- }, longestDropdownMenuItem)), /*#__PURE__*/React.createElement(Separator, null));
155
+ }, longestDropdownMenuItem)), jsx(Separator, null));
154
156
  }
155
157
 
156
- return /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(BlockTypeButton, {
158
+ return jsx(Wrapper, null, jsx(BlockTypeButton, {
157
159
  isSmall: isSmall,
158
160
  isReducedSpacing: isReducedSpacing,
159
161
  selected: active,
@@ -162,7 +164,7 @@ var ToolbarBlockType = /*#__PURE__*/function (_React$PureComponent) {
162
164
  onClick: this.handleTriggerClick,
163
165
  formatMessage: formatMessage,
164
166
  "aria-expanded": active
165
- }, longestDropdownMenuItem), /*#__PURE__*/React.createElement(Separator, null));
167
+ }, longestDropdownMenuItem), jsx(Separator, null));
166
168
  }
167
169
  }]);
168
170
 
@@ -2,15 +2,19 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject, _templateObject2;
4
4
 
5
+ /** @jsx jsx */
6
+ import { css } from '@emotion/react';
5
7
  import { N400 } from '@atlaskit/theme/colors';
6
8
  import styled from 'styled-components';
7
9
  import { headingsSharedStyles } from '@atlaskit/editor-common/styles';
8
10
  import { Shortcut } from '../../../../ui/styles';
9
- export var BlockTypeMenuItem = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n }\n }\n ", ";\n"])), headingsSharedStyles, function (props) {
10
- return (// TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
11
- props.selected ? "".concat(props.tagName, " { color: white !important; }") : ''
12
- );
13
- });
11
+ export var blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected) {
12
+ // TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
13
+ var selectedStyle = selected ? "".concat(tagName, " { color: white !important; }") : '';
14
+ return function (themeProps) {
15
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n }\n }\n ", ";\n "])), headingsSharedStyles(themeProps), selectedStyle);
16
+ };
17
+ };
14
18
  export var KeyboardShortcut = styled(Shortcut)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n margin-left: 16px;\n"])), function (props) {
15
19
  return props.selected ? "color: ".concat(N400, ";") : '';
16
20
  });
@@ -45,8 +45,8 @@ export var messages = defineMessages({
45
45
  defaultMessage: 'URL',
46
46
  description: 'Title for option to convert the card to become a regular text-based hyperlink.'
47
47
  },
48
- cardTitle: {
49
- id: 'fabric.editor.cardTitle',
48
+ blockTitle: {
49
+ id: 'fabric.editor.blockTitle',
50
50
  defaultMessage: 'Card',
51
51
  description: 'Title for option to display link in the card view.'
52
52
  },
@@ -65,8 +65,8 @@ export var messages = defineMessages({
65
65
  defaultMessage: 'Display link as URL',
66
66
  description: 'Description for option to convert the card to become a regular text-based hyperlink.'
67
67
  },
68
- cardDescription: {
69
- id: 'fabric.editor.cardDescription',
68
+ blockDescription: {
69
+ id: 'fabric.editor.blockDescription',
70
70
  defaultMessage: 'Display more information about a link, including a summary and actions',
71
71
  description: 'Description for option to display link in the card view.'
72
72
  },
@@ -19,8 +19,10 @@ import Dropdown from '../../floating-toolbar/ui/Dropdown';
19
19
  import { messages } from '../messages';
20
20
  import nodeNames from '../../../messages';
21
21
  import { getFeatureFlags } from '../../../plugins/feature-flags-context';
22
- import LinkToolbarIconDropdown from './LinkToolbarIconDropdown';
23
- import LinkToolbarButtonGroup from './LinkToolbarButtonGroup';
22
+ import { LinkToolbarIconDropdown } from './LinkToolbarIconDropdown';
23
+ import { LinkToolbarButtonGroup } from './LinkToolbarButtonGroup';
24
+ import { getButtonGroupOption } from './link-toolbar-button-group-options';
25
+ import { getIconDropdownOption } from './link-toolbar-icon-dropdown-options';
24
26
  export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
25
27
  _inherits(LinkToolbarAppearance, _React$Component);
26
28
 
@@ -60,6 +62,7 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
60
62
  var isSmartLinkSupportedInParent = isSupportedInParent(editorState, Fragment.from(editorState.schema.nodes.blockCard.createChecked({})), currentAppearance);
61
63
  var tooltip = isSmartLinkSupportedInParent ? undefined : parentNodeName(editorState, intl);
62
64
  var embedOption = allowEmbeds && preview && {
65
+ appearance: 'embed',
63
66
  title: intl.formatMessage(messages.embed),
64
67
  onClick: setSelectedCardAppearance('embed'),
65
68
  selected: currentAppearance === 'embed',
@@ -76,24 +79,27 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
76
79
  selected: !currentAppearance,
77
80
  testId: 'url-appearance'
78
81
  }, {
82
+ appearance: 'inline',
79
83
  title: intl.formatMessage(messages.inline),
80
84
  onClick: setSelectedCardAppearance('inline'),
81
85
  selected: currentAppearance === 'inline',
82
- hidden: false,
83
86
  testId: 'inline-appearance'
84
87
  }, {
88
+ appearance: 'block',
85
89
  title: intl.formatMessage(messages.block),
86
90
  onClick: setSelectedCardAppearance('block'),
87
91
  selected: currentAppearance === 'block',
88
- hidden: false,
89
92
  testId: 'block-appearance',
90
93
  disabled: !isSmartLinkSupportedInParent,
91
94
  tooltip: tooltip
92
95
  }];
93
- var title = intl.formatMessage(currentAppearance ? messages[currentAppearance] : messages.url);
94
96
 
95
97
  var dispatchCommand = function dispatchCommand(fn) {
96
- fn && fn(editorState, view && view.dispatch);
98
+ fn && fn(editorState, view && view.dispatch); // Refocus the view to ensure the editor has focus
99
+
100
+ if (view && !view.hasFocus()) {
101
+ view.focus();
102
+ }
97
103
  };
98
104
 
99
105
  if (embedOption) {
@@ -105,18 +111,28 @@ export var LinkToolbarAppearance = /*#__PURE__*/function (_React$Component) {
105
111
 
106
112
  if (viewChangingExperimentToolbarStyle === 'toolbarIcons') {
107
113
  return /*#__PURE__*/React.createElement(LinkToolbarButtonGroup, {
108
- key: "link-toolbar-button-group"
114
+ key: "link-toolbar-button-group",
115
+ options: options.map(function (option) {
116
+ return getButtonGroupOption(intl, dispatchCommand, option);
117
+ })
109
118
  });
110
119
  }
111
120
 
112
121
  if (viewChangingExperimentToolbarStyle === 'newDropdown') {
113
122
  return /*#__PURE__*/React.createElement(LinkToolbarIconDropdown, {
114
- key: "link-toolbar-icon-dropdown"
123
+ key: "link-toolbar-icon-dropdown",
124
+ title: "Change view",
125
+ buttonTestId: "link-toolbar-appearance-button",
126
+ dispatchCommand: dispatchCommand,
127
+ options: options.map(function (option) {
128
+ return getIconDropdownOption(intl, dispatchCommand, option);
129
+ })
115
130
  });
116
131
  }
117
132
 
133
+ var title = intl.formatMessage(currentAppearance ? messages[currentAppearance] : messages.url);
118
134
  return /*#__PURE__*/React.createElement(Dropdown, {
119
- key: 'link-toolbar',
135
+ key: "link-toolbar",
120
136
  buttonTestId: "link-toolbar-appearance-button",
121
137
  title: title,
122
138
  dispatchCommand: dispatchCommand,
@@ -1,10 +1,62 @@
1
- import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
+ var _excluded = ["disabled"];
4
+
5
+ var _templateObject, _templateObject2;
6
+
2
7
  import React from 'react';
8
+ import styled from 'styled-components';
9
+ import { ButtonGroup } from '@atlaskit/button';
10
+ import Button from '../../floating-toolbar/ui/Button';
11
+ /**
12
+ * Applying `pointer-events: none;` when disabled allows the Tooltip to be displayed
13
+ */
3
14
 
4
- var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref) {
5
- _objectDestructuringEmpty(_ref);
15
+ export var StyledButton = styled(Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: ", ";\n"])), function (_ref) {
16
+ var disabled = _ref.disabled;
17
+ return disabled ? 'none' : 'auto';
18
+ });
6
19
 
7
- return /*#__PURE__*/React.createElement("span", null);
20
+ var DisallowedWrapper = function DisallowedWrapper(_ref2) {
21
+ var disabled = _ref2.disabled,
22
+ props = _objectWithoutProperties(_ref2, _excluded);
23
+
24
+ return /*#__PURE__*/React.createElement("div", props);
8
25
  };
26
+ /**
27
+ * The button requires `pointer-events: none;` in order to fix the tooltip, hence
28
+ * leaving us without a disabled cursor, the following fixes this:
29
+ */
30
+
9
31
 
10
- export default LinkToolbarButtonGroup;
32
+ var StyledDisallowedWrapper = styled(DisallowedWrapper)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: ", ";\n"])), function (_ref3) {
33
+ var disabled = _ref3.disabled;
34
+ return disabled ? 'not-allowed' : 'pointer';
35
+ });
36
+ export var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref4) {
37
+ var options = _ref4.options;
38
+ return /*#__PURE__*/React.createElement(ButtonGroup, null, options.map(function (_ref5) {
39
+ var onClick = _ref5.onClick,
40
+ selected = _ref5.selected,
41
+ disabled = _ref5.disabled,
42
+ testId = _ref5.testId,
43
+ tooltipContent = _ref5.tooltipContent,
44
+ title = _ref5.title,
45
+ Icon = _ref5.icon;
46
+ return /*#__PURE__*/React.createElement(StyledDisallowedWrapper, {
47
+ key: testId,
48
+ disabled: disabled
49
+ }, /*#__PURE__*/React.createElement(StyledButton, {
50
+ title: title,
51
+ icon: /*#__PURE__*/React.createElement(Icon, {
52
+ size: "medium",
53
+ label: title
54
+ }),
55
+ selected: selected,
56
+ onClick: onClick,
57
+ testId: testId,
58
+ disabled: disabled,
59
+ tooltipContent: tooltipContent
60
+ }));
61
+ }));
62
+ };