@atlaskit/editor-plugin-find-replace 26.0.3 → 26.0.5

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 (53) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/findReplacePlugin.js +2 -2
  3. package/dist/cjs/pm-plugins/commands-with-analytics.js +31 -31
  4. package/dist/cjs/pm-plugins/keymap.js +2 -2
  5. package/dist/cjs/pm-plugins/plugin-factory.js +2 -1
  6. package/dist/cjs/pm-plugins/utils/index.js +2 -2
  7. package/dist/cjs/ui/Find.js +11 -11
  8. package/dist/cjs/ui/FindReplace.js +2 -2
  9. package/dist/cjs/ui/FindReplaceDropDownOrToolbarButtonWithState.js +2 -2
  10. package/dist/cjs/ui/FindReplaceDropdown.js +8 -7
  11. package/dist/cjs/ui/FindReplaceToolbarButton.js +17 -14
  12. package/dist/cjs/ui/Replace.js +18 -18
  13. package/dist/cjs/ui/ui-styles.js +4 -4
  14. package/dist/es2019/findReplacePlugin.js +1 -1
  15. package/dist/es2019/pm-plugins/commands-with-analytics.js +2 -2
  16. package/dist/es2019/pm-plugins/keymap.js +1 -1
  17. package/dist/es2019/pm-plugins/plugin-factory.js +2 -1
  18. package/dist/es2019/pm-plugins/utils/index.js +1 -1
  19. package/dist/es2019/ui/Find.js +2 -2
  20. package/dist/es2019/ui/FindReplace.js +1 -1
  21. package/dist/es2019/ui/FindReplaceDropDownOrToolbarButtonWithState.js +1 -1
  22. package/dist/es2019/ui/FindReplaceDropdown.js +5 -4
  23. package/dist/es2019/ui/FindReplaceToolbarButton.js +8 -5
  24. package/dist/es2019/ui/Replace.js +2 -2
  25. package/dist/es2019/ui/ui-styles.js +1 -1
  26. package/dist/esm/findReplacePlugin.js +1 -1
  27. package/dist/esm/pm-plugins/commands-with-analytics.js +2 -2
  28. package/dist/esm/pm-plugins/keymap.js +1 -1
  29. package/dist/esm/pm-plugins/plugin-factory.js +2 -1
  30. package/dist/esm/pm-plugins/utils/index.js +1 -1
  31. package/dist/esm/ui/Find.js +2 -2
  32. package/dist/esm/ui/FindReplace.js +1 -1
  33. package/dist/esm/ui/FindReplaceDropDownOrToolbarButtonWithState.js +1 -1
  34. package/dist/esm/ui/FindReplaceDropdown.js +5 -4
  35. package/dist/esm/ui/FindReplaceToolbarButton.js +8 -5
  36. package/dist/esm/ui/Replace.js +2 -2
  37. package/dist/esm/ui/ui-styles.js +1 -1
  38. package/dist/types/findReplacePluginType.d.ts +8 -8
  39. package/dist/types/pm-plugins/commands-with-analytics.d.ts +4 -2
  40. package/dist/types/pm-plugins/commands.d.ts +1 -1
  41. package/dist/types/pm-plugins/keymap.d.ts +1 -1
  42. package/dist/types/pm-plugins/main.d.ts +2 -1
  43. package/dist/types/pm-plugins/plugin-factory.d.ts +1 -1
  44. package/dist/types/pm-plugins/utils/commands.d.ts +1 -1
  45. package/dist/types/pm-plugins/utils/index.d.ts +1 -1
  46. package/dist/types/types/index.d.ts +2 -2
  47. package/dist/types/ui/Find.d.ts +1 -1
  48. package/dist/types/ui/FindReplace.d.ts +2 -1
  49. package/dist/types/ui/FindReplaceDropdown.d.ts +1 -1
  50. package/dist/types/ui/FindReplaceToolbarButton.d.ts +1 -1
  51. package/dist/types/ui/Replace.d.ts +2 -2
  52. package/dist/types/ui/hooks/useFindReplacePluginStateSelector.d.ts +1 -1
  53. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-find-replace
2
2
 
3
+ ## 26.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 26.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 26.0.3
4
16
 
5
17
  ### Patch Changes
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.findReplacePlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _analytics = require("@atlaskit/editor-common/analytics");
9
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
10
10
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
11
  var _types = require("@atlaskit/editor-common/types");
12
12
  var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
@@ -148,7 +148,7 @@ var findReplacePlugin = exports.findReplacePlugin = function findReplacePlugin(_
148
148
  if (api !== null && api !== void 0 && (_api$analytics2 = api.analytics) !== null && _api$analytics2 !== void 0 && _api$analytics2.actions) {
149
149
  var _api$analytics3;
150
150
  (0, _commandsWithAnalytics.activateWithAnalytics)(api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions, api === null || api === void 0 ? void 0 : api.editorViewMode)({
151
- triggerMethod: triggerMethod || _analytics.TRIGGER_METHOD.EXTERNAL
151
+ triggerMethod: triggerMethod || _enums.TRIGGER_METHOD.EXTERNAL
152
152
  })(state, dispatch);
153
153
  } else {
154
154
  (0, _commands.activate)()(state, dispatch);
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.replaceWithAnalytics = exports.replaceAllWithAnalytics = exports.findWithAnalytics = exports.findPrevWithAnalytics = exports.findNextWithAnalytics = exports.cancelSearchWithAnalytics = exports.activateWithAnalytics = void 0;
7
- var _analytics = require("@atlaskit/editor-common/analytics");
8
- var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
7
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
8
+ var _withAnalytics = require("@atlaskit/editor-common/withAnalytics");
9
9
  var _state = require("@atlaskit/editor-prosemirror/state");
10
10
  var _commands = require("./commands");
11
11
  /**
@@ -16,14 +16,14 @@ var _commands = require("./commands");
16
16
  var activateWithAnalytics = exports.activateWithAnalytics = function activateWithAnalytics(editorAnalyticsAPI, editorViewModeAPI) {
17
17
  return function (_ref) {
18
18
  var triggerMethod = _ref.triggerMethod;
19
- return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, function (state) {
19
+ return (0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, function (state) {
20
20
  var _editorViewModeAPI$sh, _editorViewModeAPI$sh2;
21
21
  return {
22
- eventType: _analytics.EVENT_TYPE.UI,
23
- action: _analytics.ACTION.ACTIVATED,
24
- actionSubject: _analytics.ACTION_SUBJECT.FIND_REPLACE_DIALOG,
22
+ eventType: _enums.EVENT_TYPE.UI,
23
+ action: _enums.ACTION.ACTIVATED,
24
+ actionSubject: _enums.ACTION_SUBJECT.FIND_REPLACE_DIALOG,
25
25
  attributes: {
26
- inputMethod: state.selection instanceof _state.TextSelection && !state.selection.empty ? _analytics.INPUT_METHOD.PREFILL : _analytics.INPUT_METHOD.KEYBOARD,
26
+ inputMethod: state.selection instanceof _state.TextSelection && !state.selection.empty ? _enums.INPUT_METHOD.PREFILL : _enums.INPUT_METHOD.KEYBOARD,
27
27
  triggerMethod: triggerMethod,
28
28
  editorViewMode: (_editorViewModeAPI$sh = editorViewModeAPI === null || editorViewModeAPI === void 0 || (_editorViewModeAPI$sh2 = editorViewModeAPI.sharedState.currentState()) === null || _editorViewModeAPI$sh2 === void 0 ? void 0 : _editorViewModeAPI$sh2.mode) !== null && _editorViewModeAPI$sh !== void 0 ? _editorViewModeAPI$sh : 'edit'
29
29
  }
@@ -36,20 +36,20 @@ var findWithAnalytics = exports.findWithAnalytics = function findWithAnalytics(e
36
36
  var editorView = _ref2.editorView,
37
37
  containerElement = _ref2.containerElement,
38
38
  keyword = _ref2.keyword;
39
- return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
40
- eventType: _analytics.EVENT_TYPE.TRACK,
41
- action: _analytics.ACTION.FIND_PERFORMED,
42
- actionSubject: _analytics.ACTION_SUBJECT.TEXT
39
+ return (0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, {
40
+ eventType: _enums.EVENT_TYPE.TRACK,
41
+ action: _enums.ACTION.FIND_PERFORMED,
42
+ actionSubject: _enums.ACTION_SUBJECT.TEXT
43
43
  })((0, _commands.find)(editorView, containerElement, keyword));
44
44
  };
45
45
  };
46
46
  var findNextWithAnalytics = exports.findNextWithAnalytics = function findNextWithAnalytics(editorAnalyticsAPI, editorView) {
47
47
  return function (_ref3) {
48
48
  var triggerMethod = _ref3.triggerMethod;
49
- return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
50
- eventType: _analytics.EVENT_TYPE.TRACK,
51
- action: _analytics.ACTION.FIND_NEXT_PERFORMED,
52
- actionSubject: _analytics.ACTION_SUBJECT.TEXT,
49
+ return (0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, {
50
+ eventType: _enums.EVENT_TYPE.TRACK,
51
+ action: _enums.ACTION.FIND_NEXT_PERFORMED,
52
+ actionSubject: _enums.ACTION_SUBJECT.TEXT,
53
53
  attributes: {
54
54
  triggerMethod: triggerMethod
55
55
  }
@@ -59,10 +59,10 @@ var findNextWithAnalytics = exports.findNextWithAnalytics = function findNextWit
59
59
  var findPrevWithAnalytics = exports.findPrevWithAnalytics = function findPrevWithAnalytics(editorAnalyticsAPI, editorView) {
60
60
  return function (_ref4) {
61
61
  var triggerMethod = _ref4.triggerMethod;
62
- return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
63
- eventType: _analytics.EVENT_TYPE.TRACK,
64
- action: _analytics.ACTION.FIND_PREV_PERFORMED,
65
- actionSubject: _analytics.ACTION_SUBJECT.TEXT,
62
+ return (0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, {
63
+ eventType: _enums.EVENT_TYPE.TRACK,
64
+ action: _enums.ACTION.FIND_PREV_PERFORMED,
65
+ actionSubject: _enums.ACTION_SUBJECT.TEXT,
66
66
  attributes: {
67
67
  triggerMethod: triggerMethod
68
68
  }
@@ -73,10 +73,10 @@ var replaceWithAnalytics = exports.replaceWithAnalytics = function replaceWithAn
73
73
  return function (_ref5) {
74
74
  var triggerMethod = _ref5.triggerMethod,
75
75
  replaceText = _ref5.replaceText;
76
- return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
77
- eventType: _analytics.EVENT_TYPE.TRACK,
78
- action: _analytics.ACTION.REPLACED_ONE,
79
- actionSubject: _analytics.ACTION_SUBJECT.TEXT,
76
+ return (0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, {
77
+ eventType: _enums.EVENT_TYPE.TRACK,
78
+ action: _enums.ACTION.REPLACED_ONE,
79
+ actionSubject: _enums.ACTION_SUBJECT.TEXT,
80
80
  attributes: {
81
81
  triggerMethod: triggerMethod
82
82
  }
@@ -86,20 +86,20 @@ var replaceWithAnalytics = exports.replaceWithAnalytics = function replaceWithAn
86
86
  var replaceAllWithAnalytics = exports.replaceAllWithAnalytics = function replaceAllWithAnalytics(editorAnalyticsAPI) {
87
87
  return function (_ref6) {
88
88
  var replaceText = _ref6.replaceText;
89
- return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
90
- eventType: _analytics.EVENT_TYPE.TRACK,
91
- action: _analytics.ACTION.REPLACED_ALL,
92
- actionSubject: _analytics.ACTION_SUBJECT.TEXT
89
+ return (0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, {
90
+ eventType: _enums.EVENT_TYPE.TRACK,
91
+ action: _enums.ACTION.REPLACED_ALL,
92
+ actionSubject: _enums.ACTION_SUBJECT.TEXT
93
93
  })((0, _commands.replaceAll)(replaceText));
94
94
  };
95
95
  };
96
96
  var cancelSearchWithAnalytics = exports.cancelSearchWithAnalytics = function cancelSearchWithAnalytics(editorAnalyticsAPI) {
97
97
  return function (_ref7) {
98
98
  var triggerMethod = _ref7.triggerMethod;
99
- return (0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, {
100
- eventType: _analytics.EVENT_TYPE.UI,
101
- action: _analytics.ACTION.DEACTIVATED,
102
- actionSubject: _analytics.ACTION_SUBJECT.FIND_REPLACE_DIALOG,
99
+ return (0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, {
100
+ eventType: _enums.EVENT_TYPE.UI,
101
+ action: _enums.ACTION.DEACTIVATED,
102
+ actionSubject: _enums.ACTION_SUBJECT.FIND_REPLACE_DIALOG,
103
103
  attributes: {
104
104
  triggerMethod: triggerMethod
105
105
  }
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _analytics = require("@atlaskit/editor-common/analytics");
7
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
8
8
  var _keymaps = require("@atlaskit/editor-common/keymaps");
9
9
  var _keymap = require("@atlaskit/editor-prosemirror/keymap");
10
10
  var _commandsWithAnalytics = require("./commands-with-analytics");
11
11
  var activateFindReplace = function activateFindReplace(editorAnalyticsAPI, editorViewModeAPI) {
12
12
  return function (state, dispatch) {
13
13
  (0, _commandsWithAnalytics.activateWithAnalytics)(editorAnalyticsAPI, editorViewModeAPI)({
14
- triggerMethod: _analytics.TRIGGER_METHOD.SHORTCUT
14
+ triggerMethod: _enums.TRIGGER_METHOD.SHORTCUT
15
15
  })(state, dispatch);
16
16
  return true;
17
17
  };
@@ -8,6 +8,7 @@ exports.getPluginState = exports.createPluginState = exports.createCommand = voi
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _utils = require("@atlaskit/editor-common/utils");
11
+ var _pluginStateFactory = require("@atlaskit/editor-common/utils/plugin-state-factory");
11
12
  var _view = require("@atlaskit/editor-prosemirror/view");
12
13
  var _main = require("./main");
13
14
  var _pluginKey = require("./plugin-key");
@@ -116,7 +117,7 @@ var handleDocChanged = function handleDocChanged(tr, pluginState) {
116
117
  decorationSet: decorationSet
117
118
  });
118
119
  };
119
- var dest = (0, _utils.pluginFactory)(_pluginKey.findReplacePluginKey, (0, _reducer.default)(function () {
120
+ var dest = (0, _pluginStateFactory.pluginFactory)(_pluginKey.findReplacePluginKey, (0, _reducer.default)(function () {
120
121
  return _main.initialState;
121
122
  }), {
122
123
  onDocChanged: handleDocChanged
@@ -15,7 +15,7 @@ exports.getSelectedText = getSelectedText;
15
15
  exports.removeMatchesFromSet = exports.removeDecorationsFromSet = exports.prevIndex = exports.nextIndex = exports.isMatchAffectedByStep = exports.getSelectionForMatch = void 0;
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
17
  var _classnames4 = _interopRequireDefault(require("classnames"));
18
- var _utils = require("@atlaskit/editor-common/utils");
18
+ var _date = require("@atlaskit/editor-common/utils/date");
19
19
  var _state = require("@atlaskit/editor-prosemirror/state");
20
20
  var _view = require("@atlaskit/editor-prosemirror/view");
21
21
  var _isPromise = require("@atlaskit/mention/is-promise");
@@ -219,7 +219,7 @@ function findMatches(_ref2) {
219
219
  break;
220
220
  case 'date':
221
221
  collectNodeMatch({
222
- text: (0, _utils.timestampToString)(node.attrs.timestamp, getIntl ? getIntl() : null),
222
+ text: (0, _date.timestampToString)(node.attrs.timestamp, getIntl ? getIntl() : null),
223
223
  pos: pos
224
224
  }, node);
225
225
  break;
@@ -16,8 +16,8 @@ var _react2 = require("@emotion/react");
16
16
  var _debounce = _interopRequireDefault(require("lodash/debounce"));
17
17
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
18
18
  var _reactIntl = require("react-intl");
19
- var _analytics = require("@atlaskit/editor-common/analytics");
20
- var _messages = require("@atlaskit/editor-common/messages");
19
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
20
+ var _findReplace = require("@atlaskit/editor-common/messages/find-replace");
21
21
  var _default2 = require("@atlaskit/form/label/default");
22
22
  var _textLetterCase = _interopRequireDefault(require("@atlaskit/icon-lab/core/text-letter-case"));
23
23
  var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
@@ -79,11 +79,11 @@ var Find = /*#__PURE__*/function (_React$Component) {
79
79
  if (event.key === 'Enter') {
80
80
  if (event.shiftKey) {
81
81
  _this.props.onFindPrev({
82
- triggerMethod: _analytics.TRIGGER_METHOD.KEYBOARD
82
+ triggerMethod: _enums.TRIGGER_METHOD.KEYBOARD
83
83
  });
84
84
  } else {
85
85
  _this.props.onFindNext({
86
- triggerMethod: _analytics.TRIGGER_METHOD.KEYBOARD
86
+ triggerMethod: _enums.TRIGGER_METHOD.KEYBOARD
87
87
  });
88
88
  }
89
89
  } else if (event.key === 'ArrowDown') {
@@ -106,7 +106,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
106
106
  return;
107
107
  }
108
108
  _this.props.onFindNext({
109
- triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
109
+ triggerMethod: _enums.TRIGGER_METHOD.BUTTON
110
110
  });
111
111
  });
112
112
  (0, _defineProperty2.default)(_this, "handleFindPrevClick", function () {
@@ -114,7 +114,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
114
114
  return;
115
115
  }
116
116
  _this.props.onFindPrev({
117
- triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
117
+ triggerMethod: _enums.TRIGGER_METHOD.BUTTON
118
118
  });
119
119
  });
120
120
  (0, _defineProperty2.default)(_this, "handleCompositionStart", function () {
@@ -128,7 +128,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
128
128
  });
129
129
  (0, _defineProperty2.default)(_this, "clearSearch", function () {
130
130
  _this.props.onCancel({
131
- triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
131
+ triggerMethod: _enums.TRIGGER_METHOD.BUTTON
132
132
  });
133
133
  });
134
134
  (0, _defineProperty2.default)(_this, "handleMatchCaseClick", function () {
@@ -144,9 +144,9 @@ var Find = /*#__PURE__*/function (_React$Component) {
144
144
  });
145
145
  });
146
146
  var formatMessage = props.intl.formatMessage;
147
- _this.find = formatMessage(_messages.findReplaceMessages.find);
148
- _this.noResultsFound = formatMessage(_messages.findReplaceMessages.noResultsFound);
149
- _this.matchCase = formatMessage(_messages.findReplaceMessages.matchCase);
147
+ _this.find = formatMessage(_findReplace.findReplaceMessages.find);
148
+ _this.noResultsFound = formatMessage(_findReplace.findReplaceMessages.noResultsFound);
149
+ _this.matchCase = formatMessage(_findReplace.findReplaceMessages.matchCase);
150
150
 
151
151
  // We locally manage the value of the input inside this component in order to support compositions.
152
152
  // This requires some additional work inside componentDidUpdate to ensure we support changes that
@@ -209,7 +209,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
209
209
  count = _this$props.count,
210
210
  shouldMatchCase = _this$props.shouldMatchCase,
211
211
  formatMessage = _this$props.intl.formatMessage;
212
- var resultsCount = formatMessage(_messages.findReplaceMessages.resultsCount, {
212
+ var resultsCount = formatMessage(_findReplace.findReplaceMessages.resultsCount, {
213
213
  selectedMatchPosition: count.index + 1,
214
214
  totalResultsCount: count.total
215
215
  });
@@ -13,7 +13,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
14
  var _react = _interopRequireDefault(require("react"));
15
15
  var _react2 = require("@emotion/react");
16
- var _messages = require("@atlaskit/editor-common/messages");
16
+ var _findReplace = require("@atlaskit/editor-common/messages/find-replace");
17
17
  var _Find = _interopRequireDefault(require("./Find"));
18
18
  var _Replace = _interopRequireDefault(require("./Replace"));
19
19
  var _uiStyles = require("./ui-styles");
@@ -95,7 +95,7 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
95
95
  var focusToolbarButton = this.props.focusToolbarButton || function () {};
96
96
  return (0, _react2.jsx)("div", {
97
97
  role: 'dialog',
98
- "aria-label": intl === null || intl === void 0 ? void 0 : intl.formatMessage(allowReplace ? _messages.findReplaceMessages.findReplaceDialogAriaLabel : _messages.findReplaceMessages.findDialogAriaLabel),
98
+ "aria-label": intl === null || intl === void 0 ? void 0 : intl.formatMessage(allowReplace ? _findReplace.findReplaceMessages.findReplaceDialogAriaLabel : _findReplace.findReplaceMessages.findDialogAriaLabel),
99
99
  "aria-modal": false,
100
100
  ref: this.modalRef
101
101
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _analytics = require("@atlaskit/editor-common/analytics");
11
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
12
12
  var _hooks = require("@atlaskit/editor-common/hooks");
13
13
  var _unsafeExpValNoExposure = require("@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure");
14
14
  var _conditionalHooksFactory = require("@atlaskit/platform-feature-flags-react/conditional-hooks-factory/conditional-hooks-factory");
@@ -98,7 +98,7 @@ var FindReplaceToolbarButtonWithState = function FindReplaceToolbarButtonWithSta
98
98
  var handleActivate = function handleActivate() {
99
99
  runWithEditorFocused(function () {
100
100
  return dispatchCommand((0, _commandsWithAnalytics.activateWithAnalytics)(editorAnalyticsAPI, api === null || api === void 0 ? void 0 : api.editorViewMode)({
101
- triggerMethod: _analytics.TRIGGER_METHOD.TOOLBAR
101
+ triggerMethod: _enums.TRIGGER_METHOD.TOOLBAR
102
102
  }));
103
103
  });
104
104
  };
@@ -8,9 +8,10 @@ exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _reactIntl = require("react-intl");
11
- var _analytics = require("@atlaskit/editor-common/analytics");
12
- var _uiMenu = require("@atlaskit/editor-common/ui-menu");
13
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
12
+ var _types = require("@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types");
13
+ var _Dropdown = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/Dropdown"));
14
+ var _constants = require("@atlaskit/editor-shared-styles/constants");
14
15
  var _primitives = require("@atlaskit/primitives");
15
16
  var _FindReplace = _interopRequireDefault(require("./FindReplace"));
16
17
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
@@ -34,7 +35,7 @@ var FindReplaceDropdown = function FindReplaceDropdown(props) {
34
35
  if (!popupsMountPoint) {
35
36
  return null;
36
37
  }
37
- return /*#__PURE__*/_react.default.createElement(_uiMenu.Dropdown, {
38
+ return /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
38
39
  target: popupsMountPoint,
39
40
  mountTo: popupsMountPoint,
40
41
  forcePlacement: true,
@@ -49,16 +50,16 @@ var FindReplaceDropdown = function FindReplaceDropdown(props) {
49
50
  handleEscapeKeydown: function handleEscapeKeydown() {
50
51
  if (isActive) {
51
52
  onCancel({
52
- triggerMethod: _analytics.TRIGGER_METHOD.KEYBOARD
53
+ triggerMethod: _enums.TRIGGER_METHOD.KEYBOARD
53
54
  });
54
55
  }
55
56
  },
56
57
  fitWidth: dropdownWidthNewDesign,
57
- zIndex: _editorSharedStyles.akEditorFloatingPanelZIndex
58
+ zIndex: _constants.akEditorFloatingPanelZIndex
58
59
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
59
60
  ,
60
61
  arrowKeyNavigationProviderOptions: {
61
- type: _uiMenu.ArrowKeyNavigationType.MENU,
62
+ type: _types.ArrowKeyNavigationType.MENU,
62
63
  disableArrowKeyNavigation: true
63
64
  }
64
65
  }, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
@@ -16,11 +16,14 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
16
16
  var _react = _interopRequireDefault(require("react"));
17
17
  var _react2 = require("@emotion/react");
18
18
  var _reactIntl = require("react-intl");
19
- var _analytics = require("@atlaskit/editor-common/analytics");
19
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
20
+ var _toolbarButton = require("@atlaskit/editor-common/analytics/types/toolbar-button");
20
21
  var _keymaps = require("@atlaskit/editor-common/keymaps");
21
- var _messages = require("@atlaskit/editor-common/messages");
22
- var _uiMenu = require("@atlaskit/editor-common/ui-menu");
23
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
22
+ var _findReplace = require("@atlaskit/editor-common/messages/find-replace");
23
+ var _types = require("@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types");
24
+ var _Dropdown = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/Dropdown"));
25
+ var _ToolbarButton = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/ToolbarButton"));
26
+ var _constants = require("@atlaskit/editor-shared-styles/constants");
24
27
  var _search = _interopRequireDefault(require("@atlaskit/icon/core/search"));
25
28
  var _FindReplace = _interopRequireDefault(require("./FindReplace"));
26
29
  var _templateObject;
@@ -33,7 +36,7 @@ var _templateObject;
33
36
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
34
37
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
35
38
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
36
- var toolbarButtonWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-grow: 0;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tpadding: 0 ", ";\n\t@media (max-width: ", "px) {\n\t\tjustify-content: center;\n\t\tpadding: 0;\n\t}\n"])), "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorMobileMaxWidth);
39
+ var toolbarButtonWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\tflex: 1 1 auto;\n\tflex-grow: 0;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tpadding: 0 ", ";\n\t@media (max-width: ", "px) {\n\t\tjustify-content: center;\n\t\tpadding: 0;\n\t}\n"])), "var(--ds-space-100, 8px)", _constants.akEditorMobileMaxWidth);
37
40
  var TriggerButtonWrapper = function TriggerButtonWrapper(_ref) {
38
41
  var isButtonHidden = _ref.isButtonHidden,
39
42
  children = _ref.children;
@@ -70,7 +73,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
70
73
  (0, _defineProperty2.default)(_this, "toggleOpen", function () {
71
74
  if (_this.props.isActive) {
72
75
  _this.props.onCancel({
73
- triggerMethod: _analytics.TRIGGER_METHOD.TOOLBAR
76
+ triggerMethod: _enums.TRIGGER_METHOD.TOOLBAR
74
77
  });
75
78
  } else {
76
79
  _this.setState({
@@ -110,12 +113,12 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
110
113
  takeFullWidth = _this$props.takeFullWidth,
111
114
  _this$props$isButtonH = _this$props.isButtonHidden,
112
115
  isButtonHidden = _this$props$isButtonH === void 0 ? false : _this$props$isButtonH;
113
- var title = formatMessage(_messages.findReplaceMessages.findReplaceToolbarButton);
114
- var stackBelowOtherEditorFloatingPanels = _editorSharedStyles.akEditorFloatingPanelZIndex - 1;
116
+ var title = formatMessage(_findReplace.findReplaceMessages.findReplaceToolbarButton);
117
+ var stackBelowOtherEditorFloatingPanels = _constants.akEditorFloatingPanelZIndex - 1;
115
118
  var keymap = (0, _keymaps.findKeymapByDescription)('Find');
116
119
  return (0, _react2.jsx)("div", {
117
120
  css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden && toolbarButtonWrapperHidden]
118
- }, (0, _react2.jsx)(_uiMenu.Dropdown, {
121
+ }, (0, _react2.jsx)(_Dropdown.default, {
119
122
  mountTo: popupsMountPoint,
120
123
  boundariesElement: popupsBoundariesElement,
121
124
  scrollableElement: popupsScrollableElement,
@@ -125,7 +128,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
125
128
  handleEscapeKeydown: function handleEscapeKeydown() {
126
129
  if (isActive) {
127
130
  _this2.props.onCancel({
128
- triggerMethod: _analytics.TRIGGER_METHOD.KEYBOARD
131
+ triggerMethod: _enums.TRIGGER_METHOD.KEYBOARD
129
132
  });
130
133
  if (_this2.state.openedByClick && _this2.toolbarButtonRef.current) {
131
134
  _this2.toolbarButtonRef.current.focus();
@@ -140,14 +143,14 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
140
143
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
141
144
  ,
142
145
  arrowKeyNavigationProviderOptions: {
143
- type: _uiMenu.ArrowKeyNavigationType.MENU,
146
+ type: _types.ArrowKeyNavigationType.MENU,
144
147
  disableArrowKeyNavigation: true
145
148
  },
146
149
  trigger: (0, _react2.jsx)(TriggerButtonWrapper, {
147
150
  isButtonHidden: isButtonHidden
148
- }, (0, _react2.jsx)(_uiMenu.ToolbarButton, {
149
- buttonId: _uiMenu.TOOLBAR_BUTTON.FIND_REPLACE,
150
- testId: "editor-toolbar__".concat(_uiMenu.TOOLBAR_BUTTON.FIND_REPLACE),
151
+ }, (0, _react2.jsx)(_ToolbarButton.default, {
152
+ buttonId: _toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.FIND_REPLACE,
153
+ testId: "editor-toolbar__".concat(_toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.FIND_REPLACE),
151
154
  spacing: isReducedSpacing ? 'none' : 'default',
152
155
  selected: isActive,
153
156
  title: (0, _react2.jsx)(_keymaps.ToolTipContent, {
@@ -10,8 +10,8 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _reactIntl = require("react-intl");
12
12
  var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
13
- var _analytics = require("@atlaskit/editor-common/analytics");
14
- var _messages = require("@atlaskit/editor-common/messages");
13
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
14
+ var _findReplace = require("@atlaskit/editor-common/messages/find-replace");
15
15
  var _validMessage = require("@atlaskit/form/valid-message");
16
16
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
17
17
  var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/core/chevron-up"));
@@ -88,10 +88,10 @@ var Replace = function Replace(_ref) {
88
88
  setReplaceCount = _useState0[1];
89
89
  var replaceTextfieldRef = (0, _react.useRef)(null);
90
90
  var successReplacementMessageRef = (0, _react.useRef)(null);
91
- var replaceWith = formatMessage(_messages.findReplaceMessages.replaceWith);
92
- var replaceAll = formatMessage(_messages.findReplaceMessages.replaceAll);
93
- var findPrevious = formatMessage(_messages.findReplaceMessages.findPrevious);
94
- var closeFindReplaceDialog = formatMessage(_messages.findReplaceMessages.closeFindReplaceDialog);
91
+ var replaceWith = formatMessage(_findReplace.findReplaceMessages.replaceWith);
92
+ var replaceAll = formatMessage(_findReplace.findReplaceMessages.replaceAll);
93
+ var findPrevious = formatMessage(_findReplace.findReplaceMessages.findPrevious);
94
+ var closeFindReplaceDialog = formatMessage(_findReplace.findReplaceMessages.closeFindReplaceDialog);
95
95
  (0, _react.useEffect)(function () {
96
96
  onReplaceTextfieldRefSet(replaceTextfieldRef);
97
97
  }, [onReplaceTextfieldRefSet]);
@@ -116,7 +116,7 @@ var Replace = function Replace(_ref) {
116
116
  var handleReplaceClick = function handleReplaceClick() {
117
117
  return skipWhileComposing(function () {
118
118
  onReplace({
119
- triggerMethod: _analytics.TRIGGER_METHOD.BUTTON,
119
+ triggerMethod: _enums.TRIGGER_METHOD.BUTTON,
120
120
  replaceText: replaceText
121
121
  });
122
122
  triggerSuccessReplacementMessageUpdate(1);
@@ -133,9 +133,9 @@ var Replace = function Replace(_ref) {
133
133
  var updateReplaceValue = function updateReplaceValue(text) {
134
134
  if (dispatchAnalyticsEvent) {
135
135
  dispatchAnalyticsEvent({
136
- eventType: _analytics.EVENT_TYPE.TRACK,
137
- action: _analytics.ACTION.CHANGED_REPLACEMENT_TEXT,
138
- actionSubject: _analytics.ACTION_SUBJECT.FIND_REPLACE_DIALOG
136
+ eventType: _enums.EVENT_TYPE.TRACK,
137
+ action: _enums.ACTION.CHANGED_REPLACEMENT_TEXT,
138
+ actionSubject: _enums.ACTION_SUBJECT.FIND_REPLACE_DIALOG
139
139
  });
140
140
  }
141
141
  setReplaceText(text);
@@ -144,7 +144,7 @@ var Replace = function Replace(_ref) {
144
144
  return skipWhileComposing(function () {
145
145
  if (event.key === 'Enter') {
146
146
  onReplace({
147
- triggerMethod: _analytics.TRIGGER_METHOD.KEYBOARD,
147
+ triggerMethod: _enums.TRIGGER_METHOD.KEYBOARD,
148
148
  replaceText: replaceText
149
149
  });
150
150
  } else if (event.key === 'ArrowUp') {
@@ -178,25 +178,25 @@ var Replace = function Replace(_ref) {
178
178
  };
179
179
  var clearSearch = function clearSearch() {
180
180
  onCancel({
181
- triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
181
+ triggerMethod: _enums.TRIGGER_METHOD.BUTTON
182
182
  });
183
183
  focusToolbarButton();
184
184
  };
185
185
  var handleFindNextClick = function handleFindNextClick() {
186
186
  if (!isComposing) {
187
187
  onFindNext({
188
- triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
188
+ triggerMethod: _enums.TRIGGER_METHOD.BUTTON
189
189
  });
190
190
  }
191
191
  };
192
192
  var handleFindPrevClick = function handleFindPrevClick() {
193
193
  if (!isComposing) {
194
194
  onFindPrev({
195
- triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
195
+ triggerMethod: _enums.TRIGGER_METHOD.BUTTON
196
196
  });
197
197
  }
198
198
  };
199
- var resultsReplace = formatMessage(_messages.findReplaceMessages.replaceSuccess, {
199
+ var resultsReplace = formatMessage(_findReplace.findReplaceMessages.replaceSuccess, {
200
200
  numberOfMatches: replaceCount
201
201
  });
202
202
  return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
@@ -231,7 +231,7 @@ var Replace = function Replace(_ref) {
231
231
  }, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
232
232
  xcss: actionButtonInlineStyles
233
233
  }, /*#__PURE__*/_react.default.createElement(_FindReplaceTooltipButton.FindReplaceTooltipButton, {
234
- title: formatMessage(_messages.findReplaceMessages.findNext)
234
+ title: formatMessage(_findReplace.findReplaceMessages.findNext)
235
235
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
236
236
  ,
237
237
  icon: function icon(iconProps) {
@@ -240,7 +240,7 @@ var Replace = function Replace(_ref) {
240
240
  size: "small"
241
241
  });
242
242
  },
243
- iconLabel: formatMessage(_messages.findReplaceMessages.findNext),
243
+ iconLabel: formatMessage(_findReplace.findReplaceMessages.findNext),
244
244
  keymapDescription: 'Enter',
245
245
  onClick: handleFindNextClick,
246
246
  disabled: count.total <= 1
@@ -263,7 +263,7 @@ var Replace = function Replace(_ref) {
263
263
  id: "replace-button",
264
264
  onClick: handleReplaceClick,
265
265
  isDisabled: !canReplace
266
- }, formatMessage(_messages.findReplaceMessages.replace)), /*#__PURE__*/_react.default.createElement(_button.default, {
266
+ }, formatMessage(_findReplace.findReplaceMessages.replace)), /*#__PURE__*/_react.default.createElement(_button.default, {
267
267
  appearance: "primary",
268
268
  testId: replaceAll,
269
269
  id: "replaceAll-button",
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.wrapperStyles = exports.wrapperPaddingStyles = exports.textFieldWrapper = exports.sectionWrapperStylesAlternate = exports.sectionWrapperStyles = exports.sectionWrapperJustified = exports.ruleStyles = exports.orderZeroStyles = exports.orderOneStyles = exports.nextPreviousItemStyles = exports.matchCaseSection = exports.countWrapperStyles = exports.countStylesAlternateStyles = exports.countStyles = exports.afterInputSection = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
8
+ var _constants = require("@atlaskit/editor-shared-styles/constants");
9
9
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
10
10
  /* eslint-disable @repo/internal/styles/no-exported-styles */
11
11
  /**
@@ -71,7 +71,7 @@ var sectionWrapperStylesAlternate = exports.sectionWrapperStylesAlternate = (0,
71
71
  var sectionWrapperJustified = exports.sectionWrapperJustified = (0, _react.css)({
72
72
  justifyContent: 'space-between',
73
73
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
74
- fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14)
74
+ fontSize: (0, _constants.relativeFontSizeToBase16)(14)
75
75
  });
76
76
 
77
77
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -86,7 +86,7 @@ var textFieldWrapper = exports.textFieldWrapper = (0, _react.css)({
86
86
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
87
87
  label: {
88
88
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
89
- fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14),
89
+ fontSize: (0, _constants.relativeFontSizeToBase16)(14),
90
90
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
91
91
  lineHeight: '16px'
92
92
  }
@@ -118,7 +118,7 @@ var nextPreviousItemStyles = exports.nextPreviousItemStyles = (0, _react.css)({
118
118
  var countStyles = exports.countStyles = (0, _react.css)({
119
119
  color: "var(--ds-text-subtlest, #6B6E76)",
120
120
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
121
- fontSize: "".concat((0, _editorSharedStyles.relativeFontSizeToBase16)(12)),
121
+ fontSize: "".concat((0, _constants.relativeFontSizeToBase16)(12)),
122
122
  flex: '0 0 auto',
123
123
  justifyContent: 'center',
124
124
  alignItems: 'center',
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
2
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { ToolbarSize } from '@atlaskit/editor-common/types';
5
5
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
@@ -1,5 +1,5 @@
1
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
1
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
3
3
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { activate, cancelSearch, find, findNext, findPrevious, replace, replaceAll } from './commands';
5
5
 
@@ -1,4 +1,4 @@
1
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  import { bindKeymapWithCommand, find as findKeymap } from '@atlaskit/editor-common/keymaps';
3
3
  import { keymap } from '@atlaskit/editor-prosemirror/keymap';
4
4
  import { activateWithAnalytics } from './commands-with-analytics';
@@ -1,4 +1,5 @@
1
- import { pluginFactory, stepHasSlice } from '@atlaskit/editor-common/utils';
1
+ import { stepHasSlice } from '@atlaskit/editor-common/utils';
2
+ import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
2
3
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
4
  import { initialState } from './main';
4
5
  import { findReplacePluginKey } from './plugin-key';
@@ -1,5 +1,5 @@
1
1
  import classnames from 'classnames';
2
- import { timestampToString } from '@atlaskit/editor-common/utils';
2
+ import { timestampToString } from '@atlaskit/editor-common/utils/date';
3
3
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
5
  import { isPromise } from '@atlaskit/mention/is-promise';
@@ -12,8 +12,8 @@ import { jsx } from '@emotion/react';
12
12
  import debounce from 'lodash/debounce';
13
13
  import rafSchd from 'raf-schd';
14
14
  import { injectIntl } from 'react-intl';
15
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
16
- import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
15
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
16
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages/find-replace';
17
17
  import { Label } from '@atlaskit/form/label/default';
18
18
  import TextLetterCaseIcon from '@atlaskit/icon-lab/core/text-letter-case';
19
19
  import Textfield from '@atlaskit/textfield/text-field';
@@ -10,7 +10,7 @@ import React from 'react';
10
10
 
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
12
12
  import { css, jsx } from '@emotion/react';
13
- import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
13
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages/find-replace';
14
14
  import Find from './Find';
15
15
  import Replace from './Replace';
16
16
  import { ruleStyles, wrapperPaddingStyles, wrapperStyles } from './ui-styles';
@@ -1,5 +1,5 @@
1
1
  import React, { useLayoutEffect, useState } from 'react';
2
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
2
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
3
3
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
4
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
5
5
  import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react/conditional-hooks-factory/conditional-hooks-factory';
@@ -1,9 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { injectIntl } from 'react-intl';
4
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
5
- import { ArrowKeyNavigationType, Dropdown } from '@atlaskit/editor-common/ui-menu';
6
- import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
4
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
5
+ import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
6
+ import DropdownWithOuterListeners from '@atlaskit/editor-common/ui-menu/Dropdown';
7
+ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles/constants';
7
8
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
8
9
  import { Box, xcss } from '@atlaskit/primitives';
9
10
  import FindReplace from './FindReplace';
@@ -28,7 +29,7 @@ const FindReplaceDropdown = props => {
28
29
  if (!popupsMountPoint) {
29
30
  return null;
30
31
  }
31
- return /*#__PURE__*/React.createElement(Dropdown, {
32
+ return /*#__PURE__*/React.createElement(DropdownWithOuterListeners, {
32
33
  target: popupsMountPoint,
33
34
  mountTo: popupsMountPoint,
34
35
  forcePlacement: true,
@@ -11,11 +11,14 @@ import React from 'react';
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
12
  import { css, jsx } from '@emotion/react';
13
13
  import { injectIntl } from 'react-intl';
14
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
14
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
15
+ import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
15
16
  import { findKeymapByDescription, getAriaKeyshortcuts, tooltip, ToolTipContent } from '@atlaskit/editor-common/keymaps';
16
- import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
17
- import { ArrowKeyNavigationType, Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
18
- import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
17
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages/find-replace';
18
+ import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
19
+ import DropdownWithOuterListeners from '@atlaskit/editor-common/ui-menu/Dropdown';
20
+ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
21
+ import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles/constants';
19
22
  import SearchIcon from '@atlaskit/icon/core/search';
20
23
  import FindReplace from './FindReplace';
21
24
 
@@ -106,7 +109,7 @@ class FindReplaceToolbarButton extends React.PureComponent {
106
109
  const keymap = findKeymapByDescription('Find');
107
110
  return jsx("div", {
108
111
  css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden && toolbarButtonWrapperHidden]
109
- }, jsx(Dropdown, {
112
+ }, jsx(DropdownWithOuterListeners, {
110
113
  mountTo: popupsMountPoint,
111
114
  boundariesElement: popupsBoundariesElement,
112
115
  scrollableElement: popupsScrollableElement,
@@ -1,8 +1,8 @@
1
1
  import React, { Fragment, useState, useRef, useEffect } from 'react';
2
2
  import { injectIntl } from 'react-intl';
3
3
  import Button from '@atlaskit/button/default/button';
4
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
5
- import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
4
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
5
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages/find-replace';
6
6
  import { ValidMessage } from '@atlaskit/form/valid-message';
7
7
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
8
8
  import ChevronUpIcon from '@atlaskit/icon/core/chevron-up';
@@ -6,7 +6,7 @@
6
6
  */
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { css } from '@emotion/react';
9
- import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
9
+ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles/constants';
10
10
  const fontSize = 14;
11
11
 
12
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
2
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { ToolbarSize } from '@atlaskit/editor-common/types';
5
5
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
@@ -1,5 +1,5 @@
1
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
1
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
3
3
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
4
4
  import { activate, cancelSearch, find, findNext, findPrevious, replace, replaceAll } from './commands';
5
5
 
@@ -1,4 +1,4 @@
1
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  import { bindKeymapWithCommand, find as findKeymap } from '@atlaskit/editor-common/keymaps';
3
3
  import { keymap } from '@atlaskit/editor-prosemirror/keymap';
4
4
  import { activateWithAnalytics } from './commands-with-analytics';
@@ -2,7 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
- import { pluginFactory, stepHasSlice } from '@atlaskit/editor-common/utils';
5
+ import { stepHasSlice } from '@atlaskit/editor-common/utils';
6
+ import { pluginFactory } from '@atlaskit/editor-common/utils/plugin-state-factory';
6
7
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
7
8
  import { initialState } from './main';
8
9
  import { findReplacePluginKey } from './plugin-key';
@@ -3,7 +3,7 @@ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol
3
3
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
4
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
5
  import classnames from 'classnames';
6
- import { timestampToString } from '@atlaskit/editor-common/utils';
6
+ import { timestampToString } from '@atlaskit/editor-common/utils/date';
7
7
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
8
8
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
9
9
  import { isPromise } from '@atlaskit/mention/is-promise';
@@ -19,8 +19,8 @@ import { jsx } from '@emotion/react';
19
19
  import debounce from 'lodash/debounce';
20
20
  import rafSchd from 'raf-schd';
21
21
  import { injectIntl } from 'react-intl';
22
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
23
- import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
22
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
23
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages/find-replace';
24
24
  import { Label } from '@atlaskit/form/label/default';
25
25
  import TextLetterCaseIcon from '@atlaskit/icon-lab/core/text-letter-case';
26
26
  import Textfield from '@atlaskit/textfield/text-field';
@@ -17,7 +17,7 @@ import React from 'react';
17
17
 
18
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
19
19
  import { css, jsx } from '@emotion/react';
20
- import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
20
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages/find-replace';
21
21
  import Find from './Find';
22
22
  import Replace from './Replace';
23
23
  import { ruleStyles, wrapperPaddingStyles, wrapperStyles } from './ui-styles';
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useLayoutEffect, useState } from 'react';
3
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
4
4
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
5
5
  import { UNSAFE_expValNoExposure } from '@atlaskit/platform-feature-experiments/unsafe-exp-val-no-exposure';
6
6
  import { conditionalHooksFactory } from '@atlaskit/platform-feature-flags-react/conditional-hooks-factory/conditional-hooks-factory';
@@ -1,9 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { injectIntl } from 'react-intl';
4
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
5
- import { ArrowKeyNavigationType, Dropdown } from '@atlaskit/editor-common/ui-menu';
6
- import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
4
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
5
+ import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
6
+ import DropdownWithOuterListeners from '@atlaskit/editor-common/ui-menu/Dropdown';
7
+ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles/constants';
7
8
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
8
9
  import { Box, xcss } from '@atlaskit/primitives';
9
10
  import FindReplace from './FindReplace';
@@ -26,7 +27,7 @@ var FindReplaceDropdown = function FindReplaceDropdown(props) {
26
27
  if (!popupsMountPoint) {
27
28
  return null;
28
29
  }
29
- return /*#__PURE__*/React.createElement(Dropdown, {
30
+ return /*#__PURE__*/React.createElement(DropdownWithOuterListeners, {
30
31
  target: popupsMountPoint,
31
32
  mountTo: popupsMountPoint,
32
33
  forcePlacement: true,
@@ -20,11 +20,14 @@ import React from 'react';
20
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
21
  import { css, jsx } from '@emotion/react';
22
22
  import { injectIntl } from 'react-intl';
23
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
23
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
24
+ import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
24
25
  import { findKeymapByDescription, getAriaKeyshortcuts, tooltip, ToolTipContent } from '@atlaskit/editor-common/keymaps';
25
- import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
26
- import { ArrowKeyNavigationType, Dropdown, TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
27
- import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
26
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages/find-replace';
27
+ import { ArrowKeyNavigationType } from '@atlaskit/editor-common/ui-menu/ArrowKeyNavigationProvider/types';
28
+ import DropdownWithOuterListeners from '@atlaskit/editor-common/ui-menu/Dropdown';
29
+ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
30
+ import { akEditorFloatingPanelZIndex, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles/constants';
28
31
  import SearchIcon from '@atlaskit/icon/core/search';
29
32
  import FindReplace from './FindReplace';
30
33
 
@@ -111,7 +114,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
111
114
  var keymap = findKeymapByDescription('Find');
112
115
  return jsx("div", {
113
116
  css: [toolbarButtonWrapper, takeFullWidth && toolbarButtonWrapperFullWidth, isButtonHidden && toolbarButtonWrapperHidden]
114
- }, jsx(Dropdown, {
117
+ }, jsx(DropdownWithOuterListeners, {
115
118
  mountTo: popupsMountPoint,
116
119
  boundariesElement: popupsBoundariesElement,
117
120
  scrollableElement: popupsScrollableElement,
@@ -2,8 +2,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { Fragment, useState, useRef, useEffect } from 'react';
3
3
  import { injectIntl } from 'react-intl';
4
4
  import Button from '@atlaskit/button/default/button';
5
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
6
- import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages';
5
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
6
+ import { findReplaceMessages as messages } from '@atlaskit/editor-common/messages/find-replace';
7
7
  import { ValidMessage } from '@atlaskit/form/valid-message';
8
8
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
9
9
  import ChevronUpIcon from '@atlaskit/icon/core/chevron-up';
@@ -6,7 +6,7 @@
6
6
  */
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { css } from '@emotion/react';
9
- import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
9
+ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles/constants';
10
10
  var fontSize = 14;
11
11
 
12
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -1,13 +1,13 @@
1
- import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
3
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
1
+ import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
3
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
4
4
  import type { BlockCollapsePlugin } from '@atlaskit/editor-plugin-block-collapse/blockCollapsePluginType';
5
- import type { CardPlugin } from '@atlaskit/editor-plugin-card';
5
+ import type { CardPlugin } from '@atlaskit/editor-plugin-card/cardPluginType';
6
6
  import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode/editorViewmodePluginType';
7
- import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand';
8
- import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions';
9
- import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
10
- import type { SyncedBlockPlugin } from '@atlaskit/editor-plugin-synced-block';
7
+ import type { ExpandPlugin } from '@atlaskit/editor-plugin-expand/types';
8
+ import type { MentionsPlugin } from '@atlaskit/editor-plugin-mentions/mentions-plugin-type';
9
+ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar/primary-toolbar-plugin-type';
10
+ import type { SyncedBlockPlugin } from '@atlaskit/editor-plugin-synced-block/synced-block-plugin-type';
11
11
  import type { FindReplacePluginState, FindReplaceToolbarButtonActionProps } from './types';
12
12
  export type FindReplacePluginOptions = {
13
13
  takeFullWidth: boolean;
@@ -1,5 +1,7 @@
1
- import type { EditorAnalyticsAPI, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
2
- import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
1
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
2
+ import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
3
+ import type { Command } from '@atlaskit/editor-common/types/command';
4
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
3
5
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
6
  import type { FindReplacePlugin } from '../findReplacePluginType';
5
7
  /**
@@ -1,4 +1,4 @@
1
- import type { Command } from '@atlaskit/editor-common/types';
1
+ import type { Command } from '@atlaskit/editor-common/types/command';
2
2
  import type { Decoration, EditorView } from '@atlaskit/editor-prosemirror/view';
3
3
  export declare const activate: () => Command;
4
4
  export declare const find: (editorView: EditorView, containerElement: HTMLElement | null, keyword?: string) => Command;
@@ -1,4 +1,4 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
1
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
2
2
  import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import type { EditorViewModeAPI } from './commands-with-analytics';
4
4
  declare const keymapPlugin: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, editorViewModeAPI: EditorViewModeAPI) => SafePlugin;
@@ -1,6 +1,7 @@
1
1
  import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
- import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
3
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
4
+ import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types/plugin-factory';
4
5
  import type { FindReplacePlugin } from '../findReplacePluginType';
5
6
  import type { FindReplacePluginState } from '../types';
6
7
  export declare const initialState: FindReplacePluginState;
@@ -1,5 +1,5 @@
1
1
  import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
2
- import type { Command } from '@atlaskit/editor-common/types';
2
+ import type { Command } from '@atlaskit/editor-common/types/command';
3
3
  import type { EditorState, SafeStateField, Transaction } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { FindReplacePluginState } from '../types';
5
5
  import type { FindReplaceAction } from './actions';
@@ -1,2 +1,2 @@
1
- import type { HigherOrderCommand } from '@atlaskit/editor-common/types';
1
+ import type { HigherOrderCommand } from '@atlaskit/editor-common/types/command';
2
2
  export declare const withScrollIntoView: HigherOrderCommand;
@@ -1,5 +1,5 @@
1
1
  import type { IntlShape } from 'react-intl';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
3
3
  import type { Fragment, Node as PmNode, Slice } from '@atlaskit/editor-prosemirror/model';
4
4
  import type { ReadonlyTransaction, Selection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
@@ -1,6 +1,6 @@
1
1
  import type { IntlShape } from 'react-intl';
2
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
3
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
4
4
  import type { DecorationSet, EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { FindReplacePlugin } from '../findReplacePluginType';
6
6
  export interface FindReplacePluginState {
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
7
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
8
8
  import type { MatchCaseProps } from '../types';
9
9
  export declare const FIND_DEBOUNCE_MS = 100;
10
10
  export type FindProps = {
@@ -5,7 +5,8 @@
5
5
  import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import type { IntlShape } from 'react-intl';
8
- import type { DispatchAnalyticsEvent, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
8
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
9
+ import type { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
9
10
  import type { MatchCaseProps } from '../types';
10
11
  export type FindReplaceProps = {
11
12
  /**
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type WithIntlProps, type WrappedComponentProps } from 'react-intl';
3
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
3
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
4
4
  import type { FindReplaceProps } from './FindReplace';
5
5
  export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'> {
6
6
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
7
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
7
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
8
8
  import type { FindReplaceProps } from './FindReplace';
9
9
  export interface FindReplaceToolbarButtonProps extends Omit<FindReplaceProps, 'count'> {
10
10
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
- import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
- import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event';
4
+ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
5
5
  export type ReplaceProps = {
6
6
  /**
7
7
  * When `false`, the replace label, field, replacement count message and both
@@ -1,4 +1,4 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
1
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
2
2
  import type { FindReplacePlugin } from '../../findReplacePluginType';
3
3
  import type { FindReplacePluginState } from '../../types';
4
4
  export declare function useFindReplacePluginStateSelector<Key extends keyof FindReplacePluginState>(api: ExtractInjectionAPI<FindReplacePlugin> | null | undefined, key: Key): FindReplacePluginState[Key] | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-find-replace",
3
- "version": "26.0.3",
3
+ "version": "26.0.5",
4
4
  "description": "find replace plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/platform-feature-flags-react": "^1.2.0",
41
41
  "@atlaskit/primitives": "^22.5.0",
42
42
  "@atlaskit/textfield": "^10.2.0",
43
- "@atlaskit/tmp-editor-statsig": "^230.0.0",
43
+ "@atlaskit/tmp-editor-statsig": "^232.0.0",
44
44
  "@atlaskit/tokens": "^20.4.0",
45
45
  "@atlaskit/tooltip": "^24.4.0",
46
46
  "@babel/runtime": "^7.0.0",