@atlaskit/editor-core 188.8.0 → 188.9.2

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 (290) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/composable-editor/editor-internal.js +2 -2
  3. package/dist/cjs/create-editor/ReactEditorView.js +796 -8
  4. package/dist/cjs/labs/next/presets/default.js +2 -2
  5. package/dist/cjs/labs/next/presets/universal.js +7 -4
  6. package/dist/cjs/plugins/index.js +0 -28
  7. package/dist/cjs/plugins/insert-block/index.js +4 -6
  8. package/dist/cjs/plugins/tasks-and-decisions/index.js +4 -3
  9. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
  10. package/dist/cjs/plugins/tasks-and-decisions/nodeviews/taskItem.js +45 -13
  11. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/main.js +15 -7
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/es2019/composable-editor/editor-internal.js +1 -1
  14. package/dist/es2019/create-editor/ReactEditorView.js +753 -2
  15. package/dist/es2019/labs/next/presets/default.js +1 -1
  16. package/dist/es2019/labs/next/presets/universal.js +4 -1
  17. package/dist/es2019/plugins/index.js +0 -4
  18. package/dist/es2019/plugins/insert-block/index.js +4 -6
  19. package/dist/es2019/plugins/tasks-and-decisions/index.js +4 -3
  20. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
  21. package/dist/es2019/plugins/tasks-and-decisions/nodeviews/taskItem.js +43 -10
  22. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/main.js +13 -6
  23. package/dist/es2019/version-wrapper.js +1 -1
  24. package/dist/esm/composable-editor/editor-internal.js +1 -1
  25. package/dist/esm/create-editor/ReactEditorView.js +797 -8
  26. package/dist/esm/labs/next/presets/default.js +1 -1
  27. package/dist/esm/labs/next/presets/universal.js +4 -1
  28. package/dist/esm/plugins/index.js +0 -4
  29. package/dist/esm/plugins/insert-block/index.js +4 -6
  30. package/dist/esm/plugins/tasks-and-decisions/index.js +4 -3
  31. package/dist/esm/plugins/tasks-and-decisions/nodeviews/decisionItem.js +26 -6
  32. package/dist/esm/plugins/tasks-and-decisions/nodeviews/taskItem.js +45 -12
  33. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/main.js +14 -7
  34. package/dist/esm/version-wrapper.js +1 -1
  35. package/dist/types/create-editor/ReactEditorView.d.ts +119 -5
  36. package/dist/types/labs/next/presets/default.d.ts +43 -43
  37. package/dist/types/plugins/index.d.ts +0 -4
  38. package/dist/types/plugins/insert-block/types.d.ts +3 -1
  39. package/dist/types/plugins/tasks-and-decisions/index.d.ts +2 -5
  40. package/dist/types/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +9 -4
  41. package/dist/types/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +9 -4
  42. package/dist/types/plugins/tasks-and-decisions/pm-plugins/main.d.ts +4 -2
  43. package/dist/types/plugins/tasks-and-decisions/types.d.ts +6 -1
  44. package/dist/types/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
  45. package/dist/types-ts4.5/create-editor/ReactEditorView.d.ts +119 -5
  46. package/dist/types-ts4.5/labs/next/presets/default.d.ts +43 -43
  47. package/dist/types-ts4.5/plugins/index.d.ts +0 -4
  48. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +3 -1
  49. package/dist/types-ts4.5/plugins/tasks-and-decisions/index.d.ts +2 -5
  50. package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/decisionItem.d.ts +9 -4
  51. package/dist/types-ts4.5/plugins/tasks-and-decisions/nodeviews/taskItem.d.ts +9 -4
  52. package/dist/types-ts4.5/plugins/tasks-and-decisions/pm-plugins/main.d.ts +4 -2
  53. package/dist/types-ts4.5/plugins/tasks-and-decisions/types.d.ts +8 -1
  54. package/dist/types-ts4.5/plugins/view-update-subscription/subscribe/toolbarAndPickerUpdates.d.ts +1 -1
  55. package/package.json +7 -7
  56. package/dist/cjs/create-editor/ReactEditorViewInternal.js +0 -812
  57. package/dist/cjs/create-editor/ReactEditorViewNext.js +0 -15
  58. package/dist/cjs/plugins/save-on-enter/index.js +0 -70
  59. package/dist/cjs/plugins/scroll-into-view/index.js +0 -55
  60. package/dist/cjs/plugins/status/actions.js +0 -158
  61. package/dist/cjs/plugins/status/analytics.js +0 -31
  62. package/dist/cjs/plugins/status/index.js +0 -143
  63. package/dist/cjs/plugins/status/keymap.js +0 -22
  64. package/dist/cjs/plugins/status/nodeviews/status.js +0 -58
  65. package/dist/cjs/plugins/status/plugin-key.js +0 -9
  66. package/dist/cjs/plugins/status/plugin.js +0 -133
  67. package/dist/cjs/plugins/status/types.js +0 -5
  68. package/dist/cjs/plugins/status/ui/statusPicker.js +0 -314
  69. package/dist/cjs/plugins/status/utils.js +0 -22
  70. package/dist/cjs/plugins/type-ahead/api.js +0 -215
  71. package/dist/cjs/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -205
  72. package/dist/cjs/plugins/type-ahead/commands/update-list-items.js +0 -23
  73. package/dist/cjs/plugins/type-ahead/commands/update-query.js +0 -27
  74. package/dist/cjs/plugins/type-ahead/commands/update-selected-index.js +0 -27
  75. package/dist/cjs/plugins/type-ahead/constants.js +0 -15
  76. package/dist/cjs/plugins/type-ahead/index.js +0 -14
  77. package/dist/cjs/plugins/type-ahead/insert-utils.js +0 -107
  78. package/dist/cjs/plugins/type-ahead/messages.js +0 -79
  79. package/dist/cjs/plugins/type-ahead/plugin.js +0 -382
  80. package/dist/cjs/plugins/type-ahead/pm-plugins/actions.js +0 -16
  81. package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +0 -148
  82. package/dist/cjs/plugins/type-ahead/pm-plugins/input-rules.js +0 -36
  83. package/dist/cjs/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -22
  84. package/dist/cjs/plugins/type-ahead/pm-plugins/key.js +0 -8
  85. package/dist/cjs/plugins/type-ahead/pm-plugins/main.js +0 -110
  86. package/dist/cjs/plugins/type-ahead/pm-plugins/reducer.js +0 -158
  87. package/dist/cjs/plugins/type-ahead/pm-plugins/utils.js +0 -18
  88. package/dist/cjs/plugins/type-ahead/stats-modifier.js +0 -42
  89. package/dist/cjs/plugins/type-ahead/transforms/close-type-ahead.js +0 -13
  90. package/dist/cjs/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -75
  91. package/dist/cjs/plugins/type-ahead/transforms/set-selection-before-query.js +0 -18
  92. package/dist/cjs/plugins/type-ahead/types.js +0 -5
  93. package/dist/cjs/plugins/type-ahead/ui/AssistiveText.js +0 -120
  94. package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +0 -400
  95. package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +0 -285
  96. package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +0 -179
  97. package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +0 -230
  98. package/dist/cjs/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -127
  99. package/dist/cjs/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -109
  100. package/dist/cjs/plugins/type-ahead/ui/hooks/use-load-items.js +0 -50
  101. package/dist/cjs/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -41
  102. package/dist/cjs/plugins/type-ahead/utils.js +0 -130
  103. package/dist/es2019/create-editor/ReactEditorViewInternal.js +0 -753
  104. package/dist/es2019/create-editor/ReactEditorViewNext.js +0 -7
  105. package/dist/es2019/plugins/save-on-enter/index.js +0 -63
  106. package/dist/es2019/plugins/scroll-into-view/index.js +0 -44
  107. package/dist/es2019/plugins/status/actions.js +0 -144
  108. package/dist/es2019/plugins/status/analytics.js +0 -18
  109. package/dist/es2019/plugins/status/index.js +0 -135
  110. package/dist/es2019/plugins/status/keymap.js +0 -13
  111. package/dist/es2019/plugins/status/nodeviews/status.js +0 -60
  112. package/dist/es2019/plugins/status/plugin-key.js +0 -3
  113. package/dist/es2019/plugins/status/plugin.js +0 -113
  114. package/dist/es2019/plugins/status/types.js +0 -1
  115. package/dist/es2019/plugins/status/ui/statusPicker.js +0 -293
  116. package/dist/es2019/plugins/status/utils.js +0 -12
  117. package/dist/es2019/plugins/type-ahead/api.js +0 -205
  118. package/dist/es2019/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -204
  119. package/dist/es2019/plugins/type-ahead/commands/update-list-items.js +0 -17
  120. package/dist/es2019/plugins/type-ahead/commands/update-query.js +0 -21
  121. package/dist/es2019/plugins/type-ahead/commands/update-selected-index.js +0 -21
  122. package/dist/es2019/plugins/type-ahead/constants.js +0 -9
  123. package/dist/es2019/plugins/type-ahead/index.js +0 -3
  124. package/dist/es2019/plugins/type-ahead/insert-utils.js +0 -106
  125. package/dist/es2019/plugins/type-ahead/messages.js +0 -73
  126. package/dist/es2019/plugins/type-ahead/plugin.js +0 -381
  127. package/dist/es2019/plugins/type-ahead/pm-plugins/actions.js +0 -10
  128. package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +0 -148
  129. package/dist/es2019/plugins/type-ahead/pm-plugins/input-rules.js +0 -29
  130. package/dist/es2019/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -16
  131. package/dist/es2019/plugins/type-ahead/pm-plugins/key.js +0 -2
  132. package/dist/es2019/plugins/type-ahead/pm-plugins/main.js +0 -106
  133. package/dist/es2019/plugins/type-ahead/pm-plugins/reducer.js +0 -160
  134. package/dist/es2019/plugins/type-ahead/pm-plugins/utils.js +0 -12
  135. package/dist/es2019/plugins/type-ahead/stats-modifier.js +0 -33
  136. package/dist/es2019/plugins/type-ahead/transforms/close-type-ahead.js +0 -7
  137. package/dist/es2019/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -71
  138. package/dist/es2019/plugins/type-ahead/transforms/set-selection-before-query.js +0 -10
  139. package/dist/es2019/plugins/type-ahead/types.js +0 -1
  140. package/dist/es2019/plugins/type-ahead/ui/AssistiveText.js +0 -88
  141. package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +0 -393
  142. package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +0 -273
  143. package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +0 -214
  144. package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +0 -233
  145. package/dist/es2019/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -109
  146. package/dist/es2019/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -112
  147. package/dist/es2019/plugins/type-ahead/ui/hooks/use-load-items.js +0 -41
  148. package/dist/es2019/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -38
  149. package/dist/es2019/plugins/type-ahead/utils.js +0 -126
  150. package/dist/esm/create-editor/ReactEditorViewInternal.js +0 -806
  151. package/dist/esm/create-editor/ReactEditorViewNext.js +0 -7
  152. package/dist/esm/plugins/save-on-enter/index.js +0 -63
  153. package/dist/esm/plugins/scroll-into-view/index.js +0 -50
  154. package/dist/esm/plugins/status/actions.js +0 -151
  155. package/dist/esm/plugins/status/analytics.js +0 -24
  156. package/dist/esm/plugins/status/index.js +0 -136
  157. package/dist/esm/plugins/status/keymap.js +0 -15
  158. package/dist/esm/plugins/status/nodeviews/status.js +0 -51
  159. package/dist/esm/plugins/status/plugin-key.js +0 -3
  160. package/dist/esm/plugins/status/plugin.js +0 -115
  161. package/dist/esm/plugins/status/types.js +0 -1
  162. package/dist/esm/plugins/status/ui/statusPicker.js +0 -308
  163. package/dist/esm/plugins/status/utils.js +0 -16
  164. package/dist/esm/plugins/type-ahead/api.js +0 -209
  165. package/dist/esm/plugins/type-ahead/commands/insert-type-ahead-item.js +0 -198
  166. package/dist/esm/plugins/type-ahead/commands/update-list-items.js +0 -17
  167. package/dist/esm/plugins/type-ahead/commands/update-query.js +0 -21
  168. package/dist/esm/plugins/type-ahead/commands/update-selected-index.js +0 -21
  169. package/dist/esm/plugins/type-ahead/constants.js +0 -9
  170. package/dist/esm/plugins/type-ahead/index.js +0 -3
  171. package/dist/esm/plugins/type-ahead/insert-utils.js +0 -101
  172. package/dist/esm/plugins/type-ahead/messages.js +0 -73
  173. package/dist/esm/plugins/type-ahead/plugin.js +0 -374
  174. package/dist/esm/plugins/type-ahead/pm-plugins/actions.js +0 -10
  175. package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +0 -141
  176. package/dist/esm/plugins/type-ahead/pm-plugins/input-rules.js +0 -29
  177. package/dist/esm/plugins/type-ahead/pm-plugins/insert-item-plugin.js +0 -16
  178. package/dist/esm/plugins/type-ahead/pm-plugins/key.js +0 -2
  179. package/dist/esm/plugins/type-ahead/pm-plugins/main.js +0 -104
  180. package/dist/esm/plugins/type-ahead/pm-plugins/reducer.js +0 -151
  181. package/dist/esm/plugins/type-ahead/pm-plugins/utils.js +0 -12
  182. package/dist/esm/plugins/type-ahead/stats-modifier.js +0 -35
  183. package/dist/esm/plugins/type-ahead/transforms/close-type-ahead.js +0 -7
  184. package/dist/esm/plugins/type-ahead/transforms/open-typeahead-at-cursor.js +0 -69
  185. package/dist/esm/plugins/type-ahead/transforms/set-selection-before-query.js +0 -12
  186. package/dist/esm/plugins/type-ahead/types.js +0 -1
  187. package/dist/esm/plugins/type-ahead/ui/AssistiveText.js +0 -115
  188. package/dist/esm/plugins/type-ahead/ui/InputQuery.js +0 -390
  189. package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +0 -276
  190. package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +0 -169
  191. package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +0 -220
  192. package/dist/esm/plugins/type-ahead/ui/WrapperTypeAhead.js +0 -117
  193. package/dist/esm/plugins/type-ahead/ui/hooks/use-item-insert.js +0 -103
  194. package/dist/esm/plugins/type-ahead/ui/hooks/use-load-items.js +0 -43
  195. package/dist/esm/plugins/type-ahead/ui/hooks/use-on-force-select.js +0 -35
  196. package/dist/esm/plugins/type-ahead/utils.js +0 -124
  197. package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -119
  198. package/dist/types/create-editor/ReactEditorViewNext.d.ts +0 -8
  199. package/dist/types/plugins/save-on-enter/index.d.ts +0 -10
  200. package/dist/types/plugins/scroll-into-view/index.d.ts +0 -14
  201. package/dist/types/plugins/status/actions.d.ts +0 -16
  202. package/dist/types/plugins/status/analytics.d.ts +0 -4
  203. package/dist/types/plugins/status/index.d.ts +0 -15
  204. package/dist/types/plugins/status/keymap.d.ts +0 -3
  205. package/dist/types/plugins/status/nodeviews/status.d.ts +0 -25
  206. package/dist/types/plugins/status/plugin-key.d.ts +0 -4
  207. package/dist/types/plugins/status/plugin.d.ts +0 -7
  208. package/dist/types/plugins/status/types.d.ts +0 -18
  209. package/dist/types/plugins/status/ui/statusPicker.d.ts +0 -63
  210. package/dist/types/plugins/status/utils.d.ts +0 -5
  211. package/dist/types/plugins/type-ahead/api.d.ts +0 -61
  212. package/dist/types/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +0 -12
  213. package/dist/types/plugins/type-ahead/commands/update-list-items.d.ts +0 -3
  214. package/dist/types/plugins/type-ahead/commands/update-query.d.ts +0 -2
  215. package/dist/types/plugins/type-ahead/commands/update-selected-index.d.ts +0 -2
  216. package/dist/types/plugins/type-ahead/constants.d.ts +0 -8
  217. package/dist/types/plugins/type-ahead/index.d.ts +0 -4
  218. package/dist/types/plugins/type-ahead/insert-utils.d.ts +0 -18
  219. package/dist/types/plugins/type-ahead/messages.d.ts +0 -72
  220. package/dist/types/plugins/type-ahead/plugin.d.ts +0 -10
  221. package/dist/types/plugins/type-ahead/pm-plugins/actions.d.ts +0 -9
  222. package/dist/types/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -14
  223. package/dist/types/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -6
  224. package/dist/types/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +0 -2
  225. package/dist/types/plugins/type-ahead/pm-plugins/key.d.ts +0 -3
  226. package/dist/types/plugins/type-ahead/pm-plugins/main.d.ts +0 -14
  227. package/dist/types/plugins/type-ahead/pm-plugins/reducer.d.ts +0 -10
  228. package/dist/types/plugins/type-ahead/pm-plugins/utils.d.ts +0 -4
  229. package/dist/types/plugins/type-ahead/stats-modifier.d.ts +0 -20
  230. package/dist/types/plugins/type-ahead/transforms/close-type-ahead.d.ts +0 -2
  231. package/dist/types/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +0 -11
  232. package/dist/types/plugins/type-ahead/transforms/set-selection-before-query.d.ts +0 -2
  233. package/dist/types/plugins/type-ahead/types.d.ts +0 -109
  234. package/dist/types/plugins/type-ahead/ui/AssistiveText.d.ts +0 -33
  235. package/dist/types/plugins/type-ahead/ui/InputQuery.d.ts +0 -26
  236. package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +0 -25
  237. package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -18
  238. package/dist/types/plugins/type-ahead/ui/TypeAheadPopup.d.ts +0 -29
  239. package/dist/types/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -20
  240. package/dist/types/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +0 -3
  241. package/dist/types/plugins/type-ahead/ui/hooks/use-load-items.d.ts +0 -3
  242. package/dist/types/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +0 -11
  243. package/dist/types/plugins/type-ahead/utils.d.ts +0 -27
  244. package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -119
  245. package/dist/types-ts4.5/create-editor/ReactEditorViewNext.d.ts +0 -8
  246. package/dist/types-ts4.5/plugins/save-on-enter/index.d.ts +0 -10
  247. package/dist/types-ts4.5/plugins/scroll-into-view/index.d.ts +0 -14
  248. package/dist/types-ts4.5/plugins/status/actions.d.ts +0 -16
  249. package/dist/types-ts4.5/plugins/status/analytics.d.ts +0 -4
  250. package/dist/types-ts4.5/plugins/status/index.d.ts +0 -17
  251. package/dist/types-ts4.5/plugins/status/keymap.d.ts +0 -3
  252. package/dist/types-ts4.5/plugins/status/nodeviews/status.d.ts +0 -25
  253. package/dist/types-ts4.5/plugins/status/plugin-key.d.ts +0 -4
  254. package/dist/types-ts4.5/plugins/status/plugin.d.ts +0 -7
  255. package/dist/types-ts4.5/plugins/status/types.d.ts +0 -18
  256. package/dist/types-ts4.5/plugins/status/ui/statusPicker.d.ts +0 -63
  257. package/dist/types-ts4.5/plugins/status/utils.d.ts +0 -5
  258. package/dist/types-ts4.5/plugins/type-ahead/api.d.ts +0 -61
  259. package/dist/types-ts4.5/plugins/type-ahead/commands/insert-type-ahead-item.d.ts +0 -12
  260. package/dist/types-ts4.5/plugins/type-ahead/commands/update-list-items.d.ts +0 -3
  261. package/dist/types-ts4.5/plugins/type-ahead/commands/update-query.d.ts +0 -2
  262. package/dist/types-ts4.5/plugins/type-ahead/commands/update-selected-index.d.ts +0 -2
  263. package/dist/types-ts4.5/plugins/type-ahead/constants.d.ts +0 -8
  264. package/dist/types-ts4.5/plugins/type-ahead/index.d.ts +0 -4
  265. package/dist/types-ts4.5/plugins/type-ahead/insert-utils.d.ts +0 -18
  266. package/dist/types-ts4.5/plugins/type-ahead/messages.d.ts +0 -72
  267. package/dist/types-ts4.5/plugins/type-ahead/plugin.d.ts +0 -10
  268. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/actions.d.ts +0 -9
  269. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/decorations.d.ts +0 -14
  270. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/input-rules.d.ts +0 -6
  271. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/insert-item-plugin.d.ts +0 -2
  272. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/key.d.ts +0 -3
  273. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/main.d.ts +0 -14
  274. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/reducer.d.ts +0 -10
  275. package/dist/types-ts4.5/plugins/type-ahead/pm-plugins/utils.d.ts +0 -4
  276. package/dist/types-ts4.5/plugins/type-ahead/stats-modifier.d.ts +0 -20
  277. package/dist/types-ts4.5/plugins/type-ahead/transforms/close-type-ahead.d.ts +0 -2
  278. package/dist/types-ts4.5/plugins/type-ahead/transforms/open-typeahead-at-cursor.d.ts +0 -11
  279. package/dist/types-ts4.5/plugins/type-ahead/transforms/set-selection-before-query.d.ts +0 -2
  280. package/dist/types-ts4.5/plugins/type-ahead/types.d.ts +0 -111
  281. package/dist/types-ts4.5/plugins/type-ahead/ui/AssistiveText.d.ts +0 -33
  282. package/dist/types-ts4.5/plugins/type-ahead/ui/InputQuery.d.ts +0 -26
  283. package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadList.d.ts +0 -25
  284. package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadListItem.d.ts +0 -18
  285. package/dist/types-ts4.5/plugins/type-ahead/ui/TypeAheadPopup.d.ts +0 -29
  286. package/dist/types-ts4.5/plugins/type-ahead/ui/WrapperTypeAhead.d.ts +0 -20
  287. package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-item-insert.d.ts +0 -7
  288. package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-load-items.d.ts +0 -3
  289. package/dist/types-ts4.5/plugins/type-ahead/ui/hooks/use-on-force-select.d.ts +0 -11
  290. package/dist/types-ts4.5/plugins/type-ahead/utils.d.ts +0 -27
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.ReactEditorViewEditor = ReactEditorViewEditor;
8
- exports.default = void 0;
9
- var _react = _interopRequireDefault(require("react"));
10
- var _ReactEditorViewInternal = require("./ReactEditorViewInternal");
11
- var _reactIntlNext = require("react-intl-next");
12
- function ReactEditorViewEditor(props) {
13
- return /*#__PURE__*/_react.default.createElement(_ReactEditorViewInternal.ReactEditorView, props);
14
- }
15
- var _default = exports.default = (0, _reactIntlNext.injectIntl)(ReactEditorViewEditor);
@@ -1,70 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createPlugin = createPlugin;
7
- exports.default = void 0;
8
- var _keymap = require("@atlaskit/editor-prosemirror/keymap");
9
- var _analytics = require("../../plugins/analytics");
10
- var _consts = require("../analytics/consts");
11
- function createPlugin(eventDispatch, onSave) {
12
- if (!onSave) {
13
- return;
14
- }
15
- return (0, _keymap.keymap)({
16
- Enter: function Enter(state, _dispatch, editorView) {
17
- if (editorView && canSaveOnEnter(editorView)) {
18
- eventDispatch(_consts.analyticsEventKey, analyticsPayload(state));
19
- onSave(editorView);
20
- return true;
21
- }
22
- return false;
23
- }
24
- });
25
- }
26
- function canSaveOnEnter(editorView) {
27
- var _ref = editorView.state.selection,
28
- $cursor = _ref.$cursor;
29
- var _editorView$state$sch = editorView.state.schema.nodes,
30
- decisionItem = _editorView$state$sch.decisionItem,
31
- paragraph = _editorView$state$sch.paragraph,
32
- taskItem = _editorView$state$sch.taskItem;
33
- return !$cursor || $cursor.parent.type === paragraph && $cursor.depth === 1 || $cursor.parent.type === decisionItem && !isEmptyAtCursor($cursor) || $cursor.parent.type === taskItem && !isEmptyAtCursor($cursor);
34
- }
35
- function isEmptyAtCursor($cursor) {
36
- var content = $cursor.parent.content;
37
- return !(content && content.size);
38
- }
39
- var analyticsPayload = function analyticsPayload(state) {
40
- return {
41
- payload: {
42
- action: _analytics.ACTION.STOPPED,
43
- actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
44
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.SAVE,
45
- attributes: {
46
- inputMethod: _analytics.INPUT_METHOD.SHORTCUT,
47
- documentSize: state.doc.nodeSize
48
- // TODO add individual node counts - tables, headings, lists, mediaSingles, mediaGroups, mediaCards, panels, extensions, decisions, action, codeBlocks
49
- },
50
-
51
- eventType: _analytics.EVENT_TYPE.UI
52
- }
53
- };
54
- };
55
- var saveOnEnterPlugin = function saveOnEnterPlugin(_ref2) {
56
- var onSave = _ref2.config;
57
- return {
58
- name: 'saveOnEnter',
59
- pmPlugins: function pmPlugins() {
60
- return [{
61
- name: 'saveOnEnter',
62
- plugin: function plugin(_ref3) {
63
- var dispatch = _ref3.dispatch;
64
- return createPlugin(dispatch, onSave);
65
- }
66
- }];
67
- }
68
- };
69
- };
70
- var _default = exports.default = saveOnEnterPlugin;
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.scrollIntoViewPluginKey = exports.default = void 0;
7
- var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
- var _state = require("@atlaskit/editor-prosemirror/state");
9
- var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
10
- /**
11
- * Plugin to scroll the user's selection into view whenever the user updates
12
- * the document eg. inserting, deleting, formatting
13
- *
14
- * Behaviour is on by default, can be explicitly opted out of for a transaction by
15
- * setting scrollIntoView=false meta
16
- * We ignore collab transactions, appended transactions, transactions without steps,
17
- * transactions with addToHistory=false meta and typeahead trigger transactions
18
- */
19
-
20
- var scrollIntoViewPluginKey = exports.scrollIntoViewPluginKey = new _state.PluginKey('scrollIntoViewPlugin');
21
- var createPlugin = function createPlugin() {
22
- return new _safePlugin.SafePlugin({
23
- key: scrollIntoViewPluginKey,
24
- appendTransaction: function appendTransaction(transactions, oldState, newState) {
25
- if (!transactions.length) {
26
- return;
27
- }
28
- var tr = transactions[0];
29
- if ((tr.docChanged || tr.storedMarksSet) && !tr.scrolledIntoView && tr.getMeta('scrollIntoView') !== false &&
30
- // ignore anything we would not want to undo
31
- // this covers things like autofixing layouts, hovering table rows/cols
32
- tr.getMeta('addToHistory') !== false &&
33
- // ignore collab changes from another user
34
- !tr.getMeta('isRemote') &&
35
- // ignore any transaction coming from the input text rule plugin
36
- !tr.getMeta(_prosemirrorInputRules.TEXT_INPUT_RULE_TRANSACTION_KEY)) {
37
- return newState.tr.scrollIntoView();
38
- }
39
- }
40
- });
41
- };
42
- var scrollIntoViewPlugin = function scrollIntoViewPlugin() {
43
- return {
44
- name: 'scrollIntoView',
45
- pmPlugins: function pmPlugins() {
46
- return [{
47
- name: 'scrollIntoView',
48
- plugin: function plugin() {
49
- return createPlugin();
50
- }
51
- }];
52
- }
53
- };
54
- };
55
- var _default = exports.default = scrollIntoViewPlugin;
@@ -1,158 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.updateStatusWithAnalytics = exports.updateStatus = exports.setStatusPickerAt = exports.removeStatus = exports.createStatus = exports.commitStatusPicker = exports.DEFAULT_STATUS = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _model = require("@atlaskit/editor-prosemirror/model");
10
- var _state = require("@atlaskit/editor-prosemirror/state");
11
- var _adfSchema = require("@atlaskit/adf-schema");
12
- var _analytics = require("@atlaskit/editor-common/analytics");
13
- var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
14
- var _pluginKey = require("./plugin-key");
15
- var _utils = require("@atlaskit/editor-prosemirror/utils");
16
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
- var DEFAULT_STATUS = exports.DEFAULT_STATUS = {
19
- text: '',
20
- color: 'neutral'
21
- };
22
- var createStatus = exports.createStatus = function createStatus() {
23
- var showStatusPickerAtOffset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
24
- return function (insert, state) {
25
- var statusNode = state.schema.nodes.status.createChecked(_objectSpread(_objectSpread({}, DEFAULT_STATUS), {}, {
26
- localId: _adfSchema.uuid.generate()
27
- }));
28
- var space = state.schema.text(' ');
29
- var tr = insert(_model.Fragment.from([statusNode, space]), {
30
- selectInlineNode: true
31
- });
32
- var showStatusPickerAt = tr.selection.from + showStatusPickerAtOffset;
33
- return tr.setSelection(_state.NodeSelection.create(tr.doc, showStatusPickerAt)).setMeta(_pluginKey.pluginKey, {
34
- showStatusPickerAt: showStatusPickerAt,
35
- isNew: true
36
- });
37
- };
38
- };
39
- var updateStatus = exports.updateStatus = function updateStatus(status) {
40
- return function (state, dispatch) {
41
- var schema = state.schema;
42
- var selectedStatus = status ? Object.assign(status, {
43
- text: status.text.trim(),
44
- localId: status.localId || _adfSchema.uuid.generate()
45
- }) : status;
46
- var statusProps = _objectSpread(_objectSpread({}, DEFAULT_STATUS), selectedStatus);
47
- var tr = state.tr;
48
- var _ref = _pluginKey.pluginKey.getState(state) || {},
49
- showStatusPickerAt = _ref.showStatusPickerAt;
50
- if (!showStatusPickerAt) {
51
- // Same behaviour as quick insert (used in createStatus)
52
- var statusNode = schema.nodes.status.createChecked(statusProps);
53
- var fragment = _model.Fragment.fromArray([statusNode, state.schema.text(' ')]);
54
- var insertable = (0, _utils.canInsert)(tr.selection.$from, fragment);
55
- if (!insertable) {
56
- var parentSelection = _state.NodeSelection.create(tr.doc, tr.selection.from - tr.selection.$anchor.parentOffset - 1);
57
- tr.insert(parentSelection.to, fragment).setSelection(_state.NodeSelection.create(tr.doc, parentSelection.to + 1));
58
- } else {
59
- tr.insert(tr.selection.from, fragment).setSelection(_state.NodeSelection.create(tr.doc, tr.selection.from - fragment.size));
60
- }
61
- tr.setMeta(_pluginKey.pluginKey, {
62
- showStatusPickerAt: tr.selection.from,
63
- isNew: true
64
- }).scrollIntoView();
65
- if (dispatch) {
66
- dispatch(tr);
67
- }
68
- return true;
69
- }
70
- if (state.doc.nodeAt(showStatusPickerAt)) {
71
- tr.setNodeMarkup(showStatusPickerAt, schema.nodes.status, statusProps).setSelection(_state.NodeSelection.create(tr.doc, showStatusPickerAt)).setMeta(_pluginKey.pluginKey, {
72
- showStatusPickerAt: showStatusPickerAt
73
- }).scrollIntoView();
74
- if (dispatch) {
75
- dispatch(tr);
76
- }
77
- return true;
78
- }
79
- return false;
80
- };
81
- };
82
- var updateStatusWithAnalytics = exports.updateStatusWithAnalytics = function updateStatusWithAnalytics(editorAnalyticsAPI) {
83
- return function (inputMethod, status) {
84
- return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
85
- action: _analytics.ACTION.INSERTED,
86
- actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
87
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.STATUS,
88
- attributes: {
89
- inputMethod: inputMethod
90
- },
91
- eventType: _analytics.EVENT_TYPE.TRACK
92
- })(updateStatus(status));
93
- };
94
- };
95
- var setStatusPickerAt = exports.setStatusPickerAt = function setStatusPickerAt(showStatusPickerAt) {
96
- return function (state, dispatch) {
97
- dispatch(state.tr.setMeta(_pluginKey.pluginKey, {
98
- showStatusPickerAt: showStatusPickerAt,
99
- isNew: false
100
- }));
101
- return true;
102
- };
103
- };
104
- var removeStatus = exports.removeStatus = function removeStatus(showStatusPickerAt) {
105
- return function (state, dispatch) {
106
- var tr = state.tr;
107
- tr.replace(showStatusPickerAt, showStatusPickerAt + 1);
108
- if (dispatch) {
109
- dispatch(tr);
110
- }
111
- return true;
112
- };
113
- };
114
- var handleClosingByArrows = function handleClosingByArrows(closingMethod, state, showStatusPickerAt, tr) {
115
- if (closingMethod === 'arrowLeft') {
116
- // put cursor right before status Lozenge
117
- tr = tr.setSelection(_state.Selection.near(state.tr.doc.resolve(showStatusPickerAt), -1));
118
- } else if (closingMethod === 'arrowRight') {
119
- // put cursor right after status Lozenge
120
- tr = tr.setSelection(_state.Selection.near(state.tr.doc.resolve(showStatusPickerAt + 1)));
121
- }
122
- };
123
- var commitStatusPicker = exports.commitStatusPicker = function commitStatusPicker(closingPayload) {
124
- return function (editorView) {
125
- var state = editorView.state,
126
- dispatch = editorView.dispatch;
127
- var _ref2 = _pluginKey.pluginKey.getState(state) || {},
128
- showStatusPickerAt = _ref2.showStatusPickerAt;
129
- var _ref3 = closingPayload || {},
130
- closingMethod = _ref3.closingMethod;
131
- if (!showStatusPickerAt) {
132
- return;
133
- }
134
- var statusNode = state.tr.doc.nodeAt(showStatusPickerAt);
135
- if (!statusNode) {
136
- return;
137
- }
138
- var tr = state.tr;
139
- tr = tr.setMeta(_pluginKey.pluginKey, {
140
- showStatusPickerAt: null,
141
- isNew: false
142
- });
143
- if (closingMethod) {
144
- handleClosingByArrows(closingMethod, state, showStatusPickerAt, tr);
145
- } else if (statusNode.attrs.text) {
146
- // still has content - keep content
147
- // move selection after status if selection did not change
148
- if (tr.selection.from === showStatusPickerAt) {
149
- tr = tr.setSelection(_state.Selection.near(state.tr.doc.resolve(showStatusPickerAt + 2)));
150
- }
151
- } else {
152
- // no content - remove node
153
- tr = tr.delete(showStatusPickerAt, showStatusPickerAt + 1);
154
- }
155
- dispatch(tr);
156
- editorView.focus();
157
- };
158
- };
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.createStatusAnalyticsAndFire = exports.analyticsState = exports.FABRIC_CHANNEL = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _versionWrapper = require("../../version-wrapper");
10
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
- var FABRIC_CHANNEL = exports.FABRIC_CHANNEL = 'fabric-elements';
13
- var createStatusAnalyticsAndFire = exports.createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
14
- return function (payload) {
15
- if (createAnalyticsEvent && payload) {
16
- var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
17
- eventType: 'ui'
18
- });
19
- if (!statusPayload.attributes) {
20
- statusPayload.attributes = {};
21
- }
22
- statusPayload.attributes.packageName = _versionWrapper.name;
23
- statusPayload.attributes.packageVersion = _versionWrapper.version;
24
- statusPayload.attributes.componentName = 'status';
25
- createAnalyticsEvent(statusPayload).fire(FABRIC_CHANNEL);
26
- }
27
- };
28
- };
29
- var analyticsState = exports.analyticsState = function analyticsState(isNew) {
30
- return isNew ? 'new' : 'update';
31
- };
@@ -1,143 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _utils = require("@atlaskit/editor-prosemirror/utils");
10
- var _adfSchema = require("@atlaskit/adf-schema");
11
- var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
12
- var _analytics = require("@atlaskit/editor-common/analytics");
13
- var _messages = require("@atlaskit/editor-common/messages");
14
- var _quickInsert = require("@atlaskit/editor-common/quick-insert");
15
- var _actions = require("./actions");
16
- var _keymap = require("./keymap");
17
- var _plugin = _interopRequireDefault(require("./plugin"));
18
- var _pluginKey = require("./plugin-key");
19
- var _statusPicker = _interopRequireDefault(require("./ui/statusPicker"));
20
- var baseStatusPlugin = function baseStatusPlugin(_ref) {
21
- var _api$analytics;
22
- var options = _ref.config,
23
- api = _ref.api;
24
- return {
25
- name: 'status',
26
- nodes: function nodes() {
27
- return [{
28
- name: 'status',
29
- node: _adfSchema.status
30
- }];
31
- },
32
- pmPlugins: function pmPlugins() {
33
- return [{
34
- name: 'status',
35
- plugin: function plugin(pmPluginFactoryParams) {
36
- return (0, _plugin.default)(pmPluginFactoryParams, options);
37
- }
38
- }, {
39
- name: 'statusKeymap',
40
- plugin: _keymap.keymapPlugin
41
- }];
42
- },
43
- actions: {
44
- commitStatusPicker: _actions.commitStatusPicker,
45
- updateStatus: (0, _actions.updateStatusWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)
46
- },
47
- contentComponent: function contentComponent(_ref2) {
48
- var editorView = _ref2.editorView,
49
- popupsMountPoint = _ref2.popupsMountPoint,
50
- popupsBoundariesElement = _ref2.popupsBoundariesElement,
51
- popupsScrollableElement = _ref2.popupsScrollableElement;
52
- var domAtPos = editorView.domAtPos.bind(editorView);
53
- return /*#__PURE__*/_react.default.createElement(_withPluginState.WithPluginState, {
54
- plugins: {
55
- statusState: _pluginKey.pluginKey
56
- },
57
- render: function render(_ref3) {
58
- var _ref3$statusState = _ref3.statusState,
59
- statusState = _ref3$statusState === void 0 ? {} : _ref3$statusState;
60
- var showStatusPickerAt = statusState.showStatusPickerAt;
61
- if (typeof showStatusPickerAt !== 'number') {
62
- return null;
63
- }
64
- var target = (0, _utils.findDomRefAtPos)(showStatusPickerAt, domAtPos);
65
- var statusNode = editorView.state.doc.nodeAt(showStatusPickerAt);
66
- if (!statusNode || statusNode.type.name !== 'status') {
67
- return null;
68
- }
69
- var _statusNode$attrs = statusNode.attrs,
70
- text = _statusNode$attrs.text,
71
- color = _statusNode$attrs.color,
72
- localId = _statusNode$attrs.localId;
73
- return /*#__PURE__*/_react.default.createElement(_statusPicker.default, {
74
- isNew: statusState.isNew,
75
- target: target,
76
- defaultText: text,
77
- defaultColor: color,
78
- defaultLocalId: localId,
79
- mountTo: popupsMountPoint,
80
- boundariesElement: popupsBoundariesElement,
81
- scrollableElement: popupsScrollableElement,
82
- onSelect: function onSelect(status) {
83
- (0, _actions.updateStatus)(status)(editorView.state, editorView.dispatch);
84
- },
85
- onTextChanged: function onTextChanged(status) {
86
- (0, _actions.updateStatus)(status)(editorView.state, editorView.dispatch);
87
- },
88
- closeStatusPicker: function closeStatusPicker(closingPayload) {
89
- (0, _actions.commitStatusPicker)(closingPayload)(editorView);
90
- },
91
- onEnter: function onEnter() {
92
- (0, _actions.commitStatusPicker)()(editorView);
93
- }
94
- });
95
- }
96
- });
97
- }
98
- };
99
- };
100
- var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, options, api) {
101
- if ((options === null || options === void 0 ? void 0 : options.menuDisabled) === true) {
102
- return plugin;
103
- }
104
- plugin.pluginsOptions = {
105
- quickInsert: function quickInsert(_ref4) {
106
- var formatMessage = _ref4.formatMessage;
107
- return [{
108
- id: 'status',
109
- title: formatMessage(_messages.toolbarInsertBlockMessages.status),
110
- description: formatMessage(_messages.toolbarInsertBlockMessages.statusDescription),
111
- priority: 700,
112
- keywords: ['lozenge'],
113
- icon: function icon() {
114
- return /*#__PURE__*/_react.default.createElement(_quickInsert.IconStatus, null);
115
- },
116
- action: function action(insert, state) {
117
- var _api$analytics2;
118
- var tr = (0, _actions.createStatus)()(insert, state);
119
- api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.attachAnalyticsEvent({
120
- action: _analytics.ACTION.INSERTED,
121
- actionSubject: _analytics.ACTION_SUBJECT.DOCUMENT,
122
- actionSubjectId: _analytics.ACTION_SUBJECT_ID.STATUS,
123
- attributes: {
124
- inputMethod: _analytics.INPUT_METHOD.QUICK_INSERT
125
- },
126
- eventType: _analytics.EVENT_TYPE.TRACK
127
- })(tr);
128
- return tr;
129
- }
130
- }];
131
- }
132
- };
133
- return plugin;
134
- };
135
- var statusPlugin = function statusPlugin(_ref5) {
136
- var options = _ref5.config,
137
- api = _ref5.api;
138
- return decorateWithPluginOptions(baseStatusPlugin({
139
- config: options,
140
- api: api
141
- }), options, api);
142
- };
143
- var _default = exports.default = statusPlugin;
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- exports.keymapPlugin = keymapPlugin;
8
- var _keymap = require("@atlaskit/editor-prosemirror/keymap");
9
- var _keymaps = require("@atlaskit/editor-common/keymaps");
10
- var _utils = require("./utils");
11
- function keymapPlugin() {
12
- var list = {};
13
- (0, _keymaps.bindKeymapWithCommand)(_keymaps.enter.common, consumeKeyEvent, list);
14
- (0, _keymaps.bindKeymapWithCommand)(_keymaps.tab.common, consumeKeyEvent, list);
15
- return (0, _keymap.keymap)(list);
16
- }
17
-
18
- // consume event to prevent status node problems with positioning and selection
19
- var consumeKeyEvent = function consumeKeyEvent(state, _dispatch) {
20
- return !!(0, _utils.mayGetStatusAtSelection)(state.tr.selection);
21
- };
22
- var _default = exports.default = keymapPlugin;
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.StatusNodeView = exports.IntlStatusContainerView = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _react2 = require("@emotion/react");
11
- var _reactIntlNext = require("react-intl-next");
12
- var _element = require("@atlaskit/status/element");
13
- var _messages = require("@atlaskit/editor-common/messages");
14
- var _templateObject, _templateObject2;
15
- /** @jsx jsx */
16
- var styledStatus = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n opacity: 1;\n"])));
17
- var styledStatusPlaceholder = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n opacity: 0.5;\n"])));
18
- var StatusContainerView = function StatusContainerView(props) {
19
- var text = props.text,
20
- color = props.color,
21
- localId = props.localId,
22
- style = props.style,
23
- formatMessage = props.intl.formatMessage;
24
- var statusText = text ? text : formatMessage(_messages.statusMessages.placeholder);
25
- var handleClick = function handleClick(event) {
26
- if (event.nativeEvent.stopImmediatePropagation) {
27
- event.nativeEvent.stopImmediatePropagation();
28
- }
29
- // handling of popup is done in plugin.apply on selection change.
30
- };
31
-
32
- return (0, _react2.jsx)("span", {
33
- css: text ? styledStatus : styledStatusPlaceholder,
34
- "data-testid": "statusContainerView"
35
- }, (0, _react2.jsx)(_element.Status, {
36
- text: statusText,
37
- color: color,
38
- localId: localId,
39
- style: style,
40
- onClick: handleClick
41
- }));
42
- };
43
- var IntlStatusContainerView = exports.IntlStatusContainerView = (0, _reactIntlNext.injectIntl)(StatusContainerView);
44
- var StatusNodeView = exports.StatusNodeView = function StatusNodeView(props) {
45
- var view = props.view;
46
- var _props$node$attrs = props.node.attrs,
47
- text = _props$node$attrs.text,
48
- color = _props$node$attrs.color,
49
- localId = _props$node$attrs.localId,
50
- style = _props$node$attrs.style;
51
- return (0, _react2.jsx)(IntlStatusContainerView, {
52
- view: view,
53
- text: text,
54
- color: color,
55
- style: style,
56
- localId: localId
57
- });
58
- };
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.pluginKeyName = exports.pluginKey = void 0;
7
- var _state = require("@atlaskit/editor-prosemirror/state");
8
- var pluginKeyName = exports.pluginKeyName = 'statusPlugin';
9
- var pluginKey = exports.pluginKey = new _state.PluginKey('statusPlugin');