@atlaskit/editor-plugin-find-replace 3.2.6 → 3.2.8

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 (46) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/pm-plugins/commands.js +3 -4
  3. package/dist/cjs/pm-plugins/plugin-factory.js +1 -2
  4. package/dist/cjs/ui/Find.js +1 -2
  5. package/dist/cjs/ui/Replace.js +2 -3
  6. package/dist/cjs/ui/ReplaceNext.js +2 -3
  7. package/dist/cjs/ui/styles.js +3 -98
  8. package/dist/es2019/pm-plugins/commands.js +3 -4
  9. package/dist/es2019/pm-plugins/plugin-factory.js +1 -2
  10. package/dist/es2019/ui/Find.js +1 -2
  11. package/dist/es2019/ui/Replace.js +2 -3
  12. package/dist/es2019/ui/ReplaceNext.js +2 -3
  13. package/dist/es2019/ui/styles.js +0 -205
  14. package/dist/esm/pm-plugins/commands.js +3 -4
  15. package/dist/esm/pm-plugins/plugin-factory.js +1 -2
  16. package/dist/esm/ui/Find.js +1 -2
  17. package/dist/esm/ui/Replace.js +2 -3
  18. package/dist/esm/ui/ReplaceNext.js +2 -3
  19. package/dist/esm/ui/styles.js +2 -97
  20. package/dist/types/findReplacePluginType.d.ts +4 -4
  21. package/dist/types/pm-plugins/actions.d.ts +15 -15
  22. package/dist/types/pm-plugins/commands-with-analytics.d.ts +2 -2
  23. package/dist/types/pm-plugins/utils/index.d.ts +4 -4
  24. package/dist/types/types/index.d.ts +28 -28
  25. package/dist/types/ui/Find.d.ts +24 -24
  26. package/dist/types/ui/FindReplace.d.ts +10 -10
  27. package/dist/types/ui/FindReplaceDropdown.d.ts +2 -2
  28. package/dist/types/ui/FindReplaceToolbarButton.d.ts +5 -5
  29. package/dist/types/ui/FindReplaceTooltipButton.d.ts +4 -4
  30. package/dist/types/ui/Replace.d.ts +17 -17
  31. package/dist/types/ui/ReplaceNext.d.ts +16 -16
  32. package/dist/types/ui/styles.d.ts +0 -1
  33. package/dist/types-ts4.5/findReplacePluginType.d.ts +4 -4
  34. package/dist/types-ts4.5/pm-plugins/actions.d.ts +15 -15
  35. package/dist/types-ts4.5/pm-plugins/commands-with-analytics.d.ts +2 -2
  36. package/dist/types-ts4.5/pm-plugins/utils/index.d.ts +4 -4
  37. package/dist/types-ts4.5/types/index.d.ts +28 -28
  38. package/dist/types-ts4.5/ui/Find.d.ts +24 -24
  39. package/dist/types-ts4.5/ui/FindReplace.d.ts +10 -10
  40. package/dist/types-ts4.5/ui/FindReplaceDropdown.d.ts +2 -2
  41. package/dist/types-ts4.5/ui/FindReplaceToolbarButton.d.ts +5 -5
  42. package/dist/types-ts4.5/ui/FindReplaceTooltipButton.d.ts +4 -4
  43. package/dist/types-ts4.5/ui/Replace.d.ts +17 -17
  44. package/dist/types-ts4.5/ui/ReplaceNext.d.ts +16 -16
  45. package/dist/types-ts4.5/ui/styles.d.ts +0 -1
  46. package/package.json +6 -9
@@ -1,6 +1,5 @@
1
1
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
5
  import { FindReplaceActionTypes } from './actions';
@@ -29,7 +28,7 @@ export var activate = function activate() {
29
28
  getIntl: getIntl,
30
29
  api: api
31
30
  });
32
- index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
31
+ index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
33
32
  }
34
33
  return {
35
34
  type: FindReplaceActionTypes.ACTIVATE,
@@ -53,7 +52,7 @@ export var find = function find(editorView, containerElement, keyword) {
53
52
  getIntl: getIntl,
54
53
  api: api
55
54
  }) : [];
56
- var index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
55
+ var index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
57
56
 
58
57
  // we can't just apply all the decorations to highlight the search results at once
59
58
  // as if there are a lot ProseMirror cries :'(
@@ -82,7 +81,7 @@ export var find = function find(editorView, containerElement, keyword) {
82
81
  api: api
83
82
  }) : [];
84
83
  if (matches.length > 0) {
85
- var index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
84
+ var index = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? findClosestMatch(selection.from, matches) : findSearchIndex(selection.from, matches);
86
85
  var newSelection = getSelectionForMatch(tr.selection, tr.doc, index, matches);
87
86
  if (expValEqualsNoExposure('platform_editor_toggle_expand_on_match_found', 'isEnabled', true)) {
88
87
  var _api$expand;
@@ -4,7 +4,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
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
5
  import { pluginFactory, stepHasSlice } from '@atlaskit/editor-common/utils';
6
6
  import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
8
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
10
9
  import { initialState } from './main';
@@ -96,7 +95,7 @@ var handleDocChanged = function handleDocChanged(tr, pluginState) {
96
95
  });
97
96
  }
98
97
  if (newIndex === undefined || newIndex === -1) {
99
- newIndex = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? findClosestMatch(tr.selection.from, newMatches) : findSearchIndex(tr.selection.from, newMatches);
98
+ newIndex = expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? findClosestMatch(tr.selection.from, newMatches) : findSearchIndex(tr.selection.from, newMatches);
100
99
  }
101
100
  var newSelectedMatch = newMatches[newIndex];
102
101
  decorationSet = removeMatchesFromSet(decorationSet, [selectedMatch, newSelectedMatch], tr.doc);
@@ -24,7 +24,6 @@ import { Label } from '@atlaskit/form';
24
24
  import TextLetterCaseIcon from '@atlaskit/icon-lab/core/text-letter-case';
25
25
  import MatchCaseIcon from '@atlaskit/icon/core/migration/text-style--emoji-keyboard';
26
26
  import EditorTextStyleIcon from '@atlaskit/icon/glyph/editor/text-style';
27
- import { fg } from '@atlaskit/platform-feature-flags';
28
27
  import Textfield from '@atlaskit/textfield';
29
28
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
30
29
  import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
@@ -138,7 +137,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
138
137
  }
139
138
  });
140
139
  _defineProperty(_this, "matchCaseIconEle", function (iconProps) {
141
- return expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? jsx(TextLetterCaseIcon, {
140
+ return expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? jsx(TextLetterCaseIcon, {
142
141
  LEGACY_size: 'small',
143
142
  LEGACY_fallbackIcon: EditorTextStyleIcon,
144
143
  label: expValEquals('platform_editor_find_replace_a11y_fixes', 'isEnabled', true) ? iconProps.label : _this.matchCase,
@@ -23,7 +23,6 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
23
23
  import { Label, ValidMessage } from '@atlaskit/form';
24
24
  import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down';
25
25
  import ChevronUpIcon from '@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up';
26
- import { fg } from '@atlaskit/platform-feature-flags';
27
26
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
28
27
  import { Inline, xcss } from '@atlaskit/primitives';
29
28
  import Textfield from '@atlaskit/textfield';
@@ -287,9 +286,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
287
286
  // Ignored via go/ees005
288
287
  // eslint-disable-next-line require-unicode-regexp
289
288
  resultsReplace.replace(/ /, "\xA0") : resultsReplace)))), jsx("div", {
290
- css: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified, sectionWrapperFlexWrap] : [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified]
289
+ css: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified, sectionWrapperFlexWrap] : [sectionWrapperStyles, sectionWrapperStylesAlternate, sectionWrapperJustified]
291
290
  }, jsx("div", {
292
- css: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? orderOneStylesNew : orderOneStyles
291
+ css: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? orderOneStylesNew : orderOneStyles
293
292
  }, jsx("div", {
294
293
  css: nextPreviousItemStyles
295
294
  }, jsx(FindReplaceTooltipButton, {
@@ -7,7 +7,6 @@ import { findReplaceMessages as messages } from '@atlaskit/editor-common/message
7
7
  import { ValidMessage } from '@atlaskit/form';
8
8
  import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down--hipchat-chevron-down';
9
9
  import ChevronUpIcon from '@atlaskit/icon/core/migration/chevron-up--hipchat-chevron-up';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
12
11
  import { Box, Inline, Text, xcss } from '@atlaskit/primitives';
13
12
  import Textfield from '@atlaskit/textfield';
@@ -215,7 +214,7 @@ var Replace = function Replace(_ref) {
215
214
  resultsReplace.replace(/ /, "\xA0") : resultsReplace)), /*#__PURE__*/React.createElement(Box, {
216
215
  xcss: actionButtonContainerStyles
217
216
  }, /*#__PURE__*/React.createElement(Inline, {
218
- xcss: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? [actionButtonInlineStyles, actionButtonParentInlineStylesNew] : [actionButtonInlineStyles, actionButtonParentInlineStyles]
217
+ xcss: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? [actionButtonInlineStyles, actionButtonParentInlineStylesNew] : [actionButtonInlineStyles, actionButtonParentInlineStyles]
219
218
  }, /*#__PURE__*/React.createElement(Inline, {
220
219
  xcss: actionButtonInlineStyles
221
220
  }, /*#__PURE__*/React.createElement(FindReplaceTooltipButton, {
@@ -253,7 +252,7 @@ var Replace = function Replace(_ref) {
253
252
  id: "replaceAll-button",
254
253
  onClick: handleReplaceAllClick,
255
254
  isDisabled: expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? count.totalReplaceable === 0 : !canReplace
256
- }, replaceAll)), expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && fg('platform_editor_find_and_replace_improvements_1') ? /*#__PURE__*/React.createElement(Inline, {
255
+ }, replaceAll)), expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? /*#__PURE__*/React.createElement(Inline, {
257
256
  xcss: closeButtonInlineStyles
258
257
  }, /*#__PURE__*/React.createElement(Button, {
259
258
  appearance: "subtle",
@@ -1,5 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- var _css2, _css3;
2
+ var _css2;
3
3
  /* eslint-disable @atlaskit/editor/no-re-export */
4
4
  // Entry file in package.json
5
5
 
@@ -31,101 +31,6 @@ export var findReplaceStyles = css(_defineProperty(_defineProperty({}, ".".conca
31
31
  backgroundColor: "var(--ds-background-accent-teal-subtle, #6CC3E0)"
32
32
  }));
33
33
  export var findReplaceStylesNew = css((_css2 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css2, ".".concat(searchMatchTextClass), {
34
- borderRadius: "var(--ds-space-050, 4px)",
35
- boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t"),
36
- // TODO: ED-28376 - clean up !important later
37
- backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)".concat(" !important"),
38
- color: "var(--ds-text, #172B4D)"
39
- }), ".".concat(searchMatchTextClass, ".").concat(selectedSearchMatchClass), {
40
- boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t"),
41
- // TODO: ED-28376 - clean up !important later
42
- backgroundColor: "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)".concat(" !important")
43
- }), ".".concat(searchMatchTextClass, ".").concat(darkModeSearchMatchClass), {
44
- boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t"),
45
- // TODO: ED-28376 - clean up !important later
46
- backgroundColor: "var(--ds-background-accent-magenta-bolder-pressed, #50253F)".concat(" !important"),
47
- color: "var(--ds-text-inverse, #FFFFFF)"
48
- }), ".".concat(searchMatchTextClass, ".").concat(selectedSearchMatchClass, ".").concat(darkModeSearchMatchClass), {
49
- boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t"),
50
- // TODO: ED-28376 - clean up !important later
51
- backgroundColor: "var(--ds-background-accent-magenta-bolder-hovered, #943D73)".concat(" !important")
52
- }), ".".concat(blockSearchMatchClass), _defineProperty({
53
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
54
- '[data-smart-link-container="true"], .loader-wrapper>div::after': {
55
- boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t\t")
56
- }
57
- }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
58
- boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-subtler, #FDD0EC)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)")
59
- })), ".".concat(blockSearchMatchClass, ".").concat(selectedBlockSearchMatchClass), _defineProperty({
60
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
61
- '[data-smart-link-container="true"], .loader-wrapper>div::after': {
62
- boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t\t")
63
- }
64
- }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
65
- boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)")
66
- })), ".".concat(blockSearchMatchClass, ".ak-editor-selected-node"), _defineProperty({
67
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
68
- '.loader-wrapper>div::after': {
69
- boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
70
- }
71
- }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
72
- // TODO: ED-28376 - will clean up !important later
73
- boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", " !important")
74
- })), ".".concat(blockSearchMatchClass, ".").concat(selectedBlockSearchMatchClass, ".ak-editor-selected-node"), _defineProperty({
75
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
76
- '[data-smart-link-container="true"], .loader-wrapper>div::after': {
77
- boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
78
- }
79
- }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
80
- // TODO: ED-28376 - will clean up !important later
81
- boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", " !important")
82
- })), ".".concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass), _defineProperty({
83
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
84
- '[data-smart-link-container="true"], .loader-wrapper>div::after': {
85
- boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t\t")
86
- }
87
- }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
88
- boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)")
89
- })), ".".concat(blockSearchMatchClass, ".").concat(selectedBlockSearchMatchClass, ".").concat(darkModeSearchMatchClass), _defineProperty({
90
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
91
- '[data-smart-link-container="true"], .loader-wrapper>div::after': {
92
- boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t\t")
93
- }
94
- }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
95
- boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)")
96
- })), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css2, ".".concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".ak-editor-selected-node"), _defineProperty({
97
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
98
- '.loader-wrapper>div::after': {
99
- boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
100
- }
101
- }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
102
- boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)", " !important")
103
- })), ".".concat(blockSearchMatchClass, ".").concat(selectedBlockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".ak-editor-selected-node"), _defineProperty({
104
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
105
- '[data-smart-link-container="true"], .loader-wrapper>div::after': {
106
- boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
107
- }
108
- }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
109
- boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)", " !important")
110
- })), ".".concat(searchMatchExpandTitleClass, " > .").concat(expandClassNames.titleContainer, " > .").concat(expandClassNames.inputContainer), _defineProperty({
111
- borderRadius: "var(--ds-space-050, 4px)",
112
- boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t"),
113
- backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)"
114
- }, ".".concat(expandClassNames.titleInput), {
115
- color: "var(--ds-text, #172B4D)"
116
- })), ".".concat(searchMatchExpandTitleClass, ".").concat(selectedSearchMatchClass, " > .").concat(expandClassNames.titleContainer, " > .").concat(expandClassNames.inputContainer), {
117
- boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t"),
118
- backgroundColor: "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"
119
- }), ".".concat(searchMatchExpandTitleClass, ".").concat(darkModeSearchMatchClass, " > .").concat(expandClassNames.titleContainer, " > .").concat(expandClassNames.inputContainer), _defineProperty({
120
- boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t"),
121
- backgroundColor: "var(--ds-background-accent-magenta-bolder-pressed, #50253F)"
122
- }, ".".concat(expandClassNames.titleInput), {
123
- color: "var(--ds-text-inverse, #FFFFFF)"
124
- })), ".".concat(searchMatchExpandTitleClass, ".").concat(selectedSearchMatchClass, ".").concat(darkModeSearchMatchClass, " > .").concat(expandClassNames.titleContainer, " > .").concat(expandClassNames.inputContainer), {
125
- boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t"),
126
- backgroundColor: "var(--ds-background-accent-magenta-bolder-hovered, #943D73)"
127
- })));
128
- export var findReplaceStylesNewNoImportant = css((_css3 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css3, ".".concat(searchMatchTextClass), {
129
34
  borderRadius: "var(--ds-space-050, 4px)",
130
35
  boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t"),
131
36
  // we need to use !important here as we need to override inline selection styles
@@ -184,7 +89,7 @@ export var findReplaceStylesNewNoImportant = css((_css3 = {}, _defineProperty(_d
184
89
  }
185
90
  }, "".concat(inlineCardSelector, ", ").concat(inlineCardWithHoverPreviewSelector, ", ").concat(statusSelector, ", ").concat(mentionSelector, ", ").concat(dateSelector), {
186
91
  boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)")
187
- })), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css3, ".".concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".ak-editor-selected-node, .").concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".mentionView-content-wrap.ak-editor-selected-node"), _defineProperty({
92
+ })), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_css2, ".".concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".ak-editor-selected-node, .").concat(blockSearchMatchClass, ".").concat(darkModeSearchMatchClass, ".mentionView-content-wrap.ak-editor-selected-node"), _defineProperty({
188
93
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
189
94
  '.loader-wrapper>div::after': {
190
95
  boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
@@ -18,11 +18,11 @@ export type FindReplacePluginDependencies = [
18
18
  OptionalPlugin<ExpandPlugin>
19
19
  ];
20
20
  export type FindReplacePlugin = NextEditorPlugin<'findReplace', {
21
- pluginConfiguration: FindReplacePluginOptions;
22
- sharedState: FindReplacePluginState | undefined;
23
- dependencies: FindReplacePluginDependencies;
24
21
  actions: {
25
- registerToolbarButton: (params: FindReplaceToolbarButtonActionProps) => React.ReactNode;
26
22
  activateFindReplace: (triggerMethod?: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.EXTERNAL) => boolean;
23
+ registerToolbarButton: (params: FindReplaceToolbarButtonActionProps) => React.ReactNode;
27
24
  };
25
+ dependencies: FindReplacePluginDependencies;
26
+ pluginConfiguration: FindReplacePluginOptions;
27
+ sharedState: FindReplacePluginState | undefined;
28
28
  }>;
@@ -13,40 +13,40 @@ export declare enum FindReplaceActionTypes {
13
13
  TOGGLE_MATCH_CASE = "TOGGLE_MATCH_CASE"
14
14
  }
15
15
  export interface Activate {
16
- type: FindReplaceActionTypes.ACTIVATE;
17
16
  findText?: string;
18
- matches?: Match[];
19
17
  index?: number;
18
+ matches?: Match[];
19
+ type: FindReplaceActionTypes.ACTIVATE;
20
20
  }
21
21
  export interface Find {
22
- type: FindReplaceActionTypes.FIND;
23
22
  findText: string;
24
- matches: Match[];
25
23
  index: number;
24
+ matches: Match[];
25
+ type: FindReplaceActionTypes.FIND;
26
26
  }
27
27
  export interface FindNext {
28
- type: FindReplaceActionTypes.FIND_NEXT;
29
- index: number;
30
28
  decorationSet: DecorationSet;
29
+ index: number;
30
+ type: FindReplaceActionTypes.FIND_NEXT;
31
31
  }
32
32
  export interface FindPrevious {
33
- type: FindReplaceActionTypes.FIND_PREVIOUS;
34
- index: number;
35
33
  decorationSet: DecorationSet;
34
+ index: number;
35
+ type: FindReplaceActionTypes.FIND_PREVIOUS;
36
36
  }
37
37
  export interface Replace {
38
- type: FindReplaceActionTypes.REPLACE;
39
- replaceText: string;
40
38
  decorationSet: DecorationSet;
41
- matches: Match[];
42
39
  index: number;
40
+ matches: Match[];
41
+ replaceText: string;
42
+ type: FindReplaceActionTypes.REPLACE;
43
43
  }
44
44
  export interface ReplaceAll {
45
- type: FindReplaceActionTypes.REPLACE_ALL;
46
- replaceText: string;
47
45
  decorationSet: DecorationSet;
48
- matches: Match[];
49
46
  index: number;
47
+ matches: Match[];
48
+ replaceText: string;
49
+ type: FindReplaceActionTypes.REPLACE_ALL;
50
50
  }
51
51
  export interface Cancel {
52
52
  type: FindReplaceActionTypes.CANCEL;
@@ -55,8 +55,8 @@ export interface Blur {
55
55
  type: FindReplaceActionTypes.BLUR;
56
56
  }
57
57
  export interface UpdateDecorations {
58
- type: FindReplaceActionTypes.UPDATE_DECORATIONS;
59
58
  decorationSet: DecorationSet;
59
+ type: FindReplaceActionTypes.UPDATE_DECORATIONS;
60
60
  }
61
61
  export interface ToggleMatchCase {
62
62
  type: FindReplaceActionTypes.TOGGLE_MATCH_CASE;
@@ -5,8 +5,8 @@ export declare const activateWithAnalytics: (editorAnalyticsAPI: EditorAnalytics
5
5
  triggerMethod: TRIGGER_METHOD.SHORTCUT | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.EXTERNAL;
6
6
  }) => Command;
7
7
  export declare const findWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ editorView, containerElement, keyword, }: {
8
- editorView: EditorView;
9
8
  containerElement: HTMLElement | null;
9
+ editorView: EditorView;
10
10
  keyword?: string;
11
11
  }) => Command;
12
12
  export declare const findNextWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined, editorView: EditorView) => ({ triggerMethod, }: {
@@ -16,8 +16,8 @@ export declare const findPrevWithAnalytics: (editorAnalyticsAPI: EditorAnalytics
16
16
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
17
17
  }) => Command;
18
18
  export declare const replaceWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ triggerMethod, replaceText, }: {
19
- triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
20
19
  replaceText: string;
20
+ triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
21
21
  }) => Command;
22
22
  export declare const replaceAllWithAnalytics: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => ({ replaceText }: {
23
23
  replaceText: string;
@@ -12,12 +12,12 @@ export declare function getSelectedText(selection: TextSelection): string;
12
12
  export declare const createDecorations: (selectedIndex: number, matches: Match[]) => Decoration[];
13
13
  export declare const createDecoration: (match: Match, isSelected?: Boolean) => Decoration;
14
14
  type FindMatchesType = {
15
+ api?: ExtractInjectionAPI<FindReplacePlugin>;
15
16
  content: PmNode | Fragment;
16
- searchText: string;
17
- shouldMatchCase: boolean;
18
17
  contentIndex?: number;
19
18
  getIntl?: () => IntlShape;
20
- api?: ExtractInjectionAPI<FindReplacePlugin>;
19
+ searchText: string;
20
+ shouldMatchCase: boolean;
21
21
  };
22
22
  export declare function findMatches({ content, searchText, shouldMatchCase, contentIndex, getIntl, api, }: FindMatchesType): Match[];
23
23
  export declare function findClosestMatch(selectionPos: number, matches: Match[]): number;
@@ -53,7 +53,7 @@ export declare const findIndexBeforePosition: (items: Decoration[], position: nu
53
53
  */
54
54
  export declare const isMatchAffectedByStep: (match: Match, step: Step & {
55
55
  from: number;
56
- to: number;
57
56
  slice: Slice;
57
+ to: number;
58
58
  }, tr: ReadonlyTransaction) => boolean;
59
59
  export {};
@@ -4,65 +4,65 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
4
4
  import type { DecorationSet, EditorView } from '@atlaskit/editor-prosemirror/view';
5
5
  import type { FindReplacePlugin } from '../findReplacePluginType';
6
6
  export interface FindReplacePluginState {
7
+ /** api */
8
+ api?: ExtractInjectionAPI<FindReplacePlugin>;
9
+ /** Decorations for the search results */
10
+ decorationSet: DecorationSet;
11
+ /** Search keyword */
12
+ findText: string;
13
+ /** Intl object */
14
+ getIntl?: () => IntlShape;
15
+ /** Index of selected word in array of matches, this gets updated as user finds next/prev */
16
+ index: number;
7
17
  /** Whether find/replace is active, i.e. displayed */
8
18
  isActive: boolean;
19
+ /** Positions of find results */
20
+ matches: Match[];
21
+ /** Text to replace with */
22
+ replaceText: string;
9
23
  /**
10
24
  * Whether we should set focus into and select all text of find textfield
11
25
  * This will be true if user highlights a word and hits cmd+f
12
26
  */
13
27
  shouldFocus: boolean;
14
- /** Search keyword */
15
- findText: string;
16
- /** Text to replace with */
17
- replaceText: string;
18
- /** Index of selected word in array of matches, this gets updated as user finds next/prev */
19
- index: number;
20
- /** Positions of find results */
21
- matches: Match[];
22
- /** Decorations for the search results */
23
- decorationSet: DecorationSet;
24
28
  /** Whether find/replace should match case when searching for results */
25
29
  shouldMatchCase: boolean;
26
- /** Intl object */
27
- getIntl?: () => IntlShape;
28
- /** api */
29
- api?: ExtractInjectionAPI<FindReplacePlugin>;
30
30
  }
31
31
  export type FindReplaceToolbarButtonWithStateProps = {
32
+ api: ExtractInjectionAPI<FindReplacePlugin> | undefined;
33
+ containerElement: HTMLElement | null;
34
+ dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
35
+ doesNotHaveButton?: boolean;
36
+ editorView: EditorView;
37
+ isButtonHidden?: boolean;
38
+ isToolbarReducedSpacing?: boolean;
32
39
  popupsBoundariesElement?: HTMLElement;
33
40
  popupsMountPoint?: HTMLElement;
34
41
  popupsScrollableElement?: HTMLElement;
35
- isToolbarReducedSpacing?: boolean;
36
- editorView: EditorView;
37
- containerElement: HTMLElement | null;
38
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
39
42
  takeFullWidth?: boolean;
40
- api: ExtractInjectionAPI<FindReplacePlugin> | undefined;
41
- isButtonHidden?: boolean;
42
- doesNotHaveButton?: boolean;
43
43
  };
44
44
  export type FindReplaceToolbarButtonActionProps = Omit<FindReplaceToolbarButtonWithStateProps, 'api'>;
45
45
  export type Match = {
46
- /** Start position */
47
- start: number;
48
- /** End position */
49
- end: number;
50
46
  /** Boolean for whether the match can be replaced */
51
47
  canReplace?: boolean;
48
+ /** End position */
49
+ end: number;
52
50
  /** Type of the node of the match */
53
51
  nodeType?: string;
52
+ /** Start position */
53
+ start: number;
54
54
  };
55
55
  export type TextGrouping = {
56
- /** The concatenated text across nodes */
57
- text: string;
58
56
  /** Start position */
59
57
  pos: number;
58
+ /** The concatenated text across nodes */
59
+ text: string;
60
60
  } | null;
61
61
  export type FindReplaceOptions = {
62
62
  allowMatchCase?: boolean;
63
63
  };
64
64
  export type MatchCaseProps = {
65
65
  allowMatchCase?: boolean;
66
- shouldMatchCase?: boolean;
67
66
  onToggleMatchCase?: () => void;
67
+ shouldMatchCase?: boolean;
68
68
  };
@@ -8,14 +8,18 @@ import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
8
8
  import type { MatchCaseProps } from '../types';
9
9
  export declare const FIND_DEBOUNCE_MS = 100;
10
10
  export type FindProps = {
11
- findText?: string;
12
11
  count: {
13
12
  index: number;
14
13
  total: number;
15
14
  };
16
- shouldFocus: boolean;
17
- onFindBlur: () => void;
15
+ findText?: string;
16
+ findTyped: boolean;
17
+ onArrowDown: () => void;
18
+ onCancel: ({ triggerMethod, }: {
19
+ triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
20
+ }) => void;
18
21
  onFind: (findText?: string) => void;
22
+ onFindBlur: () => void;
19
23
  onFindNext: ({ triggerMethod, }: {
20
24
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
21
25
  }) => void;
@@ -23,22 +27,22 @@ export type FindProps = {
23
27
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
24
28
  }) => void;
25
29
  onFindTextfieldRefSet: (ref: React.RefObject<HTMLInputElement>) => void;
26
- onCancel: ({ triggerMethod, }: {
27
- triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
28
- }) => void;
29
- onArrowDown: () => void;
30
30
  setFindTyped: (value: boolean) => void;
31
- findTyped: boolean;
31
+ shouldFocus: boolean;
32
32
  } & MatchCaseProps;
33
33
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
34
- findText?: string;
35
34
  count: {
36
35
  index: number;
37
36
  total: number;
38
37
  };
39
- shouldFocus: boolean;
40
- onFindBlur: () => void;
38
+ findText?: string;
39
+ findTyped: boolean;
40
+ onArrowDown: () => void;
41
+ onCancel: ({ triggerMethod, }: {
42
+ triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
43
+ }) => void;
41
44
  onFind: (findText?: string) => void;
45
+ onFindBlur: () => void;
42
46
  onFindNext: ({ triggerMethod, }: {
43
47
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
44
48
  }) => void;
@@ -46,22 +50,22 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
46
50
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
47
51
  }) => void;
48
52
  onFindTextfieldRefSet: (ref: React.RefObject<HTMLInputElement>) => void;
49
- onCancel: ({ triggerMethod, }: {
50
- triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
51
- }) => void;
52
- onArrowDown: () => void;
53
53
  setFindTyped: (value: boolean) => void;
54
- findTyped: boolean;
54
+ shouldFocus: boolean;
55
55
  } & MatchCaseProps & WrappedComponentProps>> & {
56
56
  WrappedComponent: React.ComponentType<{
57
- findText?: string;
58
57
  count: {
59
58
  index: number;
60
59
  total: number;
61
60
  };
62
- shouldFocus: boolean;
63
- onFindBlur: () => void;
61
+ findText?: string;
62
+ findTyped: boolean;
63
+ onArrowDown: () => void;
64
+ onCancel: ({ triggerMethod, }: {
65
+ triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
66
+ }) => void;
64
67
  onFind: (findText?: string) => void;
68
+ onFindBlur: () => void;
65
69
  onFindNext: ({ triggerMethod, }: {
66
70
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
67
71
  }) => void;
@@ -69,12 +73,8 @@ declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
69
73
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
70
74
  }) => void;
71
75
  onFindTextfieldRefSet: (ref: React.RefObject<HTMLInputElement>) => void;
72
- onCancel: ({ triggerMethod, }: {
73
- triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
74
- }) => void;
75
- onArrowDown: () => void;
76
76
  setFindTyped: (value: boolean) => void;
77
- findTyped: boolean;
77
+ shouldFocus: boolean;
78
78
  } & MatchCaseProps & WrappedComponentProps>;
79
79
  };
80
80
  export default _default;
@@ -7,17 +7,20 @@ import { jsx } from '@emotion/react';
7
7
  import type { DispatchAnalyticsEvent, TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
8
8
  import type { MatchCaseProps } from '../types';
9
9
  export type FindReplaceProps = {
10
- findText?: string;
11
- replaceText?: string;
12
10
  count: {
13
11
  index: number;
14
12
  total: number;
15
13
  totalReplaceable?: number;
16
14
  };
15
+ dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
16
+ findText?: string;
17
+ focusToolbarButton?: () => void;
17
18
  isReplaceable?: boolean;
18
- shouldFocus: boolean;
19
- onFindBlur: () => void;
19
+ onCancel: ({ triggerMethod, }: {
20
+ triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
21
+ }) => void;
20
22
  onFind: (findText?: string) => void;
23
+ onFindBlur: () => void;
21
24
  onFindNext: ({ triggerMethod, }: {
22
25
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
23
26
  }) => void;
@@ -25,17 +28,14 @@ export type FindReplaceProps = {
25
28
  triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
26
29
  }) => void;
27
30
  onReplace: ({ triggerMethod, replaceText, }: {
28
- triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
29
31
  replaceText: string;
32
+ triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.BUTTON;
30
33
  }) => void;
31
34
  onReplaceAll: ({ replaceText }: {
32
35
  replaceText: string;
33
36
  }) => void;
34
- onCancel: ({ triggerMethod, }: {
35
- triggerMethod: TRIGGER_METHOD.KEYBOARD | TRIGGER_METHOD.TOOLBAR | TRIGGER_METHOD.BUTTON;
36
- }) => void;
37
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
38
- focusToolbarButton?: () => void;
37
+ replaceText?: string;
38
+ shouldFocus: boolean;
39
39
  } & MatchCaseProps;
40
40
  declare class FindReplace extends React.PureComponent<FindReplaceProps> {
41
41
  private findTextfield;
@@ -3,13 +3,13 @@ import { type WrappedComponentProps } from 'react-intl-next';
3
3
  import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
4
4
  import type { FindReplaceProps } from './FindReplace';
5
5
  export interface FindReplaceDropdownProps extends Omit<FindReplaceProps, 'count'> {
6
+ dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
6
7
  index: number;
7
- numMatches: number;
8
8
  isActive: boolean;
9
9
  isReplaceable?: boolean;
10
+ numMatches: number;
10
11
  numReplaceable?: number;
11
12
  popupsMountPoint?: HTMLElement;
12
- dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
13
13
  }
14
14
  declare const _default: React.FC<import("react-intl-next").WithIntlProps<FindReplaceDropdownProps & WrappedComponentProps>> & {
15
15
  WrappedComponent: React.ComponentType<FindReplaceDropdownProps & WrappedComponentProps>;