@atlaskit/editor-core 189.3.13 → 189.3.15

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 (167) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/create-editor/ErrorBoundary.js +1 -1
  3. package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  4. package/dist/cjs/plugins/analytics/index.js +0 -6
  5. package/dist/cjs/plugins/analytics/utils.js +0 -29
  6. package/dist/cjs/plugins/breakout/index.js +3 -3
  7. package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -4
  8. package/dist/cjs/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
  9. package/dist/cjs/plugins/find-replace/commands-with-analytics.js +85 -71
  10. package/dist/cjs/plugins/find-replace/index.js +5 -2
  11. package/dist/cjs/plugins/find-replace/keymap.js +4 -4
  12. package/dist/cjs/plugins/index.js +1 -24
  13. package/dist/cjs/plugins/mobile-dimensions/index.js +6 -0
  14. package/dist/cjs/presets/context.js +5 -3
  15. package/dist/cjs/presets/universal.js +14 -4
  16. package/dist/cjs/ui/Appearance/Chromeless.js +18 -9
  17. package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -1
  18. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  19. package/dist/cjs/ui/AppearanceComponents/Mobile.js +7 -9
  20. package/dist/cjs/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +11 -8
  21. package/dist/cjs/ui/ContentStyles/index.js +4 -4
  22. package/dist/cjs/ui/ToolbarFeedback/index.js +1 -1
  23. package/dist/cjs/use-preset.js +0 -1
  24. package/dist/cjs/version-wrapper.js +1 -1
  25. package/dist/es2019/create-editor/ErrorBoundary.js +0 -2
  26. package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  27. package/dist/es2019/plugins/analytics/index.js +1 -1
  28. package/dist/es2019/plugins/analytics/utils.js +0 -24
  29. package/dist/es2019/plugins/breakout/index.js +1 -1
  30. package/dist/es2019/plugins/breakout/ui/LayoutButton.js +1 -1
  31. package/dist/es2019/plugins/find-replace/FindReplaceToolbarButtonWithState.js +20 -19
  32. package/dist/es2019/plugins/find-replace/commands-with-analytics.js +15 -15
  33. package/dist/es2019/plugins/find-replace/index.js +7 -2
  34. package/dist/es2019/plugins/find-replace/keymap.js +4 -4
  35. package/dist/es2019/plugins/index.js +0 -2
  36. package/dist/es2019/plugins/mobile-dimensions/index.js +6 -0
  37. package/dist/es2019/presets/context.js +2 -2
  38. package/dist/es2019/presets/universal.js +11 -1
  39. package/dist/es2019/ui/Appearance/Chromeless.js +17 -9
  40. package/dist/es2019/ui/Appearance/Comment/Comment.js +1 -1
  41. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  42. package/dist/es2019/ui/AppearanceComponents/Mobile.js +8 -9
  43. package/dist/es2019/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
  44. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  45. package/dist/es2019/ui/ToolbarFeedback/index.js +2 -2
  46. package/dist/es2019/use-preset.js +0 -1
  47. package/dist/es2019/version-wrapper.js +1 -1
  48. package/dist/esm/create-editor/ErrorBoundary.js +0 -2
  49. package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +1 -1
  50. package/dist/esm/plugins/analytics/index.js +1 -1
  51. package/dist/esm/plugins/analytics/utils.js +0 -28
  52. package/dist/esm/plugins/breakout/index.js +1 -1
  53. package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -1
  54. package/dist/esm/plugins/find-replace/FindReplaceToolbarButtonWithState.js +32 -30
  55. package/dist/esm/plugins/find-replace/commands-with-analytics.js +84 -70
  56. package/dist/esm/plugins/find-replace/index.js +5 -2
  57. package/dist/esm/plugins/find-replace/keymap.js +4 -4
  58. package/dist/esm/plugins/index.js +0 -2
  59. package/dist/esm/plugins/mobile-dimensions/index.js +6 -0
  60. package/dist/esm/presets/context.js +2 -2
  61. package/dist/esm/presets/universal.js +10 -1
  62. package/dist/esm/ui/Appearance/Chromeless.js +15 -9
  63. package/dist/esm/ui/Appearance/Comment/Comment.js +1 -1
  64. package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +3 -2
  65. package/dist/esm/ui/AppearanceComponents/Mobile.js +7 -9
  66. package/dist/esm/{plugins/expand/ui/styles.js → ui/ContentStyles/expand.js} +9 -4
  67. package/dist/esm/ui/ContentStyles/index.js +1 -1
  68. package/dist/esm/ui/ToolbarFeedback/index.js +1 -1
  69. package/dist/esm/use-preset.js +0 -1
  70. package/dist/esm/version-wrapper.js +1 -1
  71. package/dist/types/plugins/analytics/index.d.ts +1 -1
  72. package/dist/types/plugins/analytics/utils.d.ts +0 -11
  73. package/dist/types/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
  74. package/dist/types/plugins/find-replace/commands-with-analytics.d.ts +9 -9
  75. package/dist/types/plugins/find-replace/index.d.ts +5 -3
  76. package/dist/types/plugins/find-replace/keymap.d.ts +2 -1
  77. package/dist/types/plugins/index.d.ts +0 -2
  78. package/dist/types/plugins/insert-block/types.d.ts +1 -1
  79. package/dist/types/plugins/mobile-dimensions/index.d.ts +5 -1
  80. package/dist/types/presets/context.d.ts +2 -2
  81. package/dist/types/presets/universal.d.ts +5 -0
  82. package/dist/types/ui/Appearance/Chromeless.d.ts +1 -1
  83. package/dist/types/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
  84. package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
  85. package/dist/types-ts4.5/plugins/analytics/utils.d.ts +0 -11
  86. package/dist/types-ts4.5/plugins/find-replace/FindReplaceToolbarButtonWithState.d.ts +4 -2
  87. package/dist/types-ts4.5/plugins/find-replace/commands-with-analytics.d.ts +9 -9
  88. package/dist/types-ts4.5/plugins/find-replace/index.d.ts +6 -3
  89. package/dist/types-ts4.5/plugins/find-replace/keymap.d.ts +2 -1
  90. package/dist/types-ts4.5/plugins/index.d.ts +0 -2
  91. package/dist/types-ts4.5/plugins/insert-block/types.d.ts +1 -1
  92. package/dist/types-ts4.5/plugins/mobile-dimensions/index.d.ts +5 -1
  93. package/dist/types-ts4.5/presets/context.d.ts +2 -2
  94. package/dist/types-ts4.5/presets/universal.d.ts +5 -0
  95. package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +1 -1
  96. package/dist/types-ts4.5/{plugins/expand/ui/styles.d.ts → ui/ContentStyles/expand.d.ts} +1 -1
  97. package/package.json +6 -9
  98. package/dist/cjs/plugins/breakout/constants.js +0 -10
  99. package/dist/cjs/plugins/expand/commands.js +0 -184
  100. package/dist/cjs/plugins/expand/index.js +0 -111
  101. package/dist/cjs/plugins/expand/nodeviews/index.js +0 -485
  102. package/dist/cjs/plugins/expand/pm-plugins/keymap.js +0 -171
  103. package/dist/cjs/plugins/expand/pm-plugins/main.js +0 -85
  104. package/dist/cjs/plugins/expand/pm-plugins/plugin-factory.js +0 -15
  105. package/dist/cjs/plugins/expand/reducer.js +0 -20
  106. package/dist/cjs/plugins/expand/toolbar.js +0 -59
  107. package/dist/cjs/plugins/expand/types.js +0 -5
  108. package/dist/cjs/plugins/expand/ui/ExpandIconButton.js +0 -104
  109. package/dist/cjs/plugins/expand/ui/class-names.js +0 -20
  110. package/dist/cjs/plugins/expand/utils.js +0 -24
  111. package/dist/cjs/plugins/max-content-size/index.js +0 -44
  112. package/dist/es2019/plugins/breakout/constants.js +0 -4
  113. package/dist/es2019/plugins/expand/commands.js +0 -161
  114. package/dist/es2019/plugins/expand/index.js +0 -95
  115. package/dist/es2019/plugins/expand/nodeviews/index.js +0 -475
  116. package/dist/es2019/plugins/expand/pm-plugins/keymap.js +0 -197
  117. package/dist/es2019/plugins/expand/pm-plugins/main.js +0 -73
  118. package/dist/es2019/plugins/expand/pm-plugins/plugin-factory.js +0 -9
  119. package/dist/es2019/plugins/expand/reducer.js +0 -11
  120. package/dist/es2019/plugins/expand/toolbar.js +0 -52
  121. package/dist/es2019/plugins/expand/types.js +0 -1
  122. package/dist/es2019/plugins/expand/ui/ExpandIconButton.js +0 -85
  123. package/dist/es2019/plugins/expand/ui/class-names.js +0 -12
  124. package/dist/es2019/plugins/expand/utils.js +0 -1
  125. package/dist/es2019/plugins/max-content-size/index.js +0 -35
  126. package/dist/esm/plugins/breakout/constants.js +0 -4
  127. package/dist/esm/plugins/expand/commands.js +0 -177
  128. package/dist/esm/plugins/expand/index.js +0 -97
  129. package/dist/esm/plugins/expand/nodeviews/index.js +0 -477
  130. package/dist/esm/plugins/expand/pm-plugins/keymap.js +0 -165
  131. package/dist/esm/plugins/expand/pm-plugins/main.js +0 -77
  132. package/dist/esm/plugins/expand/pm-plugins/plugin-factory.js +0 -9
  133. package/dist/esm/plugins/expand/reducer.js +0 -13
  134. package/dist/esm/plugins/expand/toolbar.js +0 -52
  135. package/dist/esm/plugins/expand/types.js +0 -1
  136. package/dist/esm/plugins/expand/ui/ExpandIconButton.js +0 -95
  137. package/dist/esm/plugins/expand/ui/class-names.js +0 -14
  138. package/dist/esm/plugins/expand/utils.js +0 -1
  139. package/dist/esm/plugins/max-content-size/index.js +0 -37
  140. package/dist/types/plugins/breakout/constants.d.ts +0 -4
  141. package/dist/types/plugins/expand/commands.d.ts +0 -13
  142. package/dist/types/plugins/expand/index.d.ts +0 -31
  143. package/dist/types/plugins/expand/nodeviews/index.d.ts +0 -55
  144. package/dist/types/plugins/expand/pm-plugins/keymap.d.ts +0 -4
  145. package/dist/types/plugins/expand/pm-plugins/main.d.ts +0 -8
  146. package/dist/types/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
  147. package/dist/types/plugins/expand/reducer.d.ts +0 -3
  148. package/dist/types/plugins/expand/toolbar.d.ts +0 -3
  149. package/dist/types/plugins/expand/types.d.ts +0 -9
  150. package/dist/types/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
  151. package/dist/types/plugins/expand/ui/class-names.d.ts +0 -11
  152. package/dist/types/plugins/expand/utils.d.ts +0 -1
  153. package/dist/types/plugins/max-content-size/index.d.ts +0 -13
  154. package/dist/types-ts4.5/plugins/breakout/constants.d.ts +0 -4
  155. package/dist/types-ts4.5/plugins/expand/commands.d.ts +0 -13
  156. package/dist/types-ts4.5/plugins/expand/index.d.ts +0 -31
  157. package/dist/types-ts4.5/plugins/expand/nodeviews/index.d.ts +0 -55
  158. package/dist/types-ts4.5/plugins/expand/pm-plugins/keymap.d.ts +0 -4
  159. package/dist/types-ts4.5/plugins/expand/pm-plugins/main.d.ts +0 -8
  160. package/dist/types-ts4.5/plugins/expand/pm-plugins/plugin-factory.d.ts +0 -3
  161. package/dist/types-ts4.5/plugins/expand/reducer.d.ts +0 -3
  162. package/dist/types-ts4.5/plugins/expand/toolbar.d.ts +0 -3
  163. package/dist/types-ts4.5/plugins/expand/types.d.ts +0 -9
  164. package/dist/types-ts4.5/plugins/expand/ui/ExpandIconButton.d.ts +0 -43
  165. package/dist/types-ts4.5/plugins/expand/ui/class-names.d.ts +0 -11
  166. package/dist/types-ts4.5/plugins/expand/utils.d.ts +0 -1
  167. package/dist/types-ts4.5/plugins/max-content-size/index.d.ts +0 -13
@@ -5,7 +5,6 @@ export { default as insertBlockPlugin } from './insert-block';
5
5
  export { default as jiraIssuePlugin } from './jira-issue';
6
6
  export { default as toolbarListsIndentationPlugin } from './toolbar-lists-indentation';
7
7
  export { default as macroPlugin } from './macro';
8
- export { default as maxContentSizePlugin } from './max-content-size';
9
8
  export { default as pastePlugin } from './paste';
10
9
  export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
11
10
  export { default as breakoutPlugin } from './breakout';
@@ -16,7 +15,6 @@ export { default as annotationPlugin } from './annotation';
16
15
  export { default as analyticsPlugin } from './analytics';
17
16
  export { default as customAutoformatPlugin } from './custom-autoformat';
18
17
  export { default as feedbackDialogPlugin } from './feedback-dialog';
19
- export { default as expandPlugin, isExpandInsertionEnabled } from './expand';
20
18
  export { default as mobileDimensionsPlugin } from './mobile-dimensions';
21
19
  export { default as findReplacePlugin } from './find-replace';
22
20
  export { default as mobileSelectionPlugin } from './mobile-selection';
@@ -70,6 +70,12 @@ const createPlugin = dispatch => {
70
70
  };
71
71
  const mobileDimensionsPlugin = () => ({
72
72
  name: 'mobileDimensions',
73
+ getSharedState(editorState) {
74
+ if (!editorState) {
75
+ return undefined;
76
+ }
77
+ return mobileDimensionsPluginKey.getState(editorState);
78
+ },
73
79
  pmPlugins() {
74
80
  return [{
75
81
  name: 'mobileDimensions',
@@ -11,12 +11,12 @@ export const PresetContextProvider = ({
11
11
  }
12
12
  }, children);
13
13
  };
14
- export const usePresetContext = () => {
14
+ export function usePresetContext() {
15
15
  const {
16
16
  editorApi
17
17
  } = useContext(EditorAPIContext);
18
18
  return editorApi;
19
- };
19
+ }
20
20
  export const useSetPresetContext = () => {
21
21
  const {
22
22
  setEditorApi
@@ -1,9 +1,10 @@
1
- import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
1
+ import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, insertBlockPlugin, jiraIssuePlugin, toolbarListsIndentationPlugin, macroPlugin, tasksAndDecisionsPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
2
2
  import { panelPlugin } from '@atlaskit/editor-plugin-panel';
3
3
  import { textColorPlugin } from '@atlaskit/editor-plugin-text-color';
4
4
  import { historyPlugin } from '@atlaskit/editor-plugin-history';
5
5
  import { statusPlugin } from '@atlaskit/editor-plugin-status';
6
6
  import { datePlugin } from '@atlaskit/editor-plugin-date';
7
+ import { maxContentSizePlugin } from '@atlaskit/editor-plugin-max-content-size';
7
8
  import { captionPlugin } from '@atlaskit/editor-plugin-caption';
8
9
  import { borderPlugin } from '@atlaskit/editor-plugin-border';
9
10
  import { helpDialogPlugin } from '@atlaskit/editor-plugin-help-dialog';
@@ -26,6 +27,7 @@ import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
26
27
  import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
27
28
  import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
28
29
  import { placeholderTextPlugin } from '@atlaskit/editor-plugin-placeholder-text';
30
+ import { expandPlugin } from '@atlaskit/editor-plugin-expand';
29
31
  import { isFullPage as fullPageCheck } from '../utils/is-full-page';
30
32
  import { getMediaFeatureFlag } from '@atlaskit/media-common';
31
33
  import { createDefaultPreset } from './default';
@@ -415,4 +417,12 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
415
417
  appearance
416
418
  }]);
417
419
  return finalPreset;
420
+ }
421
+ export function isExpandInsertionEnabled({
422
+ allowExpand
423
+ }) {
424
+ if (allowExpand && typeof allowExpand === 'object') {
425
+ return !!allowExpand.allowInsertion;
426
+ }
427
+ return false;
418
428
  }
@@ -1,13 +1,13 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /** @jsx jsx */
3
- import React from 'react';
3
+ import React, { Fragment } from 'react';
4
4
  import { css, jsx } from '@emotion/react';
5
5
  import PluginSlot from '../PluginSlot';
6
- import WithPluginState from '../WithPluginState';
7
6
  import { createEditorContentStyle } from '../ContentStyles';
8
- import { pluginKey as maxContentSizePluginKey } from '../../plugins/max-content-size';
9
7
  import { scrollbarStyles } from '../styles';
10
8
  import WithFlash from '../WithFlash';
9
+ import { usePresetContext } from '../../presets/context';
10
+ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
11
11
  const chromelessEditor = css`
12
12
  line-height: 20px;
13
13
  height: auto;
@@ -91,12 +91,20 @@ export default class Editor extends React.Component {
91
91
  });
92
92
  }
93
93
  render() {
94
- return jsx(WithPluginState, {
95
- plugins: {
96
- maxContentSize: maxContentSizePluginKey
97
- },
98
- render: this.renderChrome
94
+ return jsx(RenderWithPluginState, {
95
+ renderChrome: this.renderChrome
99
96
  });
100
97
  }
101
98
  }
102
- _defineProperty(Editor, "displayName", 'ChromelessEditorAppearance');
99
+ _defineProperty(Editor, "displayName", 'ChromelessEditorAppearance');
100
+ function RenderWithPluginState({
101
+ renderChrome
102
+ }) {
103
+ const api = usePresetContext();
104
+ const {
105
+ maxContentSizeState
106
+ } = useSharedPluginState(api, ['maxContentSize']);
107
+ return jsx(Fragment, null, renderChrome({
108
+ maxContentSize: maxContentSizeState
109
+ }));
110
+ }
@@ -238,7 +238,7 @@ function RenderWithPluginState({
238
238
  } = useSharedPluginState(api, ['media', 'maxContentSize']);
239
239
  return jsx(Fragment, null, renderChrome({
240
240
  maxContentSize: maxContentSizeState,
241
- mediaState
241
+ mediaState: mediaState !== null && mediaState !== void 0 ? mediaState : undefined
242
242
  }));
243
243
  }
244
244
  export const CommentEditorWithIntl = injectIntl(Editor);
@@ -13,7 +13,7 @@ import { fullPageMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
14
14
  import { usePresetContext } from '../../../presets/context';
15
15
  export const EditorToolbar = /*#__PURE__*/React.memo(props => {
16
- var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3;
16
+ var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$collabEdit, _props$collabEdit2, _props$collabEdit3, _editorAPI$analytics;
17
17
  const [shouldSplitToolbar, setShouldSplitToolbar] = useState(false);
18
18
  const editorAPI = usePresetContext();
19
19
 
@@ -62,7 +62,8 @@ export const EditorToolbar = /*#__PURE__*/React.memo(props => {
62
62
  editorView: props.editorView,
63
63
  containerElement: props.containerElement,
64
64
  dispatchAnalyticsEvent: props.dispatchAnalyticsEvent,
65
- featureFlags: props.featureFlags
65
+ featureFlags: props.featureFlags,
66
+ editorAnalyticsAPI: editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$analytics = editorAPI.analytics) === null || _editorAPI$analytics === void 0 ? void 0 : _editorAPI$analytics.actions
66
67
  }) : null, !!props.customPrimaryToolbarComponents && 'after' in props.customPrimaryToolbarComponents ? props.customPrimaryToolbarComponents.after : props.customPrimaryToolbarComponents);
67
68
  useEffect(() => {
68
69
  if (twoLineEditorToolbar) {
@@ -1,13 +1,11 @@
1
1
  /** @jsx jsx */
2
2
  import React, { useCallback, forwardRef } from 'react';
3
3
  import { css, jsx } from '@emotion/react';
4
- import { pluginKey as maxContentSizePluginKey } from '../../plugins/max-content-size';
5
- import { mobileDimensionsPluginKey } from '../../plugins/mobile-dimensions/plugin-factory';
6
- import WithPluginState from '../WithPluginState';
7
4
  import WithFlash from '../WithFlash';
8
5
  import { createEditorContentStyle } from '../ContentStyles';
9
6
  import { ClickAreaMobile as ClickArea } from '../Addon';
10
7
  import { usePresetContext } from '../../presets/context';
8
+ import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
11
9
  const mobileEditor = css`
12
10
  min-height: 30px;
13
11
  width: 100%;
@@ -33,6 +31,10 @@ export const MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearanc
33
31
  }, ref) {
34
32
  var _api$base2;
35
33
  const api = usePresetContext();
34
+ const {
35
+ maxContentSizeState,
36
+ mobileDimensionsState
37
+ } = useSharedPluginState(api, ['maxContentSize', 'mobileDimensions']);
36
38
  const render = useCallback(({
37
39
  maxContentSize,
38
40
  mobileDimensions
@@ -85,11 +87,8 @@ export const MobileAppearance = /*#__PURE__*/forwardRef(function MobileAppearanc
85
87
  className: "ak-editor-content-area"
86
88
  }, children)))));
87
89
  }, [children, editorView, persistScrollGutter, editorDisabled, ref, featureFlags, api === null || api === void 0 ? void 0 : (_api$base2 = api.base) === null || _api$base2 === void 0 ? void 0 : _api$base2.sharedState]);
88
- return jsx(WithPluginState, {
89
- plugins: {
90
- maxContentSize: maxContentSizePluginKey,
91
- mobileDimensions: mobileDimensionsPluginKey
92
- },
93
- render: render
90
+ return render({
91
+ maxContentSize: maxContentSizeState,
92
+ mobileDimensions: mobileDimensionsState
94
93
  });
95
94
  });
@@ -1,14 +1,17 @@
1
1
  import { css } from '@emotion/react';
2
+ import { DN50, N40A, N50A, N80A, R200, R300, R50 } from '@atlaskit/theme/colors';
3
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
2
4
  import { themed } from '@atlaskit/theme/components';
3
- import { R50, R300, N40A, N50A, N80A, DN50, R200 } from '@atlaskit/theme/colors';
5
+ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
4
6
  import { sharedExpandStyles } from '@atlaskit/editor-common/ui';
5
- import { SelectionStyle, getSelectionStyles, akLayoutGutterOffset, akEditorSelectedNodeClassName } from '@atlaskit/editor-shared-styles';
6
- import { BreakoutCssClassName } from '../../breakout/constants';
7
- import { expandClassNames } from './class-names';
7
+ import { akEditorSelectedNodeClassName, akLayoutGutterOffset, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
8
+ import { expandClassNames } from '@atlaskit/editor-common/styles';
8
9
  const EXPAND_SELECTED_BACKGROUND = themed({
9
10
  light: "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))",
10
11
  dark: "var(--ds-background-neutral-subtle, rgba(9, 10, 11, 0.29))"
11
12
  });
13
+
14
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
12
15
  const EXPAND_ICON_COLOR = props => css`
13
16
  color: ${themed({
14
17
  light: `var(--ds-icon-subtle, ${N80A})`,
@@ -37,6 +40,8 @@ const DANGER_STATE_BORDER_COLOR = themed({
37
40
  const DANGER_STATE_BORDER_RADIUS = themed({
38
41
  dark: '3px'
39
42
  });
43
+
44
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
40
45
  export const expandStyles = props => css`
41
46
  .${expandClassNames.icon} > div {
42
47
  display: flex;
@@ -14,7 +14,7 @@ import { layoutStyles } from './layout';
14
14
  import { panelStyles } from './panel';
15
15
  import { placeholderTextStyles } from '@atlaskit/editor-plugin-placeholder-text/styles';
16
16
  import { extensionStyles } from '../../plugins/extension/ui/styles';
17
- import { expandStyles } from '../../plugins/expand/ui/styles';
17
+ import { expandStyles } from './expand';
18
18
  import { MediaSharedClassNames } from '@atlaskit/editor-common/styles';
19
19
  import { findReplaceStyles } from '../../plugins/find-replace/styles';
20
20
  import { taskDecisionStyles } from '../../plugins/tasks-and-decisions/styles';
@@ -71,12 +71,12 @@ class ToolbarFeedbackInternal extends PureComponent {
71
71
  });
72
72
  });
73
73
  _defineProperty(this, "openJiraIssueCollector", async () => {
74
- var _this$props$api, _window$localStorage$, _basePluginState$cont;
74
+ var _this$props$api, _this$props$api$base, _window$localStorage$, _basePluginState$cont;
75
75
  this.setState({
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.base.sharedState.currentState();
79
+ const basePluginState = (_this$props$api = this.props.api) === null || _this$props$api === void 0 ? void 0 : (_this$props$api$base = _this$props$api.base) === null || _this$props$api$base === 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'];
@@ -35,7 +35,6 @@ import { usePresetContext } from './presets/context';
35
35
  */
36
36
  export function usePreset(createPreset, dependencies) {
37
37
  const editorApi = usePresetContext();
38
-
39
38
  // eslint-disable-next-line react-hooks/exhaustive-deps
40
39
  const preset = useMemo(createPreset, dependencies);
41
40
  return {
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "189.3.13";
2
+ export const version = "189.3.15";
@@ -16,8 +16,6 @@ import uuid from 'uuid';
16
16
  import { ExperienceStore } from '@atlaskit/editor-common/ufo';
17
17
  import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
18
18
  import { sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
19
- // eslint-disable-next-line import/no-extraneous-dependencies
20
-
21
19
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
22
20
  import { getDocStructure } from '../utils/document-logger';
23
21
  import { WithEditorView } from './WithEditorView';
@@ -7,4 +7,4 @@ import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
7
7
  // For reasoning behind styles, see comments in:
8
8
  // ./getInlineNodeViewProducer -> portalChildren()
9
9
 
10
- export var InlineNodeViewSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > *:not(span[aria-hidden='true'].zeroWidthSpaceContainer) {\n white-space: pre-wrap;\n }\n // Prevent visually hidden assistive text from being selected.\n & > .assistive {\n user-select: none;\n }\n }\n /** Remove browser deafult selections style. This prevents\n unexpected visual artefacts in Safari when navigating\n with the keyboard or making range selections. */\n &.ua-safari {\n .", " {\n ::selection,\n *::selection {\n background: transparent;\n }\n }\n }\n\n &.ua-chrome .", " > span {\n user-select: none;\n }\n\n .", "AddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, ZERO_WIDTH_SPACE);
10
+ export var InlineNodeViewSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n display: inline;\n user-select: all;\n /* Collapses zero width spaces inside the inline node view\n to prevent the node from line breaking too early.\n */\n white-space: nowrap;\n /* Then reset to the Editor default so we don't interfere\n with any component styling. */\n & > *:not(.zeroWidthSpaceContainer) {\n white-space: pre-wrap;\n }\n // Prevent visually hidden assistive text from being selected.\n & > .assistive {\n user-select: none;\n }\n }\n /** Remove browser deafult selections style. This prevents\n unexpected visual artefacts in Safari when navigating\n with the keyboard or making range selections. */\n &.ua-safari {\n .", " {\n ::selection,\n *::selection {\n background: transparent;\n }\n }\n }\n\n &.ua-chrome .", " > span {\n user-select: none;\n }\n\n .", "AddZeroWidthSpace {\n ::after {\n content: '", "';\n }\n }\n"])), inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, inlineNodeViewClassname, ZERO_WIDTH_SPACE);
@@ -1,3 +1,3 @@
1
1
  import analyticsPlugin from './plugin';
2
- export { withAnalytics, addAnalytics } from './utils';
2
+ export { addAnalytics } from './utils';
3
3
  export default analyticsPlugin;
@@ -26,32 +26,4 @@ export function addAnalytics(state, tr, payload) {
26
26
  }
27
27
  editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(payload, channel)(tr);
28
28
  return tr;
29
- }
30
- // Below function has been copied to packages/editor/editor-plugin-ai/src/utils/analytics.ts
31
- // If changes are made to this function, please make the same update in the linked file.
32
- /**
33
- *
34
- * @private
35
- * @deprecated
36
- *
37
- * Do not use this anymore. Please use @atlaskit/editor-plugin-analytics
38
- *
39
- */
40
- export function withAnalytics(payload, channel) {
41
- return function (command) {
42
- return function (state, dispatch, view) {
43
- return command(state, function (tr) {
44
- if (dispatch) {
45
- if (payload instanceof Function) {
46
- var dynamicPayload = payload(state);
47
- if (dynamicPayload) {
48
- dispatch(addAnalytics(state, tr, dynamicPayload, channel));
49
- }
50
- } else {
51
- dispatch(addAnalytics(state, tr, payload, channel));
52
- }
53
- }
54
- }, view);
55
- };
56
- };
57
29
  }
@@ -8,10 +8,10 @@ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
8
8
  import { breakout } from '@atlaskit/adf-schema';
9
9
  import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
10
10
  import LayoutButton from './ui/LayoutButton';
11
- import { BreakoutCssClassName } from './constants';
12
11
  import { pluginKey } from './plugin-key';
13
12
  import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
14
13
  import { akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
14
+ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
15
15
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
16
16
  var BreakoutView = /*#__PURE__*/function () {
17
17
  function BreakoutView(
@@ -22,7 +22,7 @@ import ToolbarButton from '../../../ui/ToolbarButton';
22
22
  import { getBreakoutMode } from '../utils/get-breakout-mode';
23
23
  import { setBreakoutMode } from '../commands/set-breakout-mode';
24
24
  import { removeBreakout } from '../commands/remove-breakout';
25
- import { BreakoutCssClassName } from '../constants';
25
+ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
26
26
  import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
27
27
  import { getPluginState } from '../plugin-key';
28
28
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
@@ -5,15 +5,17 @@ import { cancelSearchWithAnalytics, replaceWithAnalytics, replaceAllWithAnalytic
5
5
  import { blur, toggleMatchCase } from './commands';
6
6
  import FindReplaceToolbarButton from './ui/FindReplaceToolbarButton';
7
7
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
8
- var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithState(props) {
9
- var popupsBoundariesElement = props.popupsBoundariesElement,
10
- popupsMountPoint = props.popupsMountPoint,
11
- popupsScrollableElement = props.popupsScrollableElement,
12
- isToolbarReducedSpacing = props.isToolbarReducedSpacing,
13
- editorView = props.editorView,
14
- containerElement = props.containerElement,
15
- dispatchAnalyticsEvent = props.dispatchAnalyticsEvent,
16
- featureFlags = props.featureFlags;
8
+ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithState(_ref) {
9
+ var popupsBoundariesElement = _ref.popupsBoundariesElement,
10
+ popupsMountPoint = _ref.popupsMountPoint,
11
+ popupsScrollableElement = _ref.popupsScrollableElement,
12
+ isToolbarReducedSpacing = _ref.isToolbarReducedSpacing,
13
+ editorView = _ref.editorView,
14
+ containerElement = _ref.containerElement,
15
+ dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
16
+ featureFlags = _ref.featureFlags,
17
+ editorAnalyticsAPI = _ref.editorAnalyticsAPI,
18
+ takeFullWidth = _ref.takeFullWidth;
17
19
  if (!editorView) {
18
20
  return null;
19
21
  }
@@ -34,50 +36,50 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
34
36
  };
35
37
  var handleActivate = function handleActivate() {
36
38
  runWithEditorFocused(function () {
37
- return dispatchCommand(activateWithAnalytics({
39
+ return dispatchCommand(activateWithAnalytics(editorAnalyticsAPI)({
38
40
  triggerMethod: TRIGGER_METHOD.TOOLBAR
39
41
  }));
40
42
  });
41
43
  };
42
44
  var handleFind = function handleFind(keyword) {
43
45
  runWithEditorFocused(function () {
44
- return dispatchCommand(findWithAnalytics({
46
+ return dispatchCommand(findWithAnalytics(editorAnalyticsAPI)({
45
47
  editorView: editorView,
46
48
  containerElement: containerElement,
47
49
  keyword: keyword
48
50
  }));
49
51
  });
50
52
  };
51
- var handleFindNext = function handleFindNext(_ref) {
52
- var triggerMethod = _ref.triggerMethod;
53
+ var handleFindNext = function handleFindNext(_ref2) {
54
+ var triggerMethod = _ref2.triggerMethod;
53
55
  runWithEditorFocused(function () {
54
- return dispatchCommand(findNextWithAnalytics({
56
+ return dispatchCommand(findNextWithAnalytics(editorAnalyticsAPI)({
55
57
  triggerMethod: triggerMethod
56
58
  }));
57
59
  });
58
60
  };
59
- var handleFindPrev = function handleFindPrev(_ref2) {
60
- var triggerMethod = _ref2.triggerMethod;
61
+ var handleFindPrev = function handleFindPrev(_ref3) {
62
+ var triggerMethod = _ref3.triggerMethod;
61
63
  runWithEditorFocused(function () {
62
- return dispatchCommand(findPrevWithAnalytics({
64
+ return dispatchCommand(findPrevWithAnalytics(editorAnalyticsAPI)({
63
65
  triggerMethod: triggerMethod
64
66
  }));
65
67
  });
66
68
  };
67
- var handleReplace = function handleReplace(_ref3) {
68
- var triggerMethod = _ref3.triggerMethod,
69
- replaceText = _ref3.replaceText;
69
+ var handleReplace = function handleReplace(_ref4) {
70
+ var triggerMethod = _ref4.triggerMethod,
71
+ replaceText = _ref4.replaceText;
70
72
  runWithEditorFocused(function () {
71
- return dispatchCommand(replaceWithAnalytics({
73
+ return dispatchCommand(replaceWithAnalytics(editorAnalyticsAPI)({
72
74
  triggerMethod: triggerMethod,
73
75
  replaceText: replaceText
74
76
  }));
75
77
  });
76
78
  };
77
- var handleReplaceAll = function handleReplaceAll(_ref4) {
78
- var replaceText = _ref4.replaceText;
79
+ var handleReplaceAll = function handleReplaceAll(_ref5) {
80
+ var replaceText = _ref5.replaceText;
79
81
  runWithEditorFocused(function () {
80
- return dispatchCommand(replaceAllWithAnalytics({
82
+ return dispatchCommand(replaceAllWithAnalytics(editorAnalyticsAPI)({
81
83
  replaceText: replaceText
82
84
  }));
83
85
  });
@@ -85,9 +87,9 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
85
87
  var handleFindBlur = function handleFindBlur() {
86
88
  dispatchCommand(blur());
87
89
  };
88
- var handleCancel = function handleCancel(_ref5) {
89
- var triggerMethod = _ref5.triggerMethod;
90
- dispatchCommand(cancelSearchWithAnalytics({
90
+ var handleCancel = function handleCancel(_ref6) {
91
+ var triggerMethod = _ref6.triggerMethod;
92
+ dispatchCommand(cancelSearchWithAnalytics(editorAnalyticsAPI)({
91
93
  triggerMethod: triggerMethod
92
94
  }));
93
95
  editorView.focus();
@@ -101,8 +103,8 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
101
103
  plugins: {
102
104
  findReplaceState: findReplacePluginKey
103
105
  },
104
- render: function render(_ref6) {
105
- var findReplaceState = _ref6.findReplaceState;
106
+ render: function render(_ref7) {
107
+ var findReplaceState = _ref7.findReplaceState;
106
108
  if (!findReplaceState) {
107
109
  return null;
108
110
  }
@@ -129,7 +131,7 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
129
131
  onFindPrev: handleFindPrev,
130
132
  onReplace: handleReplace,
131
133
  onReplaceAll: handleReplaceAll,
132
- takeFullWidth: !!props.takeFullWidth
134
+ takeFullWidth: !!takeFullWidth
133
135
  });
134
136
  }
135
137
  });
@@ -1,81 +1,95 @@
1
1
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { withAnalytics } from '../analytics';
3
2
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
4
4
  import { activate, find, findNext, findPrevious, replace, replaceAll, cancelSearch } from './commands';
5
- export var activateWithAnalytics = function activateWithAnalytics(_ref) {
6
- var triggerMethod = _ref.triggerMethod;
7
- return withAnalytics(function (state) {
8
- return {
9
- eventType: EVENT_TYPE.UI,
10
- action: ACTION.ACTIVATED,
11
- actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
5
+ export var activateWithAnalytics = function activateWithAnalytics(editorAnalyticsAPI) {
6
+ return function (_ref) {
7
+ var triggerMethod = _ref.triggerMethod;
8
+ return withAnalytics(editorAnalyticsAPI, function (state) {
9
+ return {
10
+ eventType: EVENT_TYPE.UI,
11
+ action: ACTION.ACTIVATED,
12
+ actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
13
+ attributes: {
14
+ inputMethod: state.selection instanceof TextSelection && !state.selection.empty ? INPUT_METHOD.PREFILL : INPUT_METHOD.KEYBOARD,
15
+ triggerMethod: triggerMethod
16
+ }
17
+ };
18
+ })(activate());
19
+ };
20
+ };
21
+ export var findWithAnalytics = function findWithAnalytics(editorAnalyticsAPI) {
22
+ return function (_ref2) {
23
+ var editorView = _ref2.editorView,
24
+ containerElement = _ref2.containerElement,
25
+ keyword = _ref2.keyword;
26
+ return withAnalytics(editorAnalyticsAPI, {
27
+ eventType: EVENT_TYPE.TRACK,
28
+ action: ACTION.FIND_PERFORMED,
29
+ actionSubject: ACTION_SUBJECT.TEXT
30
+ })(find(editorView, containerElement, keyword));
31
+ };
32
+ };
33
+ export var findNextWithAnalytics = function findNextWithAnalytics(editorAnalyticsAPI) {
34
+ return function (_ref3) {
35
+ var triggerMethod = _ref3.triggerMethod;
36
+ return withAnalytics(editorAnalyticsAPI, {
37
+ eventType: EVENT_TYPE.TRACK,
38
+ action: ACTION.FIND_NEXT_PERFORMED,
39
+ actionSubject: ACTION_SUBJECT.TEXT,
12
40
  attributes: {
13
- inputMethod: state.selection instanceof TextSelection && !state.selection.empty ? INPUT_METHOD.PREFILL : INPUT_METHOD.KEYBOARD,
14
41
  triggerMethod: triggerMethod
15
42
  }
16
- };
17
- })(activate());
18
- };
19
- export var findWithAnalytics = function findWithAnalytics(_ref2) {
20
- var editorView = _ref2.editorView,
21
- containerElement = _ref2.containerElement,
22
- keyword = _ref2.keyword;
23
- return withAnalytics({
24
- eventType: EVENT_TYPE.TRACK,
25
- action: ACTION.FIND_PERFORMED,
26
- actionSubject: ACTION_SUBJECT.TEXT
27
- })(find(editorView, containerElement, keyword));
43
+ })(findNext());
44
+ };
28
45
  };
29
- export var findNextWithAnalytics = function findNextWithAnalytics(_ref3) {
30
- var triggerMethod = _ref3.triggerMethod;
31
- return withAnalytics({
32
- eventType: EVENT_TYPE.TRACK,
33
- action: ACTION.FIND_NEXT_PERFORMED,
34
- actionSubject: ACTION_SUBJECT.TEXT,
35
- attributes: {
36
- triggerMethod: triggerMethod
37
- }
38
- })(findNext());
39
- };
40
- export var findPrevWithAnalytics = function findPrevWithAnalytics(_ref4) {
41
- var triggerMethod = _ref4.triggerMethod;
42
- return withAnalytics({
43
- eventType: EVENT_TYPE.TRACK,
44
- action: ACTION.FIND_PREV_PERFORMED,
45
- actionSubject: ACTION_SUBJECT.TEXT,
46
- attributes: {
47
- triggerMethod: triggerMethod
48
- }
49
- })(findPrevious());
46
+ export var findPrevWithAnalytics = function findPrevWithAnalytics(editorAnalyticsAPI) {
47
+ return function (_ref4) {
48
+ var triggerMethod = _ref4.triggerMethod;
49
+ return withAnalytics(editorAnalyticsAPI, {
50
+ eventType: EVENT_TYPE.TRACK,
51
+ action: ACTION.FIND_PREV_PERFORMED,
52
+ actionSubject: ACTION_SUBJECT.TEXT,
53
+ attributes: {
54
+ triggerMethod: triggerMethod
55
+ }
56
+ })(findPrevious());
57
+ };
50
58
  };
51
- export var replaceWithAnalytics = function replaceWithAnalytics(_ref5) {
52
- var triggerMethod = _ref5.triggerMethod,
53
- replaceText = _ref5.replaceText;
54
- return withAnalytics({
55
- eventType: EVENT_TYPE.TRACK,
56
- action: ACTION.REPLACED_ONE,
57
- actionSubject: ACTION_SUBJECT.TEXT,
58
- attributes: {
59
- triggerMethod: triggerMethod
60
- }
61
- })(replace(replaceText));
59
+ export var replaceWithAnalytics = function replaceWithAnalytics(editorAnalyticsAPI) {
60
+ return function (_ref5) {
61
+ var triggerMethod = _ref5.triggerMethod,
62
+ replaceText = _ref5.replaceText;
63
+ return withAnalytics(editorAnalyticsAPI, {
64
+ eventType: EVENT_TYPE.TRACK,
65
+ action: ACTION.REPLACED_ONE,
66
+ actionSubject: ACTION_SUBJECT.TEXT,
67
+ attributes: {
68
+ triggerMethod: triggerMethod
69
+ }
70
+ })(replace(replaceText));
71
+ };
62
72
  };
63
- export var replaceAllWithAnalytics = function replaceAllWithAnalytics(_ref6) {
64
- var replaceText = _ref6.replaceText;
65
- return withAnalytics({
66
- eventType: EVENT_TYPE.TRACK,
67
- action: ACTION.REPLACED_ALL,
68
- actionSubject: ACTION_SUBJECT.TEXT
69
- })(replaceAll(replaceText));
73
+ export var replaceAllWithAnalytics = function replaceAllWithAnalytics(editorAnalyticsAPI) {
74
+ return function (_ref6) {
75
+ var replaceText = _ref6.replaceText;
76
+ return withAnalytics(editorAnalyticsAPI, {
77
+ eventType: EVENT_TYPE.TRACK,
78
+ action: ACTION.REPLACED_ALL,
79
+ actionSubject: ACTION_SUBJECT.TEXT
80
+ })(replaceAll(replaceText));
81
+ };
70
82
  };
71
- export var cancelSearchWithAnalytics = function cancelSearchWithAnalytics(_ref7) {
72
- var triggerMethod = _ref7.triggerMethod;
73
- return withAnalytics({
74
- eventType: EVENT_TYPE.UI,
75
- action: ACTION.DEACTIVATED,
76
- actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
77
- attributes: {
78
- triggerMethod: triggerMethod
79
- }
80
- })(cancelSearch());
83
+ export var cancelSearchWithAnalytics = function cancelSearchWithAnalytics(editorAnalyticsAPI) {
84
+ return function (_ref7) {
85
+ var triggerMethod = _ref7.triggerMethod;
86
+ return withAnalytics(editorAnalyticsAPI, {
87
+ eventType: EVENT_TYPE.UI,
88
+ action: ACTION.DEACTIVATED,
89
+ actionSubject: ACTION_SUBJECT.FIND_REPLACE_DIALOG,
90
+ attributes: {
91
+ triggerMethod: triggerMethod
92
+ }
93
+ })(cancelSearch());
94
+ };
81
95
  };