@atlaskit/editor-core 98.5.1 → 98.7.1

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 (238) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/es2015/plugins/analytics/index.js +1 -0
  3. package/dist/es2015/plugins/analytics/index.js.map +1 -1
  4. package/dist/es2015/plugins/analytics/plugin.d.ts +2 -1
  5. package/dist/es2015/plugins/analytics/plugin.js +10 -0
  6. package/dist/es2015/plugins/analytics/plugin.js.map +1 -1
  7. package/dist/es2015/plugins/analytics/types/enums.d.ts +63 -0
  8. package/dist/es2015/plugins/analytics/types/enums.js +1 -0
  9. package/dist/es2015/plugins/analytics/types/enums.js.map +1 -0
  10. package/dist/es2015/plugins/analytics/types/events.d.ts +20 -0
  11. package/dist/es2015/plugins/analytics/types/events.js +1 -0
  12. package/dist/es2015/plugins/analytics/types/events.js.map +1 -0
  13. package/dist/es2015/plugins/analytics/types/format-events.d.ts +46 -0
  14. package/dist/es2015/plugins/analytics/types/format-events.js +1 -0
  15. package/dist/es2015/plugins/analytics/types/format-events.js.map +1 -0
  16. package/dist/es2015/plugins/analytics/types/index.d.ts +5 -0
  17. package/dist/es2015/plugins/analytics/types/index.js +5 -0
  18. package/dist/es2015/plugins/analytics/types/index.js.map +1 -0
  19. package/dist/es2015/plugins/analytics/types/substitute-events.d.ts +25 -0
  20. package/dist/es2015/plugins/analytics/types/substitute-events.js +1 -0
  21. package/dist/es2015/plugins/analytics/types/substitute-events.js.map +1 -0
  22. package/dist/es2015/plugins/analytics/types/ui-events.d.ts +53 -0
  23. package/dist/es2015/plugins/analytics/types/ui-events.js +1 -0
  24. package/dist/es2015/plugins/analytics/types/ui-events.js.map +1 -0
  25. package/dist/es2015/plugins/block-type/types.d.ts +1 -1
  26. package/dist/es2015/plugins/emoji/index.js +9 -1
  27. package/dist/es2015/plugins/emoji/index.js.map +1 -1
  28. package/dist/es2015/plugins/emoji/pm-plugins/input-rules.js +9 -1
  29. package/dist/es2015/plugins/emoji/pm-plugins/input-rules.js.map +1 -1
  30. package/dist/es2015/plugins/extension/ui/Extension/Extension/styles.d.ts +1 -1
  31. package/dist/es2015/plugins/floating-toolbar/index.js +8 -7
  32. package/dist/es2015/plugins/floating-toolbar/index.js.map +1 -1
  33. package/dist/es2015/plugins/floating-toolbar/types.d.ts +24 -3
  34. package/dist/es2015/plugins/floating-toolbar/ui/Button.d.ts +3 -1
  35. package/dist/es2015/plugins/floating-toolbar/ui/Button.js +3 -3
  36. package/dist/es2015/plugins/floating-toolbar/ui/Button.js.map +1 -1
  37. package/dist/es2015/plugins/floating-toolbar/ui/Input.d.ts +20 -0
  38. package/dist/es2015/plugins/floating-toolbar/ui/Input.js +44 -0
  39. package/dist/es2015/plugins/floating-toolbar/ui/Input.js.map +1 -0
  40. package/dist/es2015/plugins/floating-toolbar/ui/Toolbar.d.ts +6 -0
  41. package/dist/es2015/plugins/floating-toolbar/ui/Toolbar.js +9 -3
  42. package/dist/es2015/plugins/floating-toolbar/ui/Toolbar.js.map +1 -1
  43. package/dist/es2015/plugins/help-dialog/index.js +8 -0
  44. package/dist/es2015/plugins/help-dialog/index.js.map +1 -1
  45. package/dist/es2015/plugins/hyperlink/Toolbar.d.ts +14 -0
  46. package/dist/es2015/plugins/hyperlink/Toolbar.js +110 -0
  47. package/dist/es2015/plugins/hyperlink/Toolbar.js.map +1 -0
  48. package/dist/es2015/plugins/hyperlink/commands.d.ts +2 -1
  49. package/dist/es2015/plugins/hyperlink/commands.js +15 -2
  50. package/dist/es2015/plugins/hyperlink/commands.js.map +1 -1
  51. package/dist/es2015/plugins/hyperlink/index.js +12 -16
  52. package/dist/es2015/plugins/hyperlink/index.js.map +1 -1
  53. package/dist/es2015/plugins/hyperlink/pm-plugins/keymap.js +1 -1
  54. package/dist/es2015/plugins/hyperlink/pm-plugins/keymap.js.map +1 -1
  55. package/dist/{es5/plugins/hyperlink/ui/HyperlinkEdit/index.d.ts → es2015/plugins/hyperlink/ui/RecentSearch/LinkAddToolbar.d.ts} +9 -9
  56. package/dist/es2015/plugins/hyperlink/ui/RecentSearch/LinkAddToolbar.js +210 -0
  57. package/dist/es2015/plugins/hyperlink/ui/RecentSearch/LinkAddToolbar.js.map +1 -0
  58. package/dist/es2015/plugins/hyperlink/ui/RecentSearch/index.d.ts +4 -27
  59. package/dist/es2015/plugins/hyperlink/ui/RecentSearch/index.js +15 -187
  60. package/dist/es2015/plugins/hyperlink/ui/RecentSearch/index.js.map +1 -1
  61. package/dist/es2015/plugins/insert-block/index.js +2 -2
  62. package/dist/es2015/plugins/insert-block/index.js.map +1 -1
  63. package/dist/es2015/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +2 -0
  64. package/dist/es2015/plugins/insert-block/ui/ToolbarInsertBlock/index.js +28 -5
  65. package/dist/es2015/plugins/insert-block/ui/ToolbarInsertBlock/index.js.map +1 -1
  66. package/dist/es2015/plugins/media/index.js +9 -1
  67. package/dist/es2015/plugins/media/index.js.map +1 -1
  68. package/dist/es2015/plugins/mentions/commands/insert-mention-query.js +8 -1
  69. package/dist/es2015/plugins/mentions/commands/insert-mention-query.js.map +1 -1
  70. package/dist/es2015/plugins/mentions/index.js +21 -2
  71. package/dist/es2015/plugins/mentions/index.js.map +1 -1
  72. package/dist/es2015/plugins/quick-insert/index.js +14 -1
  73. package/dist/es2015/plugins/quick-insert/index.js.map +1 -1
  74. package/dist/es2015/plugins/rank.js +1 -0
  75. package/dist/es2015/plugins/rank.js.map +1 -1
  76. package/dist/es2015/plugins/save-on-enter/index.d.ts +2 -1
  77. package/dist/es2015/plugins/save-on-enter/index.js +17 -3
  78. package/dist/es2015/plugins/save-on-enter/index.js.map +1 -1
  79. package/dist/es2015/plugins/submit-editor/index.d.ts +2 -1
  80. package/dist/es2015/plugins/submit-editor/index.js +17 -3
  81. package/dist/es2015/plugins/submit-editor/index.js.map +1 -1
  82. package/dist/es2015/plugins/table/nodeviews/TableComponent.d.ts +2 -2
  83. package/dist/es2015/plugins/table/nodeviews/TableComponent.js +28 -26
  84. package/dist/es2015/plugins/table/nodeviews/TableComponent.js.map +1 -1
  85. package/dist/es2015/plugins/table/pm-plugins/table-resizing/actions.d.ts +2 -2
  86. package/dist/es2015/plugins/table/pm-plugins/table-resizing/actions.js +17 -7
  87. package/dist/es2015/plugins/table/pm-plugins/table-resizing/actions.js.map +1 -1
  88. package/dist/es2015/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
  89. package/dist/es2015/plugins/table/pm-plugins/table-resizing/plugin.js.map +1 -1
  90. package/dist/es2015/plugins/table/pm-plugins/table-resizing/resizer/resizer.d.ts +0 -1
  91. package/dist/es2015/plugins/table/pm-plugins/table-resizing/resizer/resizer.js +2 -11
  92. package/dist/es2015/plugins/table/pm-plugins/table-resizing/resizer/resizer.js.map +1 -1
  93. package/dist/es2015/plugins/table/pm-plugins/table-resizing/utils.d.ts +1 -1
  94. package/dist/es2015/plugins/table/pm-plugins/table-resizing/utils.js +8 -5
  95. package/dist/es2015/plugins/table/pm-plugins/table-resizing/utils.js.map +1 -1
  96. package/dist/es2015/plugins/table/ui/LayoutButton/index.js +1 -1
  97. package/dist/es2015/plugins/table/ui/LayoutButton/index.js.map +1 -1
  98. package/dist/es2015/plugins/table/utils/nodes.d.ts +1 -0
  99. package/dist/es2015/plugins/table/utils/nodes.js +24 -0
  100. package/dist/es2015/plugins/table/utils/nodes.js.map +1 -1
  101. package/dist/es2015/plugins/type-ahead/pm-plugins/main.d.ts +2 -1
  102. package/dist/es2015/plugins/type-ahead/pm-plugins/main.js +4 -2
  103. package/dist/es2015/plugins/type-ahead/pm-plugins/main.js.map +1 -1
  104. package/dist/es2015/plugins/type-ahead/types.d.ts +2 -1
  105. package/dist/es2015/ui/ContentStyles/index.js +1 -1
  106. package/dist/es2015/ui/ContentStyles/index.js.map +1 -1
  107. package/dist/es2015/ui/ToolbarFeedback/index.d.ts +4 -0
  108. package/dist/es2015/ui/ToolbarFeedback/index.js +15 -0
  109. package/dist/es2015/ui/ToolbarFeedback/index.js.map +1 -1
  110. package/dist/es2015/ui/WithHelpTrigger/index.js +14 -1
  111. package/dist/es2015/ui/WithHelpTrigger/index.js.map +1 -1
  112. package/dist/es5/plugins/analytics/index.js +1 -0
  113. package/dist/es5/plugins/analytics/index.js.map +1 -1
  114. package/dist/es5/plugins/analytics/plugin.d.ts +2 -1
  115. package/dist/es5/plugins/analytics/plugin.js +11 -0
  116. package/dist/es5/plugins/analytics/plugin.js.map +1 -1
  117. package/dist/es5/plugins/analytics/types/enums.d.ts +63 -0
  118. package/dist/es5/plugins/analytics/{types.js → types/enums.js} +1 -1
  119. package/dist/es5/plugins/analytics/types/enums.js.map +1 -0
  120. package/dist/es5/plugins/analytics/types/events.d.ts +20 -0
  121. package/dist/es5/plugins/analytics/types/events.js +3 -0
  122. package/dist/es5/plugins/analytics/types/events.js.map +1 -0
  123. package/dist/es5/plugins/analytics/types/format-events.d.ts +46 -0
  124. package/dist/es5/plugins/analytics/types/format-events.js +3 -0
  125. package/dist/es5/plugins/analytics/types/format-events.js.map +1 -0
  126. package/dist/es5/plugins/analytics/types/index.d.ts +5 -0
  127. package/dist/es5/plugins/analytics/types/index.js +8 -0
  128. package/dist/es5/plugins/analytics/types/index.js.map +1 -0
  129. package/dist/es5/plugins/analytics/types/substitute-events.d.ts +25 -0
  130. package/dist/es5/plugins/analytics/types/substitute-events.js +3 -0
  131. package/dist/es5/plugins/analytics/types/substitute-events.js.map +1 -0
  132. package/dist/es5/plugins/analytics/types/ui-events.d.ts +53 -0
  133. package/dist/es5/plugins/analytics/types/ui-events.js +3 -0
  134. package/dist/es5/plugins/analytics/types/ui-events.js.map +1 -0
  135. package/dist/es5/plugins/block-type/types.d.ts +1 -1
  136. package/dist/es5/plugins/emoji/index.js +9 -1
  137. package/dist/es5/plugins/emoji/index.js.map +1 -1
  138. package/dist/es5/plugins/emoji/pm-plugins/input-rules.js +9 -1
  139. package/dist/es5/plugins/emoji/pm-plugins/input-rules.js.map +1 -1
  140. package/dist/es5/plugins/extension/ui/Extension/Extension/styles.d.ts +1 -1
  141. package/dist/es5/plugins/floating-toolbar/index.js +8 -7
  142. package/dist/es5/plugins/floating-toolbar/index.js.map +1 -1
  143. package/dist/es5/plugins/floating-toolbar/types.d.ts +24 -3
  144. package/dist/es5/plugins/floating-toolbar/ui/Button.d.ts +3 -1
  145. package/dist/es5/plugins/floating-toolbar/ui/Button.js +3 -3
  146. package/dist/es5/plugins/floating-toolbar/ui/Button.js.map +1 -1
  147. package/dist/es5/plugins/floating-toolbar/ui/Input.d.ts +20 -0
  148. package/dist/es5/plugins/floating-toolbar/ui/Input.js +46 -0
  149. package/dist/es5/plugins/floating-toolbar/ui/Input.js.map +1 -0
  150. package/dist/es5/plugins/floating-toolbar/ui/Toolbar.d.ts +6 -0
  151. package/dist/es5/plugins/floating-toolbar/ui/Toolbar.js +9 -3
  152. package/dist/es5/plugins/floating-toolbar/ui/Toolbar.js.map +1 -1
  153. package/dist/es5/plugins/help-dialog/index.js +8 -0
  154. package/dist/es5/plugins/help-dialog/index.js.map +1 -1
  155. package/dist/es5/plugins/hyperlink/Toolbar.d.ts +14 -0
  156. package/dist/es5/plugins/hyperlink/Toolbar.js +112 -0
  157. package/dist/es5/plugins/hyperlink/Toolbar.js.map +1 -0
  158. package/dist/es5/plugins/hyperlink/commands.d.ts +2 -1
  159. package/dist/es5/plugins/hyperlink/commands.js +15 -2
  160. package/dist/es5/plugins/hyperlink/commands.js.map +1 -1
  161. package/dist/es5/plugins/hyperlink/index.js +11 -15
  162. package/dist/es5/plugins/hyperlink/index.js.map +1 -1
  163. package/dist/es5/plugins/hyperlink/pm-plugins/keymap.js +1 -1
  164. package/dist/es5/plugins/hyperlink/pm-plugins/keymap.js.map +1 -1
  165. package/dist/{es2015/plugins/hyperlink/ui/HyperlinkEdit/index.d.ts → es5/plugins/hyperlink/ui/RecentSearch/LinkAddToolbar.d.ts} +9 -9
  166. package/dist/es5/plugins/hyperlink/ui/RecentSearch/LinkAddToolbar.js +212 -0
  167. package/dist/es5/plugins/hyperlink/ui/RecentSearch/LinkAddToolbar.js.map +1 -0
  168. package/dist/es5/plugins/hyperlink/ui/RecentSearch/index.d.ts +4 -27
  169. package/dist/es5/plugins/hyperlink/ui/RecentSearch/index.js +15 -187
  170. package/dist/es5/plugins/hyperlink/ui/RecentSearch/index.js.map +1 -1
  171. package/dist/es5/plugins/insert-block/index.js +2 -2
  172. package/dist/es5/plugins/insert-block/index.js.map +1 -1
  173. package/dist/es5/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +2 -0
  174. package/dist/es5/plugins/insert-block/ui/ToolbarInsertBlock/index.js +28 -5
  175. package/dist/es5/plugins/insert-block/ui/ToolbarInsertBlock/index.js.map +1 -1
  176. package/dist/es5/plugins/media/index.js +9 -1
  177. package/dist/es5/plugins/media/index.js.map +1 -1
  178. package/dist/es5/plugins/mentions/commands/insert-mention-query.js +8 -1
  179. package/dist/es5/plugins/mentions/commands/insert-mention-query.js.map +1 -1
  180. package/dist/es5/plugins/mentions/index.js +21 -2
  181. package/dist/es5/plugins/mentions/index.js.map +1 -1
  182. package/dist/es5/plugins/quick-insert/index.js +14 -1
  183. package/dist/es5/plugins/quick-insert/index.js.map +1 -1
  184. package/dist/es5/plugins/rank.js +1 -0
  185. package/dist/es5/plugins/rank.js.map +1 -1
  186. package/dist/es5/plugins/save-on-enter/index.d.ts +2 -1
  187. package/dist/es5/plugins/save-on-enter/index.js +17 -3
  188. package/dist/es5/plugins/save-on-enter/index.js.map +1 -1
  189. package/dist/es5/plugins/submit-editor/index.d.ts +2 -1
  190. package/dist/es5/plugins/submit-editor/index.js +17 -3
  191. package/dist/es5/plugins/submit-editor/index.js.map +1 -1
  192. package/dist/es5/plugins/table/nodeviews/TableComponent.d.ts +2 -2
  193. package/dist/es5/plugins/table/nodeviews/TableComponent.js +26 -24
  194. package/dist/es5/plugins/table/nodeviews/TableComponent.js.map +1 -1
  195. package/dist/es5/plugins/table/pm-plugins/table-resizing/actions.d.ts +2 -2
  196. package/dist/es5/plugins/table/pm-plugins/table-resizing/actions.js +16 -6
  197. package/dist/es5/plugins/table/pm-plugins/table-resizing/actions.js.map +1 -1
  198. package/dist/es5/plugins/table/pm-plugins/table-resizing/plugin.js +2 -2
  199. package/dist/es5/plugins/table/pm-plugins/table-resizing/plugin.js.map +1 -1
  200. package/dist/es5/plugins/table/pm-plugins/table-resizing/resizer/resizer.d.ts +0 -1
  201. package/dist/es5/plugins/table/pm-plugins/table-resizing/resizer/resizer.js +1 -11
  202. package/dist/es5/plugins/table/pm-plugins/table-resizing/resizer/resizer.js.map +1 -1
  203. package/dist/es5/plugins/table/pm-plugins/table-resizing/utils.d.ts +1 -1
  204. package/dist/es5/plugins/table/pm-plugins/table-resizing/utils.js +8 -5
  205. package/dist/es5/plugins/table/pm-plugins/table-resizing/utils.js.map +1 -1
  206. package/dist/es5/plugins/table/ui/LayoutButton/index.js +1 -1
  207. package/dist/es5/plugins/table/ui/LayoutButton/index.js.map +1 -1
  208. package/dist/es5/plugins/table/utils/nodes.d.ts +1 -0
  209. package/dist/es5/plugins/table/utils/nodes.js +24 -0
  210. package/dist/es5/plugins/table/utils/nodes.js.map +1 -1
  211. package/dist/es5/plugins/type-ahead/pm-plugins/main.d.ts +2 -1
  212. package/dist/es5/plugins/type-ahead/pm-plugins/main.js +4 -2
  213. package/dist/es5/plugins/type-ahead/pm-plugins/main.js.map +1 -1
  214. package/dist/es5/plugins/type-ahead/types.d.ts +2 -1
  215. package/dist/es5/ui/ContentStyles/index.js +1 -1
  216. package/dist/es5/ui/ContentStyles/index.js.map +1 -1
  217. package/dist/es5/ui/ToolbarFeedback/index.d.ts +4 -0
  218. package/dist/es5/ui/ToolbarFeedback/index.js +15 -0
  219. package/dist/es5/ui/ToolbarFeedback/index.js.map +1 -1
  220. package/dist/es5/ui/WithHelpTrigger/index.js +14 -1
  221. package/dist/es5/ui/WithHelpTrigger/index.js.map +1 -1
  222. package/dist/package.json +1 -1
  223. package/package.json +3 -3
  224. package/dist/es2015/plugins/analytics/types.d.ts +0 -118
  225. package/dist/es2015/plugins/analytics/types.js +0 -1
  226. package/dist/es2015/plugins/analytics/types.js.map +0 -1
  227. package/dist/es2015/plugins/hyperlink/ui/HyperlinkEdit/index.js +0 -55
  228. package/dist/es2015/plugins/hyperlink/ui/HyperlinkEdit/index.js.map +0 -1
  229. package/dist/es2015/plugins/hyperlink/ui/index.d.ts +0 -101
  230. package/dist/es2015/plugins/hyperlink/ui/index.js +0 -142
  231. package/dist/es2015/plugins/hyperlink/ui/index.js.map +0 -1
  232. package/dist/es5/plugins/analytics/types.d.ts +0 -118
  233. package/dist/es5/plugins/analytics/types.js.map +0 -1
  234. package/dist/es5/plugins/hyperlink/ui/HyperlinkEdit/index.js +0 -57
  235. package/dist/es5/plugins/hyperlink/ui/HyperlinkEdit/index.js.map +0 -1
  236. package/dist/es5/plugins/hyperlink/ui/index.d.ts +0 -101
  237. package/dist/es5/plugins/hyperlink/ui/index.js +0 -145
  238. package/dist/es5/plugins/hyperlink/ui/index.js.map +0 -1
@@ -5,13 +5,26 @@ var React = require("react");
5
5
  var PropTypes = require("prop-types");
6
6
  var help_dialog_1 = require("../../plugins/help-dialog");
7
7
  var analytics_1 = require("../../analytics");
8
+ var analytics_2 = require("../../plugins/analytics");
9
+ var event_dispatcher_1 = require("../../event-dispatcher");
8
10
  var WithHelpTrigger = /** @class */ (function (_super) {
9
11
  tslib_1.__extends(WithHelpTrigger, _super);
10
12
  function WithHelpTrigger() {
11
13
  var _this = _super !== null && _super.apply(this, arguments) || this;
12
14
  _this.openHelp = function () {
15
+ var editorActions = _this.context.editorActions;
16
+ var dispatch = event_dispatcher_1.createDispatch(editorActions.eventDispatcher);
17
+ dispatch(analytics_2.analyticsEventKey, {
18
+ payload: {
19
+ action: "clicked" /* CLICKED */,
20
+ actionSubject: "button" /* BUTTON */,
21
+ actionSubjectId: "helpButton" /* BUTTON_HELP */,
22
+ attributes: { inputMethod: "toolbar" /* TOOLBAR */ },
23
+ eventType: "ui" /* UI */,
24
+ },
25
+ });
13
26
  analytics_1.analyticsService.trackEvent('atlassian.editor.help.button');
14
- var editorView = _this.context.editorActions._privateGetEditorView();
27
+ var editorView = editorActions._privateGetEditorView();
15
28
  if (editorView) {
16
29
  help_dialog_1.openHelpCommand(editorView.state.tr, editorView.dispatch);
17
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/WithHelpTrigger/index.tsx"],"names":[],"mappings":";;;AAAA,6BAA+B;AAC/B,sCAAwC;AACxC,yDAA4D;AAC5D,6CAAmD;AAEnD;IAA6C,2CAAyB;IAAtE;QAAA,qEAgBC;QAXC,cAAQ,GAAG;YACT,4BAAgB,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;YAC5D,IAAM,UAAU,GAAG,KAAI,CAAC,OAAO,CAAC,aAAa,CAAC,qBAAqB,EAAE,CAAC;YACtE,IAAI,UAAU,EAAE;gBACd,6BAAe,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;aAC3D;QACH,CAAC,CAAC;;IAKJ,CAAC;IAHC,gCAAM,GAAN;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAdM,4BAAY,GAAG;QACpB,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;KAC3C,CAAC;IAaJ,sBAAC;CAAA,AAhBD,CAA6C,KAAK,CAAC,SAAS,GAgB3D;kBAhBoB,eAAe"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/WithHelpTrigger/index.tsx"],"names":[],"mappings":";;;AAAA,6BAA+B;AAC/B,sCAAwC;AACxC,yDAA4D;AAC5D,6CAAmD;AACnD,qDAQiC;AACjC,2DAAwD;AAExD;IAA6C,2CAAyB;IAAtE;QAAA,qEA+BC;QA1BC,cAAQ,GAAG;YACD,IAAA,2CAAa,CAAkB;YAEvC,IAAM,QAAQ,GAAsB,iCAAc,CAChD,aAAa,CAAC,eAAe,CAC9B,CAAC;YACF,QAAQ,CAAC,6BAAiB,EAAE;gBAC1B,OAAO,EAAE;oBACP,MAAM,yBAAgB;oBACtB,aAAa,uBAAuB;oBACpC,eAAe,gCAA+B;oBAC9C,UAAU,EAAE,EAAE,WAAW,yBAAsB,EAAE;oBACjD,SAAS,eAAe;iBACzB;aACF,CAAC,CAAC;YACH,4BAAgB,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;YAE5D,IAAM,UAAU,GAAG,aAAa,CAAC,qBAAqB,EAAE,CAAC;YACzD,IAAI,UAAU,EAAE;gBACd,6BAAe,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;aAC3D;QACH,CAAC,CAAC;;IAKJ,CAAC;IAHC,gCAAM,GAAN;QACE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IA7BM,4BAAY,GAAG;QACpB,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU;KAC3C,CAAC;IA4BJ,sBAAC;CAAA,AA/BD,CAA6C,KAAK,CAAC,SAAS,GA+B3D;kBA/BoB,eAAe"}
package/dist/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "98.5.1",
3
+ "version": "98.7.1",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "98.5.1",
3
+ "version": "98.7.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/es5/index.js",
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/code": "^8.2.2",
39
39
  "@atlaskit/date": "^0.2.0",
40
40
  "@atlaskit/droplist": "^7.0.18",
41
- "@atlaskit/editor-common": "^31.0.1",
41
+ "@atlaskit/editor-common": "^31.0.4",
42
42
  "@atlaskit/editor-json-transformer": "^4.1.9",
43
43
  "@atlaskit/editor-markdown-transformer": "^2.1.9",
44
44
  "@atlaskit/emoji": "^54.0.0",
@@ -105,7 +105,7 @@
105
105
  "@atlaskit/docs": "^6.0.1",
106
106
  "@atlaskit/dropdown-menu": "^6.1.26",
107
107
  "@atlaskit/editor-bitbucket-transformer": "^4.1.9",
108
- "@atlaskit/editor-test-helpers": "^6.3.20",
108
+ "@atlaskit/editor-test-helpers": "^6.3.21",
109
109
  "@atlaskit/i18n-tools": "^0.4.0",
110
110
  "@atlaskit/lozenge": "^6.2.4",
111
111
  "@atlaskit/media-core": "^27.0.0",
@@ -1,118 +0,0 @@
1
- import { Dispatch } from '../../event-dispatcher';
2
- declare type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
3
- action: Action;
4
- actionSubject: ActionSubject;
5
- actionSubjectId?: ActionSubjectID;
6
- attributes?: Attributes;
7
- eventType: EventType;
8
- };
9
- declare type UIAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, 'ui'>;
10
- declare type TrackAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, 'track'>;
11
- declare type ButtonAEP<ActionSubjectID, Attributes> = UIAEP<'clicked', 'button', ActionSubjectID, Attributes>;
12
- declare type PickerAEP<ActionSubjectID, Attributes> = UIAEP<'opened', 'picker', ActionSubjectID, Attributes>;
13
- declare type TypeAheadAEP<ActionSubjectID, Attributes> = UIAEP<'invoked', 'typeAhead', ActionSubjectID, Attributes>;
14
- declare type EditorStartAEP = UIAEP<'started', 'editor', undefined, {
15
- platform: 'mobileNative' | 'mobileHybrid' | 'web';
16
- }>;
17
- declare type EditorStopAEP = UIAEP<'stopped', 'editor', 'save' | 'cancel', {
18
- inputMethod: 'toolbar' | 'shortcut';
19
- documentSize: number;
20
- nodeCount?: {
21
- tables: number;
22
- headings: number;
23
- lists: number;
24
- mediaSingles: number;
25
- mediaGroups: number;
26
- panels: number;
27
- extensions: number;
28
- decisions: number;
29
- actions: number;
30
- codeBlocks: number;
31
- };
32
- }>;
33
- declare type ButtonHelpAEP = ButtonAEP<'helpButton', {
34
- inputMethod: 'shortcut' | 'toolbar';
35
- }>;
36
- declare type ButtonFeedbackAEP = ButtonAEP<'feedbackButton', undefined>;
37
- declare type PickerEmojiAEP = PickerAEP<'emojiPicker', {
38
- inputMethod: 'toolbar';
39
- }>;
40
- declare type PickerImageAEP = PickerAEP<'cloudPicker', {
41
- inputMethod: 'toolbar' | 'quickInsert';
42
- }>;
43
- declare type TypeAheadQuickInsertAEP = TypeAheadAEP<'quickInsertTypeAhead', {
44
- inputMethod: 'keyboard';
45
- }>;
46
- declare type TypeAheadEmojiAEP = TypeAheadAEP<'emojiTypeAhead', {
47
- inputMethod: 'quickInsert' | 'keyboard';
48
- }>;
49
- declare type TypeAheadLinkAEP = TypeAheadAEP<'linkTypeAhead', {
50
- inputMethod: 'toolbar' | 'quickInsert' | 'shortcut';
51
- }>;
52
- declare type TypeAheadMentionAEP = TypeAheadAEP<'mentionTypeAhead', {
53
- inputMethod: 'toolbar' | 'quickInsert' | 'keyboard';
54
- }>;
55
- declare type UIEventPayload = EditorStartAEP | EditorStopAEP | ButtonHelpAEP | ButtonFeedbackAEP | PickerEmojiAEP | PickerImageAEP | TypeAheadQuickInsertAEP | TypeAheadEmojiAEP | TypeAheadLinkAEP | TypeAheadMentionAEP;
56
- /** Text input and formatting events */
57
- declare type FormatAEP<ActionSubjectID, Attributes> = TrackAEP<'formatted', 'text', ActionSubjectID, Attributes>;
58
- declare type SubstituteAEP<ActionSubjectID, Attributes> = TrackAEP<'autoSubstituted', 'text', ActionSubjectID, Attributes>;
59
- declare type FormatBasicAEP = FormatAEP<'strong' | 'italic' | 'underline' | 'code' | 'strike', {
60
- inputMethod: 'toolbar' | 'shortcut' | 'autoformatting' | 'floatingToolbar';
61
- }>;
62
- declare type FormatSuperSubAEP = FormatAEP<'superscript' | 'subscript', {
63
- inputMethod: 'toolbar';
64
- }>;
65
- declare type FormatIndentationAEP = FormatAEP<'indentation', {
66
- inputMethod: 'toolbar' | 'keyboard';
67
- direction: 'indent' | 'outdent';
68
- previousIndentationLevel: number;
69
- newIndentLevel: number;
70
- indentType: 'paragraph' | 'list' | 'heading' | 'codeBlock';
71
- }>;
72
- declare type FormatHeadingAEP = FormatAEP<'heading', {
73
- inputMethod: 'toolbar' | 'shortcut' | 'autoformatting';
74
- newHeadlineLevel: 0 | 1 | 2 | 3 | 4 | 5 | 6;
75
- }>;
76
- declare type FormatBlockQuoteAEP = FormatAEP<'blockQuote', {
77
- inputMethod: 'toolbar' | 'keyboard' | 'autoformatting' | 'quickInsert';
78
- }>;
79
- declare type FormatClearAEP = FormatAEP<'clearFormatting', {
80
- inputMethod: 'toolbar' | 'shortcut';
81
- formattingCleared: string[];
82
- }>;
83
- declare type FormatColorAEP = FormatAEP<'color', {
84
- newColor: string;
85
- previousColor: string;
86
- }>;
87
- declare type FormatListAEP = FormatAEP<'numberedList' | 'bulletedList', {
88
- inputMethod: 'toolbar' | 'keyboard' | 'autoformatting' | 'quickInsert';
89
- }>;
90
- declare type SubstituteProductAEP = SubstituteAEP<'productName', {
91
- product: string;
92
- originalSpelling: string;
93
- }>;
94
- declare type SubstituteSymbolAEP = SubstituteAEP<'symbol', {
95
- symbol: 'rightArrow' | 'leftArrow';
96
- }>;
97
- declare type SubstitutePuncAEP = SubstituteAEP<'punctuation', {
98
- punctuation: 'emDash' | 'ellipsis' | 'singleQuote' | 'doubleQuote';
99
- }>;
100
- declare type FormatSubstitutionEventPayload = FormatBasicAEP | FormatSuperSubAEP | FormatIndentationAEP | FormatHeadingAEP | FormatBlockQuoteAEP | FormatClearAEP | FormatColorAEP | FormatListAEP | SubstituteProductAEP | SubstituteSymbolAEP | SubstitutePuncAEP;
101
- /** Insertion events */
102
- declare type InsertAEP<ActionSubjectID, Attributes> = TrackAEP<'inserted', 'document', ActionSubjectID, Attributes>;
103
- declare type InsertDividerAEP = InsertAEP<'divider', {
104
- inputMethod: 'quickInsert' | 'toolbar' | 'autoformatting';
105
- }>;
106
- declare type InsertPanelAEP = InsertAEP<'panel', {
107
- inputMethod: 'quickInsert' | 'toolbar';
108
- }>;
109
- declare type InsertCodeBlockAEP = InsertAEP<'codeBlock', {
110
- inputMethod: 'quickInsert' | 'toolbar' | 'autoformatting' | 'insertMenu';
111
- }>;
112
- declare type InsertEventPayload = InsertDividerAEP | InsertPanelAEP | InsertCodeBlockAEP;
113
- export declare type AnalyticsEventPayload = UIEventPayload | FormatSubstitutionEventPayload | InsertEventPayload;
114
- export declare type AnalyticsDispatch = Dispatch<{
115
- payload: AnalyticsEventPayload;
116
- channel?: string;
117
- }>;
118
- export {};
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/analytics/types.ts"],"names":[],"mappings":""}
@@ -1,55 +0,0 @@
1
- import * as tslib_1 from "tslib";
2
- import * as React from 'react';
3
- import { defineMessages, injectIntl } from 'react-intl';
4
- import OpenIcon from '@atlaskit/icon/glyph/editor/open';
5
- import UnlinkIcon from '@atlaskit/icon/glyph/editor/unlink';
6
- import { akEditorFloatingDialogZIndex } from '@atlaskit/editor-common';
7
- import PanelTextInput from '../../../../ui/PanelTextInput';
8
- import { getNearestNonTextNode } from '../../../../ui/FloatingToolbar';
9
- import { FloatingToolbar, Separator, ToolbarButton } from '../styles';
10
- export var messages = defineMessages({
11
- openLink: {
12
- id: 'fabric.editor.openLink',
13
- defaultMessage: 'Open link',
14
- description: 'Follows the hyperlink.',
15
- },
16
- unlink: {
17
- id: 'fabric.editor.unlink',
18
- defaultMessage: 'Unlink',
19
- description: 'Removes the hyperlink but keeps your text.',
20
- },
21
- });
22
- var HyperlinkEdit = /** @class */ (function (_super) {
23
- tslib_1.__extends(HyperlinkEdit, _super);
24
- function HyperlinkEdit(props) {
25
- var _this = _super.call(this, props) || this;
26
- _this.handleChange = function (text) {
27
- _this.setState({ text: text });
28
- };
29
- _this.handleBlur = function () {
30
- if (_this.props.onBlur) {
31
- _this.props.onBlur(_this.state.text);
32
- }
33
- };
34
- _this.handleSubmit = function () {
35
- if (_this.props.onSubmit) {
36
- _this.props.onSubmit(_this.state.text);
37
- }
38
- };
39
- _this.state = { text: props.defaultValue || '' };
40
- return _this;
41
- }
42
- HyperlinkEdit.prototype.render = function () {
43
- var _a = this.props, target = _a.target, popupsMountPoint = _a.popupsMountPoint, popupsBoundariesElement = _a.popupsBoundariesElement, placeholder = _a.placeholder, onUnlink = _a.onUnlink, autoFocus = _a.autoFocus, onOpenLink = _a.onOpenLink, defaultValue = _a.defaultValue, alwaysOpenLinkAt = _a.alwaysOpenLinkAt, formatMessage = _a.intl.formatMessage;
44
- var labelOpenLink = formatMessage(messages.openLink);
45
- var labelUnlink = formatMessage(messages.unlink);
46
- return (React.createElement(FloatingToolbar, { target: getNearestNonTextNode(target), popupsMountPoint: popupsMountPoint, popupsBoundariesElement: popupsBoundariesElement, fitWidth: 400, fitHeight: 32, offset: [0, 12], className: "normal", zIndex: akEditorFloatingDialogZIndex },
47
- React.createElement(PanelTextInput, { autoFocus: autoFocus, defaultValue: defaultValue || '', placeholder: placeholder, onSubmit: this.handleSubmit, onChange: this.handleChange, onBlur: this.handleBlur, onCancel: this.handleBlur }),
48
- (onOpenLink || onUnlink) && React.createElement(Separator, null),
49
- onOpenLink && (React.createElement(ToolbarButton, { spacing: "compact", href: alwaysOpenLinkAt || this.state.text, onClick: onOpenLink, target: "_blank", title: labelOpenLink, iconBefore: React.createElement(OpenIcon, { label: labelOpenLink }) })),
50
- onUnlink && (React.createElement(ToolbarButton, { spacing: "compact", onClick: onUnlink, title: labelUnlink, iconBefore: React.createElement(UnlinkIcon, { label: labelUnlink }) }))));
51
- };
52
- return HyperlinkEdit;
53
- }(React.Component));
54
- export default injectIntl(HyperlinkEdit);
55
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/plugins/hyperlink/ui/HyperlinkEdit/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAqB,MAAM,YAAY,CAAC;AAE3E,OAAO,QAAQ,MAAM,kCAAkC,CAAC;AACxD,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,cAAc,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEtE,MAAM,CAAC,IAAM,QAAQ,GAAG,cAAc,CAAC;IACrC,QAAQ,EAAE;QACR,EAAE,EAAE,wBAAwB;QAC5B,cAAc,EAAE,WAAW;QAC3B,WAAW,EAAE,wBAAwB;KACtC;IACD,MAAM,EAAE;QACN,EAAE,EAAE,sBAAsB;QAC1B,cAAc,EAAE,QAAQ;QACxB,WAAW,EAAE,4CAA4C;KAC1D;CACF,CAAC,CAAC;AAwBH;IAA4B,yCAAiD;IAC3E,uBAAY,KAAK;QAAjB,YACE,kBAAM,KAAK,CAAC,SAEb;QAED,kBAAY,GAAG,UAAC,IAAY;YAC1B,KAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,MAAA,EAAE,CAAC,CAAC;QAC1B,CAAC,CAAC;QAEF,gBAAU,GAAG;YACX,IAAI,KAAI,CAAC,KAAK,CAAC,MAAM,EAAE;gBACrB,KAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAI,CAAC,KAAK,CAAC,IAAI,CAAC,C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AAI,CACb,oBAAC,aAAa,IACZ,OAAO,EAAC,SAAS,EACjB,IAAI,EAAE,gBAAgB,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EACzC,OAAO,EAAE,UAAU,EACnB,MAAM,EAAC,QAAQ,EACf,KAAK,EAAE,aAAa,EACpB,UAAU,EAAE,oBAAC,QAAQ,IAAC,KAAK,EAAE,aAAa,GAAI,GAC9C,CACH;YACA,QAAQ,IAAI,CACX,oBAAC,aAAa,IACZ,OAAO,EAAC,SAAS,EACjB,OAAO,EAAE,QAAQ,EACjB,KAAK,EAAE,WAAW,EAClB,UAAU,EAAE,oBAAC,UAAU,IAAC,KAAK,EAAE,WAAW,GAAI,GAC9C,CACH,CACe,CACnB,CAAC;IACJ,CAAC;IACH,oBAAC;AAAD,CAAC,AAhFD,CAA4B,KAAK,CAAC,SAAS,GAgF1C;AAED,eAAe,UAAU,CAAC,aAAa,CAAC,CAAC"}
@@ -1,101 +0,0 @@
1
- import * as React from 'react';
2
- import { InjectedIntlProps } from 'react-intl';
3
- import { Node } from 'prosemirror-model';
4
- import { EditorView } from 'prosemirror-view';
5
- import { ActivityProvider } from '@atlaskit/activity';
6
- import { HyperlinkState } from '../pm-plugins/main';
7
- export declare const messages: {
8
- linkPlaceholder: {
9
- id: string;
10
- defaultMessage: string;
11
- description: string;
12
- };
13
- linkTextPlaceholder: {
14
- id: string;
15
- defaultMessage: string;
16
- description: string;
17
- };
18
- linkPlaceholderWithSearch: {
19
- id: string;
20
- defaultMessage: string;
21
- description: string;
22
- };
23
- };
24
- export interface CommonProps {
25
- pos: number;
26
- node: Node;
27
- view: EditorView;
28
- popupsMountPoint?: HTMLElement;
29
- popupsBoundariesElement?: HTMLElement;
30
- }
31
- export declare class AddDisplayTextToolbar extends React.PureComponent<CommonProps & InjectedIntlProps> {
32
- render(): JSX.Element;
33
- }
34
- export declare const AddDisplayTextToolbarWithIntl: React.ComponentClass<CommonProps, any> & {
35
- WrappedComponent: ReactIntl.ComponentConstructor<CommonProps & InjectedIntlProps>;
36
- };
37
- export declare class EditLinkHrefToolbar extends React.PureComponent<CommonProps & InjectedIntlProps> {
38
- render(): JSX.Element;
39
- }
40
- export declare const EditLinkHrefToolbarWithIntl: React.ComponentClass<CommonProps, any> & {
41
- WrappedComponent: ReactIntl.ComponentConstructor<CommonProps & InjectedIntlProps>;
42
- };
43
- export declare class InsertLinkToolbar extends React.PureComponent<{
44
- from: number;
45
- to: number;
46
- view: EditorView;
47
- popupsMountPoint?: HTMLElement;
48
- popupsBoundariesElement?: HTMLElement;
49
- } & InjectedIntlProps> {
50
- render(): JSX.Element;
51
- }
52
- export declare const InsertLinkToolbarWithIntl: React.ComponentClass<{
53
- from: number;
54
- to: number;
55
- view: EditorView<any>;
56
- popupsMountPoint?: HTMLElement | undefined;
57
- popupsBoundariesElement?: HTMLElement | undefined;
58
- }, any> & {
59
- WrappedComponent: ReactIntl.ComponentConstructor<{
60
- from: number;
61
- to: number;
62
- view: EditorView<any>;
63
- popupsMountPoint?: HTMLElement | undefined;
64
- popupsBoundariesElement?: HTMLElement | undefined;
65
- } & InjectedIntlProps>;
66
- };
67
- export declare class ActivityPoweredInsertLinkToolbar extends React.PureComponent<{
68
- from: number;
69
- to: number;
70
- view: EditorView;
71
- popupsMountPoint?: HTMLElement;
72
- popupsBoundariesElement?: HTMLElement;
73
- activityProvider: Promise<ActivityProvider>;
74
- } & InjectedIntlProps> {
75
- render(): JSX.Element;
76
- }
77
- export declare const ActivityPoweredInsertLinkToolbarWithIntl: React.ComponentClass<{
78
- from: number;
79
- to: number;
80
- view: EditorView<any>;
81
- popupsMountPoint?: HTMLElement | undefined;
82
- popupsBoundariesElement?: HTMLElement | undefined;
83
- activityProvider: Promise<ActivityProvider>;
84
- }, any> & {
85
- WrappedComponent: ReactIntl.ComponentConstructor<{
86
- from: number;
87
- to: number;
88
- view: EditorView<any>;
89
- popupsMountPoint?: HTMLElement | undefined;
90
- popupsBoundariesElement?: HTMLElement | undefined;
91
- activityProvider: Promise<ActivityProvider>;
92
- } & InjectedIntlProps>;
93
- };
94
- export interface Props {
95
- hyperlinkState?: HyperlinkState;
96
- view: EditorView;
97
- popupsMountPoint?: HTMLElement;
98
- popupsBoundariesElement?: HTMLElement;
99
- activityProvider?: Promise<ActivityProvider>;
100
- }
101
- export default function HyperlinkToolbar(props: Props): JSX.Element | null;
@@ -1,142 +0,0 @@
1
- import * as tslib_1 from "tslib";
2
- import * as React from 'react';
3
- import { defineMessages, injectIntl } from 'react-intl';
4
- import { findDomRefAtPos } from 'prosemirror-utils';
5
- import { setLinkText, removeLink, hideLinkToolbar, setLinkHref, insertLink, } from '../commands';
6
- import HyperlinkEdit from './HyperlinkEdit';
7
- import RecentSearch from './RecentSearch';
8
- import { normalizeUrl } from '../utils';
9
- import { InsertStatus } from '../pm-plugins/main';
10
- export var messages = defineMessages({
11
- linkPlaceholder: {
12
- id: 'fabric.editor.linkPlaceholder',
13
- defaultMessage: 'Paste link',
14
- description: 'Create a new link by pasting a URL.',
15
- },
16
- linkTextPlaceholder: {
17
- id: 'fabric.editor.linkTextPlaceholder',
18
- defaultMessage: 'Text to display',
19
- description: 'Enter the text you’d like to display for the link (instead of the URL).',
20
- },
21
- linkPlaceholderWithSearch: {
22
- id: 'fabric.editor.linkPlaceholderWithSearch',
23
- defaultMessage: 'Paste link or search recently viewed',
24
- description: 'Create a new link by pasting a URL or searching pages you’ve recently visited.',
25
- },
26
- });
27
- var AddDisplayTextToolbar = /** @class */ (function (_super) {
28
- tslib_1.__extends(AddDisplayTextToolbar, _super);
29
- function AddDisplayTextToolbar() {
30
- return _super !== null && _super.apply(this, arguments) || this;
31
- }
32
- AddDisplayTextToolbar.prototype.render = function () {
33
- var _a = this.props, pos = _a.pos, node = _a.node, view = _a.view, popupsMountPoint = _a.popupsMountPoint, popupsBoundariesElement = _a.popupsBoundariesElement, formatMessage = _a.intl.formatMessage;
34
- var existingLink = node.type.schema.marks.link.isInSet(node.marks).attrs.href;
35
- var unlink = function () {
36
- return removeLink(pos)(view.state, view.dispatch) && view.focus();
37
- };
38
- var hideToolbar = function () {
39
- return hideLinkToolbar()(view.state, view.dispatch) && view.focus();
40
- };
41
- var updateLinkText = function (text) {
42
- return setLinkText(pos, text)(view.state, view.dispatch) && view.focus();
43
- };
44
- var updateLinkTextOrHideToolbar = function (text) {
45
- return updateLinkText(text) || hideToolbar();
46
- };
47
- return (React.createElement(HyperlinkEdit, { target: findDomRefAtPos(pos, view.domAtPos.bind(view)), popupsMountPoint: popupsMountPoint, popupsBoundariesElement: popupsBoundariesElement, alwaysOpenLinkAt: existingLink, placeholder: formatMessage(messages.linkTextPlaceholder), onSubmit: updateLinkText, onBlur: updateLinkTextOrHideToolbar, onUnlink: unlink, onOpenLink: function () { } }));
48
- };
49
- return AddDisplayTextToolbar;
50
- }(React.PureComponent));
51
- export { AddDisplayTextToolbar };
52
- export var AddDisplayTextToolbarWithIntl = injectIntl(AddDisplayTextToolbar);
53
- var EditLinkHrefToolbar = /** @class */ (function (_super) {
54
- tslib_1.__extends(EditLinkHrefToolbar, _super);
55
- function EditLinkHrefToolbar() {
56
- return _super !== null && _super.apply(this, arguments) || this;
57
- }
58
- EditLinkHrefToolbar.prototype.render = function () {
59
- var _a = this.props, pos = _a.pos, node = _a.node, view = _a.view, popupsMountPoint = _a.popupsMountPoint, popupsBoundariesElement = _a.popupsBoundariesElement, formatMessage = _a.intl.formatMessage;
60
- var existingLink = node.type.schema.marks.link.isInSet(node.marks).attrs.href;
61
- var hideToolbar = function () {
62
- return hideLinkToolbar()(view.state, view.dispatch) && view.focus();
63
- };
64
- var updateLinkHref = function (href) {
65
- return setLinkHref(pos, href)(view.state, view.dispatch) && view.focus();
66
- };
67
- var updateLinkHrefOrHideToolbar = function (href) {
68
- return updateLinkHref(href) || hideToolbar();
69
- };
70
- var unlink = function () {
71
- return removeLink(pos)(view.state, view.dispatch) && view.focus();
72
- };
73
- return (React.createElement(HyperlinkEdit, { target: findDomRefAtPos(pos, view.domAtPos.bind(view)), popupsMountPoint: popupsMountPoint, popupsBoundariesElement: popupsBoundariesElement, defaultValue: existingLink, placeholder: formatMessage(messages.linkPlaceholder), onSubmit: updateLinkHref, onBlur: updateLinkHrefOrHideToolbar, onUnlink: unlink, onOpenLink: function () { } }));
74
- };
75
- return EditLinkHrefToolbar;
76
- }(React.PureComponent));
77
- export { EditLinkHrefToolbar };
78
- export var EditLinkHrefToolbarWithIntl = injectIntl(EditLinkHrefToolbar);
79
- var InsertLinkToolbar = /** @class */ (function (_super) {
80
- tslib_1.__extends(InsertLinkToolbar, _super);
81
- function InsertLinkToolbar() {
82
- return _super !== null && _super.apply(this, arguments) || this;
83
- }
84
- InsertLinkToolbar.prototype.render = function () {
85
- var _a = this.props, from = _a.from, to = _a.to, view = _a.view, popupsMountPoint = _a.popupsMountPoint, popupsBoundariesElement = _a.popupsBoundariesElement, formatMessage = _a.intl.formatMessage;
86
- var hideToolbar = function () {
87
- return hideLinkToolbar()(view.state, view.dispatch) && view.focus();
88
- };
89
- var addLink = function (href) {
90
- return insertLink(from, to, href)(view.state, view.dispatch) && view.focus();
91
- };
92
- return (React.createElement(HyperlinkEdit, { target: findDomRefAtPos(from, view.domAtPos.bind(view)), popupsMountPoint: popupsMountPoint, popupsBoundariesElement: popupsBoundariesElement, autoFocus: true, placeholder: formatMessage(messages.linkPlaceholder), onSubmit: addLink, onBlur: hideToolbar }));
93
- };
94
- return InsertLinkToolbar;
95
- }(React.PureComponent));
96
- export { InsertLinkToolbar };
97
- export var InsertLinkToolbarWithIntl = injectIntl(InsertLinkToolbar);
98
- var ActivityPoweredInsertLinkToolbar = /** @class */ (function (_super) {
99
- tslib_1.__extends(ActivityPoweredInsertLinkToolbar, _super);
100
- function ActivityPoweredInsertLinkToolbar() {
101
- return _super !== null && _super.apply(this, arguments) || this;
102
- }
103
- ActivityPoweredInsertLinkToolbar.prototype.render = function () {
104
- var _a = this.props, from = _a.from, to = _a.to, view = _a.view, popupsMountPoint = _a.popupsMountPoint, popupsBoundariesElement = _a.popupsBoundariesElement, activityProvider = _a.activityProvider, formatMessage = _a.intl.formatMessage;
105
- var hideToolbar = function () {
106
- return hideLinkToolbar()(view.state, view.dispatch) && view.focus();
107
- };
108
- var addLink = function (href, text) {
109
- return insertLink(from, to, href, text)(view.state, view.dispatch) &&
110
- view.focus();
111
- };
112
- return (React.createElement(RecentSearch, { target: findDomRefAtPos(from, view.domAtPos.bind(view)), popupsMountPoint: popupsMountPoint, popupsBoundariesElement: popupsBoundariesElement, autoFocus: true, activityProvider: activityProvider, placeholder: formatMessage(messages.linkPlaceholderWithSearch), onSubmit: addLink, onBlur: hideToolbar }));
113
- };
114
- return ActivityPoweredInsertLinkToolbar;
115
- }(React.PureComponent));
116
- export { ActivityPoweredInsertLinkToolbar };
117
- export var ActivityPoweredInsertLinkToolbarWithIntl = injectIntl(ActivityPoweredInsertLinkToolbar);
118
- export default function HyperlinkToolbar(props) {
119
- var hyperlinkState = props.hyperlinkState, view = props.view, popupsMountPoint = props.popupsMountPoint, popupsBoundariesElement = props.popupsBoundariesElement, activityProvider = props.activityProvider;
120
- if (hyperlinkState && hyperlinkState.activeLinkMark) {
121
- if (hyperlinkState.activeLinkMark.type === InsertStatus.EDIT_LINK_TOOLBAR) {
122
- var _a = hyperlinkState.activeLinkMark, node = _a.node, pos = _a.pos;
123
- var mark = view.state.schema.marks.link.isInSet(node.marks);
124
- var isLinkTextTheSameAsTheLinkUrl = mark.attrs.href === normalizeUrl(node.text);
125
- var Toolbar = isLinkTextTheSameAsTheLinkUrl
126
- ? AddDisplayTextToolbarWithIntl
127
- : EditLinkHrefToolbarWithIntl;
128
- return (React.createElement(Toolbar, { pos: pos, node: node, view: view, popupsMountPoint: popupsMountPoint, popupsBoundariesElement: popupsBoundariesElement }));
129
- }
130
- else if (hyperlinkState.activeLinkMark.type === InsertStatus.INSERT_LINK_TOOLBAR) {
131
- var _b = hyperlinkState.activeLinkMark, from = _b.from, to = _b.to;
132
- if (activityProvider) {
133
- return (React.createElement(ActivityPoweredInsertLinkToolbarWithIntl, { from: from, to: to, view: view, popupsMountPoint: popupsMountPoint, popupsBoundariesElement: popupsBoundariesElement, activityProvider: activityProvider }));
134
- }
135
- else {
136
- return (React.createElement(InsertLinkToolbarWithIntl, { from: from, to: to, view: view, popupsMountPoint: popupsMountPoint, popupsBoundariesElement: popupsBoundariesElement }));
137
- }
138
- }
139
- }
140
- return null;
141
- }
142
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/hyperlink/ui/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAqB,MAAM,YAAY,CAAC;AAG3E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EACL,WAAW,EACX,UAAU,EACV,eAAe,EACf,WAAW,EACX,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,YAAY,EAAkB,MAAM,oBAAoB,CAAC;AAElE,MAAM,CAAC,IAAM,QAAQ,GAAG,cAAc,CAAC;IACrC,eAAe,EAAE;QACf,EAAE,EAAE,+BAA+B;QACnC,cAAc,EAAE,YAAY;QAC5B,WAAW,EAAE,qCAAqC;KACnD;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,mCAAmC;QACvC,cAAc,EAAE,iBAAiB;QACjC,WAAW,EACT,yEAAyE;KAC5E;IACD,yBAAyB,EAAE;QACzB,EAAE,EAAE,yCAAyC;QAC7C,cAAc,EAAE,sCAAsC;QACtD,WAAW,EACT,gFAAgF;KACnF;CACF,CAAC,CAAC;AAUH;IAA2C,iDAE1C;IAFD;;IAqCA,CAAC;IAlCC,sCAAM,GAA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,IACxB,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,gBAAgB,EAAE,gBAAgB,EAClC,uBAAuB,EAAE,uBAAuB,GAChD,CACH,CAAC;aACH;SACF;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,118 +0,0 @@
1
- import { Dispatch } from '../../event-dispatcher';
2
- declare type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
3
- action: Action;
4
- actionSubject: ActionSubject;
5
- actionSubjectId?: ActionSubjectID;
6
- attributes?: Attributes;
7
- eventType: EventType;
8
- };
9
- declare type UIAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, 'ui'>;
10
- declare type TrackAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, 'track'>;
11
- declare type ButtonAEP<ActionSubjectID, Attributes> = UIAEP<'clicked', 'button', ActionSubjectID, Attributes>;
12
- declare type PickerAEP<ActionSubjectID, Attributes> = UIAEP<'opened', 'picker', ActionSubjectID, Attributes>;
13
- declare type TypeAheadAEP<ActionSubjectID, Attributes> = UIAEP<'invoked', 'typeAhead', ActionSubjectID, Attributes>;
14
- declare type EditorStartAEP = UIAEP<'started', 'editor', undefined, {
15
- platform: 'mobileNative' | 'mobileHybrid' | 'web';
16
- }>;
17
- declare type EditorStopAEP = UIAEP<'stopped', 'editor', 'save' | 'cancel', {
18
- inputMethod: 'toolbar' | 'shortcut';
19
- documentSize: number;
20
- nodeCount?: {
21
- tables: number;
22
- headings: number;
23
- lists: number;
24
- mediaSingles: number;
25
- mediaGroups: number;
26
- panels: number;
27
- extensions: number;
28
- decisions: number;
29
- actions: number;
30
- codeBlocks: number;
31
- };
32
- }>;
33
- declare type ButtonHelpAEP = ButtonAEP<'helpButton', {
34
- inputMethod: 'shortcut' | 'toolbar';
35
- }>;
36
- declare type ButtonFeedbackAEP = ButtonAEP<'feedbackButton', undefined>;
37
- declare type PickerEmojiAEP = PickerAEP<'emojiPicker', {
38
- inputMethod: 'toolbar';
39
- }>;
40
- declare type PickerImageAEP = PickerAEP<'cloudPicker', {
41
- inputMethod: 'toolbar' | 'quickInsert';
42
- }>;
43
- declare type TypeAheadQuickInsertAEP = TypeAheadAEP<'quickInsertTypeAhead', {
44
- inputMethod: 'keyboard';
45
- }>;
46
- declare type TypeAheadEmojiAEP = TypeAheadAEP<'emojiTypeAhead', {
47
- inputMethod: 'quickInsert' | 'keyboard';
48
- }>;
49
- declare type TypeAheadLinkAEP = TypeAheadAEP<'linkTypeAhead', {
50
- inputMethod: 'toolbar' | 'quickInsert' | 'shortcut';
51
- }>;
52
- declare type TypeAheadMentionAEP = TypeAheadAEP<'mentionTypeAhead', {
53
- inputMethod: 'toolbar' | 'quickInsert' | 'keyboard';
54
- }>;
55
- declare type UIEventPayload = EditorStartAEP | EditorStopAEP | ButtonHelpAEP | ButtonFeedbackAEP | PickerEmojiAEP | PickerImageAEP | TypeAheadQuickInsertAEP | TypeAheadEmojiAEP | TypeAheadLinkAEP | TypeAheadMentionAEP;
56
- /** Text input and formatting events */
57
- declare type FormatAEP<ActionSubjectID, Attributes> = TrackAEP<'formatted', 'text', ActionSubjectID, Attributes>;
58
- declare type SubstituteAEP<ActionSubjectID, Attributes> = TrackAEP<'autoSubstituted', 'text', ActionSubjectID, Attributes>;
59
- declare type FormatBasicAEP = FormatAEP<'strong' | 'italic' | 'underline' | 'code' | 'strike', {
60
- inputMethod: 'toolbar' | 'shortcut' | 'autoformatting' | 'floatingToolbar';
61
- }>;
62
- declare type FormatSuperSubAEP = FormatAEP<'superscript' | 'subscript', {
63
- inputMethod: 'toolbar';
64
- }>;
65
- declare type FormatIndentationAEP = FormatAEP<'indentation', {
66
- inputMethod: 'toolbar' | 'keyboard';
67
- direction: 'indent' | 'outdent';
68
- previousIndentationLevel: number;
69
- newIndentLevel: number;
70
- indentType: 'paragraph' | 'list' | 'heading' | 'codeBlock';
71
- }>;
72
- declare type FormatHeadingAEP = FormatAEP<'heading', {
73
- inputMethod: 'toolbar' | 'shortcut' | 'autoformatting';
74
- newHeadlineLevel: 0 | 1 | 2 | 3 | 4 | 5 | 6;
75
- }>;
76
- declare type FormatBlockQuoteAEP = FormatAEP<'blockQuote', {
77
- inputMethod: 'toolbar' | 'keyboard' | 'autoformatting' | 'quickInsert';
78
- }>;
79
- declare type FormatClearAEP = FormatAEP<'clearFormatting', {
80
- inputMethod: 'toolbar' | 'shortcut';
81
- formattingCleared: string[];
82
- }>;
83
- declare type FormatColorAEP = FormatAEP<'color', {
84
- newColor: string;
85
- previousColor: string;
86
- }>;
87
- declare type FormatListAEP = FormatAEP<'numberedList' | 'bulletedList', {
88
- inputMethod: 'toolbar' | 'keyboard' | 'autoformatting' | 'quickInsert';
89
- }>;
90
- declare type SubstituteProductAEP = SubstituteAEP<'productName', {
91
- product: string;
92
- originalSpelling: string;
93
- }>;
94
- declare type SubstituteSymbolAEP = SubstituteAEP<'symbol', {
95
- symbol: 'rightArrow' | 'leftArrow';
96
- }>;
97
- declare type SubstitutePuncAEP = SubstituteAEP<'punctuation', {
98
- punctuation: 'emDash' | 'ellipsis' | 'singleQuote' | 'doubleQuote';
99
- }>;
100
- declare type FormatSubstitutionEventPayload = FormatBasicAEP | FormatSuperSubAEP | FormatIndentationAEP | FormatHeadingAEP | FormatBlockQuoteAEP | FormatClearAEP | FormatColorAEP | FormatListAEP | SubstituteProductAEP | SubstituteSymbolAEP | SubstitutePuncAEP;
101
- /** Insertion events */
102
- declare type InsertAEP<ActionSubjectID, Attributes> = TrackAEP<'inserted', 'document', ActionSubjectID, Attributes>;
103
- declare type InsertDividerAEP = InsertAEP<'divider', {
104
- inputMethod: 'quickInsert' | 'toolbar' | 'autoformatting';
105
- }>;
106
- declare type InsertPanelAEP = InsertAEP<'panel', {
107
- inputMethod: 'quickInsert' | 'toolbar';
108
- }>;
109
- declare type InsertCodeBlockAEP = InsertAEP<'codeBlock', {
110
- inputMethod: 'quickInsert' | 'toolbar' | 'autoformatting' | 'insertMenu';
111
- }>;
112
- declare type InsertEventPayload = InsertDividerAEP | InsertPanelAEP | InsertCodeBlockAEP;
113
- export declare type AnalyticsEventPayload = UIEventPayload | FormatSubstitutionEventPayload | InsertEventPayload;
114
- export declare type AnalyticsDispatch = Dispatch<{
115
- payload: AnalyticsEventPayload;
116
- channel?: string;
117
- }>;
118
- export {};
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/plugins/analytics/types.ts"],"names":[],"mappings":""}