@atlaskit/editor-core 187.31.7 → 187.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/CHANGELOG.md +33 -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/Toolbar.js +3 -3
  26. package/dist/cjs/plugins/help-dialog/index.js +18 -17
  27. package/dist/cjs/plugins/insert-block/index.js +52 -51
  28. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  29. package/dist/cjs/plugins/layout/index.js +15 -14
  30. package/dist/cjs/plugins/max-content-size/index.js +4 -3
  31. package/dist/cjs/plugins/media/index.js +49 -47
  32. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +2 -2
  33. package/dist/cjs/plugins/media/pm-plugins/main.js +7 -7
  34. package/dist/cjs/plugins/media/toolbar/index.js +29 -24
  35. package/dist/cjs/plugins/media/toolbar/linking.js +4 -4
  36. package/dist/cjs/plugins/media/toolbar/utils.js +22 -2
  37. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  38. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  39. package/dist/cjs/plugins/mentions/index.js +17 -15
  40. package/dist/cjs/plugins/panel/index.js +13 -12
  41. package/dist/cjs/plugins/paste/index.js +13 -10
  42. package/dist/cjs/plugins/paste/pm-plugins/analytics.js +8 -8
  43. package/dist/cjs/plugins/paste/pm-plugins/main.js +10 -10
  44. package/dist/cjs/plugins/placeholder/index.js +9 -7
  45. package/dist/cjs/plugins/placeholder-text/index.js +23 -16
  46. package/dist/cjs/plugins/quick-insert/index.js +13 -12
  47. package/dist/cjs/plugins/rule/index.js +8 -7
  48. package/dist/cjs/plugins/save-on-enter/index.js +4 -3
  49. package/dist/cjs/plugins/selection/index.js +5 -4
  50. package/dist/cjs/plugins/status/index.js +20 -14
  51. package/dist/cjs/plugins/submit-editor/index.js +4 -3
  52. package/dist/cjs/plugins/tasks-and-decisions/index.js +6 -5
  53. package/dist/cjs/plugins/text-color/index.js +17 -15
  54. package/dist/cjs/plugins/toolbar-lists-indentation/index.js +31 -26
  55. package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  56. package/dist/cjs/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  57. package/dist/cjs/plugins/type-ahead/index.js +21 -20
  58. package/dist/cjs/ui/ElementBrowser/InsertMenu.js +11 -11
  59. package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
  60. package/dist/cjs/use-preset.js +2 -2
  61. package/dist/cjs/version-wrapper.js +1 -1
  62. package/dist/es2019/create-editor/ReactEditorViewInternal.js +1 -1
  63. package/dist/es2019/plugins/analytics/plugin.js +11 -8
  64. package/dist/es2019/plugins/annotation/index.js +4 -1
  65. package/dist/es2019/plugins/avatar-group/index.js +8 -5
  66. package/dist/es2019/plugins/base/plugin.js +6 -3
  67. package/dist/es2019/plugins/before-primaryToolbar/index.js +4 -2
  68. package/dist/es2019/plugins/block-type/index.js +14 -11
  69. package/dist/es2019/plugins/breakout/index.js +6 -3
  70. package/dist/es2019/plugins/caption/index.js +3 -1
  71. package/dist/es2019/plugins/caption/pm-plugins/main.js +2 -2
  72. package/dist/es2019/plugins/code-bidi-warning/index.js +2 -4
  73. package/dist/es2019/plugins/code-block/index.js +15 -9
  74. package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +2 -2
  75. package/dist/es2019/plugins/collab-edit/index.js +9 -6
  76. package/dist/es2019/plugins/collab-edit/plugin.js +5 -5
  77. package/dist/es2019/plugins/date/index.js +6 -3
  78. package/dist/es2019/plugins/emoji/index.js +16 -13
  79. package/dist/es2019/plugins/expand/index.js +7 -4
  80. package/dist/es2019/plugins/extension/index.js +11 -8
  81. package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
  82. package/dist/es2019/plugins/feedback-dialog/index.js +4 -2
  83. package/dist/es2019/plugins/find-replace/index.js +8 -5
  84. package/dist/es2019/plugins/floating-toolbar/index.js +6 -4
  85. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -3
  86. package/dist/es2019/plugins/help-dialog/index.js +9 -6
  87. package/dist/es2019/plugins/insert-block/index.js +12 -9
  88. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  89. package/dist/es2019/plugins/layout/index.js +8 -5
  90. package/dist/es2019/plugins/max-content-size/index.js +3 -1
  91. package/dist/es2019/plugins/media/index.js +14 -10
  92. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +2 -2
  93. package/dist/es2019/plugins/media/pm-plugins/main.js +7 -7
  94. package/dist/es2019/plugins/media/toolbar/index.js +29 -25
  95. package/dist/es2019/plugins/media/toolbar/linking.js +4 -4
  96. package/dist/es2019/plugins/media/toolbar/utils.js +18 -0
  97. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  98. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  99. package/dist/es2019/plugins/mentions/index.js +9 -6
  100. package/dist/es2019/plugins/panel/index.js +5 -2
  101. package/dist/es2019/plugins/paste/index.js +9 -5
  102. package/dist/es2019/plugins/paste/pm-plugins/analytics.js +8 -8
  103. package/dist/es2019/plugins/paste/pm-plugins/main.js +10 -10
  104. package/dist/es2019/plugins/placeholder/index.js +10 -7
  105. package/dist/es2019/plugins/placeholder-text/index.js +12 -4
  106. package/dist/es2019/plugins/quick-insert/index.js +3 -1
  107. package/dist/es2019/plugins/rule/index.js +5 -3
  108. package/dist/es2019/plugins/save-on-enter/index.js +3 -1
  109. package/dist/es2019/plugins/selection/index.js +3 -1
  110. package/dist/es2019/plugins/status/index.js +11 -3
  111. package/dist/es2019/plugins/submit-editor/index.js +3 -1
  112. package/dist/es2019/plugins/tasks-and-decisions/index.js +6 -4
  113. package/dist/es2019/plugins/text-color/index.js +6 -3
  114. package/dist/es2019/plugins/toolbar-lists-indentation/index.js +9 -5
  115. package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  116. package/dist/es2019/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  117. package/dist/es2019/plugins/type-ahead/index.js +3 -1
  118. package/dist/es2019/ui/ElementBrowser/InsertMenu.js +11 -11
  119. package/dist/es2019/ui/ToolbarFeedback/index.js +1 -1
  120. package/dist/es2019/use-preset.js +2 -2
  121. package/dist/es2019/version-wrapper.js +1 -1
  122. package/dist/esm/create-editor/ReactEditorViewInternal.js +1 -1
  123. package/dist/esm/plugins/analytics/plugin.js +14 -12
  124. package/dist/esm/plugins/annotation/index.js +15 -13
  125. package/dist/esm/plugins/avatar-group/index.js +16 -14
  126. package/dist/esm/plugins/base/plugin.js +12 -10
  127. package/dist/esm/plugins/before-primaryToolbar/index.js +3 -2
  128. package/dist/esm/plugins/block-type/index.js +32 -30
  129. package/dist/esm/plugins/breakout/index.js +10 -8
  130. package/dist/esm/plugins/caption/index.js +7 -6
  131. package/dist/esm/plugins/caption/pm-plugins/main.js +2 -2
  132. package/dist/esm/plugins/code-bidi-warning/index.js +2 -4
  133. package/dist/esm/plugins/code-block/index.js +14 -11
  134. package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +2 -2
  135. package/dist/esm/plugins/collab-edit/index.js +16 -14
  136. package/dist/esm/plugins/collab-edit/plugin.js +5 -5
  137. package/dist/esm/plugins/date/index.js +18 -17
  138. package/dist/esm/plugins/emoji/index.js +35 -33
  139. package/dist/esm/plugins/expand/index.js +14 -13
  140. package/dist/esm/plugins/extension/index.js +16 -15
  141. package/dist/esm/plugins/extension/pm-plugins/main.js +4 -4
  142. package/dist/esm/plugins/feedback-dialog/index.js +5 -4
  143. package/dist/esm/plugins/find-replace/index.js +17 -15
  144. package/dist/esm/plugins/floating-toolbar/index.js +31 -30
  145. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +3 -3
  146. package/dist/esm/plugins/help-dialog/index.js +18 -17
  147. package/dist/esm/plugins/insert-block/index.js +52 -51
  148. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +11 -11
  149. package/dist/esm/plugins/layout/index.js +15 -14
  150. package/dist/esm/plugins/max-content-size/index.js +4 -3
  151. package/dist/esm/plugins/media/index.js +49 -47
  152. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +2 -2
  153. package/dist/esm/plugins/media/pm-plugins/main.js +7 -7
  154. package/dist/esm/plugins/media/toolbar/index.js +30 -25
  155. package/dist/esm/plugins/media/toolbar/linking.js +4 -4
  156. package/dist/esm/plugins/media/toolbar/utils.js +19 -0
  157. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -4
  158. package/dist/esm/plugins/media/ui/ResizableMediaSingle/index.js +2 -2
  159. package/dist/esm/plugins/mentions/index.js +17 -15
  160. package/dist/esm/plugins/panel/index.js +13 -12
  161. package/dist/esm/plugins/paste/index.js +13 -10
  162. package/dist/esm/plugins/paste/pm-plugins/analytics.js +8 -8
  163. package/dist/esm/plugins/paste/pm-plugins/main.js +10 -10
  164. package/dist/esm/plugins/placeholder/index.js +9 -7
  165. package/dist/esm/plugins/placeholder-text/index.js +23 -16
  166. package/dist/esm/plugins/quick-insert/index.js +13 -12
  167. package/dist/esm/plugins/rule/index.js +8 -7
  168. package/dist/esm/plugins/save-on-enter/index.js +4 -3
  169. package/dist/esm/plugins/selection/index.js +5 -4
  170. package/dist/esm/plugins/status/index.js +20 -14
  171. package/dist/esm/plugins/submit-editor/index.js +4 -3
  172. package/dist/esm/plugins/tasks-and-decisions/index.js +6 -5
  173. package/dist/esm/plugins/text-color/index.js +17 -15
  174. package/dist/esm/plugins/toolbar-lists-indentation/index.js +31 -26
  175. package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +1 -1
  176. package/dist/esm/plugins/toolbar-lists-indentation/ui/onItemActivated.js +4 -4
  177. package/dist/esm/plugins/type-ahead/index.js +21 -20
  178. package/dist/esm/ui/ElementBrowser/InsertMenu.js +11 -11
  179. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  180. package/dist/esm/use-preset.js +2 -2
  181. package/dist/esm/version-wrapper.js +1 -1
  182. package/dist/types/labs/next/presets/default.d.ts +62 -618
  183. package/dist/types/plugins/avatar-group/index.d.ts +1 -1
  184. package/dist/types/plugins/before-primaryToolbar/index.d.ts +1 -1
  185. package/dist/types/plugins/caption/index.d.ts +1 -1
  186. package/dist/types/plugins/media/toolbar/utils.d.ts +2 -1
  187. package/dist/types/plugins/media/types.d.ts +1 -0
  188. package/dist/types/plugins/selection/index.d.ts +2 -2
  189. package/dist/types/plugins/text-color/index.d.ts +3 -2
  190. package/dist/types/use-preset.d.ts +2 -2
  191. package/dist/types-ts4.5/labs/next/presets/default.d.ts +96 -716
  192. package/dist/types-ts4.5/plugins/avatar-group/index.d.ts +1 -1
  193. package/dist/types-ts4.5/plugins/before-primaryToolbar/index.d.ts +1 -1
  194. package/dist/types-ts4.5/plugins/caption/index.d.ts +1 -1
  195. package/dist/types-ts4.5/plugins/media/toolbar/utils.d.ts +2 -1
  196. package/dist/types-ts4.5/plugins/media/types.d.ts +1 -0
  197. package/dist/types-ts4.5/plugins/selection/index.d.ts +2 -2
  198. package/dist/types-ts4.5/plugins/text-color/index.d.ts +3 -2
  199. package/dist/types-ts4.5/use-preset.d.ts +2 -2
  200. package/package.json +3 -3
@@ -6,7 +6,9 @@ import { search } from './search';
6
6
  import ModalElementBrowser from './ui/ModalElementBrowser';
7
7
  import { openElementBrowserModal, insertItem } from './commands';
8
8
  import { memoProcessQuickInsertItems, getQuickInsertSuggestions } from '@atlaskit/editor-common/quick-insert';
9
- const quickInsertPlugin = options => ({
9
+ const quickInsertPlugin = ({
10
+ config: options
11
+ }) => ({
10
12
  name: 'quickInsert',
11
13
  pmPlugins(defaultItems) {
12
14
  return [{
@@ -5,9 +5,11 @@ import { messages } from '../insert-block/ui/ToolbarInsertBlock/messages';
5
5
  import { IconDivider } from '@atlaskit/editor-common/quick-insert';
6
6
  import inputRulePlugin from './pm-plugins/input-rule';
7
7
  import keymapPlugin from './pm-plugins/keymap';
8
- const rulePlugin = (_, api) => {
9
- var _api$dependencies, _api$dependencies$fea;
10
- 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()) || {};
8
+ const rulePlugin = ({
9
+ api
10
+ }) => {
11
+ var _api$featureFlags;
12
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
11
13
  return {
12
14
  name: 'rule',
13
15
  nodes() {
@@ -47,7 +47,9 @@ const analyticsPayload = state => ({
47
47
  eventType: EVENT_TYPE.UI
48
48
  }
49
49
  });
50
- const saveOnEnterPlugin = onSave => ({
50
+ const saveOnEnterPlugin = ({
51
+ config: onSave
52
+ }) => ({
51
53
  name: 'saveOnEnter',
52
54
  pmPlugins() {
53
55
  return [{
@@ -2,7 +2,9 @@ import { createPlugin } from './pm-plugins/selection-main';
2
2
  import selectionKeymapPlugin from './pm-plugins/keymap';
3
3
  import gapCursorPlugin from './pm-plugins/gap-cursor-main';
4
4
  import gapCursorKeymapPlugin from './pm-plugins/gap-cursor-keymap';
5
- export const selectionPlugin = options => ({
5
+ export const selectionPlugin = ({
6
+ config: options
7
+ }) => ({
6
8
  name: 'selection',
7
9
  pmPlugins() {
8
10
  return [{
@@ -10,7 +10,9 @@ import { keymapPlugin } from './keymap';
10
10
  import createStatusPlugin from './plugin';
11
11
  import { pluginKey } from './plugin-key';
12
12
  import StatusPicker from './ui/statusPicker';
13
- const baseStatusPlugin = options => ({
13
+ const baseStatusPlugin = ({
14
+ config: options
15
+ }) => ({
14
16
  name: 'status',
15
17
  nodes() {
16
18
  return [{
@@ -84,7 +86,7 @@ const baseStatusPlugin = options => ({
84
86
  }
85
87
  });
86
88
  const decorateWithPluginOptions = (plugin, options) => {
87
- if (options.menuDisabled === true) {
89
+ if ((options === null || options === void 0 ? void 0 : options.menuDisabled) === true) {
88
90
  return plugin;
89
91
  }
90
92
  plugin.pluginsOptions = {
@@ -112,5 +114,11 @@ const decorateWithPluginOptions = (plugin, options) => {
112
114
  };
113
115
  return plugin;
114
116
  };
115
- const statusPlugin = (options, api) => decorateWithPluginOptions(baseStatusPlugin(options, api), options);
117
+ const statusPlugin = ({
118
+ config: options,
119
+ api
120
+ }) => decorateWithPluginOptions(baseStatusPlugin({
121
+ config: options,
122
+ api
123
+ }), options);
116
124
  export default statusPlugin;
@@ -36,7 +36,9 @@ const analyticsPayload = state => ({
36
36
  eventType: EVENT_TYPE.UI
37
37
  }
38
38
  });
39
- const submitEditorPlugin = onSave => ({
39
+ const submitEditorPlugin = ({
40
+ config: onSave
41
+ }) => ({
40
42
  name: 'submitEditor',
41
43
  pmPlugins() {
42
44
  return [{
@@ -28,10 +28,12 @@ const addItem = (insert, listType, schema) => ({
28
28
  })));
29
29
  };
30
30
  const tasksAndDecisionsPlugin = ({
31
- allowNestedTasks,
32
- consumeTabs,
33
- useLongPressSelection
34
- } = {}) => ({
31
+ config: {
32
+ allowNestedTasks,
33
+ consumeTabs,
34
+ useLongPressSelection
35
+ } = {}
36
+ }) => ({
35
37
  name: 'taskDecision',
36
38
  nodes() {
37
39
  return [{
@@ -9,9 +9,12 @@ const pluginConfig = textColorConfig => {
9
9
  }
10
10
  return textColorConfig;
11
11
  };
12
- const textColorPlugin = (textColorConfig, api) => {
13
- var _api$dependencies, _api$dependencies$fea;
14
- 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()) || {};
12
+ const textColorPlugin = ({
13
+ config: textColorConfig,
14
+ api
15
+ }) => {
16
+ var _api$featureFlags;
17
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
15
18
  return {
16
19
  name: 'textColor',
17
20
  marks() {
@@ -5,11 +5,15 @@ import { ToolbarSize } from '../../ui/Toolbar/types';
5
5
  import { createPlugin as indentationButtonsPlugin } from './pm-plugins/indentation-buttons';
6
6
  import { pluginKey as indentationButtonPluginKey } from './pm-plugins/indentation-buttons';
7
7
  const toolbarListsIndentationPlugin = ({
8
- showIndentationButtons,
9
- allowHeadingAndParagraphIndentation
10
- }, api) => {
11
- var _api$dependencies$fea;
12
- 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()) || {};
8
+ config,
9
+ api
10
+ }) => {
11
+ var _api$featureFlags;
12
+ const {
13
+ showIndentationButtons = false,
14
+ allowHeadingAndParagraphIndentation = false
15
+ } = config !== null && config !== void 0 ? config : {};
16
+ const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
13
17
  return {
14
18
  name: 'toolbarListsIndentation',
15
19
  getSharedState(editorState) {
@@ -21,7 +21,7 @@ function getIndentationButtonsState(editorState, allowHeadingAndParagraphIndenta
21
21
  // not use the indentation mark.
22
22
  // Check for lists before paragraphs and headings in case
23
23
  // the selection is in a list nested in a layout column.
24
- if (api !== null && api !== void 0 && api.dependencies.list.actions.isInsideListItem(editorState.tr)) {
24
+ if (api !== null && api !== void 0 && api.list.actions.isInsideListItem(editorState.tr)) {
25
25
  const {
26
26
  indentLevel,
27
27
  itemIndex
@@ -8,10 +8,10 @@ export const onItemActivated = pluginInjectionApi => ({
8
8
  }) => {
9
9
  switch (buttonName) {
10
10
  case 'bullet_list':
11
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.toggleBulletList(INPUT_METHOD.TOOLBAR));
11
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.toggleBulletList(INPUT_METHOD.TOOLBAR));
12
12
  break;
13
13
  case 'ordered_list':
14
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.toggleOrderedList(INPUT_METHOD.TOOLBAR));
14
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.toggleOrderedList(INPUT_METHOD.TOOLBAR));
15
15
  break;
16
16
  case 'indent':
17
17
  {
@@ -21,7 +21,7 @@ export const onItemActivated = pluginInjectionApi => ({
21
21
  indentParagraphOrHeading(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
22
22
  }
23
23
  if (node === 'list') {
24
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.indentList(INPUT_METHOD.TOOLBAR));
24
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.indentList(INPUT_METHOD.TOOLBAR));
25
25
  }
26
26
  if (node === 'taskList') {
27
27
  indentTaskList(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
@@ -36,7 +36,7 @@ export const onItemActivated = pluginInjectionApi => ({
36
36
  outdentParagraphOrHeading(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
37
37
  }
38
38
  if (node === 'list') {
39
- pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.dependencies.list.commands.outdentList(INPUT_METHOD.TOOLBAR));
39
+ pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.core.actions.execute(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.list.commands.outdentList(INPUT_METHOD.TOOLBAR));
40
40
  }
41
41
  if (node === 'taskList') {
42
42
  outdentTaskList(INPUT_METHOD.TOOLBAR)(editorView.state, editorView.dispatch);
@@ -111,7 +111,9 @@ const TypeAheadMenu = /*#__PURE__*/React.memo(({
111
111
  *
112
112
  *
113
113
  */
114
- const typeAheadPlugin = options => {
114
+ const typeAheadPlugin = ({
115
+ config: options
116
+ }) => {
115
117
  const fireAnalyticsCallback = fireAnalyticsEvent(options === null || options === void 0 ? void 0 : options.createAnalyticsEvent);
116
118
  const popupMountRef = {
117
119
  current: null
@@ -20,7 +20,7 @@ const InsertMenu = ({
20
20
  toggleVisiblity,
21
21
  pluginInjectionApi
22
22
  }) => {
23
- var _pluginInjectionApi$d10, _pluginInjectionApi$d11, _pluginInjectionApi$d12, _pluginInjectionApi$d13;
23
+ var _pluginInjectionApi$q10, _pluginInjectionApi$q11, _pluginInjectionApi$q12, _pluginInjectionApi$q13;
24
24
  const [itemCount, setItemCount] = useState(0);
25
25
  const transform = useCallback(item => ({
26
26
  title: item.content,
@@ -43,12 +43,12 @@ const InsertMenu = ({
43
43
  const quickInsertDropdownItems = dropdownItems.map(transform);
44
44
  const viewMoreItem = showElementBrowserLink ? quickInsertDropdownItems.pop() : undefined;
45
45
  const onInsertItem = useCallback(item => {
46
- var _pluginInjectionApi$d;
46
+ var _pluginInjectionApi$q;
47
47
  toggleVisiblity();
48
48
  if (!editorView.hasFocus()) {
49
49
  editorView.focus();
50
50
  }
51
- 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);
51
+ 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);
52
52
  }, [editorView, toggleVisiblity, pluginInjectionApi]);
53
53
  const getItems = useCallback((query, category) => {
54
54
  let result;
@@ -59,25 +59,25 @@ const InsertMenu = ({
59
59
  * @see above transform function for more details.
60
60
  */
61
61
  if (query) {
62
- var _pluginInjectionApi$d2, _pluginInjectionApi$d3, _pluginInjectionApi$d4, _pluginInjectionApi$d5;
63
- 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({
62
+ var _pluginInjectionApi$q2, _pluginInjectionApi$q3, _pluginInjectionApi$q4, _pluginInjectionApi$q5;
63
+ 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({
64
64
  query,
65
65
  category
66
66
  }));
67
- 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 : [];
67
+ 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 : [];
68
68
  } else {
69
- var _pluginInjectionApi$d6, _pluginInjectionApi$d7, _pluginInjectionApi$d8, _pluginInjectionApi$d9;
70
- 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({
69
+ var _pluginInjectionApi$q6, _pluginInjectionApi$q7, _pluginInjectionApi$q8, _pluginInjectionApi$q9;
70
+ 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({
71
71
  category,
72
72
  featuredItems: true
73
73
  }));
74
- const 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 : [];
74
+ const 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 : [];
75
75
  result = quickInsertDropdownItems.concat(featuredQuickInsertSuggestions);
76
76
  }
77
77
  setItemCount(result.length);
78
78
  return result;
79
- }, [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]);
80
- const 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;
79
+ }, [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]);
80
+ const 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;
81
81
  return jsx("div", {
82
82
  css: theme => insertMenuWrapper(theme, itemCount)
83
83
  }, jsx(ElementBrowserWrapper, {
@@ -76,7 +76,7 @@ class ToolbarFeedbackInternal extends PureComponent {
76
76
  jiraIssueCollectorScriptLoading: true,
77
77
  showOptOutOption: false
78
78
  });
79
- const basePluginState = (_this$props$api = this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.dependencies.base.sharedState.currentState();
79
+ const basePluginState = (_this$props$api = this.props.api) === null || _this$props$api === void 0 ? void 0 : _this$props$api.base.sharedState.currentState();
80
80
  const sessionId = (_window$localStorage$ = window.localStorage.getItem('awc.session.id')) === null || _window$localStorage$ === void 0 ? void 0 : _window$localStorage$.toString();
81
81
  const contentId = basePluginState === null || basePluginState === void 0 ? void 0 : (_basePluginState$cont = basePluginState.contextIdentifier) === null || _basePluginState$cont === void 0 ? void 0 : _basePluginState$cont.objectId;
82
82
  const tabId = window.sessionStorage['awc.tab.id'];
@@ -21,8 +21,8 @@ import { usePresetContext } from './presets/context';
21
21
  * , []);
22
22
  *
23
23
  * // Can execute typesafe commands based on plugin1 or 2
24
- * const runCommand = () => editorApi.dependencies.core.actions.execute(
25
- * editorApi.dependencies.plugin1.commands.doSomething()
24
+ * const runCommand = () => editorApi.core.actions.execute(
25
+ * editorApi.plugin1.commands.doSomething()
26
26
  * )
27
27
  * return (
28
28
  * <>
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "187.31.7";
2
+ export const version = "187.32.0";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -398,7 +398,7 @@ export var ReactEditorView = /*#__PURE__*/function (_React$Component) {
398
398
  var _this$pluginInjection, _this$experienceStore10;
399
399
  var nodes = getNodesCount(_this.view.state.doc);
400
400
  var ttfb = getResponseEndTime();
401
- var contextIdentifier = (_this$pluginInjection = _this.pluginInjectionAPI.api().dependencies.base) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.sharedState.currentState();
401
+ var contextIdentifier = (_this$pluginInjection = _this.pluginInjectionAPI.api().base) === null || _this$pluginInjection === void 0 ? void 0 : _this$pluginInjection.sharedState.currentState();
402
402
  _this.dispatchAnalyticsEvent({
403
403
  action: ACTION.PROSEMIRROR_RENDERED,
404
404
  actionSubject: ACTION_SUBJECT.EDITOR,
@@ -15,18 +15,18 @@ function createPlugin(options, featureFlags, pluginInjectionApi) {
15
15
  }
16
16
  var hasRequiredPerformanceAPIs = isPerformanceAPIAvailable();
17
17
  var getCreateAnalyticsEvent = function getCreateAnalyticsEvent() {
18
- var _pluginInjectionApi$d, _pluginInjectionApi$d2;
19
- 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;
18
+ var _pluginInjectionApi$a, _pluginInjectionApi$a2;
19
+ 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;
20
20
  };
21
21
  return new SafePlugin({
22
22
  key: analyticsPluginKey,
23
23
  state: {
24
24
  init: function init() {
25
- var _pluginInjectionApi$d3;
25
+ var _pluginInjectionApi$a3;
26
26
  return _objectSpread(_objectSpread({}, options), {}, {
27
27
  createAnalyticsEvent: getCreateAnalyticsEvent(),
28
28
  fireAnalytics: fireAnalyticsEvent(options.createAnalyticsEvent),
29
- editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d3 = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d3 === void 0 ? void 0 : _pluginInjectionApi$d3.actions
29
+ editorAnalyticsApi: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a3 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a3 === void 0 ? void 0 : _pluginInjectionApi$a3.actions
30
30
  });
31
31
  },
32
32
  apply: function apply(tr, pluginState, _, state) {
@@ -91,25 +91,27 @@ function createPlugin(options, featureFlags, pluginInjectionApi) {
91
91
  * Do not use this analytics plugin.
92
92
  * This will be deprecated soon.
93
93
  */
94
- var analyticsPlugin = function analyticsPlugin(options, api) {
95
- var _api$dependencies$fea;
96
- 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()) || {};
94
+ var analyticsPlugin = function analyticsPlugin(_ref2) {
95
+ var _api$featureFlags;
96
+ var options = _ref2.config,
97
+ api = _ref2.api;
98
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
97
99
  return {
98
100
  name: 'deprecatedAnalytics',
99
101
  pmPlugins: function pmPlugins() {
100
102
  return [{
101
103
  name: 'analyticsPlugin',
102
104
  plugin: function plugin() {
103
- return createPlugin(options, featureFlags, api);
105
+ return createPlugin(options !== null && options !== void 0 ? options : {}, featureFlags, api);
104
106
  }
105
107
  }];
106
108
  }
107
109
  };
108
110
  };
109
- export function extendPayload(_ref2) {
110
- var payload = _ref2.payload,
111
- duration = _ref2.duration,
112
- distortedDuration = _ref2.distortedDuration;
111
+ export function extendPayload(_ref3) {
112
+ var payload = _ref3.payload,
113
+ duration = _ref3.duration,
114
+ distortedDuration = _ref3.distortedDuration;
113
115
  return _objectSpread(_objectSpread({}, payload), {}, {
114
116
  attributes: _objectSpread(_objectSpread({}, payload.attributes), {}, {
115
117
  duration: duration,
@@ -7,7 +7,9 @@ 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
- var annotationPlugin = function annotationPlugin(annotationProviders, api) {
10
+ var annotationPlugin = function annotationPlugin(_ref) {
11
+ var annotationProviders = _ref.config,
12
+ api = _ref.api;
11
13
  return {
12
14
  name: 'annotation',
13
15
  marks: function marks() {
@@ -25,10 +27,10 @@ var annotationPlugin = function annotationPlugin(annotationProviders, api) {
25
27
  pmPlugins: function pmPlugins() {
26
28
  return [{
27
29
  name: 'annotation',
28
- plugin: function plugin(_ref) {
29
- var dispatch = _ref.dispatch,
30
- portalProviderAPI = _ref.portalProviderAPI,
31
- eventDispatcher = _ref.eventDispatcher;
30
+ plugin: function plugin(_ref2) {
31
+ var dispatch = _ref2.dispatch,
32
+ portalProviderAPI = _ref2.portalProviderAPI,
33
+ eventDispatcher = _ref2.eventDispatcher;
32
34
  if (annotationProviders) {
33
35
  return inlineCommentPlugin({
34
36
  dispatch: dispatch,
@@ -61,9 +63,9 @@ var annotationPlugin = function annotationPlugin(annotationProviders, api) {
61
63
  }
62
64
  }
63
65
  },
64
- contentComponent: function contentComponent(_ref2) {
65
- var editorView = _ref2.editorView,
66
- dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent;
66
+ contentComponent: function contentComponent(_ref3) {
67
+ var editorView = _ref3.editorView,
68
+ dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent;
67
69
  if (!annotationProviders) {
68
70
  return null;
69
71
  }
@@ -76,11 +78,11 @@ var annotationPlugin = function annotationPlugin(annotationProviders, api) {
76
78
  }
77
79
  };
78
80
  };
79
- function AnnotationContentComponent(_ref3) {
80
- var api = _ref3.api,
81
- editorView = _ref3.editorView,
82
- annotationProviders = _ref3.annotationProviders,
83
- dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent;
81
+ function AnnotationContentComponent(_ref4) {
82
+ var api = _ref4.api,
83
+ editorView = _ref4.editorView,
84
+ annotationProviders = _ref4.annotationProviders,
85
+ dispatchAnalyticsEvent = _ref4.dispatchAnalyticsEvent;
84
86
  var _useSharedPluginState = useSharedPluginState(api, ['annotation']),
85
87
  inlineCommentState = _useSharedPluginState.annotationState;
86
88
  if (inlineCommentState && !inlineCommentState.isVisible) {
@@ -1,25 +1,27 @@
1
1
  import React from 'react';
2
2
  import AvatarGroupPluginWrapper from './ui/AvatarGroupPluginWrapper';
3
- var avatarGroup = function avatarGroup(props, api) {
4
- var _api$dependencies, _api$dependencies$fea;
5
- 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()) || {};
3
+ var avatarGroup = function avatarGroup(_ref) {
4
+ var _api$featureFlags;
5
+ var props = _ref.config,
6
+ api = _ref.api;
7
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
6
8
  return {
7
9
  name: 'avatarGroup',
8
- primaryToolbarComponent: function primaryToolbarComponent(_ref) {
9
- var editorView = _ref.editorView,
10
- popupsMountPoint = _ref.popupsMountPoint,
11
- popupsBoundariesElement = _ref.popupsBoundariesElement,
12
- popupsScrollableElement = _ref.popupsScrollableElement,
13
- disabled = _ref.disabled,
14
- isToolbarReducedSpacing = _ref.isToolbarReducedSpacing,
15
- eventDispatcher = _ref.eventDispatcher,
16
- dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
10
+ primaryToolbarComponent: function primaryToolbarComponent(_ref2) {
11
+ var editorView = _ref2.editorView,
12
+ popupsMountPoint = _ref2.popupsMountPoint,
13
+ popupsBoundariesElement = _ref2.popupsBoundariesElement,
14
+ popupsScrollableElement = _ref2.popupsScrollableElement,
15
+ disabled = _ref2.disabled,
16
+ isToolbarReducedSpacing = _ref2.isToolbarReducedSpacing,
17
+ eventDispatcher = _ref2.eventDispatcher,
18
+ dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent;
17
19
  return /*#__PURE__*/React.createElement(AvatarGroupPluginWrapper, {
18
20
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
19
21
  editorView: editorView,
20
22
  eventDispatcher: eventDispatcher,
21
- collabEdit: props.collabEdit,
22
- takeFullWidth: props.takeFullWidth,
23
+ collabEdit: props === null || props === void 0 ? void 0 : props.collabEdit,
24
+ takeFullWidth: props === null || props === void 0 ? void 0 : props.takeFullWidth,
23
25
  featureFlags: featureFlags
24
26
  });
25
27
  }
@@ -17,9 +17,11 @@ import { keymap } from '@atlaskit/editor-common/keymaps';
17
17
  import frozenEditor from './pm-plugins/frozen-editor';
18
18
  // Chrome >= 88
19
19
  export var isChromeWithSelectionBug = browser.chrome && browser.chrome_version >= 88;
20
- var basePlugin = function basePlugin(options, api) {
21
- var _api$dependencies, _api$dependencies$fea;
22
- 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()) || {};
20
+ var basePlugin = function basePlugin(_ref) {
21
+ var _api$featureFlags;
22
+ var options = _ref.config,
23
+ api = _ref.api;
24
+ var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
23
25
  return {
24
26
  name: 'base',
25
27
  getSharedState: function getSharedState(editorState) {
@@ -30,8 +32,8 @@ var basePlugin = function basePlugin(options, api) {
30
32
  pmPlugins: function pmPlugins() {
31
33
  var plugins = [{
32
34
  name: 'filterStepsPlugin',
33
- plugin: function plugin(_ref) {
34
- var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent;
35
+ plugin: function plugin(_ref2) {
36
+ var dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent;
35
37
  return filterStepsPlugin(dispatchAnalyticsEvent);
36
38
  }
37
39
  }];
@@ -55,9 +57,9 @@ var basePlugin = function basePlugin(options, api) {
55
57
  plugin: newlinePreserveMarksPlugin
56
58
  }, {
57
59
  name: 'frozenEditor',
58
- plugin: function plugin(_ref2) {
60
+ plugin: function plugin(_ref3) {
59
61
  var _options$inputTrackin;
60
- var dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent;
62
+ var dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent;
61
63
  return options !== null && options !== void 0 && (_options$inputTrackin = options.inputTracking) !== null && _options$inputTrackin !== void 0 && _options$inputTrackin.enabled || options !== null && options !== void 0 && options.ufo ? frozenEditor(dispatchAnalyticsEvent, options.inputTracking, options.browserFreezeTracking, options.ufo) : undefined;
62
64
  }
63
65
  }, {
@@ -81,9 +83,9 @@ var basePlugin = function basePlugin(options, api) {
81
83
  }
82
84
  }, {
83
85
  name: 'contextIdentifier',
84
- plugin: function plugin(_ref3) {
85
- var dispatch = _ref3.dispatch,
86
- providerFactory = _ref3.providerFactory;
86
+ plugin: function plugin(_ref4) {
87
+ var dispatch = _ref4.dispatch,
88
+ providerFactory = _ref4.providerFactory;
87
89
  return contextIdentifierPlugin(dispatch, providerFactory);
88
90
  }
89
91
  });
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
2
  import { BeforePrimaryToolbarWrapper } from './ui/BeforePrimaryToolbarWrapper';
3
- var beforePrimaryToolbar = function beforePrimaryToolbar(props) {
3
+ var beforePrimaryToolbar = function beforePrimaryToolbar(_ref) {
4
+ var props = _ref.config;
4
5
  return {
5
6
  name: 'beforePrimaryToolbar',
6
7
  primaryToolbarComponent: function primaryToolbarComponent() {
7
8
  return /*#__PURE__*/React.createElement(BeforePrimaryToolbarWrapper, {
8
- beforePrimaryToolbarComponents: props.beforePrimaryToolbarComponents
9
+ beforePrimaryToolbarComponents: props === null || props === void 0 ? void 0 : props.beforePrimaryToolbarComponents
9
10
  });
10
11
  }
11
12
  };