@atlaskit/editor-core 187.31.7 → 187.32.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 (210) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/cjs/create-editor/ReactEditorViewInternal.js +1 -1
  3. package/dist/cjs/plugins/analytics/plugin.js +14 -12
  4. package/dist/cjs/plugins/annotation/index.js +15 -13
  5. package/dist/cjs/plugins/avatar-group/index.js +16 -14
  6. package/dist/cjs/plugins/base/plugin.js +12 -10
  7. package/dist/cjs/plugins/before-primaryToolbar/index.js +3 -2
  8. package/dist/cjs/plugins/block-type/index.js +32 -30
  9. package/dist/cjs/plugins/breakout/index.js +10 -8
  10. package/dist/cjs/plugins/caption/index.js +7 -6
  11. package/dist/cjs/plugins/caption/pm-plugins/main.js +2 -2
  12. package/dist/cjs/plugins/code-bidi-warning/index.js +2 -4
  13. package/dist/cjs/plugins/code-block/index.js +14 -11
  14. package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +2 -2
  15. package/dist/cjs/plugins/collab-edit/index.js +16 -14
  16. package/dist/cjs/plugins/collab-edit/plugin.js +5 -5
  17. package/dist/cjs/plugins/date/index.js +18 -17
  18. package/dist/cjs/plugins/emoji/index.js +35 -33
  19. package/dist/cjs/plugins/expand/index.js +14 -13
  20. package/dist/cjs/plugins/extension/index.js +16 -15
  21. package/dist/cjs/plugins/extension/pm-plugins/main.js +4 -4
  22. package/dist/cjs/plugins/feedback-dialog/index.js +5 -4
  23. package/dist/cjs/plugins/find-replace/index.js +17 -15
  24. package/dist/cjs/plugins/floating-toolbar/index.js +31 -30
  25. package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +29 -24
  26. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +5 -5
  27. package/dist/cjs/plugins/help-dialog/index.js +18 -17
  28. package/dist/cjs/plugins/insert-block/index.js +52 -51
  29. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  30. package/dist/cjs/plugins/layout/index.js +15 -14
  31. package/dist/cjs/plugins/max-content-size/index.js +4 -3
  32. package/dist/cjs/plugins/media/index.js +49 -47
  33. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  34. package/dist/cjs/plugins/media/pm-plugins/main.js +7 -7
  35. package/dist/cjs/plugins/media/toolbar/index.js +29 -24
  36. package/dist/cjs/plugins/media/toolbar/linking.js +4 -4
  37. package/dist/cjs/plugins/media/toolbar/utils.js +22 -2
  38. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  39. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  40. package/dist/cjs/plugins/media/utils/media-single.js +19 -4
  41. package/dist/cjs/plugins/mentions/index.js +17 -15
  42. package/dist/cjs/plugins/panel/index.js +13 -12
  43. package/dist/cjs/plugins/paste/index.js +13 -10
  44. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +8 -8
  45. package/dist/cjs/plugins/paste/pm-plugins/main.js +10 -10
  46. package/dist/cjs/plugins/placeholder/index.js +9 -7
  47. package/dist/cjs/plugins/placeholder-text/index.js +23 -16
  48. package/dist/cjs/plugins/quick-insert/index.js +13 -12
  49. package/dist/cjs/plugins/rule/index.js +8 -7
  50. package/dist/cjs/plugins/save-on-enter/index.js +4 -3
  51. package/dist/cjs/plugins/selection/index.js +5 -4
  52. package/dist/cjs/plugins/status/index.js +20 -14
  53. package/dist/cjs/plugins/submit-editor/index.js +4 -3
  54. package/dist/cjs/plugins/tasks-and-decisions/index.js +6 -5
  55. package/dist/cjs/plugins/text-color/index.js +17 -15
  56. package/dist/cjs/plugins/toolbar-lists-indentation/index.js +31 -26
  57. package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  58. package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  59. package/dist/cjs/plugins/type-ahead/index.js +21 -20
  60. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +11 -11
  61. package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
  62. package/dist/cjs/use-preset.js +2 -2
  63. package/dist/cjs/version-wrapper.js +1 -1
  64. package/dist/es2019/create-editor/ReactEditorViewInternal.js +1 -1
  65. package/dist/es2019/plugins/analytics/plugin.js +11 -8
  66. package/dist/es2019/plugins/annotation/index.js +4 -1
  67. package/dist/es2019/plugins/avatar-group/index.js +8 -5
  68. package/dist/es2019/plugins/base/plugin.js +6 -3
  69. package/dist/es2019/plugins/before-primaryToolbar/index.js +4 -2
  70. package/dist/es2019/plugins/block-type/index.js +14 -11
  71. package/dist/es2019/plugins/breakout/index.js +6 -3
  72. package/dist/es2019/plugins/caption/index.js +3 -1
  73. package/dist/es2019/plugins/caption/pm-plugins/main.js +2 -2
  74. package/dist/es2019/plugins/code-bidi-warning/index.js +2 -4
  75. package/dist/es2019/plugins/code-block/index.js +15 -9
  76. package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +2 -2
  77. package/dist/es2019/plugins/collab-edit/index.js +9 -6
  78. package/dist/es2019/plugins/collab-edit/plugin.js +5 -5
  79. package/dist/es2019/plugins/date/index.js +6 -3
  80. package/dist/es2019/plugins/emoji/index.js +16 -13
  81. package/dist/es2019/plugins/expand/index.js +7 -4
  82. package/dist/es2019/plugins/extension/index.js +11 -8
  83. package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
  84. package/dist/es2019/plugins/feedback-dialog/index.js +4 -2
  85. package/dist/es2019/plugins/find-replace/index.js +8 -5
  86. package/dist/es2019/plugins/floating-toolbar/index.js +6 -4
  87. package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +9 -4
  88. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +4 -4
  89. package/dist/es2019/plugins/help-dialog/index.js +9 -6
  90. package/dist/es2019/plugins/insert-block/index.js +12 -9
  91. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  92. package/dist/es2019/plugins/layout/index.js +8 -5
  93. package/dist/es2019/plugins/max-content-size/index.js +3 -1
  94. package/dist/es2019/plugins/media/index.js +14 -10
  95. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
  96. package/dist/es2019/plugins/media/pm-plugins/main.js +7 -7
  97. package/dist/es2019/plugins/media/toolbar/index.js +29 -25
  98. package/dist/es2019/plugins/media/toolbar/linking.js +4 -4
  99. package/dist/es2019/plugins/media/toolbar/utils.js +18 -0
  100. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  101. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  102. package/dist/es2019/plugins/media/utils/media-single.js +22 -4
  103. package/dist/es2019/plugins/mentions/index.js +9 -6
  104. package/dist/es2019/plugins/panel/index.js +5 -2
  105. package/dist/es2019/plugins/paste/index.js +9 -5
  106. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +8 -8
  107. package/dist/es2019/plugins/paste/pm-plugins/main.js +10 -10
  108. package/dist/es2019/plugins/placeholder/index.js +10 -7
  109. package/dist/es2019/plugins/placeholder-text/index.js +12 -4
  110. package/dist/es2019/plugins/quick-insert/index.js +3 -1
  111. package/dist/es2019/plugins/rule/index.js +5 -3
  112. package/dist/es2019/plugins/save-on-enter/index.js +3 -1
  113. package/dist/es2019/plugins/selection/index.js +3 -1
  114. package/dist/es2019/plugins/status/index.js +11 -3
  115. package/dist/es2019/plugins/submit-editor/index.js +3 -1
  116. package/dist/es2019/plugins/tasks-and-decisions/index.js +6 -4
  117. package/dist/es2019/plugins/text-color/index.js +6 -3
  118. package/dist/es2019/plugins/toolbar-lists-indentation/index.js +9 -5
  119. package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  120. package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  121. package/dist/es2019/plugins/type-ahead/index.js +3 -1
  122. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +11 -11
  123. package/dist/es2019/ui/ToolbarFeedback/index.js +1 -1
  124. package/dist/es2019/use-preset.js +2 -2
  125. package/dist/es2019/version-wrapper.js +1 -1
  126. package/dist/esm/create-editor/ReactEditorViewInternal.js +1 -1
  127. package/dist/esm/plugins/analytics/plugin.js +14 -12
  128. package/dist/esm/plugins/annotation/index.js +15 -13
  129. package/dist/esm/plugins/avatar-group/index.js +16 -14
  130. package/dist/esm/plugins/base/plugin.js +12 -10
  131. package/dist/esm/plugins/before-primaryToolbar/index.js +3 -2
  132. package/dist/esm/plugins/block-type/index.js +32 -30
  133. package/dist/esm/plugins/breakout/index.js +10 -8
  134. package/dist/esm/plugins/caption/index.js +7 -6
  135. package/dist/esm/plugins/caption/pm-plugins/main.js +2 -2
  136. package/dist/esm/plugins/code-bidi-warning/index.js +2 -4
  137. package/dist/esm/plugins/code-block/index.js +14 -11
  138. package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +2 -2
  139. package/dist/esm/plugins/collab-edit/index.js +16 -14
  140. package/dist/esm/plugins/collab-edit/plugin.js +5 -5
  141. package/dist/esm/plugins/date/index.js +18 -17
  142. package/dist/esm/plugins/emoji/index.js +35 -33
  143. package/dist/esm/plugins/expand/index.js +14 -13
  144. package/dist/esm/plugins/extension/index.js +16 -15
  145. package/dist/esm/plugins/extension/pm-plugins/main.js +4 -4
  146. package/dist/esm/plugins/feedback-dialog/index.js +5 -4
  147. package/dist/esm/plugins/find-replace/index.js +17 -15
  148. package/dist/esm/plugins/floating-toolbar/index.js +31 -30
  149. package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +28 -23
  150. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +4 -4
  151. package/dist/esm/plugins/help-dialog/index.js +18 -17
  152. package/dist/esm/plugins/insert-block/index.js +52 -51
  153. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  154. package/dist/esm/plugins/layout/index.js +15 -14
  155. package/dist/esm/plugins/max-content-size/index.js +4 -3
  156. package/dist/esm/plugins/media/index.js +49 -47
  157. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
  158. package/dist/esm/plugins/media/pm-plugins/main.js +7 -7
  159. package/dist/esm/plugins/media/toolbar/index.js +30 -25
  160. package/dist/esm/plugins/media/toolbar/linking.js +4 -4
  161. package/dist/esm/plugins/media/toolbar/utils.js +19 -0
  162. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  163. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  164. package/dist/esm/plugins/media/utils/media-single.js +19 -4
  165. package/dist/esm/plugins/mentions/index.js +17 -15
  166. package/dist/esm/plugins/panel/index.js +13 -12
  167. package/dist/esm/plugins/paste/index.js +13 -10
  168. package/dist/esm/plugins/paste/pm-plugins/analytics.js +8 -8
  169. package/dist/esm/plugins/paste/pm-plugins/main.js +10 -10
  170. package/dist/esm/plugins/placeholder/index.js +9 -7
  171. package/dist/esm/plugins/placeholder-text/index.js +23 -16
  172. package/dist/esm/plugins/quick-insert/index.js +13 -12
  173. package/dist/esm/plugins/rule/index.js +8 -7
  174. package/dist/esm/plugins/save-on-enter/index.js +4 -3
  175. package/dist/esm/plugins/selection/index.js +5 -4
  176. package/dist/esm/plugins/status/index.js +20 -14
  177. package/dist/esm/plugins/submit-editor/index.js +4 -3
  178. package/dist/esm/plugins/tasks-and-decisions/index.js +6 -5
  179. package/dist/esm/plugins/text-color/index.js +17 -15
  180. package/dist/esm/plugins/toolbar-lists-indentation/index.js +31 -26
  181. package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  182. package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  183. package/dist/esm/plugins/type-ahead/index.js +21 -20
  184. package/dist/esm/ui/ElementBrowser/InsertMenu.js +11 -11
  185. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  186. package/dist/esm/use-preset.js +2 -2
  187. package/dist/esm/version-wrapper.js +1 -1
  188. package/dist/types/labs/next/presets/default.d.ts +62 -618
  189. package/dist/types/plugins/avatar-group/index.d.ts +1 -1
  190. package/dist/types/plugins/before-primaryToolbar/index.d.ts +1 -1
  191. package/dist/types/plugins/caption/index.d.ts +1 -1
  192. package/dist/types/plugins/floating-toolbar/ui/ScrollButtons.d.ts +3 -3
  193. package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -2
  194. package/dist/types/plugins/media/toolbar/utils.d.ts +2 -1
  195. package/dist/types/plugins/media/types.d.ts +1 -0
  196. package/dist/types/plugins/selection/index.d.ts +2 -2
  197. package/dist/types/plugins/text-color/index.d.ts +3 -2
  198. package/dist/types/use-preset.d.ts +2 -2
  199. package/dist/types-ts4.5/labs/next/presets/default.d.ts +96 -716
  200. package/dist/types-ts4.5/plugins/avatar-group/index.d.ts +1 -1
  201. package/dist/types-ts4.5/plugins/before-primaryToolbar/index.d.ts +1 -1
  202. package/dist/types-ts4.5/plugins/caption/index.d.ts +1 -1
  203. package/dist/types-ts4.5/plugins/floating-toolbar/ui/ScrollButtons.d.ts +3 -3
  204. package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +1 -2
  205. package/dist/types-ts4.5/plugins/media/toolbar/utils.d.ts +2 -1
  206. package/dist/types-ts4.5/plugins/media/types.d.ts +1 -0
  207. package/dist/types-ts4.5/plugins/selection/index.d.ts +2 -2
  208. package/dist/types-ts4.5/plugins/text-color/index.d.ts +3 -2
  209. package/dist/types-ts4.5/use-preset.d.ts +2 -2
  210. package/package.json +3 -3
@@ -17,7 +17,8 @@ var _keymap = require("./keymap");
17
17
  var _plugin = _interopRequireDefault(require("./plugin"));
18
18
  var _pluginKey = require("./plugin-key");
19
19
  var _statusPicker = _interopRequireDefault(require("./ui/statusPicker"));
20
- var baseStatusPlugin = function baseStatusPlugin(options) {
20
+ var baseStatusPlugin = function baseStatusPlugin(_ref) {
21
+ var options = _ref.config;
21
22
  return {
22
23
  name: 'status',
23
24
  nodes: function nodes() {
@@ -37,19 +38,19 @@ var baseStatusPlugin = function baseStatusPlugin(options) {
37
38
  plugin: _keymap.keymapPlugin
38
39
  }];
39
40
  },
40
- contentComponent: function contentComponent(_ref) {
41
- var editorView = _ref.editorView,
42
- popupsMountPoint = _ref.popupsMountPoint,
43
- popupsBoundariesElement = _ref.popupsBoundariesElement,
44
- popupsScrollableElement = _ref.popupsScrollableElement;
41
+ contentComponent: function contentComponent(_ref2) {
42
+ var editorView = _ref2.editorView,
43
+ popupsMountPoint = _ref2.popupsMountPoint,
44
+ popupsBoundariesElement = _ref2.popupsBoundariesElement,
45
+ popupsScrollableElement = _ref2.popupsScrollableElement;
45
46
  var domAtPos = editorView.domAtPos.bind(editorView);
46
47
  return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
47
48
  plugins: {
48
49
  statusState: _pluginKey.pluginKey
49
50
  },
50
- render: function render(_ref2) {
51
- var _ref2$statusState = _ref2.statusState,
52
- statusState = _ref2$statusState === void 0 ? {} : _ref2$statusState;
51
+ render: function render(_ref3) {
52
+ var _ref3$statusState = _ref3.statusState,
53
+ statusState = _ref3$statusState === void 0 ? {} : _ref3$statusState;
53
54
  var showStatusPickerAt = statusState.showStatusPickerAt;
54
55
  if (typeof showStatusPickerAt !== 'number') {
55
56
  return null;
@@ -91,12 +92,12 @@ var baseStatusPlugin = function baseStatusPlugin(options) {
91
92
  };
92
93
  };
93
94
  var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, options) {
94
- if (options.menuDisabled === true) {
95
+ if ((options === null || options === void 0 ? void 0 : options.menuDisabled) === true) {
95
96
  return plugin;
96
97
  }
97
98
  plugin.pluginsOptions = {
98
- quickInsert: function quickInsert(_ref3) {
99
- var formatMessage = _ref3.formatMessage;
99
+ quickInsert: function quickInsert(_ref4) {
100
+ var formatMessage = _ref4.formatMessage;
100
101
  return [{
101
102
  id: 'status',
102
103
  title: formatMessage(_messages.messages.status),
@@ -122,8 +123,13 @@ var decorateWithPluginOptions = function decorateWithPluginOptions(plugin, optio
122
123
  };
123
124
  return plugin;
124
125
  };
125
- var statusPlugin = function statusPlugin(options, api) {
126
- return decorateWithPluginOptions(baseStatusPlugin(options, api), options);
126
+ var statusPlugin = function statusPlugin(_ref5) {
127
+ var options = _ref5.config,
128
+ api = _ref5.api;
129
+ return decorateWithPluginOptions(baseStatusPlugin({
130
+ config: options,
131
+ api: api
132
+ }), options);
127
133
  };
128
134
  var _default = statusPlugin;
129
135
  exports.default = _default;
@@ -45,14 +45,15 @@ var analyticsPayload = function analyticsPayload(state) {
45
45
  }
46
46
  };
47
47
  };
48
- var submitEditorPlugin = function submitEditorPlugin(onSave) {
48
+ var submitEditorPlugin = function submitEditorPlugin(_ref) {
49
+ var onSave = _ref.config;
49
50
  return {
50
51
  name: 'submitEditor',
51
52
  pmPlugins: function pmPlugins() {
52
53
  return [{
53
54
  name: 'submitEditor',
54
- plugin: function plugin(_ref) {
55
- var dispatch = _ref.dispatch;
55
+ plugin: function plugin(_ref2) {
56
+ var dispatch = _ref2.dispatch;
56
57
  return createPlugin(dispatch, onSave);
57
58
  }
58
59
  }];
@@ -34,11 +34,12 @@ var addItem = function addItem(insert, listType, schema) {
34
34
  })));
35
35
  };
36
36
  };
37
- var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin() {
38
- var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
39
- allowNestedTasks = _ref2.allowNestedTasks,
40
- consumeTabs = _ref2.consumeTabs,
41
- useLongPressSelection = _ref2.useLongPressSelection;
37
+ var tasksAndDecisionsPlugin = function tasksAndDecisionsPlugin(_ref2) {
38
+ var _ref2$config = _ref2.config,
39
+ _ref2$config2 = _ref2$config === void 0 ? {} : _ref2$config,
40
+ allowNestedTasks = _ref2$config2.allowNestedTasks,
41
+ consumeTabs = _ref2$config2.consumeTabs,
42
+ useLongPressSelection = _ref2$config2.useLongPressSelection;
42
43
  return {
43
44
  name: 'taskDecision',
44
45
  nodes: function nodes() {
@@ -22,9 +22,11 @@ var pluginConfig = function pluginConfig(textColorConfig) {
22
22
  }
23
23
  return textColorConfig;
24
24
  };
25
- var textColorPlugin = function textColorPlugin(textColorConfig, api) {
26
- var _api$dependencies, _api$dependencies$fea;
27
- var featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
25
+ var textColorPlugin = function textColorPlugin(_ref) {
26
+ var _api$featureFlags;
27
+ var textColorConfig = _ref.config,
28
+ api = _ref.api;
29
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
28
30
  return {
29
31
  name: 'textColor',
30
32
  marks: function marks() {
@@ -36,26 +38,26 @@ var textColorPlugin = function textColorPlugin(textColorConfig, api) {
36
38
  pmPlugins: function pmPlugins() {
37
39
  return [{
38
40
  name: 'textColor',
39
- plugin: function plugin(_ref) {
40
- var dispatch = _ref.dispatch;
41
+ plugin: function plugin(_ref2) {
42
+ var dispatch = _ref2.dispatch;
41
43
  return (0, _main.createPlugin)(dispatch, pluginConfig(textColorConfig));
42
44
  }
43
45
  }];
44
46
  },
45
- primaryToolbarComponent: function primaryToolbarComponent(_ref2) {
46
- var editorView = _ref2.editorView,
47
- popupsMountPoint = _ref2.popupsMountPoint,
48
- popupsBoundariesElement = _ref2.popupsBoundariesElement,
49
- popupsScrollableElement = _ref2.popupsScrollableElement,
50
- isToolbarReducedSpacing = _ref2.isToolbarReducedSpacing,
51
- dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
52
- disabled = _ref2.disabled;
47
+ primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
48
+ var editorView = _ref3.editorView,
49
+ popupsMountPoint = _ref3.popupsMountPoint,
50
+ popupsBoundariesElement = _ref3.popupsBoundariesElement,
51
+ popupsScrollableElement = _ref3.popupsScrollableElement,
52
+ isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing,
53
+ dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent,
54
+ disabled = _ref3.disabled;
53
55
  return /*#__PURE__*/_react.default.createElement(_WithPluginState.default, {
54
56
  plugins: {
55
57
  textColor: _main.pluginKey
56
58
  },
57
- render: function render(_ref3) {
58
- var textColor = _ref3.textColor;
59
+ render: function render(_ref4) {
60
+ var textColor = _ref4.textColor;
59
61
  return /*#__PURE__*/_react.default.createElement(_ToolbarTextColor.default, {
60
62
  pluginState: textColor,
61
63
  isReducedSpacing: isToolbarReducedSpacing,
@@ -10,11 +10,16 @@ var _hooks = require("@atlaskit/editor-common/hooks");
10
10
  var _ui = _interopRequireDefault(require("./ui"));
11
11
  var _types = require("../../ui/Toolbar/types");
12
12
  var _indentationButtons = require("./pm-plugins/indentation-buttons");
13
- var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref, api) {
14
- var _api$dependencies$fea;
15
- var showIndentationButtons = _ref.showIndentationButtons,
16
- allowHeadingAndParagraphIndentation = _ref.allowHeadingAndParagraphIndentation;
17
- var featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies$fea = api.dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
13
+ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref) {
14
+ var _api$featureFlags;
15
+ var config = _ref.config,
16
+ api = _ref.api;
17
+ var _ref2 = config !== null && config !== void 0 ? config : {},
18
+ _ref2$showIndentation = _ref2.showIndentationButtons,
19
+ showIndentationButtons = _ref2$showIndentation === void 0 ? false : _ref2$showIndentation,
20
+ _ref2$allowHeadingAnd = _ref2.allowHeadingAndParagraphIndentation,
21
+ allowHeadingAndParagraphIndentation = _ref2$allowHeadingAnd === void 0 ? false : _ref2$allowHeadingAnd;
22
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
18
23
  return {
19
24
  name: 'toolbarListsIndentation',
20
25
  getSharedState: function getSharedState(editorState) {
@@ -26,8 +31,8 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref,
26
31
  pmPlugins: function pmPlugins() {
27
32
  return [{
28
33
  name: 'indentationButtons',
29
- plugin: function plugin(_ref2) {
30
- var dispatch = _ref2.dispatch;
34
+ plugin: function plugin(_ref3) {
35
+ var dispatch = _ref3.dispatch;
31
36
  return (0, _indentationButtons.createPlugin)({
32
37
  dispatch: dispatch,
33
38
  showIndentationButtons: showIndentationButtons,
@@ -37,14 +42,14 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref,
37
42
  }
38
43
  }];
39
44
  },
40
- primaryToolbarComponent: function primaryToolbarComponent(_ref3) {
41
- var editorView = _ref3.editorView,
42
- popupsMountPoint = _ref3.popupsMountPoint,
43
- popupsBoundariesElement = _ref3.popupsBoundariesElement,
44
- popupsScrollableElement = _ref3.popupsScrollableElement,
45
- toolbarSize = _ref3.toolbarSize,
46
- disabled = _ref3.disabled,
47
- isToolbarReducedSpacing = _ref3.isToolbarReducedSpacing;
45
+ primaryToolbarComponent: function primaryToolbarComponent(_ref4) {
46
+ var editorView = _ref4.editorView,
47
+ popupsMountPoint = _ref4.popupsMountPoint,
48
+ popupsBoundariesElement = _ref4.popupsBoundariesElement,
49
+ popupsScrollableElement = _ref4.popupsScrollableElement,
50
+ toolbarSize = _ref4.toolbarSize,
51
+ disabled = _ref4.disabled,
52
+ isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing;
48
53
  var isSmall = toolbarSize < _types.ToolbarSize.L;
49
54
  return /*#__PURE__*/_react.default.createElement(PrimaryToolbarComponent, {
50
55
  featureFlags: featureFlags,
@@ -61,17 +66,17 @@ var toolbarListsIndentationPlugin = function toolbarListsIndentationPlugin(_ref,
61
66
  }
62
67
  };
63
68
  };
64
- function PrimaryToolbarComponent(_ref4) {
65
- var featureFlags = _ref4.featureFlags,
66
- popupsMountPoint = _ref4.popupsMountPoint,
67
- popupsBoundariesElement = _ref4.popupsBoundariesElement,
68
- popupsScrollableElement = _ref4.popupsScrollableElement,
69
- isSmall = _ref4.isSmall,
70
- isToolbarReducedSpacing = _ref4.isToolbarReducedSpacing,
71
- disabled = _ref4.disabled,
72
- editorView = _ref4.editorView,
73
- showIndentationButtons = _ref4.showIndentationButtons,
74
- pluginInjectionApi = _ref4.pluginInjectionApi;
69
+ function PrimaryToolbarComponent(_ref5) {
70
+ var featureFlags = _ref5.featureFlags,
71
+ popupsMountPoint = _ref5.popupsMountPoint,
72
+ popupsBoundariesElement = _ref5.popupsBoundariesElement,
73
+ popupsScrollableElement = _ref5.popupsScrollableElement,
74
+ isSmall = _ref5.isSmall,
75
+ isToolbarReducedSpacing = _ref5.isToolbarReducedSpacing,
76
+ disabled = _ref5.disabled,
77
+ editorView = _ref5.editorView,
78
+ showIndentationButtons = _ref5.showIndentationButtons,
79
+ pluginInjectionApi = _ref5.pluginInjectionApi;
75
80
  var _useSharedPluginState = (0, _hooks.useSharedPluginState)(pluginInjectionApi, ['list', 'toolbarListsIndentation']),
76
81
  listState = _useSharedPluginState.listState,
77
82
  toolbarListsIndentationState = _useSharedPluginState.toolbarListsIndentationState;
@@ -26,7 +26,7 @@ function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndenta
26
26
  // not use the indentation mark.
27
27
  // Check for lists before paragraphs and headings in case
28
28
  // the selection is in a list nested in a layout column.
29
- if (api !== null && api !== void 0 && api.dependencies.list.actions.isInsideListItem(editorState.tr)) {
29
+ if (api !== null && api !== void 0 && api.list.actions.isInsideListItem(editorState.tr)) {
30
30
  var _getListItemAttribute = (0, _lists.getListItemAttributes)(selection.$head),
31
31
  indentLevel = _getListItemAttribute.indentLevel,
32
32
  itemIndex = _getListItemAttribute.itemIndex;
@@ -14,10 +14,10 @@ var onItemActivated = function onItemActivated(pluginInjectionApi) {
14
14
  editorView = _ref.editorView;
15
15
  switch (buttonName) {
16
16
  case 'bullet_list':
17
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.toggleBulletList(_analytics.INPUT_METHOD.TOOLBAR));
17
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.toggleBulletList(_analytics.INPUT_METHOD.TOOLBAR));
18
18
  break;
19
19
  case 'ordered_list':
20
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.toggleOrderedList(_analytics.INPUT_METHOD.TOOLBAR));
20
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.toggleOrderedList(_analytics.INPUT_METHOD.TOOLBAR));
21
21
  break;
22
22
  case 'indent':
23
23
  {
@@ -27,7 +27,7 @@ var onItemActivated = function onItemActivated(pluginInjectionApi) {
27
27
  (0, _commands.getIndentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
28
28
  }
29
29
  if (node === 'list') {
30
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.indentList(_analytics.INPUT_METHOD.TOOLBAR));
30
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.indentList(_analytics.INPUT_METHOD.TOOLBAR));
31
31
  }
32
32
  if (node === 'taskList') {
33
33
  (0, _keymaps.getIndentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
@@ -42,7 +42,7 @@ var onItemActivated = function onItemActivated(pluginInjectionApi) {
42
42
  (0, _commands.getOutdentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
43
43
  }
44
44
  if (_node === 'list') {
45
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.outdentList(_analytics.INPUT_METHOD.TOOLBAR));
45
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.outdentList(_analytics.INPUT_METHOD.TOOLBAR));
46
46
  }
47
47
  if (_node === 'taskList') {
48
48
  (0, _keymaps.getUnindentCommand)(_analytics.INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
@@ -127,7 +127,8 @@ var TypeAheadMenu = /*#__PURE__*/_react.default.memo(function (_ref) {
127
127
  *
128
128
  *
129
129
  */
130
- var typeAheadPlugin = function typeAheadPlugin(options) {
130
+ var typeAheadPlugin = function typeAheadPlugin(_ref4) {
131
+ var options = _ref4.config;
131
132
  var fireAnalyticsCallback = (0, _analytics.fireAnalyticsEvent)(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
132
133
  var popupMountRef = {
133
134
  current: null
@@ -146,9 +147,9 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
146
147
  var typeAhead = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
147
148
  return [{
148
149
  name: 'typeAhead',
149
- plugin: function plugin(_ref4) {
150
- var dispatch = _ref4.dispatch,
151
- getIntl = _ref4.getIntl;
150
+ plugin: function plugin(_ref5) {
151
+ var dispatch = _ref5.dispatch,
152
+ getIntl = _ref5.getIntl;
152
153
  return (0, _main.createPlugin)({
153
154
  getIntl: getIntl,
154
155
  popupMountRef: popupMountRef,
@@ -162,9 +163,9 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
162
163
  plugin: _insertItemPlugin.createPlugin
163
164
  }, {
164
165
  name: 'typeAheadInputRule',
165
- plugin: function plugin(_ref5) {
166
- var schema = _ref5.schema,
167
- featureFlags = _ref5.featureFlags;
166
+ plugin: function plugin(_ref6) {
167
+ var schema = _ref6.schema,
168
+ featureFlags = _ref6.featureFlags;
168
169
  return (0, _inputRules.inputRulePlugin)(schema, typeAhead, featureFlags);
169
170
  }
170
171
  }];
@@ -172,13 +173,13 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
172
173
  commands: {
173
174
  openTypeAheadAtCursor: _openTypeaheadAtCursor.openTypeAheadAtCursor
174
175
  },
175
- contentComponent: function contentComponent(_ref6) {
176
- var editorView = _ref6.editorView,
177
- containerElement = _ref6.containerElement,
178
- popupsMountPoint = _ref6.popupsMountPoint,
179
- popupsBoundariesElement = _ref6.popupsBoundariesElement,
180
- popupsScrollableElement = _ref6.popupsScrollableElement,
181
- wrapperElement = _ref6.wrapperElement;
176
+ contentComponent: function contentComponent(_ref7) {
177
+ var editorView = _ref7.editorView,
178
+ containerElement = _ref7.containerElement,
179
+ popupsMountPoint = _ref7.popupsMountPoint,
180
+ popupsBoundariesElement = _ref7.popupsBoundariesElement,
181
+ popupsScrollableElement = _ref7.popupsScrollableElement,
182
+ wrapperElement = _ref7.wrapperElement;
182
183
  popupMountRef.current = {
183
184
  popupsMountPoint: popupsMountPoint || wrapperElement || undefined,
184
185
  popupsBoundariesElement: popupsBoundariesElement,
@@ -188,8 +189,8 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
188
189
  plugins: {
189
190
  typeAheadState: _key.pluginKey
190
191
  },
191
- render: function render(_ref7) {
192
- var typeAheadState = _ref7.typeAheadState;
192
+ render: function render(_ref8) {
193
+ var typeAheadState = _ref8.typeAheadState;
193
194
  if (!typeAheadState) {
194
195
  return null;
195
196
  }
@@ -202,10 +203,10 @@ var typeAheadPlugin = function typeAheadPlugin(options) {
202
203
  }
203
204
  });
204
205
  },
205
- onEditorViewStateUpdated: function onEditorViewStateUpdated(_ref8) {
206
- var originalTransaction = _ref8.originalTransaction,
207
- oldEditorState = _ref8.oldEditorState,
208
- newEditorState = _ref8.newEditorState;
206
+ onEditorViewStateUpdated: function onEditorViewStateUpdated(_ref9) {
207
+ var originalTransaction = _ref9.originalTransaction,
208
+ oldEditorState = _ref9.oldEditorState,
209
+ newEditorState = _ref9.newEditorState;
209
210
  var oldPluginState = (0, _utils.getPluginState)(oldEditorState);
210
211
  var newPluginState = (0, _utils.getPluginState)(newEditorState);
211
212
  if (!oldPluginState || !newPluginState) {
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2;
24
24
  // AFP-2532 TODO: Fix automatic suppressions below
25
25
  // eslint-disable-next-line @atlassian/tangerine/import/entry-points
26
26
  var InsertMenu = function InsertMenu(_ref) {
27
- var _pluginInjectionApi$d10, _pluginInjectionApi$d11, _pluginInjectionApi$d12, _pluginInjectionApi$d13;
27
+ var _pluginInjectionApi$q10, _pluginInjectionApi$q11, _pluginInjectionApi$q12, _pluginInjectionApi$q13;
28
28
  var editorView = _ref.editorView,
29
29
  dropdownItems = _ref.dropdownItems,
30
30
  showElementBrowserLink = _ref.showElementBrowserLink,
@@ -62,12 +62,12 @@ var InsertMenu = function InsertMenu(_ref) {
62
62
  var quickInsertDropdownItems = dropdownItems.map(transform);
63
63
  var viewMoreItem = showElementBrowserLink ? quickInsertDropdownItems.pop() : undefined;
64
64
  var onInsertItem = (0, _react.useCallback)(function (item) {
65
- var _pluginInjectionApi$d;
65
+ var _pluginInjectionApi$q;
66
66
  toggleVisiblity();
67
67
  if (!editorView.hasFocus()) {
68
68
  editorView.focus();
69
69
  }
70
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions.insertItem(item)(editorView.state, editorView.dispatch);
70
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q === void 0 ? void 0 : _pluginInjectionApi$q.actions.insertItem(item)(editorView.state, editorView.dispatch);
71
71
  }, [editorView, toggleVisiblity, pluginInjectionApi]);
72
72
  var getItems = (0, _react.useCallback)(function (query, category) {
73
73
  var result;
@@ -78,25 +78,25 @@ var InsertMenu = function InsertMenu(_ref) {
78
78
  * @see above transform function for more details.
79
79
  */
80
80
  if (query) {
81
- var _pluginInjectionApi$d2, _pluginInjectionApi$d3, _pluginInjectionApi$d4, _pluginInjectionApi$d5;
82
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d2 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.commands.search({
81
+ var _pluginInjectionApi$q2, _pluginInjectionApi$q3, _pluginInjectionApi$q4, _pluginInjectionApi$q5;
82
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q2 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q2 === void 0 ? void 0 : _pluginInjectionApi$q2.commands.search({
83
83
  query: query,
84
84
  category: category
85
85
  }));
86
- result = (_pluginInjectionApi$d3 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d4 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d4 === void 0 ? void 0 : (_pluginInjectionApi$d5 = _pluginInjectionApi$d4.sharedState.currentState()) === null || _pluginInjectionApi$d5 === void 0 ? void 0 : _pluginInjectionApi$d5.suggestions) !== null && _pluginInjectionApi$d3 !== void 0 ? _pluginInjectionApi$d3 : [];
86
+ result = (_pluginInjectionApi$q3 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q4 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q4 === void 0 ? void 0 : (_pluginInjectionApi$q5 = _pluginInjectionApi$q4.sharedState.currentState()) === null || _pluginInjectionApi$q5 === void 0 ? void 0 : _pluginInjectionApi$q5.suggestions) !== null && _pluginInjectionApi$q3 !== void 0 ? _pluginInjectionApi$q3 : [];
87
87
  } else {
88
- var _pluginInjectionApi$d6, _pluginInjectionApi$d7, _pluginInjectionApi$d8, _pluginInjectionApi$d9;
89
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d6 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d6 === void 0 ? void 0 : _pluginInjectionApi$d6.commands.search({
88
+ var _pluginInjectionApi$q6, _pluginInjectionApi$q7, _pluginInjectionApi$q8, _pluginInjectionApi$q9;
89
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q6 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q6 === void 0 ? void 0 : _pluginInjectionApi$q6.commands.search({
90
90
  category: category,
91
91
  featuredItems: true
92
92
  }));
93
- var featuredQuickInsertSuggestions = (_pluginInjectionApi$d7 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d8 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d8 === void 0 ? void 0 : (_pluginInjectionApi$d9 = _pluginInjectionApi$d8.sharedState.currentState()) === null || _pluginInjectionApi$d9 === void 0 ? void 0 : _pluginInjectionApi$d9.suggestions) !== null && _pluginInjectionApi$d7 !== void 0 ? _pluginInjectionApi$d7 : [];
93
+ var featuredQuickInsertSuggestions = (_pluginInjectionApi$q7 = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q8 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q8 === void 0 ? void 0 : (_pluginInjectionApi$q9 = _pluginInjectionApi$q8.sharedState.currentState()) === null || _pluginInjectionApi$q9 === void 0 ? void 0 : _pluginInjectionApi$q9.suggestions) !== null && _pluginInjectionApi$q7 !== void 0 ? _pluginInjectionApi$q7 : [];
94
94
  result = quickInsertDropdownItems.concat(featuredQuickInsertSuggestions);
95
95
  }
96
96
  setItemCount(result.length);
97
97
  return result;
98
- }, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d10 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d10 === void 0 ? void 0 : _pluginInjectionApi$d10.commands, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d11 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d11 === void 0 ? void 0 : _pluginInjectionApi$d11.sharedState, quickInsertDropdownItems]);
99
- var emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d12 = pluginInjectionApi.dependencies.quickInsert) === null || _pluginInjectionApi$d12 === void 0 ? void 0 : (_pluginInjectionApi$d13 = _pluginInjectionApi$d12.sharedState.currentState()) === null || _pluginInjectionApi$d13 === void 0 ? void 0 : _pluginInjectionApi$d13.emptyStateHandler;
98
+ }, [pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q10 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q10 === void 0 ? void 0 : _pluginInjectionApi$q10.commands, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q11 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q11 === void 0 ? void 0 : _pluginInjectionApi$q11.sharedState, quickInsertDropdownItems]);
99
+ var emptyStateHandler = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$q12 = pluginInjectionApi.quickInsert) === null || _pluginInjectionApi$q12 === void 0 ? void 0 : (_pluginInjectionApi$q13 = _pluginInjectionApi$q12.sharedState.currentState()) === null || _pluginInjectionApi$q13 === void 0 ? void 0 : _pluginInjectionApi$q13.emptyStateHandler;
100
100
  return (0, _react2.jsx)("div", {
101
101
  css: function css(theme) {
102
102
  return insertMenuWrapper(theme, itemCount);
@@ -108,7 +108,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
108
108
  jiraIssueCollectorScriptLoading: true,
109
109
  showOptOutOption: false
110
110
  });
111
- basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.dependencies.base.sharedState.currentState();
111
+ basePluginState = (_this$props$api = _this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.base.sharedState.currentState();
112
112
  sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
113
113
  contentId = basePluginState === null || basePluginState === void 0 ? void 0 : (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
114
114
  tabId = window.sessionStorage['awc.tab.id'];
@@ -27,8 +27,8 @@ var _context = require("./presets/context");
27
27
  * , []);
28
28
  *
29
29
  * // Can execute typesafe commands based on plugin1 or 2
30
- * const runCommand = () => editorApi.dependencies.core.actions.execute(
31
- * editorApi.dependencies.plugin1.commands.doSomething()
30
+ * const runCommand = () => editorApi.core.actions.execute(
31
+ * editorApi.plugin1.commands.doSomething()
32
32
  * )
33
33
  * return (
34
34
  * <>
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.31.7";
9
+ var version = "187.32.1";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -401,7 +401,7 @@ export class ReactEditorView extends React.Component {
401
401
  var _this$pluginInjection, _this$experienceStore10;
402
402
  const nodes = getNodesCount(this.view.state.doc);
403
403
  const ttfb = getResponseEndTime();
404
- const contextIdentifier = (_this$pluginInjection = this.pluginInjectionAPI.api().dependencies.base) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.sharedState.currentState();
404
+ const contextIdentifier = (_this$pluginInjection = this.pluginInjectionAPI.api().base) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.sharedState.currentState();
405
405
  this.dispatchAnalyticsEvent({
406
406
  action: ACTION.PROSEMIRROR_RENDERED,
407
407
  actionSubject: ACTION_SUBJECT.EDITOR,
@@ -9,19 +9,19 @@ function createPlugin(options, featureFlags, pluginInjectionApi) {
9
9
  }
10
10
  const hasRequiredPerformanceAPIs = isPerformanceAPIAvailable();
11
11
  const getCreateAnalyticsEvent = () => {
12
- var _pluginInjectionApi$d, _pluginInjectionApi$d2;
13
- return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d === void 0 ? void 0 : (_pluginInjectionApi$d2 = _pluginInjectionApi$d.sharedState.currentState()) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.createAnalyticsEvent;
12
+ var _pluginInjectionApi$a, _pluginInjectionApi$a2;
13
+ return pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : (_pluginInjectionApi$a2 = _pluginInjectionApi$a.sharedState.currentState()) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.createAnalyticsEvent;
14
14
  };
15
15
  return new SafePlugin({
16
16
  key: analyticsPluginKey,
17
17
  state: {
18
18
  init: () => {
19
- var _pluginInjectionApi$d3;
19
+ var _pluginInjectionApi$a3;
20
20
  return {
21
21
  ...options,
22
22
  createAnalyticsEvent: getCreateAnalyticsEvent(),
23
23
  fireAnalytics: fireAnalyticsEvent(options.createAnalyticsEvent),
24
- editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d3 = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : _pluginInjectionApi$d3.actions
24
+ editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a3 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a3 === void 0 ? void 0 : _pluginInjectionApi$a3.actions
25
25
  };
26
26
  },
27
27
  apply: (tr, pluginState, _, state) => {
@@ -77,15 +77,18 @@ function createPlugin(options, featureFlags, pluginInjectionApi) {
77
77
  * Do not use this analytics plugin.
78
78
  * This will be deprecated soon.
79
79
  */
80
- const analyticsPlugin = (options, api) => {
81
- var _api$dependencies$fea;
82
- const featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies$fea = api.dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
80
+ const analyticsPlugin = ({
81
+ config: options,
82
+ api
83
+ }) => {
84
+ var _api$featureFlags;
85
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
83
86
  return {
84
87
  name: 'deprecatedAnalytics',
85
88
  pmPlugins() {
86
89
  return [{
87
90
  name: 'analyticsPlugin',
88
- plugin: () => createPlugin(options, featureFlags, api)
91
+ plugin: () => createPlugin(options !== null && options !== void 0 ? options : {}, featureFlags, api)
89
92
  }];
90
93
  }
91
94
  };
@@ -7,7 +7,10 @@ import { getPluginState } from './utils';
7
7
  import { buildToolbar } from './toolbar';
8
8
  import { InlineCommentView } from './ui/InlineCommentView';
9
9
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
10
- const annotationPlugin = (annotationProviders, api) => {
10
+ const annotationPlugin = ({
11
+ config: annotationProviders,
12
+ api
13
+ }) => {
11
14
  return {
12
15
  name: 'annotation',
13
16
  marks() {
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
2
  import AvatarGroupPluginWrapper from './ui/AvatarGroupPluginWrapper';
3
- const avatarGroup = (props, api) => {
4
- var _api$dependencies, _api$dependencies$fea;
5
- const featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
3
+ const avatarGroup = ({
4
+ config: props,
5
+ api
6
+ }) => {
7
+ var _api$featureFlags;
8
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
6
9
  return {
7
10
  name: 'avatarGroup',
8
11
  primaryToolbarComponent({
@@ -19,8 +22,8 @@ const avatarGroup = (props, api) => {
19
22
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
20
23
  editorView: editorView,
21
24
  eventDispatcher: eventDispatcher,
22
- collabEdit: props.collabEdit,
23
- takeFullWidth: props.takeFullWidth,
25
+ collabEdit: props === null || props === void 0 ? void 0 : props.collabEdit,
26
+ takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
24
27
  featureFlags: featureFlags
25
28
  });
26
29
  }
@@ -14,9 +14,12 @@ import { keymap } from '@atlaskit/editor-common/keymaps';
14
14
  import frozenEditor from './pm-plugins/frozen-editor';
15
15
  // Chrome >= 88
16
16
  export const isChromeWithSelectionBug = browser.chrome && browser.chrome_version >= 88;
17
- const basePlugin = (options, api) => {
18
- var _api$dependencies, _api$dependencies$fea;
19
- const featureFlags = (api === null || api === void 0 ? void 0 : (_api$dependencies = api.dependencies) === null || _api$dependencies === void 0 ? void 0 : (_api$dependencies$fea = _api$dependencies.featureFlags) === null || _api$dependencies$fea === void 0 ? void 0 : _api$dependencies$fea.sharedState.currentState()) || {};
17
+ const basePlugin = ({
18
+ config: options,
19
+ api
20
+ }) => {
21
+ var _api$featureFlags;
22
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
20
23
  return {
21
24
  name: 'base',
22
25
  getSharedState(editorState) {
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { BeforePrimaryToolbarWrapper } from './ui/BeforePrimaryToolbarWrapper';
3
- const beforePrimaryToolbar = props => ({
3
+ const beforePrimaryToolbar = ({
4
+ config: props
5
+ }) => ({
4
6
  name: 'beforePrimaryToolbar',
5
7
  primaryToolbarComponent() {
6
8
  return /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
7
- beforePrimaryToolbarComponents: props.beforePrimaryToolbarComponents
9
+ beforePrimaryToolbarComponents: props === null || props === void 0 ? void 0 : props.beforePrimaryToolbarComponents
8
10
  });
9
11
  }
10
12
  });