@atlaskit/renderer 105.1.1 → 106.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 (421) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/actions/index.js +19 -71
  3. package/dist/cjs/actions/matches-utils.js +10 -11
  4. package/dist/cjs/actions.js +0 -2
  5. package/dist/cjs/analytics/analyticsContext.js +0 -4
  6. package/dist/cjs/analytics/events.js +0 -5
  7. package/dist/cjs/analytics/unsupported-content.js +14 -27
  8. package/dist/cjs/i18n/cs.js +0 -1
  9. package/dist/cjs/i18n/da.js +0 -1
  10. package/dist/cjs/i18n/de.js +0 -1
  11. package/dist/cjs/i18n/en.js +0 -1
  12. package/dist/cjs/i18n/en_GB.js +0 -1
  13. package/dist/cjs/i18n/en_ZZ.js +0 -1
  14. package/dist/cjs/i18n/es.js +0 -1
  15. package/dist/cjs/i18n/et.js +0 -1
  16. package/dist/cjs/i18n/fi.js +0 -1
  17. package/dist/cjs/i18n/fr.js +0 -1
  18. package/dist/cjs/i18n/hu.js +0 -1
  19. package/dist/cjs/i18n/index.js +0 -26
  20. package/dist/cjs/i18n/it.js +0 -1
  21. package/dist/cjs/i18n/ja.js +0 -1
  22. package/dist/cjs/i18n/ko.js +0 -1
  23. package/dist/cjs/i18n/nb.js +0 -1
  24. package/dist/cjs/i18n/nl.js +0 -1
  25. package/dist/cjs/i18n/pl.js +0 -1
  26. package/dist/cjs/i18n/pt_BR.js +0 -1
  27. package/dist/cjs/i18n/pt_PT.js +0 -1
  28. package/dist/cjs/i18n/ru.js +0 -1
  29. package/dist/cjs/i18n/sk.js +0 -1
  30. package/dist/cjs/i18n/sv.js +0 -1
  31. package/dist/cjs/i18n/th.js +0 -1
  32. package/dist/cjs/i18n/tr.js +0 -1
  33. package/dist/cjs/i18n/uk.js +0 -1
  34. package/dist/cjs/i18n/vi.js +0 -1
  35. package/dist/cjs/i18n/zh.js +0 -1
  36. package/dist/cjs/i18n/zh_TW.js +0 -1
  37. package/dist/cjs/index.js +0 -6
  38. package/dist/cjs/messages.js +0 -2
  39. package/dist/cjs/react/hooks/use-bidi-warnings.js +2 -12
  40. package/dist/cjs/react/hooks/use-in-viewport.js +4 -17
  41. package/dist/cjs/react/hooks/use-observed-width.js +20 -35
  42. package/dist/cjs/react/index.js +27 -114
  43. package/dist/cjs/react/marks/alignment.js +0 -9
  44. package/dist/cjs/react/marks/annotation.js +6 -21
  45. package/dist/cjs/react/marks/breakout.js +0 -9
  46. package/dist/cjs/react/marks/code.js +0 -11
  47. package/dist/cjs/react/marks/confluence-inline-comment.js +2 -19
  48. package/dist/cjs/react/marks/data-consumer.js +0 -4
  49. package/dist/cjs/react/marks/em.js +0 -3
  50. package/dist/cjs/react/marks/fragment.js +0 -4
  51. package/dist/cjs/react/marks/indentation.js +0 -3
  52. package/dist/cjs/react/marks/index.js +1 -24
  53. package/dist/cjs/react/marks/link.js +5 -25
  54. package/dist/cjs/react/marks/strike.js +0 -4
  55. package/dist/cjs/react/marks/strong.js +0 -3
  56. package/dist/cjs/react/marks/subsup.js +0 -5
  57. package/dist/cjs/react/marks/textColor.js +0 -9
  58. package/dist/cjs/react/marks/underline.js +0 -3
  59. package/dist/cjs/react/marks/unsupportedMark.js +0 -3
  60. package/dist/cjs/react/marks/unsupportedNodeAttribute.js +0 -3
  61. package/dist/cjs/react/nodes/blockCard.js +4 -16
  62. package/dist/cjs/react/nodes/blockquote.js +0 -3
  63. package/dist/cjs/react/nodes/bodiedExtension.js +6 -17
  64. package/dist/cjs/react/nodes/bulletList.js +0 -5
  65. package/dist/cjs/react/nodes/caption.js +1 -6
  66. package/dist/cjs/react/nodes/codeBlock/codeBlock.js +5 -14
  67. package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +3 -16
  68. package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +6 -23
  69. package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +9 -32
  70. package/dist/cjs/react/nodes/codeBlockCopyButton.js +7 -31
  71. package/dist/cjs/react/nodes/date.js +5 -33
  72. package/dist/cjs/react/nodes/decisionItem.js +1 -5
  73. package/dist/cjs/react/nodes/decisionList.js +0 -20
  74. package/dist/cjs/react/nodes/doc.js +0 -6
  75. package/dist/cjs/react/nodes/embedCard.js +25 -54
  76. package/dist/cjs/react/nodes/emoji.js +6 -24
  77. package/dist/cjs/react/nodes/extension.js +12 -26
  78. package/dist/cjs/react/nodes/fallback.js +2 -24
  79. package/dist/cjs/react/nodes/hardBreak.js +1 -7
  80. package/dist/cjs/react/nodes/heading-anchor.js +1 -46
  81. package/dist/cjs/react/nodes/heading.js +4 -17
  82. package/dist/cjs/react/nodes/index.js +7 -62
  83. package/dist/cjs/react/nodes/inline.js +0 -6
  84. package/dist/cjs/react/nodes/inlineCard.js +6 -23
  85. package/dist/cjs/react/nodes/inlineExtension.js +2 -10
  86. package/dist/cjs/react/nodes/layoutColumn.js +0 -8
  87. package/dist/cjs/react/nodes/layoutSection.js +0 -3
  88. package/dist/cjs/react/nodes/listItem.js +0 -3
  89. package/dist/cjs/react/nodes/media.js +10 -49
  90. package/dist/cjs/react/nodes/mediaGroup.js +6 -47
  91. package/dist/cjs/react/nodes/mediaInline.js +7 -37
  92. package/dist/cjs/react/nodes/mediaSingle/index.js +38 -85
  93. package/dist/cjs/react/nodes/mediaSingle/styles.js +0 -5
  94. package/dist/cjs/react/nodes/mention.js +5 -23
  95. package/dist/cjs/react/nodes/orderedList.js +0 -14
  96. package/dist/cjs/react/nodes/panel.js +10 -38
  97. package/dist/cjs/react/nodes/paragraph.js +1 -5
  98. package/dist/cjs/react/nodes/placeholder.js +0 -4
  99. package/dist/cjs/react/nodes/rule.js +0 -3
  100. package/dist/cjs/react/nodes/status.js +3 -22
  101. package/dist/cjs/react/nodes/table/colgroup.js +12 -26
  102. package/dist/cjs/react/nodes/table/sticky.js +17 -47
  103. package/dist/cjs/react/nodes/table/table.js +5 -10
  104. package/dist/cjs/react/nodes/table.js +19 -102
  105. package/dist/cjs/react/nodes/tableCell.js +26 -79
  106. package/dist/cjs/react/nodes/tableRow.js +4 -33
  107. package/dist/cjs/react/nodes/task-item-with-providers.js +4 -40
  108. package/dist/cjs/react/nodes/taskItem.js +8 -36
  109. package/dist/cjs/react/nodes/taskList.js +2 -22
  110. package/dist/cjs/react/nodes/text-wrapper.js +1 -8
  111. package/dist/cjs/react/nodes/unknownBlock.js +0 -3
  112. package/dist/cjs/react/renderer-node.js +0 -6
  113. package/dist/cjs/react/utils/clipboard.js +0 -3
  114. package/dist/cjs/react/utils/element-selection.js +0 -13
  115. package/dist/cjs/react/utils/getCardClickHandler.js +0 -3
  116. package/dist/cjs/react/utils/inject-props.js +4 -9
  117. package/dist/cjs/react/utils/links.js +2 -6
  118. package/dist/cjs/react/utils/lists.js +0 -1
  119. package/dist/cjs/react/utils/performance/RenderTracking.js +2 -10
  120. package/dist/cjs/react/utils/use-select-all-trap.js +1 -23
  121. package/dist/cjs/render-document.js +42 -83
  122. package/dist/cjs/renderer-context.js +0 -5
  123. package/dist/cjs/steps/index.js +7 -39
  124. package/dist/cjs/text/index.js +0 -9
  125. package/dist/cjs/text/nodes/blockquote.js +0 -3
  126. package/dist/cjs/text/nodes/bulletList.js +0 -3
  127. package/dist/cjs/text/nodes/date.js +0 -4
  128. package/dist/cjs/text/nodes/decisionItem.js +0 -5
  129. package/dist/cjs/text/nodes/hardBreak.js +0 -2
  130. package/dist/cjs/text/nodes/heading.js +0 -3
  131. package/dist/cjs/text/nodes/index.js +0 -21
  132. package/dist/cjs/text/nodes/inlineCard.js +0 -4
  133. package/dist/cjs/text/nodes/listItem.js +0 -3
  134. package/dist/cjs/text/nodes/mediaGroup.js +0 -4
  135. package/dist/cjs/text/nodes/mention.js +0 -3
  136. package/dist/cjs/text/nodes/orderedList.js +0 -4
  137. package/dist/cjs/text/nodes/panel.js +0 -3
  138. package/dist/cjs/text/nodes/paragraph.js +0 -5
  139. package/dist/cjs/text/nodes/rule.js +0 -2
  140. package/dist/cjs/text/nodes/status.js +0 -3
  141. package/dist/cjs/text/nodes/table.js +0 -5
  142. package/dist/cjs/text/nodes/taskItem.js +0 -5
  143. package/dist/cjs/text/nodes/unknown.js +0 -6
  144. package/dist/cjs/text-serializer.js +0 -2
  145. package/dist/cjs/ui/Expand.js +15 -59
  146. package/dist/cjs/ui/ExtensionRenderer.js +10 -43
  147. package/dist/cjs/ui/MediaCard.js +40 -116
  148. package/dist/cjs/ui/Renderer/ErrorBoundary.js +0 -26
  149. package/dist/cjs/ui/Renderer/breakout-ssr.js +6 -32
  150. package/dist/cjs/ui/Renderer/click-to-edit.js +0 -6
  151. package/dist/cjs/ui/Renderer/index.js +47 -149
  152. package/dist/cjs/ui/Renderer/style.js +1 -39
  153. package/dist/cjs/ui/Renderer/truncated-wrapper.js +12 -30
  154. package/dist/cjs/ui/RendererActionsContext/WithRendererActions.js +0 -4
  155. package/dist/cjs/ui/RendererActionsContext/index.js +1 -11
  156. package/dist/cjs/ui/SmartCardStorage.js +0 -20
  157. package/dist/cjs/ui/SortingIcon.js +10 -40
  158. package/dist/cjs/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -11
  159. package/dist/cjs/ui/TaskItemsFormatContext/index.js +0 -1
  160. package/dist/cjs/ui/active-header-id-provider.js +6 -19
  161. package/dist/cjs/ui/annotations/context.js +0 -24
  162. package/dist/cjs/ui/annotations/draft/component.js +5 -42
  163. package/dist/cjs/ui/annotations/draft/dom.js +3 -17
  164. package/dist/cjs/ui/annotations/draft/index.js +0 -2
  165. package/dist/cjs/ui/annotations/draft/position.js +1 -12
  166. package/dist/cjs/ui/annotations/draft/text.js +2 -8
  167. package/dist/cjs/ui/annotations/element/index.js +4 -16
  168. package/dist/cjs/ui/annotations/element/mark.js +8 -26
  169. package/dist/cjs/ui/annotations/hooks/index.js +0 -3
  170. package/dist/cjs/ui/annotations/hooks/use-events.js +13 -45
  171. package/dist/cjs/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -6
  172. package/dist/cjs/ui/annotations/hooks/use-inline-comments-filter.js +1 -8
  173. package/dist/cjs/ui/annotations/hooks/use-load-annotations.js +4 -19
  174. package/dist/cjs/ui/annotations/hooks/user-selection.js +3 -18
  175. package/dist/cjs/ui/annotations/hooks/utils.js +0 -2
  176. package/dist/cjs/ui/annotations/index.js +4 -20
  177. package/dist/cjs/ui/annotations/selection/index.js +0 -1
  178. package/dist/cjs/ui/annotations/selection/mounter.js +13 -42
  179. package/dist/cjs/ui/annotations/selection/range-validator.js +9 -23
  180. package/dist/cjs/ui/annotations/selection/wrapper.js +3 -13
  181. package/dist/cjs/ui/annotations/types.js +0 -1
  182. package/dist/cjs/ui/annotations/view/index.js +1 -12
  183. package/dist/cjs/ui/index.js +0 -2
  184. package/dist/cjs/use-feature-flags.js +0 -4
  185. package/dist/cjs/utils.js +1 -19
  186. package/dist/cjs/version.json +1 -1
  187. package/dist/es2019/actions/index.js +6 -50
  188. package/dist/es2019/actions/matches-utils.js +10 -9
  189. package/dist/es2019/actions.js +2 -1
  190. package/dist/es2019/analytics/events.js +0 -5
  191. package/dist/es2019/analytics/unsupported-content.js +8 -14
  192. package/dist/es2019/react/hooks/use-bidi-warnings.js +0 -2
  193. package/dist/es2019/react/hooks/use-in-viewport.js +0 -1
  194. package/dist/es2019/react/hooks/use-observed-width.js +0 -2
  195. package/dist/es2019/react/index.js +44 -119
  196. package/dist/es2019/react/marks/alignment.js +0 -3
  197. package/dist/es2019/react/marks/annotation.js +2 -5
  198. package/dist/es2019/react/marks/confluence-inline-comment.js +0 -1
  199. package/dist/es2019/react/marks/index.js +2 -1
  200. package/dist/es2019/react/marks/link.js +0 -6
  201. package/dist/es2019/react/marks/subsup.js +0 -3
  202. package/dist/es2019/react/nodes/bodiedExtension.js +2 -5
  203. package/dist/es2019/react/nodes/caption.js +0 -2
  204. package/dist/es2019/react/nodes/codeBlock/codeBlock.js +0 -2
  205. package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +1 -3
  206. package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +1 -6
  207. package/dist/es2019/react/nodes/codeBlockCopyButton.js +0 -4
  208. package/dist/es2019/react/nodes/date.js +0 -7
  209. package/dist/es2019/react/nodes/decisionList.js +0 -3
  210. package/dist/es2019/react/nodes/embedCard.js +8 -16
  211. package/dist/es2019/react/nodes/emoji.js +0 -1
  212. package/dist/es2019/react/nodes/extension.js +4 -6
  213. package/dist/es2019/react/nodes/fallback.js +0 -8
  214. package/dist/es2019/react/nodes/hardBreak.js +0 -3
  215. package/dist/es2019/react/nodes/heading-anchor.js +0 -15
  216. package/dist/es2019/react/nodes/heading.js +0 -6
  217. package/dist/es2019/react/nodes/index.js +28 -61
  218. package/dist/es2019/react/nodes/inline.js +0 -2
  219. package/dist/es2019/react/nodes/inlineCard.js +0 -5
  220. package/dist/es2019/react/nodes/inlineExtension.js +2 -5
  221. package/dist/es2019/react/nodes/media.js +0 -10
  222. package/dist/es2019/react/nodes/mediaGroup.js +2 -22
  223. package/dist/es2019/react/nodes/mediaInline.js +1 -8
  224. package/dist/es2019/react/nodes/mediaSingle/index.js +8 -29
  225. package/dist/es2019/react/nodes/mention.js +0 -1
  226. package/dist/es2019/react/nodes/orderedList.js +0 -5
  227. package/dist/es2019/react/nodes/panel.js +4 -17
  228. package/dist/es2019/react/nodes/placeholder.js +0 -1
  229. package/dist/es2019/react/nodes/status.js +0 -1
  230. package/dist/es2019/react/nodes/table/colgroup.js +9 -18
  231. package/dist/es2019/react/nodes/table/sticky.js +3 -16
  232. package/dist/es2019/react/nodes/table.js +9 -75
  233. package/dist/es2019/react/nodes/tableCell.js +4 -31
  234. package/dist/es2019/react/nodes/tableRow.js +0 -10
  235. package/dist/es2019/react/nodes/task-item-with-providers.js +0 -6
  236. package/dist/es2019/react/nodes/taskItem.js +0 -7
  237. package/dist/es2019/react/nodes/taskList.js +0 -3
  238. package/dist/es2019/react/nodes/text-wrapper.js +0 -4
  239. package/dist/es2019/react/utils/clipboard.js +0 -1
  240. package/dist/es2019/react/utils/element-selection.js +0 -12
  241. package/dist/es2019/react/utils/inject-props.js +5 -7
  242. package/dist/es2019/react/utils/links.js +2 -4
  243. package/dist/es2019/react/utils/performance/RenderTracking.js +0 -1
  244. package/dist/es2019/react/utils/use-select-all-trap.js +0 -7
  245. package/dist/es2019/render-document.js +16 -33
  246. package/dist/es2019/steps/index.js +4 -33
  247. package/dist/es2019/text/index.js +0 -3
  248. package/dist/es2019/text/nodes/blockquote.js +0 -2
  249. package/dist/es2019/text/nodes/bulletList.js +0 -2
  250. package/dist/es2019/text/nodes/date.js +0 -2
  251. package/dist/es2019/text/nodes/decisionItem.js +0 -4
  252. package/dist/es2019/text/nodes/hardBreak.js +0 -1
  253. package/dist/es2019/text/nodes/heading.js +0 -2
  254. package/dist/es2019/text/nodes/inlineCard.js +0 -3
  255. package/dist/es2019/text/nodes/listItem.js +0 -2
  256. package/dist/es2019/text/nodes/mediaGroup.js +0 -3
  257. package/dist/es2019/text/nodes/mention.js +0 -2
  258. package/dist/es2019/text/nodes/orderedList.js +0 -2
  259. package/dist/es2019/text/nodes/panel.js +0 -2
  260. package/dist/es2019/text/nodes/paragraph.js +0 -4
  261. package/dist/es2019/text/nodes/rule.js +0 -1
  262. package/dist/es2019/text/nodes/status.js +0 -2
  263. package/dist/es2019/text/nodes/table.js +0 -4
  264. package/dist/es2019/text/nodes/taskItem.js +0 -4
  265. package/dist/es2019/text/nodes/unknown.js +0 -4
  266. package/dist/es2019/ui/Expand.js +2 -17
  267. package/dist/es2019/ui/ExtensionRenderer.js +0 -19
  268. package/dist/es2019/ui/MediaCard.js +9 -40
  269. package/dist/es2019/ui/Renderer/ErrorBoundary.js +0 -10
  270. package/dist/es2019/ui/Renderer/breakout-ssr.js +6 -26
  271. package/dist/es2019/ui/Renderer/click-to-edit.js +1 -4
  272. package/dist/es2019/ui/Renderer/index.js +17 -66
  273. package/dist/es2019/ui/Renderer/style.js +0 -14
  274. package/dist/es2019/ui/Renderer/truncated-wrapper.js +2 -6
  275. package/dist/es2019/ui/SmartCardStorage.js +0 -1
  276. package/dist/es2019/ui/SortingIcon.js +3 -20
  277. package/dist/es2019/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -2
  278. package/dist/es2019/ui/active-header-id-provider.js +0 -3
  279. package/dist/es2019/ui/annotations/context.js +0 -6
  280. package/dist/es2019/ui/annotations/draft/component.js +0 -13
  281. package/dist/es2019/ui/annotations/draft/dom.js +0 -6
  282. package/dist/es2019/ui/annotations/draft/position.js +0 -8
  283. package/dist/es2019/ui/annotations/draft/text.js +0 -1
  284. package/dist/es2019/ui/annotations/element/index.js +0 -3
  285. package/dist/es2019/ui/annotations/element/mark.js +4 -6
  286. package/dist/es2019/ui/annotations/hooks/use-events.js +4 -13
  287. package/dist/es2019/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -2
  288. package/dist/es2019/ui/annotations/hooks/use-inline-comments-filter.js +0 -1
  289. package/dist/es2019/ui/annotations/hooks/use-load-annotations.js +4 -8
  290. package/dist/es2019/ui/annotations/hooks/user-selection.js +0 -6
  291. package/dist/es2019/ui/annotations/selection/mounter.js +0 -13
  292. package/dist/es2019/ui/annotations/selection/range-validator.js +0 -2
  293. package/dist/es2019/ui/annotations/selection/wrapper.js +0 -2
  294. package/dist/es2019/ui/annotations/types.js +0 -1
  295. package/dist/es2019/ui/annotations/view/index.js +0 -4
  296. package/dist/es2019/use-feature-flags.js +0 -1
  297. package/dist/es2019/utils.js +1 -8
  298. package/dist/es2019/version.json +1 -1
  299. package/dist/esm/actions/index.js +19 -63
  300. package/dist/esm/actions/matches-utils.js +10 -9
  301. package/dist/esm/actions.js +2 -1
  302. package/dist/esm/analytics/events.js +0 -5
  303. package/dist/esm/analytics/unsupported-content.js +14 -21
  304. package/dist/esm/react/hooks/use-bidi-warnings.js +2 -4
  305. package/dist/esm/react/hooks/use-in-viewport.js +4 -13
  306. package/dist/esm/react/hooks/use-observed-width.js +20 -29
  307. package/dist/esm/react/index.js +27 -111
  308. package/dist/esm/react/marks/alignment.js +0 -4
  309. package/dist/esm/react/marks/annotation.js +6 -14
  310. package/dist/esm/react/marks/breakout.js +0 -2
  311. package/dist/esm/react/marks/confluence-inline-comment.js +2 -12
  312. package/dist/esm/react/marks/index.js +2 -1
  313. package/dist/esm/react/marks/link.js +5 -12
  314. package/dist/esm/react/marks/subsup.js +0 -3
  315. package/dist/esm/react/nodes/blockCard.js +4 -4
  316. package/dist/esm/react/nodes/bodiedExtension.js +6 -10
  317. package/dist/esm/react/nodes/caption.js +1 -3
  318. package/dist/esm/react/nodes/codeBlock/codeBlock.js +4 -6
  319. package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +4 -8
  320. package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +6 -10
  321. package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +10 -21
  322. package/dist/esm/react/nodes/codeBlockCopyButton.js +7 -15
  323. package/dist/esm/react/nodes/date.js +5 -20
  324. package/dist/esm/react/nodes/decisionItem.js +1 -1
  325. package/dist/esm/react/nodes/decisionList.js +0 -12
  326. package/dist/esm/react/nodes/embedCard.js +25 -39
  327. package/dist/esm/react/nodes/emoji.js +6 -16
  328. package/dist/esm/react/nodes/extension.js +12 -16
  329. package/dist/esm/react/nodes/fallback.js +2 -18
  330. package/dist/esm/react/nodes/hardBreak.js +1 -5
  331. package/dist/esm/react/nodes/heading-anchor.js +1 -32
  332. package/dist/esm/react/nodes/heading.js +4 -10
  333. package/dist/esm/react/nodes/index.js +26 -64
  334. package/dist/esm/react/nodes/inline.js +0 -2
  335. package/dist/esm/react/nodes/inlineCard.js +6 -12
  336. package/dist/esm/react/nodes/inlineExtension.js +2 -6
  337. package/dist/esm/react/nodes/layoutColumn.js +0 -2
  338. package/dist/esm/react/nodes/media.js +10 -34
  339. package/dist/esm/react/nodes/mediaGroup.js +6 -37
  340. package/dist/esm/react/nodes/mediaInline.js +7 -20
  341. package/dist/esm/react/nodes/mediaSingle/index.js +37 -66
  342. package/dist/esm/react/nodes/mediaSingle/styles.js +0 -2
  343. package/dist/esm/react/nodes/mention.js +5 -15
  344. package/dist/esm/react/nodes/orderedList.js +0 -5
  345. package/dist/esm/react/nodes/panel.js +12 -28
  346. package/dist/esm/react/nodes/paragraph.js +1 -1
  347. package/dist/esm/react/nodes/placeholder.js +0 -1
  348. package/dist/esm/react/nodes/status.js +3 -13
  349. package/dist/esm/react/nodes/table/colgroup.js +12 -21
  350. package/dist/esm/react/nodes/table/sticky.js +17 -32
  351. package/dist/esm/react/nodes/table/table.js +5 -5
  352. package/dist/esm/react/nodes/table.js +19 -95
  353. package/dist/esm/react/nodes/tableCell.js +26 -66
  354. package/dist/esm/react/nodes/tableRow.js +4 -25
  355. package/dist/esm/react/nodes/task-item-with-providers.js +4 -27
  356. package/dist/esm/react/nodes/taskItem.js +8 -24
  357. package/dist/esm/react/nodes/taskList.js +2 -14
  358. package/dist/esm/react/nodes/text-wrapper.js +1 -5
  359. package/dist/esm/react/utils/clipboard.js +0 -1
  360. package/dist/esm/react/utils/element-selection.js +0 -10
  361. package/dist/esm/react/utils/inject-props.js +5 -7
  362. package/dist/esm/react/utils/links.js +2 -4
  363. package/dist/esm/react/utils/performance/RenderTracking.js +2 -4
  364. package/dist/esm/react/utils/use-select-all-trap.js +1 -9
  365. package/dist/esm/render-document.js +42 -70
  366. package/dist/esm/steps/index.js +7 -36
  367. package/dist/esm/text/index.js +0 -6
  368. package/dist/esm/text/nodes/blockquote.js +0 -2
  369. package/dist/esm/text/nodes/bulletList.js +0 -2
  370. package/dist/esm/text/nodes/date.js +0 -2
  371. package/dist/esm/text/nodes/decisionItem.js +0 -4
  372. package/dist/esm/text/nodes/hardBreak.js +0 -1
  373. package/dist/esm/text/nodes/heading.js +0 -2
  374. package/dist/esm/text/nodes/inlineCard.js +0 -3
  375. package/dist/esm/text/nodes/listItem.js +0 -2
  376. package/dist/esm/text/nodes/mediaGroup.js +0 -3
  377. package/dist/esm/text/nodes/mention.js +0 -2
  378. package/dist/esm/text/nodes/orderedList.js +0 -2
  379. package/dist/esm/text/nodes/panel.js +0 -2
  380. package/dist/esm/text/nodes/paragraph.js +0 -4
  381. package/dist/esm/text/nodes/rule.js +0 -1
  382. package/dist/esm/text/nodes/status.js +0 -2
  383. package/dist/esm/text/nodes/table.js +0 -4
  384. package/dist/esm/text/nodes/taskItem.js +0 -4
  385. package/dist/esm/text/nodes/unknown.js +0 -4
  386. package/dist/esm/ui/Expand.js +15 -36
  387. package/dist/esm/ui/ExtensionRenderer.js +10 -39
  388. package/dist/esm/ui/MediaCard.js +42 -99
  389. package/dist/esm/ui/Renderer/ErrorBoundary.js +0 -16
  390. package/dist/esm/ui/Renderer/breakout-ssr.js +7 -27
  391. package/dist/esm/ui/Renderer/click-to-edit.js +1 -4
  392. package/dist/esm/ui/Renderer/index.js +47 -110
  393. package/dist/esm/ui/Renderer/style.js +1 -21
  394. package/dist/esm/ui/Renderer/truncated-wrapper.js +12 -23
  395. package/dist/esm/ui/RendererActionsContext/index.js +1 -1
  396. package/dist/esm/ui/SmartCardStorage.js +0 -9
  397. package/dist/esm/ui/SortingIcon.js +10 -29
  398. package/dist/esm/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +0 -2
  399. package/dist/esm/ui/active-header-id-provider.js +6 -12
  400. package/dist/esm/ui/annotations/context.js +0 -15
  401. package/dist/esm/ui/annotations/draft/component.js +5 -19
  402. package/dist/esm/ui/annotations/draft/dom.js +3 -11
  403. package/dist/esm/ui/annotations/draft/position.js +1 -9
  404. package/dist/esm/ui/annotations/draft/text.js +2 -4
  405. package/dist/esm/ui/annotations/element/index.js +4 -7
  406. package/dist/esm/ui/annotations/element/mark.js +8 -14
  407. package/dist/esm/ui/annotations/hooks/use-events.js +13 -32
  408. package/dist/esm/ui/annotations/hooks/use-inline-comment-subscriber.js +0 -2
  409. package/dist/esm/ui/annotations/hooks/use-inline-comments-filter.js +1 -2
  410. package/dist/esm/ui/annotations/hooks/use-load-annotations.js +4 -12
  411. package/dist/esm/ui/annotations/hooks/user-selection.js +3 -11
  412. package/dist/esm/ui/annotations/index.js +4 -6
  413. package/dist/esm/ui/annotations/selection/mounter.js +13 -29
  414. package/dist/esm/ui/annotations/selection/range-validator.js +9 -12
  415. package/dist/esm/ui/annotations/selection/wrapper.js +3 -5
  416. package/dist/esm/ui/annotations/types.js +0 -1
  417. package/dist/esm/ui/annotations/view/index.js +1 -5
  418. package/dist/esm/use-feature-flags.js +0 -1
  419. package/dist/esm/utils.js +1 -8
  420. package/dist/esm/version.json +1 -1
  421. package/package.json +7 -7
@@ -11,12 +11,10 @@ import { withSmartCardStorage } from '../../ui/SmartCardStorage';
11
11
  import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
12
12
  import { Table } from './table/table';
13
13
  import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
14
-
15
14
  const orderChildren = (children, tableNode, smartCardStorage, tableOrderStatus) => {
16
15
  if (!tableOrderStatus || tableOrderStatus.order === SortOrder.NO_ORDER) {
17
16
  return children;
18
17
  }
19
-
20
18
  const {
21
19
  order,
22
20
  columnIndex
@@ -26,14 +24,11 @@ const orderChildren = (children, tableNode, smartCardStorage, tableOrderStatus)
26
24
  const {
27
25
  url
28
26
  } = attrs;
29
-
30
27
  if (!url) {
31
28
  return null;
32
29
  }
33
-
34
30
  return smartCardStorage.get(url) || null;
35
31
  }
36
-
37
32
  }, order);
38
33
  const tableArray = convertProsemirrorTableNodeToArrayOfRows(tableNode);
39
34
  const tableArrayWithChildren = tableArray.map((rowNodes, index) => ({
@@ -42,28 +37,21 @@ const orderChildren = (children, tableNode, smartCardStorage, tableOrderStatus)
42
37
  }));
43
38
  const headerRow = tableArrayWithChildren.shift();
44
39
  const sortedTable = tableArrayWithChildren.sort((rowA, rowB) => compareNodesInOrder(rowA.rowNodes[columnIndex], rowB.rowNodes[columnIndex]));
45
-
46
40
  if (headerRow) {
47
41
  sortedTable.unshift(headerRow);
48
42
  }
49
-
50
43
  return sortedTable.map(elem => elem.rowReact);
51
44
  };
52
-
53
45
  const hasRowspan = row => {
54
46
  let hasRowspan = false;
55
47
  row.forEach(cell => hasRowspan = hasRowspan || cell.attrs.rowspan > 1);
56
48
  return hasRowspan;
57
49
  };
58
-
59
50
  const getRefTop = refElement => {
60
51
  return Math.round(refElement.getBoundingClientRect().top);
61
52
  };
62
-
63
53
  const shouldHeaderStick = (scrollTop, tableTop, tableBottom, rowHeight) => tableTop <= scrollTop && !(tableBottom - rowHeight <= scrollTop);
64
-
65
54
  const shouldHeaderPinBottom = (scrollTop, tableBottom, rowHeight) => tableBottom - rowHeight <= scrollTop && !(tableBottom < scrollTop);
66
-
67
55
  const addSortableColumn = (rows, tableOrderStatus, onSorting) => {
68
56
  return React.Children.map(rows, (row, index) => {
69
57
  if (index === 0) {
@@ -72,65 +60,47 @@ const addSortableColumn = (rows, tableOrderStatus, onSorting) => {
72
60
  onSorting
73
61
  });
74
62
  }
75
-
76
63
  return row;
77
64
  });
78
65
  };
79
-
80
66
  const isHeaderRowEnabled = rows => {
81
67
  if (!rows.length) {
82
68
  return false;
83
69
  }
84
-
85
70
  const {
86
71
  children
87
72
  } = rows[0].props;
88
-
89
73
  if (!children.length) {
90
74
  return false;
91
75
  }
92
-
93
76
  if (children.length === 1) {
94
77
  return children[0].type === TableHeader;
95
78
  }
96
-
97
79
  return children.every(node => node.type === TableHeader);
98
80
  };
99
-
100
81
  const tableCanBeSticky = (node, children) => {
101
82
  return isHeaderRowEnabled(children) && node && node.firstChild && !hasRowspan(node.firstChild);
102
83
  };
103
-
104
84
  const canUseLinelength = appearance => appearance === 'full-page' || appearance === 'mobile';
105
-
106
85
  export class TableContainer extends React.Component {
107
86
  constructor(...args) {
108
87
  super(...args);
109
-
110
88
  _defineProperty(this, "state", {
111
89
  stickyMode: 'none'
112
90
  });
113
-
114
91
  _defineProperty(this, "tableRef", /*#__PURE__*/React.createRef());
115
-
116
92
  _defineProperty(this, "stickyHeaderRef", /*#__PURE__*/React.createRef());
117
-
118
93
  _defineProperty(this, "stickyWrapperRef", /*#__PURE__*/React.createRef());
119
-
120
94
  _defineProperty(this, "wrapperRef", /*#__PURE__*/React.createRef());
121
-
122
95
  _defineProperty(this, "overflowParent", null);
123
-
124
96
  _defineProperty(this, "componentWillUnmount", () => {
125
97
  if (this.overflowParent) {
126
98
  this.overflowParent.removeEventListener('scroll', this.onScroll);
127
99
  }
128
-
129
100
  if (this.nextFrame) {
130
101
  cancelAnimationFrame(this.nextFrame);
131
102
  }
132
103
  });
133
-
134
104
  _defineProperty(this, "getScrollTop", () => {
135
105
  const {
136
106
  stickyHeaders
@@ -138,51 +108,41 @@ export class TableContainer extends React.Component {
138
108
  const offsetTop = stickyHeaders && stickyHeaders.offsetTop || 0;
139
109
  return (this.overflowParent ? this.overflowParent.top : 0) + offsetTop;
140
110
  });
141
-
142
111
  _defineProperty(this, "updateSticky", () => {
143
112
  const tableElem = this.tableRef.current;
144
113
  const refElem = this.stickyHeaderRef.current;
145
-
146
114
  if (!tableElem || !refElem) {
147
115
  return;
148
116
  }
149
-
150
117
  const scrollTop = this.getScrollTop() + tableStickyPadding;
151
118
  const tableTop = getRefTop(tableElem);
152
119
  const tableBottom = tableTop + tableElem.clientHeight;
153
120
  const shouldSticky = shouldHeaderStick(scrollTop, tableTop, tableBottom, refElem.clientHeight);
154
121
  const shouldPin = shouldHeaderPinBottom(scrollTop, tableBottom, refElem.clientHeight);
155
122
  let stickyMode = 'none';
156
-
157
123
  if (shouldPin) {
158
124
  stickyMode = 'pin-bottom';
159
125
  } else if (shouldSticky) {
160
126
  stickyMode = 'stick';
161
127
  }
162
-
163
128
  if (this.state.stickyMode !== stickyMode) {
164
129
  this.setState({
165
130
  stickyMode
166
131
  });
167
132
  }
168
-
169
133
  this.nextFrame = undefined;
170
134
  });
171
-
172
135
  _defineProperty(this, "onScroll", () => {
173
136
  if (!this.nextFrame) {
174
137
  this.nextFrame = requestAnimationFrame(this.updateSticky);
175
138
  }
176
139
  });
177
-
178
140
  _defineProperty(this, "onWrapperScrolled", () => {
179
141
  if (!this.wrapperRef.current || !this.stickyWrapperRef.current) {
180
142
  return;
181
143
  }
182
-
183
144
  this.stickyWrapperRef.current.scrollLeft = this.wrapperRef.current.scrollLeft;
184
145
  });
185
-
186
146
  _defineProperty(this, "grabFirstRowRef", children => {
187
147
  return React.Children.map(children, (child, idx) => {
188
148
  if (idx === 0 && /*#__PURE__*/React.isValidElement(child)) {
@@ -190,19 +150,16 @@ export class TableContainer extends React.Component {
190
150
  innerRef: this.stickyHeaderRef
191
151
  });
192
152
  }
193
-
194
153
  return child;
195
154
  });
196
155
  });
197
156
  }
198
-
199
157
  componentDidMount() {
200
158
  if (this.props.stickyHeaders) {
201
159
  this.overflowParent = OverflowParent.fromElement(this.tableRef.current);
202
160
  this.overflowParent.addEventListener('scroll', this.onScroll);
203
161
  }
204
162
  }
205
-
206
163
  componentDidUpdate(prevProps, prevState) {
207
164
  // toggling sticky headers visiblity
208
165
  if (this.props.stickyHeaders && !this.overflowParent) {
@@ -210,44 +167,37 @@ export class TableContainer extends React.Component {
210
167
  } else if (!this.props.stickyHeaders && this.overflowParent) {
211
168
  this.overflowParent.removeEventListener('scroll', this.onScroll);
212
169
  this.overflowParent = null;
213
- } // offsetTop might have changed, re-position sticky header
214
-
170
+ }
215
171
 
172
+ // offsetTop might have changed, re-position sticky header
216
173
  if (this.props.stickyHeaders !== prevProps.stickyHeaders) {
217
174
  this.updateSticky();
218
- } // sync horizontal scroll in floating div when toggling modes
219
-
175
+ }
220
176
 
177
+ // sync horizontal scroll in floating div when toggling modes
221
178
  if (prevState.stickyMode !== this.state.stickyMode) {
222
179
  this.onWrapperScrolled();
223
180
  }
224
181
  }
225
-
226
182
  get pinTop() {
227
183
  if (!this.tableRef.current || !this.stickyHeaderRef.current) {
228
184
  return;
229
185
  }
230
-
231
186
  return this.tableRef.current.offsetHeight - this.stickyHeaderRef.current.offsetHeight + tableMarginTop - tableStickyPadding;
232
187
  }
233
-
234
188
  get stickyTop() {
235
189
  switch (this.state.stickyMode) {
236
190
  case 'pin-bottom':
237
191
  return this.pinTop;
238
-
239
192
  case 'stick':
240
193
  return this.props.stickyHeaders && this.props.stickyHeaders.offsetTop;
241
-
242
194
  default:
243
195
  return undefined;
244
196
  }
245
197
  }
246
-
247
198
  get headerRowHeight() {
248
199
  return this.stickyHeaderRef.current ? this.stickyHeaderRef.current.offsetHeight : 0;
249
200
  }
250
-
251
201
  render() {
252
202
  const {
253
203
  isNumberColumnEnabled,
@@ -263,12 +213,10 @@ export class TableContainer extends React.Component {
263
213
  let tableWidth = calcTableWidth(layout, renderWidth, false);
264
214
  const lineLength = akEditorDefaultLayoutWidth;
265
215
  let left;
266
-
267
216
  if (canUseLinelength(this.props.rendererAppearance) && tableWidth !== 'inherit') {
268
217
  const tableWidthPx = Number(tableWidth.substring(0, tableWidth.length - 2));
269
218
  left = lineLength / 2 - tableWidthPx / 2;
270
219
  }
271
-
272
220
  const wrapperWidth = this.wrapperRef.current ? this.wrapperRef.current.clientWidth : 0;
273
221
  const children = React.Children.toArray(this.props.children);
274
222
  return /*#__PURE__*/React.createElement(React.Fragment, null, stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
@@ -305,16 +253,13 @@ export class TableContainer extends React.Component {
305
253
  renderWidth: renderWidth
306
254
  }, this.grabFirstRowRef(children)))));
307
255
  }
308
-
309
256
  }
310
257
  export class TableProcessor extends React.Component {
311
258
  constructor(...args) {
312
259
  super(...args);
313
-
314
260
  _defineProperty(this, "state", {
315
261
  tableOrderStatus: undefined
316
262
  });
317
-
318
263
  _defineProperty(this, "addSortableColumn", childrenArray => {
319
264
  const {
320
265
  tableNode,
@@ -324,14 +269,11 @@ export class TableProcessor extends React.Component {
324
269
  const {
325
270
  tableOrderStatus
326
271
  } = this.state;
327
-
328
272
  if (allowColumnSorting && isHeaderRowEnabled(childrenArray) && tableNode && !hasMergedCell(tableNode)) {
329
273
  return addSortableColumn(orderChildren(childrenArray, tableNode, smartCardStorage, tableOrderStatus), tableOrderStatus, this.changeSortOrder);
330
274
  }
331
-
332
275
  return childrenArray;
333
276
  });
334
-
335
277
  _defineProperty(this, "changeSortOrder", (columnIndex, sortOrder) => {
336
278
  this.setState({
337
279
  tableOrderStatus: {
@@ -340,7 +282,6 @@ export class TableProcessor extends React.Component {
340
282
  }
341
283
  });
342
284
  });
343
-
344
285
  _defineProperty(this, "addNumberColumnIndexes", rows => {
345
286
  const {
346
287
  isNumberColumnEnabled
@@ -354,46 +295,39 @@ export class TableProcessor extends React.Component {
354
295
  });
355
296
  });
356
297
  }
357
-
358
298
  render() {
359
299
  const {
360
300
  children
361
301
  } = this.props;
362
-
363
302
  if (!children) {
364
303
  return null;
365
304
  }
366
-
367
305
  let childrenArray = React.Children.toArray(children);
368
306
  const orderedChildren = compose(this.addNumberColumnIndexes, this.addSortableColumn)(childrenArray);
369
307
  return /*#__PURE__*/React.createElement(TableContainer, this.props, orderedChildren);
370
- } // adds sortable + re-orders children
371
-
308
+ }
372
309
 
310
+ // adds sortable + re-orders children
373
311
  }
312
+
374
313
  const TableWithShadows = overflowShadow(TableProcessor, {
375
314
  overflowSelector: `.${TableSharedCssClassName.TABLE_NODE_WRAPPER}`,
376
315
  useShadowObserver: true
377
316
  });
378
-
379
317
  const TableWithWidth = props => /*#__PURE__*/React.createElement(WidthConsumer, null, ({
380
318
  width
381
319
  }) => {
382
320
  var _props$columnWidths;
383
-
384
321
  const renderWidth = props.rendererAppearance === 'full-page' ? width - FullPagePadding * 2 : width;
385
322
  const colWidthsSum = ((_props$columnWidths = props.columnWidths) === null || _props$columnWidths === void 0 ? void 0 : _props$columnWidths.reduce((total, val) => total + val, 0)) || 0;
386
-
387
323
  if (colWidthsSum) {
388
324
  return /*#__PURE__*/React.createElement(TableWithShadows, _extends({
389
325
  renderWidth: renderWidth
390
326
  }, props));
391
- } // there should not be a case when colWidthsSum is 0 and table is in overflow state - so no need to render shadows in this case
392
-
393
-
327
+ }
328
+ // there should not be a case when colWidthsSum is 0 and table is in overflow state - so no need to render shadows in this case
394
329
  return /*#__PURE__*/React.createElement(TableProcessor, _extends({
395
330
  renderWidth: renderWidth
396
331
  }, props));
397
332
  });
398
-
399
333
  export default withSmartCardStorage(TableWithWidth);
@@ -11,74 +11,57 @@ import { RendererCssClassName } from '../../consts';
11
11
  import { injectIntl } from 'react-intl-next';
12
12
  import { tableCellMessages } from '../../messages';
13
13
  const IgnoreSorting = ['LABEL', 'INPUT'];
14
-
15
14
  const nextStatusOrder = currentSortOrder => {
16
15
  switch (currentSortOrder) {
17
16
  case SortOrder.NO_ORDER:
18
17
  return SortOrder.ASC;
19
-
20
18
  case SortOrder.ASC:
21
19
  return SortOrder.DESC;
22
-
23
20
  case SortOrder.DESC:
24
21
  return SortOrder.NO_ORDER;
25
22
  }
26
-
27
23
  return SortOrder.NO_ORDER;
28
24
  };
29
-
30
25
  const getSortOrderLabel = (intl, currentSortOrder) => {
31
26
  const {
32
27
  noneSortingLabel,
33
28
  ascSortingLabel,
34
29
  descSortingLabel
35
30
  } = tableCellMessages;
36
-
37
31
  switch (currentSortOrder) {
38
32
  case SortOrder.NO_ORDER:
39
33
  return intl.formatMessage(noneSortingLabel);
40
-
41
34
  case SortOrder.ASC:
42
35
  return intl.formatMessage(ascSortingLabel);
43
-
44
36
  case SortOrder.DESC:
45
37
  return intl.formatMessage(descSortingLabel);
46
-
47
38
  default:
48
39
  return intl.formatMessage(noneSortingLabel);
49
40
  }
50
41
  };
51
-
52
42
  const getDataAttributes = colwidth => {
53
43
  const attrs = {};
54
-
55
44
  if (colwidth) {
56
45
  attrs['data-colwidth'] = colwidth.join(',');
57
46
  }
58
-
59
47
  return attrs;
60
48
  };
61
-
62
49
  const getStyle = (background, colGroupWidth, offsetTop) => {
63
50
  const style = {};
64
-
65
- if (background && // ignore setting inline styles if ds neutral token is detected
51
+ if (background &&
52
+ // ignore setting inline styles if ds neutral token is detected
66
53
  !background.includes('--ds-background-neutral')) {
67
54
  style.backgroundColor = background;
68
55
  }
69
-
70
56
  if (colGroupWidth) {
71
57
  style.width = colGroupWidth;
72
58
  style.minWidth = colGroupWidth;
73
59
  }
74
-
75
60
  if (offsetTop !== undefined) {
76
61
  style.top = offsetTop;
77
62
  }
78
-
79
63
  return style;
80
64
  };
81
-
82
65
  const withCellProps = WrapperComponent => {
83
66
  return class WithCellProps extends React.Component {
84
67
  render() {
@@ -106,27 +89,23 @@ const withCellProps = WrapperComponent => {
106
89
  "aria-sort": ariaSort
107
90
  }), children);
108
91
  }
109
-
110
92
  };
111
93
  };
112
-
113
94
  export const withSortableColumn = WrapperComponent => {
114
95
  class WithSortableColumn extends React.Component {
115
96
  constructor(props) {
116
97
  super(props);
117
-
118
98
  _defineProperty(this, "onKeyPress", event => {
119
99
  const keys = [' ', 'Enter', 'Spacebar'];
120
100
  const {
121
101
  tagName
122
- } = event.target; // trigger sorting if space or enter are clicked but not when in an input field (template variables)
123
-
102
+ } = event.target;
103
+ // trigger sorting if space or enter are clicked but not when in an input field (template variables)
124
104
  if (keys.includes(event.key) && !IgnoreSorting.includes(tagName)) {
125
105
  event.preventDefault();
126
106
  this.sort();
127
107
  }
128
108
  });
129
-
130
109
  _defineProperty(this, "sort", () => {
131
110
  const {
132
111
  fireAnalyticsEvent,
@@ -134,7 +113,6 @@ export const withSortableColumn = WrapperComponent => {
134
113
  columnIndex,
135
114
  sortOrdered
136
115
  } = this.props;
137
-
138
116
  if (onSorting && columnIndex != null) {
139
117
  const sortOrder = nextStatusOrder(sortOrdered);
140
118
  onSorting(columnIndex, sortOrder);
@@ -162,7 +140,6 @@ export const withSortableColumn = WrapperComponent => {
162
140
  }
163
141
  });
164
142
  }
165
-
166
143
  render() {
167
144
  const {
168
145
  allowColumnSorting,
@@ -173,11 +150,9 @@ export const withSortableColumn = WrapperComponent => {
173
150
  intl
174
151
  } = this.props;
175
152
  const sortOrderedClassName = sortOrdered === SortOrder.NO_ORDER ? RendererCssClassName.SORTABLE_COLUMN_NO_ORDER : '';
176
-
177
153
  if (!allowColumnSorting || !isHeaderRow) {
178
154
  return /*#__PURE__*/React.createElement(WrapperComponent, this.props);
179
155
  }
180
-
181
156
  return /*#__PURE__*/React.createElement(WrapperComponent, _extends({}, this.props, {
182
157
  className: RendererCssClassName.SORTABLE_COLUMN_WRAPPER,
183
158
  ariaSort: getSortOrderLabel(intl, sortOrdered)
@@ -192,9 +167,7 @@ export const withSortableColumn = WrapperComponent => {
192
167
  onKeyDown: this.onKeyPress
193
168
  }))));
194
169
  }
195
-
196
170
  }
197
-
198
171
  return injectIntl(WithSortableColumn);
199
172
  };
200
173
  export const TableHeader = compose(withSortableColumn, withCellProps)('th');
@@ -6,17 +6,14 @@ import { RendererCssClassName } from '../../consts';
6
6
  export default class TableRow extends React.Component {
7
7
  constructor(...args) {
8
8
  super(...args);
9
-
10
9
  _defineProperty(this, "state", {
11
10
  colGroupWidths: []
12
11
  });
13
-
14
12
  _defineProperty(this, "addSortableColumn", childrenArray => {
15
13
  const {
16
14
  allowColumnSorting,
17
15
  index: rowIndex
18
16
  } = this.props;
19
-
20
17
  if (allowColumnSorting) {
21
18
  const isHeaderRow = !rowIndex;
22
19
  childrenArray = childrenArray.map((child, index) => {
@@ -25,11 +22,9 @@ export default class TableRow extends React.Component {
25
22
  tableOrderStatus
26
23
  } = this.props;
27
24
  let sortOrdered = SortOrder.NO_ORDER;
28
-
29
25
  if (tableOrderStatus) {
30
26
  sortOrdered = index === tableOrderStatus.columnIndex ? tableOrderStatus.order : SortOrder.NO_ORDER;
31
27
  }
32
-
33
28
  return /*#__PURE__*/React.cloneElement(child, {
34
29
  columnIndex: index,
35
30
  onSorting: this.props.onSorting,
@@ -39,10 +34,8 @@ export default class TableRow extends React.Component {
39
34
  }
40
35
  });
41
36
  }
42
-
43
37
  return childrenArray;
44
38
  });
45
-
46
39
  _defineProperty(this, "addColGroupWidth", childrenArray => {
47
40
  if (this.state.colGroupWidths) {
48
41
  childrenArray = childrenArray.map((child, index) => {
@@ -53,11 +46,9 @@ export default class TableRow extends React.Component {
53
46
  }
54
47
  });
55
48
  }
56
-
57
49
  return childrenArray;
58
50
  });
59
51
  }
60
-
61
52
  render() {
62
53
  const {
63
54
  children,
@@ -70,5 +61,4 @@ export default class TableRow extends React.Component {
70
61
  className: RendererCssClassName.NUMBER_COLUMN
71
62
  }, this.props.index), compose(this.addSortableColumn, this.addColGroupWidth)(childrenArray));
72
63
  }
73
-
74
64
  }
@@ -6,22 +6,18 @@ import { ResourcedTaskItem } from '@atlaskit/task-decision';
6
6
  export default class TaskItemWithProviders extends Component {
7
7
  constructor(...args) {
8
8
  super(...args);
9
-
10
9
  _defineProperty(this, "state", {
11
10
  resolvedContextProvider: undefined
12
11
  });
13
12
  }
14
-
15
13
  UNSAFE_componentWillMount() {
16
14
  this.updateContextIdentifierProvider(this.props);
17
15
  }
18
-
19
16
  UNSAFE_componentWillReceiveProps(nextProps) {
20
17
  if (nextProps.contextIdentifierProvider !== this.props.contextIdentifierProvider) {
21
18
  this.updateContextIdentifierProvider(nextProps);
22
19
  }
23
20
  }
24
-
25
21
  async updateContextIdentifierProvider(props) {
26
22
  if (props.contextIdentifierProvider) {
27
23
  try {
@@ -40,7 +36,6 @@ export default class TaskItemWithProviders extends Component {
40
36
  });
41
37
  }
42
38
  }
43
-
44
39
  render() {
45
40
  const {
46
41
  contextIdentifierProvider,
@@ -54,5 +49,4 @@ export default class TaskItemWithProviders extends Component {
54
49
  isRenderer: isRenderer
55
50
  }));
56
51
  }
57
-
58
52
  }
@@ -8,7 +8,6 @@ import { TaskItemsFormatProvider, TaskItemsFormatConsumer } from '../../ui/TaskI
8
8
  export default class TaskItem extends PureComponent {
9
9
  constructor(props) {
10
10
  super(props);
11
-
12
11
  _defineProperty(this, "renderWithProvider", providers => {
13
12
  const {
14
13
  taskDecisionProvider,
@@ -23,11 +22,9 @@ export default class TaskItem extends PureComponent {
23
22
  dataAttributes
24
23
  } = this.props;
25
24
  let objectAri = '';
26
-
27
25
  if (rendererContext) {
28
26
  objectAri = rendererContext.objectAri || '';
29
27
  }
30
-
31
28
  return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
32
29
  data: {
33
30
  userContext: 'document'
@@ -46,10 +43,8 @@ export default class TaskItem extends PureComponent {
46
43
  }
47
44
  }, children))));
48
45
  });
49
-
50
46
  this.providerFactory = props.providers || new ProviderFactory();
51
47
  }
52
-
53
48
  componentWillUnmount() {
54
49
  if (!this.props.providers) {
55
50
  // new ProviderFactory is created if no `providers` has been set
@@ -57,7 +52,6 @@ export default class TaskItem extends PureComponent {
57
52
  this.providerFactory.destroy();
58
53
  }
59
54
  }
60
-
61
55
  render() {
62
56
  return /*#__PURE__*/React.createElement(WithProviders, {
63
57
  providers: ['taskDecisionProvider', 'contextIdentifierProvider'],
@@ -65,5 +59,4 @@ export default class TaskItem extends PureComponent {
65
59
  renderNode: this.renderWithProvider
66
60
  });
67
61
  }
68
-
69
62
  }
@@ -7,14 +7,11 @@ export default class TaskList extends PureComponent {
7
7
  children,
8
8
  localId
9
9
  } = this.props;
10
-
11
10
  if (Children.count(children) === 0) {
12
11
  return null;
13
12
  }
14
-
15
13
  return /*#__PURE__*/React.createElement(AkTaskList, {
16
14
  listId: localId
17
15
  }, children);
18
16
  }
19
-
20
17
  }
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { TextWithAnnotationDraft } from '../../ui/annotations';
3
-
4
3
  const TextWrapper = props => {
5
4
  const {
6
5
  startPos,
@@ -9,15 +8,12 @@ const TextWrapper = props => {
9
8
  const {
10
9
  children
11
10
  } = props;
12
-
13
11
  if (!children) {
14
12
  return null;
15
13
  }
16
-
17
14
  return /*#__PURE__*/React.createElement(TextWithAnnotationDraft, {
18
15
  startPos: startPos,
19
16
  endPos: endPos
20
17
  }, children);
21
18
  };
22
-
23
19
  export default TextWrapper;
@@ -1,6 +1,5 @@
1
1
  export const copyTextToClipboard = text => new Promise((resolve, reject) => {
2
2
  const isApiSupported = !!navigator.clipboard && typeof navigator.clipboard.writeText === 'function';
3
-
4
3
  if (isApiSupported) {
5
4
  navigator.clipboard.writeText(text).then(() => resolve(), e => reject(e));
6
5
  } else {