@atlaskit/editor-plugin-find-replace 1.7.18 → 1.7.19

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-plugin-find-replace
2
2
 
3
+ ## 1.7.19
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 1.7.18
4
10
 
5
11
  ### Patch Changes
@@ -22,7 +22,7 @@ var BatchDecorations = /*#__PURE__*/function () {
22
22
  function BatchDecorations() {
23
23
  (0, _classCallCheck2.default)(this, BatchDecorations);
24
24
  }
25
- (0, _createClass2.default)(BatchDecorations, [{
25
+ return (0, _createClass2.default)(BatchDecorations, [{
26
26
  key: "stop",
27
27
  value: function stop() {
28
28
  if (this.rafId) {
@@ -304,7 +304,6 @@ var BatchDecorations = /*#__PURE__*/function () {
304
304
  });
305
305
  }
306
306
  }]);
307
- return BatchDecorations;
308
307
  }();
309
308
  var batchDecorations = new BatchDecorations();
310
309
  var _default = exports.default = batchDecorations;
@@ -7,10 +7,9 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.FIND_DEBOUNCE_MS = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
10
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
11
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
14
  var _react = _interopRequireDefault(require("react"));
16
15
  var _react2 = require("@emotion/react");
@@ -24,7 +23,7 @@ var _keyboard = _interopRequireDefault(require("@atlaskit/icon/glyph/emoji/keybo
24
23
  var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
25
24
  var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
26
25
  var _uiStyles = require("./ui-styles");
27
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
26
+ 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)); }
28
27
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */ /**
29
28
  * @jsxRuntime classic
30
29
  * @jsx jsx
@@ -32,15 +31,13 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
32
31
  var FIND_DEBOUNCE_MS = exports.FIND_DEBOUNCE_MS = 100;
33
32
  // eslint-disable-next-line @repo/internal/react/no-class-components
34
33
  var Find = /*#__PURE__*/function (_React$Component) {
35
- (0, _inherits2.default)(Find, _React$Component);
36
- var _super = _createSuper(Find);
37
34
  function Find(props) {
38
35
  var _this;
39
36
  (0, _classCallCheck2.default)(this, Find);
40
- _this = _super.call(this, props);
41
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "findTextfieldRef", /*#__PURE__*/_react.default.createRef());
42
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isComposing", false);
43
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "syncFindText", function (onSynced) {
37
+ _this = _callSuper(this, Find, [props]);
38
+ (0, _defineProperty2.default)(_this, "findTextfieldRef", /*#__PURE__*/_react.default.createRef());
39
+ (0, _defineProperty2.default)(_this, "isComposing", false);
40
+ (0, _defineProperty2.default)(_this, "syncFindText", function (onSynced) {
44
41
  var _this$state;
45
42
  // If the external prop findText changes and we aren't in a composition we should update to
46
43
  // use the external prop value.
@@ -51,20 +48,20 @@ var Find = /*#__PURE__*/function (_React$Component) {
51
48
  _this.updateFindValue(_this.props.findText || '', onSynced);
52
49
  }
53
50
  });
54
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusFindTextfield", function () {
51
+ (0, _defineProperty2.default)(_this, "focusFindTextfield", function () {
55
52
  var input = _this.findTextfieldRef.current;
56
53
  if (_this.props.shouldFocus && input) {
57
54
  input.select();
58
55
  }
59
56
  });
60
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFindChange", function (event) {
57
+ (0, _defineProperty2.default)(_this, "handleFindChange", function (event) {
61
58
  _this.updateFindValue(event.target.value);
62
59
  });
63
60
  // debounce (vs throttle) to not block typing inside find input while onFind runs
64
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "debouncedFind", (0, _debounce.default)(function (value) {
61
+ (0, _defineProperty2.default)(_this, "debouncedFind", (0, _debounce.default)(function (value) {
65
62
  _this.props.onFind(value);
66
63
  }, FIND_DEBOUNCE_MS));
67
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateFindValue", function (value, onSynced) {
64
+ (0, _defineProperty2.default)(_this, "updateFindValue", function (value, onSynced) {
68
65
  _this.setState({
69
66
  localFindText: value
70
67
  }, function () {
@@ -78,7 +75,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
78
75
  });
79
76
  // throtlle between animation frames gives better experience on Enter compared to arbitrary value
80
77
  // it adjusts based on performance (and document size)
81
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFindKeyDownThrottled", (0, _rafSchd.default)(function (event) {
78
+ (0, _defineProperty2.default)(_this, "handleFindKeyDownThrottled", (0, _rafSchd.default)(function (event) {
82
79
  if (event.key === 'Enter') {
83
80
  if (event.shiftKey) {
84
81
  _this.props.onFindPrev({
@@ -94,17 +91,17 @@ var Find = /*#__PURE__*/function (_React$Component) {
94
91
  _this.props.onArrowDown();
95
92
  }
96
93
  }));
97
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFindKeyDown", function (event) {
94
+ (0, _defineProperty2.default)(_this, "handleFindKeyDown", function (event) {
98
95
  if (_this.isComposing) {
99
96
  return;
100
97
  }
101
98
  event.persist();
102
99
  _this.handleFindKeyDownThrottled(event);
103
100
  });
104
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFindKeyUp", function () {
101
+ (0, _defineProperty2.default)(_this, "handleFindKeyUp", function () {
105
102
  _this.handleFindKeyDownThrottled.cancel();
106
103
  });
107
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFindNextClick", function (ref) {
104
+ (0, _defineProperty2.default)(_this, "handleFindNextClick", function (ref) {
108
105
  if (_this.isComposing) {
109
106
  return;
110
107
  }
@@ -112,7 +109,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
112
109
  triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
113
110
  });
114
111
  });
115
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFindPrevClick", function (ref) {
112
+ (0, _defineProperty2.default)(_this, "handleFindPrevClick", function (ref) {
116
113
  if (_this.isComposing) {
117
114
  return;
118
115
  }
@@ -120,20 +117,20 @@ var Find = /*#__PURE__*/function (_React$Component) {
120
117
  triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
121
118
  });
122
119
  });
123
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCompositionStart", function () {
120
+ (0, _defineProperty2.default)(_this, "handleCompositionStart", function () {
124
121
  _this.isComposing = true;
125
122
  });
126
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCompositionEnd", function (event) {
123
+ (0, _defineProperty2.default)(_this, "handleCompositionEnd", function (event) {
127
124
  _this.isComposing = false;
128
125
  // type for React.CompositionEvent doesn't set type for target correctly
129
126
  _this.updateFindValue(event.target.value);
130
127
  });
131
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clearSearch", function () {
128
+ (0, _defineProperty2.default)(_this, "clearSearch", function () {
132
129
  _this.props.onCancel({
133
130
  triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
134
131
  });
135
132
  });
136
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMatchCaseClick", function (buttonRef) {
133
+ (0, _defineProperty2.default)(_this, "handleMatchCaseClick", function (buttonRef) {
137
134
  if (_this.props.onToggleMatchCase) {
138
135
  _this.props.onToggleMatchCase();
139
136
  _this.props.onFind(_this.props.findText);
@@ -152,7 +149,8 @@ var Find = /*#__PURE__*/function (_React$Component) {
152
149
  };
153
150
  return _this;
154
151
  }
155
- (0, _createClass2.default)(Find, [{
152
+ (0, _inherits2.default)(Find, _React$Component);
153
+ return (0, _createClass2.default)(Find, [{
156
154
  key: "componentDidMount",
157
155
  value: function componentDidMount() {
158
156
  var _this2 = this;
@@ -254,6 +252,5 @@ var Find = /*#__PURE__*/function (_React$Component) {
254
252
  );
255
253
  }
256
254
  }]);
257
- return Find;
258
255
  }(_react.default.Component);
259
256
  var _default = exports.default = (0, _reactIntlNext.injectIntl)(Find);
@@ -7,32 +7,29 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
10
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
13
11
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
14
  var _react = _interopRequireDefault(require("react"));
16
15
  var _react2 = require("@emotion/react");
17
16
  var _Find = _interopRequireDefault(require("./Find"));
18
17
  var _Replace = _interopRequireDefault(require("./Replace"));
19
18
  var _uiStyles = require("./ui-styles");
20
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
19
+ 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)); }
21
20
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */ /* eslint-disable @atlaskit/design-system/prefer-primitives */ /**
22
21
  * @jsxRuntime classic
23
22
  * @jsx jsx
24
23
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
24
  // eslint-disable-next-line @repo/internal/react/no-class-components
26
25
  var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
27
- (0, _inherits2.default)(FindReplace, _React$PureComponent);
28
- var _super = _createSuper(FindReplace);
29
26
  function FindReplace(props) {
30
27
  var _this;
31
28
  (0, _classCallCheck2.default)(this, FindReplace);
32
- _this = _super.call(this, props);
33
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "findTextfield", null);
34
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replaceTextfield", null);
35
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleTabNavigation", function (event) {
29
+ _this = _callSuper(this, FindReplace, [props]);
30
+ (0, _defineProperty2.default)(_this, "findTextfield", null);
31
+ (0, _defineProperty2.default)(_this, "replaceTextfield", null);
32
+ (0, _defineProperty2.default)(_this, "handleTabNavigation", function (event) {
36
33
  if (event.key === 'Tab') {
37
34
  event.preventDefault();
38
35
  var modalFindReplace = _this.modalRef.current;
@@ -55,26 +52,26 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
55
52
  }
56
53
  }
57
54
  });
58
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
55
+ (0, _defineProperty2.default)(_this, "state", {
59
56
  findTyped: false
60
57
  });
61
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setFindTyped", function (value) {
58
+ (0, _defineProperty2.default)(_this, "setFindTyped", function (value) {
62
59
  _this.setState({
63
60
  findTyped: value
64
61
  });
65
62
  });
66
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setFindTextfieldRef", function (findTextfieldRef) {
63
+ (0, _defineProperty2.default)(_this, "setFindTextfieldRef", function (findTextfieldRef) {
67
64
  _this.findTextfield = findTextfieldRef.current;
68
65
  });
69
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setReplaceTextfieldRef", function (replaceTextfieldRef) {
66
+ (0, _defineProperty2.default)(_this, "setReplaceTextfieldRef", function (replaceTextfieldRef) {
70
67
  _this.replaceTextfield = replaceTextfieldRef.current;
71
68
  });
72
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setFocusToFind", function () {
69
+ (0, _defineProperty2.default)(_this, "setFocusToFind", function () {
73
70
  if (_this.findTextfield) {
74
71
  _this.findTextfield.focus();
75
72
  }
76
73
  });
77
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setFocusToReplace", function () {
74
+ (0, _defineProperty2.default)(_this, "setFocusToReplace", function () {
78
75
  if (_this.replaceTextfield) {
79
76
  _this.replaceTextfield.focus();
80
77
  }
@@ -82,7 +79,8 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
82
79
  _this.modalRef = /*#__PURE__*/_react.default.createRef();
83
80
  return _this;
84
81
  }
85
- (0, _createClass2.default)(FindReplace, [{
82
+ (0, _inherits2.default)(FindReplace, _React$PureComponent);
83
+ return (0, _createClass2.default)(FindReplace, [{
86
84
  key: "componentDidMount",
87
85
  value: function componentDidMount() {
88
86
  // eslint-disable-next-line
@@ -157,6 +155,5 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
157
155
  );
158
156
  }
159
157
  }]);
160
- return FindReplace;
161
158
  }(_react.default.PureComponent);
162
159
  var _default = exports.default = FindReplace;
@@ -8,10 +8,9 @@ exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
11
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
14
12
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
15
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
17
16
  var _react = _interopRequireDefault(require("react"));
@@ -32,7 +31,7 @@ var _templateObject;
32
31
  * @jsx jsx
33
32
  */
34
33
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
35
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
34
+ 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)); }
36
35
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
37
36
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
38
37
  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);
@@ -59,19 +58,17 @@ var wrapper = (0, _react2.css)({
59
58
  var dropdownWidthNewDesign = 382;
60
59
  // eslint-disable-next-line @repo/internal/react/no-class-components
61
60
  var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
62
- (0, _inherits2.default)(FindReplaceToolbarButton, _React$PureComponent);
63
- var _super = _createSuper(FindReplaceToolbarButton);
64
61
  function FindReplaceToolbarButton() {
65
62
  var _this;
66
63
  (0, _classCallCheck2.default)(this, FindReplaceToolbarButton);
67
64
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
68
65
  args[_key] = arguments[_key];
69
66
  }
70
- _this = _super.call.apply(_super, [this].concat(args));
71
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
67
+ _this = _callSuper(this, FindReplaceToolbarButton, [].concat(args));
68
+ (0, _defineProperty2.default)(_this, "state", {
72
69
  openedByClick: false
73
70
  });
74
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "toggleOpen", function () {
71
+ (0, _defineProperty2.default)(_this, "toggleOpen", function () {
75
72
  if (_this.props.isActive) {
76
73
  _this.props.onCancel({
77
74
  triggerMethod: _analytics.TRIGGER_METHOD.TOOLBAR
@@ -83,7 +80,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
83
80
  _this.props.onActivate();
84
81
  }
85
82
  });
86
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusToolbarButton", function () {
83
+ (0, _defineProperty2.default)(_this, "focusToolbarButton", function () {
87
84
  if (_this.state.openedByClick && _this.toolbarButtonRef.current) {
88
85
  _this.toolbarButtonRef.current.focus();
89
86
  }
@@ -91,10 +88,11 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
91
88
  openedByClick: false
92
89
  });
93
90
  });
94
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "toolbarButtonRef", /*#__PURE__*/_react.default.createRef());
91
+ (0, _defineProperty2.default)(_this, "toolbarButtonRef", /*#__PURE__*/_react.default.createRef());
95
92
  return _this;
96
93
  }
97
- (0, _createClass2.default)(FindReplaceToolbarButton, [{
94
+ (0, _inherits2.default)(FindReplaceToolbarButton, _React$PureComponent);
95
+ return (0, _createClass2.default)(FindReplaceToolbarButton, [{
98
96
  key: "render",
99
97
  value: function render() {
100
98
  var _this2 = this;
@@ -193,6 +191,5 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
193
191
  }, this.props)))));
194
192
  }
195
193
  }]);
196
- return FindReplaceToolbarButton;
197
194
  }(_react.default.PureComponent);
198
195
  var _default = exports.default = (0, _reactIntlNext.injectIntl)(FindReplaceToolbarButton);
@@ -8,10 +8,9 @@ exports.FindReplaceTooltipButton = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
11
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
14
12
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
15
  var _react = _interopRequireDefault(require("react"));
17
16
  var _new = require("@atlaskit/button/new");
@@ -19,26 +18,25 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
19
18
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
20
19
  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; }
21
20
  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) { (0, _defineProperty2.default)(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; }
22
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
21
+ 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)); }
23
22
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
24
23
  // eslint-disable-next-line @repo/internal/react/no-class-components
25
24
  var FindReplaceTooltipButton = exports.FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponent) {
26
- (0, _inherits2.default)(FindReplaceTooltipButton, _React$PureComponent);
27
- var _super = _createSuper(FindReplaceTooltipButton);
28
25
  function FindReplaceTooltipButton() {
29
26
  var _this;
30
27
  (0, _classCallCheck2.default)(this, FindReplaceTooltipButton);
31
28
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
32
29
  args[_key] = arguments[_key];
33
30
  }
34
- _this = _super.call.apply(_super, [this].concat(args));
35
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "buttonRef", /*#__PURE__*/_react.default.createRef());
36
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClick", function () {
31
+ _this = _callSuper(this, FindReplaceTooltipButton, [].concat(args));
32
+ (0, _defineProperty2.default)(_this, "buttonRef", /*#__PURE__*/_react.default.createRef());
33
+ (0, _defineProperty2.default)(_this, "handleClick", function () {
37
34
  _this.props.onClick(_this.buttonRef);
38
35
  });
39
36
  return _this;
40
37
  }
41
- (0, _createClass2.default)(FindReplaceTooltipButton, [{
38
+ (0, _inherits2.default)(FindReplaceTooltipButton, _React$PureComponent);
39
+ return (0, _createClass2.default)(FindReplaceTooltipButton, [{
42
40
  key: "render",
43
41
  value: function render() {
44
42
  var _this$props = this.props,
@@ -76,7 +74,6 @@ var FindReplaceTooltipButton = exports.FindReplaceTooltipButton = /*#__PURE__*/f
76
74
  }, pressedProps)));
77
75
  }
78
76
  }]);
79
- return FindReplaceTooltipButton;
80
77
  }(_react.default.PureComponent);
81
78
  (0, _defineProperty2.default)(FindReplaceTooltipButton, "defaultProps", {
82
79
  keymapDescription: 'no-keymap',
@@ -8,10 +8,9 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.default = void 0;
9
9
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
10
10
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
11
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
11
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
14
12
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
13
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
15
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
15
  var _react = _interopRequireWildcard(require("react"));
17
16
  var _react2 = require("@emotion/react");
@@ -28,29 +27,27 @@ var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
28
27
  var _uiStyles = require("./ui-styles");
29
28
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
30
29
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
31
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
30
+ 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)); }
32
31
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */ /**
33
32
  * @jsxRuntime classic
34
33
  * @jsx jsx
35
34
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
36
35
  // eslint-disable-next-line @repo/internal/react/no-class-components
37
36
  var Replace = /*#__PURE__*/function (_React$PureComponent) {
38
- (0, _inherits2.default)(Replace, _React$PureComponent);
39
- var _super = _createSuper(Replace);
40
37
  function Replace(props) {
41
38
  var _this;
42
39
  (0, _classCallCheck2.default)(this, Replace);
43
- _this = _super.call(this, props);
44
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "replaceTextfieldRef", /*#__PURE__*/_react.default.createRef());
45
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "successReplacementMessageRef", /*#__PURE__*/_react.default.createRef());
46
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isComposing", false);
47
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "skipWhileComposing", function (fn) {
40
+ _this = _callSuper(this, Replace, [props]);
41
+ (0, _defineProperty2.default)(_this, "replaceTextfieldRef", /*#__PURE__*/_react.default.createRef());
42
+ (0, _defineProperty2.default)(_this, "successReplacementMessageRef", /*#__PURE__*/_react.default.createRef());
43
+ (0, _defineProperty2.default)(_this, "isComposing", false);
44
+ (0, _defineProperty2.default)(_this, "skipWhileComposing", function (fn) {
48
45
  if (_this.state.isComposing) {
49
46
  return;
50
47
  }
51
48
  fn();
52
49
  });
53
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleReplaceClick", function () {
50
+ (0, _defineProperty2.default)(_this, "handleReplaceClick", function () {
54
51
  return _this.skipWhileComposing(function () {
55
52
  _this.props.onReplace({
56
53
  triggerMethod: _analytics.TRIGGER_METHOD.BUTTON,
@@ -66,12 +63,12 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
66
63
  _this.props.setFindTyped(false);
67
64
  });
68
65
  });
69
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleReplaceChange", function (event) {
66
+ (0, _defineProperty2.default)(_this, "handleReplaceChange", function (event) {
70
67
  return _this.skipWhileComposing(function () {
71
68
  _this.updateReplaceValue(event.target.value);
72
69
  });
73
70
  });
74
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateReplaceValue", function (replaceText) {
71
+ (0, _defineProperty2.default)(_this, "updateReplaceValue", function (replaceText) {
75
72
  var dispatchAnalyticsEvent = _this.props.dispatchAnalyticsEvent;
76
73
  if (dispatchAnalyticsEvent) {
77
74
  dispatchAnalyticsEvent({
@@ -84,7 +81,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
84
81
  replaceText: replaceText
85
82
  });
86
83
  });
87
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleReplaceKeyDown", function (event) {
84
+ (0, _defineProperty2.default)(_this, "handleReplaceKeyDown", function (event) {
88
85
  return _this.skipWhileComposing(function () {
89
86
  if (event.key === 'Enter') {
90
87
  _this.props.onReplace({
@@ -97,7 +94,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
97
94
  }
98
95
  });
99
96
  });
100
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleReplaceAllClick", function () {
97
+ (0, _defineProperty2.default)(_this, "handleReplaceAllClick", function () {
101
98
  return _this.skipWhileComposing(function () {
102
99
  _this.props.onReplaceAll({
103
100
  replaceText: _this.state.replaceText
@@ -112,25 +109,25 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
112
109
  _this.props.setFindTyped(false);
113
110
  });
114
111
  });
115
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCompositionStart", function () {
112
+ (0, _defineProperty2.default)(_this, "handleCompositionStart", function () {
116
113
  _this.setState({
117
114
  isComposing: true
118
115
  });
119
116
  });
120
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleCompositionEnd", function (event) {
117
+ (0, _defineProperty2.default)(_this, "handleCompositionEnd", function (event) {
121
118
  _this.setState({
122
119
  isComposing: false
123
120
  });
124
121
  // type for React.CompositionEvent doesn't set type for target correctly
125
122
  _this.updateReplaceValue(event.target.value);
126
123
  });
127
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "clearSearch", function () {
124
+ (0, _defineProperty2.default)(_this, "clearSearch", function () {
128
125
  _this.props.onCancel({
129
126
  triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
130
127
  });
131
128
  _this.props.focusToolbarButton && _this.props.focusToolbarButton();
132
129
  });
133
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFindNextClick", function () {
130
+ (0, _defineProperty2.default)(_this, "handleFindNextClick", function () {
134
131
  if (_this.isComposing) {
135
132
  return;
136
133
  }
@@ -138,7 +135,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
138
135
  triggerMethod: _analytics.TRIGGER_METHOD.BUTTON
139
136
  });
140
137
  });
141
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleFindPrevClick", function () {
138
+ (0, _defineProperty2.default)(_this, "handleFindPrevClick", function () {
142
139
  if (_this.isComposing) {
143
140
  return;
144
141
  }
@@ -163,7 +160,8 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
163
160
  _this.closeFindReplaceDialog = formatMessage(_messages.findReplaceMessages.closeFindReplaceDialog);
164
161
  return _this;
165
162
  }
166
- (0, _createClass2.default)(Replace, [{
163
+ (0, _inherits2.default)(Replace, _React$PureComponent);
164
+ return (0, _createClass2.default)(Replace, [{
167
165
  key: "componentDidMount",
168
166
  value: function componentDidMount() {
169
167
  this.props.onReplaceTextfieldRefSet(this.replaceTextfieldRef);
@@ -294,6 +292,5 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
294
292
  }, this.closeFindReplaceDialog))));
295
293
  }
296
294
  }]);
297
- return Replace;
298
295
  }(_react.default.PureComponent);
299
296
  var _default = exports.default = (0, _reactIntlNext.injectIntl)(Replace);
@@ -8,17 +8,21 @@ exports.selectedSearchMatchClass = exports.searchMatchClass = exports.findReplac
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("@emotion/react");
10
10
  var _colors = require("@atlaskit/theme/colors");
11
- var _css;
11
+ /* eslint-disable @atlaskit/editor/no-re-export */
12
+ // Entry file in package.json
13
+
12
14
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
13
15
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
14
16
  /* eslint-disable */
17
+
15
18
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4290
19
+
16
20
  var searchMatchClass = exports.searchMatchClass = 'search-match';
17
21
  var selectedSearchMatchClass = exports.selectedSearchMatchClass = 'selected-search-match';
18
- var findReplaceStyles = exports.findReplaceStyles = (0, _react.css)((_css = {}, (0, _defineProperty2.default)(_css, ".".concat(searchMatchClass), {
22
+ var findReplaceStyles = exports.findReplaceStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(searchMatchClass), {
19
23
  borderRadius: '3px',
20
24
  backgroundColor: "var(--ds-background-accent-teal-subtlest, #E7F9FF)",
21
25
  boxShadow: "var(--ds-shadow-raised, ".concat("0 1px 1px 0 ".concat(_colors.N50A, ", 0 0 1px 0 ").concat(_colors.N60A), ")") + ', inset 0 0 0 1px ' + "var(--ds-border-input, ".concat("".concat(_colors.N40A), ")")
22
- }), (0, _defineProperty2.default)(_css, ".".concat(selectedSearchMatchClass), {
26
+ }), ".".concat(selectedSearchMatchClass), {
23
27
  backgroundColor: "var(--ds-background-accent-teal-subtle, #6CC3E0)"
24
- }), _css));
28
+ }));
@@ -1 +1,4 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
1
4
  export { findReplacePlugin } from './findReplacePlugin';
@@ -1,3 +1,6 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
1
4
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
2
5
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
6
  /* eslint-disable */
package/dist/esm/index.js CHANGED
@@ -1 +1,4 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
1
4
  export { findReplacePlugin } from './findReplacePlugin';
@@ -16,7 +16,7 @@ var BatchDecorations = /*#__PURE__*/function () {
16
16
  function BatchDecorations() {
17
17
  _classCallCheck(this, BatchDecorations);
18
18
  }
19
- _createClass(BatchDecorations, [{
19
+ return _createClass(BatchDecorations, [{
20
20
  key: "stop",
21
21
  value: function stop() {
22
22
  if (this.rafId) {
@@ -298,7 +298,6 @@ var BatchDecorations = /*#__PURE__*/function () {
298
298
  });
299
299
  }
300
300
  }]);
301
- return BatchDecorations;
302
301
  }();
303
302
  var batchDecorations = new BatchDecorations();
304
303
  export default batchDecorations;
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
11
10
  /**
@@ -29,15 +28,13 @@ import { afterInputSection, countStyles, countStylesAlternateStyles, matchCaseSe
29
28
  export var FIND_DEBOUNCE_MS = 100;
30
29
  // eslint-disable-next-line @repo/internal/react/no-class-components
31
30
  var Find = /*#__PURE__*/function (_React$Component) {
32
- _inherits(Find, _React$Component);
33
- var _super = _createSuper(Find);
34
31
  function Find(props) {
35
32
  var _this;
36
33
  _classCallCheck(this, Find);
37
- _this = _super.call(this, props);
38
- _defineProperty(_assertThisInitialized(_this), "findTextfieldRef", /*#__PURE__*/React.createRef());
39
- _defineProperty(_assertThisInitialized(_this), "isComposing", false);
40
- _defineProperty(_assertThisInitialized(_this), "syncFindText", function (onSynced) {
34
+ _this = _callSuper(this, Find, [props]);
35
+ _defineProperty(_this, "findTextfieldRef", /*#__PURE__*/React.createRef());
36
+ _defineProperty(_this, "isComposing", false);
37
+ _defineProperty(_this, "syncFindText", function (onSynced) {
41
38
  var _this$state;
42
39
  // If the external prop findText changes and we aren't in a composition we should update to
43
40
  // use the external prop value.
@@ -48,20 +45,20 @@ var Find = /*#__PURE__*/function (_React$Component) {
48
45
  _this.updateFindValue(_this.props.findText || '', onSynced);
49
46
  }
50
47
  });
51
- _defineProperty(_assertThisInitialized(_this), "focusFindTextfield", function () {
48
+ _defineProperty(_this, "focusFindTextfield", function () {
52
49
  var input = _this.findTextfieldRef.current;
53
50
  if (_this.props.shouldFocus && input) {
54
51
  input.select();
55
52
  }
56
53
  });
57
- _defineProperty(_assertThisInitialized(_this), "handleFindChange", function (event) {
54
+ _defineProperty(_this, "handleFindChange", function (event) {
58
55
  _this.updateFindValue(event.target.value);
59
56
  });
60
57
  // debounce (vs throttle) to not block typing inside find input while onFind runs
61
- _defineProperty(_assertThisInitialized(_this), "debouncedFind", debounce(function (value) {
58
+ _defineProperty(_this, "debouncedFind", debounce(function (value) {
62
59
  _this.props.onFind(value);
63
60
  }, FIND_DEBOUNCE_MS));
64
- _defineProperty(_assertThisInitialized(_this), "updateFindValue", function (value, onSynced) {
61
+ _defineProperty(_this, "updateFindValue", function (value, onSynced) {
65
62
  _this.setState({
66
63
  localFindText: value
67
64
  }, function () {
@@ -75,7 +72,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
75
72
  });
76
73
  // throtlle between animation frames gives better experience on Enter compared to arbitrary value
77
74
  // it adjusts based on performance (and document size)
78
- _defineProperty(_assertThisInitialized(_this), "handleFindKeyDownThrottled", rafSchd(function (event) {
75
+ _defineProperty(_this, "handleFindKeyDownThrottled", rafSchd(function (event) {
79
76
  if (event.key === 'Enter') {
80
77
  if (event.shiftKey) {
81
78
  _this.props.onFindPrev({
@@ -91,17 +88,17 @@ var Find = /*#__PURE__*/function (_React$Component) {
91
88
  _this.props.onArrowDown();
92
89
  }
93
90
  }));
94
- _defineProperty(_assertThisInitialized(_this), "handleFindKeyDown", function (event) {
91
+ _defineProperty(_this, "handleFindKeyDown", function (event) {
95
92
  if (_this.isComposing) {
96
93
  return;
97
94
  }
98
95
  event.persist();
99
96
  _this.handleFindKeyDownThrottled(event);
100
97
  });
101
- _defineProperty(_assertThisInitialized(_this), "handleFindKeyUp", function () {
98
+ _defineProperty(_this, "handleFindKeyUp", function () {
102
99
  _this.handleFindKeyDownThrottled.cancel();
103
100
  });
104
- _defineProperty(_assertThisInitialized(_this), "handleFindNextClick", function (ref) {
101
+ _defineProperty(_this, "handleFindNextClick", function (ref) {
105
102
  if (_this.isComposing) {
106
103
  return;
107
104
  }
@@ -109,7 +106,7 @@ var Find = /*#__PURE__*/function (_React$Component) {
109
106
  triggerMethod: TRIGGER_METHOD.BUTTON
110
107
  });
111
108
  });
112
- _defineProperty(_assertThisInitialized(_this), "handleFindPrevClick", function (ref) {
109
+ _defineProperty(_this, "handleFindPrevClick", function (ref) {
113
110
  if (_this.isComposing) {
114
111
  return;
115
112
  }
@@ -117,20 +114,20 @@ var Find = /*#__PURE__*/function (_React$Component) {
117
114
  triggerMethod: TRIGGER_METHOD.BUTTON
118
115
  });
119
116
  });
120
- _defineProperty(_assertThisInitialized(_this), "handleCompositionStart", function () {
117
+ _defineProperty(_this, "handleCompositionStart", function () {
121
118
  _this.isComposing = true;
122
119
  });
123
- _defineProperty(_assertThisInitialized(_this), "handleCompositionEnd", function (event) {
120
+ _defineProperty(_this, "handleCompositionEnd", function (event) {
124
121
  _this.isComposing = false;
125
122
  // type for React.CompositionEvent doesn't set type for target correctly
126
123
  _this.updateFindValue(event.target.value);
127
124
  });
128
- _defineProperty(_assertThisInitialized(_this), "clearSearch", function () {
125
+ _defineProperty(_this, "clearSearch", function () {
129
126
  _this.props.onCancel({
130
127
  triggerMethod: TRIGGER_METHOD.BUTTON
131
128
  });
132
129
  });
133
- _defineProperty(_assertThisInitialized(_this), "handleMatchCaseClick", function (buttonRef) {
130
+ _defineProperty(_this, "handleMatchCaseClick", function (buttonRef) {
134
131
  if (_this.props.onToggleMatchCase) {
135
132
  _this.props.onToggleMatchCase();
136
133
  _this.props.onFind(_this.props.findText);
@@ -149,7 +146,8 @@ var Find = /*#__PURE__*/function (_React$Component) {
149
146
  };
150
147
  return _this;
151
148
  }
152
- _createClass(Find, [{
149
+ _inherits(Find, _React$Component);
150
+ return _createClass(Find, [{
153
151
  key: "componentDidMount",
154
152
  value: function componentDidMount() {
155
153
  var _this2 = this;
@@ -251,6 +249,5 @@ var Find = /*#__PURE__*/function (_React$Component) {
251
249
  );
252
250
  }
253
251
  }]);
254
- return Find;
255
252
  }(React.Component);
256
253
  export default injectIntl(Find);
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
11
10
  /* eslint-disable @atlaskit/design-system/prefer-primitives */
@@ -22,15 +21,13 @@ import Replace from './Replace';
22
21
  import { ruleStyles, wrapperPaddingStyles, wrapperStyles } from './ui-styles';
23
22
  // eslint-disable-next-line @repo/internal/react/no-class-components
24
23
  var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
25
- _inherits(FindReplace, _React$PureComponent);
26
- var _super = _createSuper(FindReplace);
27
24
  function FindReplace(props) {
28
25
  var _this;
29
26
  _classCallCheck(this, FindReplace);
30
- _this = _super.call(this, props);
31
- _defineProperty(_assertThisInitialized(_this), "findTextfield", null);
32
- _defineProperty(_assertThisInitialized(_this), "replaceTextfield", null);
33
- _defineProperty(_assertThisInitialized(_this), "handleTabNavigation", function (event) {
27
+ _this = _callSuper(this, FindReplace, [props]);
28
+ _defineProperty(_this, "findTextfield", null);
29
+ _defineProperty(_this, "replaceTextfield", null);
30
+ _defineProperty(_this, "handleTabNavigation", function (event) {
34
31
  if (event.key === 'Tab') {
35
32
  event.preventDefault();
36
33
  var modalFindReplace = _this.modalRef.current;
@@ -53,26 +50,26 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
53
50
  }
54
51
  }
55
52
  });
56
- _defineProperty(_assertThisInitialized(_this), "state", {
53
+ _defineProperty(_this, "state", {
57
54
  findTyped: false
58
55
  });
59
- _defineProperty(_assertThisInitialized(_this), "setFindTyped", function (value) {
56
+ _defineProperty(_this, "setFindTyped", function (value) {
60
57
  _this.setState({
61
58
  findTyped: value
62
59
  });
63
60
  });
64
- _defineProperty(_assertThisInitialized(_this), "setFindTextfieldRef", function (findTextfieldRef) {
61
+ _defineProperty(_this, "setFindTextfieldRef", function (findTextfieldRef) {
65
62
  _this.findTextfield = findTextfieldRef.current;
66
63
  });
67
- _defineProperty(_assertThisInitialized(_this), "setReplaceTextfieldRef", function (replaceTextfieldRef) {
64
+ _defineProperty(_this, "setReplaceTextfieldRef", function (replaceTextfieldRef) {
68
65
  _this.replaceTextfield = replaceTextfieldRef.current;
69
66
  });
70
- _defineProperty(_assertThisInitialized(_this), "setFocusToFind", function () {
67
+ _defineProperty(_this, "setFocusToFind", function () {
71
68
  if (_this.findTextfield) {
72
69
  _this.findTextfield.focus();
73
70
  }
74
71
  });
75
- _defineProperty(_assertThisInitialized(_this), "setFocusToReplace", function () {
72
+ _defineProperty(_this, "setFocusToReplace", function () {
76
73
  if (_this.replaceTextfield) {
77
74
  _this.replaceTextfield.focus();
78
75
  }
@@ -80,7 +77,8 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
80
77
  _this.modalRef = /*#__PURE__*/React.createRef();
81
78
  return _this;
82
79
  }
83
- _createClass(FindReplace, [{
80
+ _inherits(FindReplace, _React$PureComponent);
81
+ return _createClass(FindReplace, [{
84
82
  key: "componentDidMount",
85
83
  value: function componentDidMount() {
86
84
  // eslint-disable-next-line
@@ -155,6 +153,5 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
155
153
  );
156
154
  }
157
155
  }]);
158
- return FindReplace;
159
156
  }(React.PureComponent);
160
157
  export default FindReplace;
@@ -1,14 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
8
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
10
9
  var _templateObject;
11
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
12
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
14
13
  /**
@@ -54,19 +53,17 @@ var wrapper = css({
54
53
  var dropdownWidthNewDesign = 382;
55
54
  // eslint-disable-next-line @repo/internal/react/no-class-components
56
55
  var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
57
- _inherits(FindReplaceToolbarButton, _React$PureComponent);
58
- var _super = _createSuper(FindReplaceToolbarButton);
59
56
  function FindReplaceToolbarButton() {
60
57
  var _this;
61
58
  _classCallCheck(this, FindReplaceToolbarButton);
62
59
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
63
60
  args[_key] = arguments[_key];
64
61
  }
65
- _this = _super.call.apply(_super, [this].concat(args));
66
- _defineProperty(_assertThisInitialized(_this), "state", {
62
+ _this = _callSuper(this, FindReplaceToolbarButton, [].concat(args));
63
+ _defineProperty(_this, "state", {
67
64
  openedByClick: false
68
65
  });
69
- _defineProperty(_assertThisInitialized(_this), "toggleOpen", function () {
66
+ _defineProperty(_this, "toggleOpen", function () {
70
67
  if (_this.props.isActive) {
71
68
  _this.props.onCancel({
72
69
  triggerMethod: TRIGGER_METHOD.TOOLBAR
@@ -78,7 +75,7 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
78
75
  _this.props.onActivate();
79
76
  }
80
77
  });
81
- _defineProperty(_assertThisInitialized(_this), "focusToolbarButton", function () {
78
+ _defineProperty(_this, "focusToolbarButton", function () {
82
79
  if (_this.state.openedByClick && _this.toolbarButtonRef.current) {
83
80
  _this.toolbarButtonRef.current.focus();
84
81
  }
@@ -86,10 +83,11 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
86
83
  openedByClick: false
87
84
  });
88
85
  });
89
- _defineProperty(_assertThisInitialized(_this), "toolbarButtonRef", /*#__PURE__*/React.createRef());
86
+ _defineProperty(_this, "toolbarButtonRef", /*#__PURE__*/React.createRef());
90
87
  return _this;
91
88
  }
92
- _createClass(FindReplaceToolbarButton, [{
89
+ _inherits(FindReplaceToolbarButton, _React$PureComponent);
90
+ return _createClass(FindReplaceToolbarButton, [{
93
91
  key: "render",
94
92
  value: function render() {
95
93
  var _this2 = this;
@@ -188,6 +186,5 @@ var FindReplaceToolbarButton = /*#__PURE__*/function (_React$PureComponent) {
188
186
  }, this.props)))));
189
187
  }
190
188
  }]);
191
- return FindReplaceToolbarButton;
192
189
  }(React.PureComponent);
193
190
  export default injectIntl(FindReplaceToolbarButton);
@@ -1,14 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
8
  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; }
10
9
  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; }
11
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
12
  import React from 'react';
14
13
  import { IconButton } from '@atlaskit/button/new';
@@ -16,22 +15,21 @@ import { findKeymapByDescription, ToolTipContent } from '@atlaskit/editor-common
16
15
  import Tooltip from '@atlaskit/tooltip';
17
16
  // eslint-disable-next-line @repo/internal/react/no-class-components
18
17
  export var FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponent) {
19
- _inherits(FindReplaceTooltipButton, _React$PureComponent);
20
- var _super = _createSuper(FindReplaceTooltipButton);
21
18
  function FindReplaceTooltipButton() {
22
19
  var _this;
23
20
  _classCallCheck(this, FindReplaceTooltipButton);
24
21
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25
22
  args[_key] = arguments[_key];
26
23
  }
27
- _this = _super.call.apply(_super, [this].concat(args));
28
- _defineProperty(_assertThisInitialized(_this), "buttonRef", /*#__PURE__*/React.createRef());
29
- _defineProperty(_assertThisInitialized(_this), "handleClick", function () {
24
+ _this = _callSuper(this, FindReplaceTooltipButton, [].concat(args));
25
+ _defineProperty(_this, "buttonRef", /*#__PURE__*/React.createRef());
26
+ _defineProperty(_this, "handleClick", function () {
30
27
  _this.props.onClick(_this.buttonRef);
31
28
  });
32
29
  return _this;
33
30
  }
34
- _createClass(FindReplaceTooltipButton, [{
31
+ _inherits(FindReplaceTooltipButton, _React$PureComponent);
32
+ return _createClass(FindReplaceTooltipButton, [{
35
33
  key: "render",
36
34
  value: function render() {
37
35
  var _this$props = this.props,
@@ -69,7 +67,6 @@ export var FindReplaceTooltipButton = /*#__PURE__*/function (_React$PureComponen
69
67
  }, pressedProps)));
70
68
  }
71
69
  }]);
72
- return FindReplaceTooltipButton;
73
70
  }(React.PureComponent);
74
71
  _defineProperty(FindReplaceTooltipButton, "defaultProps", {
75
72
  keymapDescription: 'no-keymap',
@@ -1,11 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
4
- import _inherits from "@babel/runtime/helpers/inherits";
5
3
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
4
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _inherits from "@babel/runtime/helpers/inherits";
7
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
9
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
11
10
  /**
@@ -29,22 +28,20 @@ import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
29
28
  import { nextPreviousItemStyles, orderOneStyles, orderZeroStyles, sectionWrapperJustified, sectionWrapperStyles, sectionWrapperStylesAlternate, textFieldWrapper } from './ui-styles';
30
29
  // eslint-disable-next-line @repo/internal/react/no-class-components
31
30
  var Replace = /*#__PURE__*/function (_React$PureComponent) {
32
- _inherits(Replace, _React$PureComponent);
33
- var _super = _createSuper(Replace);
34
31
  function Replace(props) {
35
32
  var _this;
36
33
  _classCallCheck(this, Replace);
37
- _this = _super.call(this, props);
38
- _defineProperty(_assertThisInitialized(_this), "replaceTextfieldRef", /*#__PURE__*/React.createRef());
39
- _defineProperty(_assertThisInitialized(_this), "successReplacementMessageRef", /*#__PURE__*/React.createRef());
40
- _defineProperty(_assertThisInitialized(_this), "isComposing", false);
41
- _defineProperty(_assertThisInitialized(_this), "skipWhileComposing", function (fn) {
34
+ _this = _callSuper(this, Replace, [props]);
35
+ _defineProperty(_this, "replaceTextfieldRef", /*#__PURE__*/React.createRef());
36
+ _defineProperty(_this, "successReplacementMessageRef", /*#__PURE__*/React.createRef());
37
+ _defineProperty(_this, "isComposing", false);
38
+ _defineProperty(_this, "skipWhileComposing", function (fn) {
42
39
  if (_this.state.isComposing) {
43
40
  return;
44
41
  }
45
42
  fn();
46
43
  });
47
- _defineProperty(_assertThisInitialized(_this), "handleReplaceClick", function () {
44
+ _defineProperty(_this, "handleReplaceClick", function () {
48
45
  return _this.skipWhileComposing(function () {
49
46
  _this.props.onReplace({
50
47
  triggerMethod: TRIGGER_METHOD.BUTTON,
@@ -60,12 +57,12 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
60
57
  _this.props.setFindTyped(false);
61
58
  });
62
59
  });
63
- _defineProperty(_assertThisInitialized(_this), "handleReplaceChange", function (event) {
60
+ _defineProperty(_this, "handleReplaceChange", function (event) {
64
61
  return _this.skipWhileComposing(function () {
65
62
  _this.updateReplaceValue(event.target.value);
66
63
  });
67
64
  });
68
- _defineProperty(_assertThisInitialized(_this), "updateReplaceValue", function (replaceText) {
65
+ _defineProperty(_this, "updateReplaceValue", function (replaceText) {
69
66
  var dispatchAnalyticsEvent = _this.props.dispatchAnalyticsEvent;
70
67
  if (dispatchAnalyticsEvent) {
71
68
  dispatchAnalyticsEvent({
@@ -78,7 +75,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
78
75
  replaceText: replaceText
79
76
  });
80
77
  });
81
- _defineProperty(_assertThisInitialized(_this), "handleReplaceKeyDown", function (event) {
78
+ _defineProperty(_this, "handleReplaceKeyDown", function (event) {
82
79
  return _this.skipWhileComposing(function () {
83
80
  if (event.key === 'Enter') {
84
81
  _this.props.onReplace({
@@ -91,7 +88,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
91
88
  }
92
89
  });
93
90
  });
94
- _defineProperty(_assertThisInitialized(_this), "handleReplaceAllClick", function () {
91
+ _defineProperty(_this, "handleReplaceAllClick", function () {
95
92
  return _this.skipWhileComposing(function () {
96
93
  _this.props.onReplaceAll({
97
94
  replaceText: _this.state.replaceText
@@ -106,25 +103,25 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
106
103
  _this.props.setFindTyped(false);
107
104
  });
108
105
  });
109
- _defineProperty(_assertThisInitialized(_this), "handleCompositionStart", function () {
106
+ _defineProperty(_this, "handleCompositionStart", function () {
110
107
  _this.setState({
111
108
  isComposing: true
112
109
  });
113
110
  });
114
- _defineProperty(_assertThisInitialized(_this), "handleCompositionEnd", function (event) {
111
+ _defineProperty(_this, "handleCompositionEnd", function (event) {
115
112
  _this.setState({
116
113
  isComposing: false
117
114
  });
118
115
  // type for React.CompositionEvent doesn't set type for target correctly
119
116
  _this.updateReplaceValue(event.target.value);
120
117
  });
121
- _defineProperty(_assertThisInitialized(_this), "clearSearch", function () {
118
+ _defineProperty(_this, "clearSearch", function () {
122
119
  _this.props.onCancel({
123
120
  triggerMethod: TRIGGER_METHOD.BUTTON
124
121
  });
125
122
  _this.props.focusToolbarButton && _this.props.focusToolbarButton();
126
123
  });
127
- _defineProperty(_assertThisInitialized(_this), "handleFindNextClick", function () {
124
+ _defineProperty(_this, "handleFindNextClick", function () {
128
125
  if (_this.isComposing) {
129
126
  return;
130
127
  }
@@ -132,7 +129,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
132
129
  triggerMethod: TRIGGER_METHOD.BUTTON
133
130
  });
134
131
  });
135
- _defineProperty(_assertThisInitialized(_this), "handleFindPrevClick", function () {
132
+ _defineProperty(_this, "handleFindPrevClick", function () {
136
133
  if (_this.isComposing) {
137
134
  return;
138
135
  }
@@ -157,7 +154,8 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
157
154
  _this.closeFindReplaceDialog = formatMessage(messages.closeFindReplaceDialog);
158
155
  return _this;
159
156
  }
160
- _createClass(Replace, [{
157
+ _inherits(Replace, _React$PureComponent);
158
+ return _createClass(Replace, [{
161
159
  key: "componentDidMount",
162
160
  value: function componentDidMount() {
163
161
  this.props.onReplaceTextfieldRefSet(this.replaceTextfieldRef);
@@ -288,6 +286,5 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
288
286
  }, this.closeFindReplaceDialog))));
289
287
  }
290
288
  }]);
291
- return Replace;
292
289
  }(React.PureComponent);
293
290
  export default injectIntl(Replace);
@@ -1,5 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- var _css;
2
+ /* eslint-disable @atlaskit/editor/no-re-export */
3
+ // Entry file in package.json
4
+
3
5
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
4
6
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
5
7
  /* eslint-disable */
@@ -9,10 +11,10 @@ import { css } from '@emotion/react';
9
11
  import { N40A, N50A, N60A } from '@atlaskit/theme/colors';
10
12
  export var searchMatchClass = 'search-match';
11
13
  export var selectedSearchMatchClass = 'selected-search-match';
12
- export var findReplaceStyles = css((_css = {}, _defineProperty(_css, ".".concat(searchMatchClass), {
14
+ export var findReplaceStyles = css(_defineProperty(_defineProperty({}, ".".concat(searchMatchClass), {
13
15
  borderRadius: '3px',
14
16
  backgroundColor: "var(--ds-background-accent-teal-subtlest, #E7F9FF)",
15
17
  boxShadow: "var(--ds-shadow-raised, ".concat("0 1px 1px 0 ".concat(N50A, ", 0 0 1px 0 ").concat(N60A), ")") + ', inset 0 0 0 1px ' + "var(--ds-border-input, ".concat("".concat(N40A), ")")
16
- }), _defineProperty(_css, ".".concat(selectedSearchMatchClass), {
18
+ }), ".".concat(selectedSearchMatchClass), {
17
19
  backgroundColor: "var(--ds-background-accent-teal-subtle, #6CC3E0)"
18
- }), _css));
20
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-find-replace",
3
- "version": "1.7.18",
3
+ "version": "1.7.19",
4
4
  "description": "find replace plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,18 +33,18 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/button": "^20.3.0",
36
- "@atlaskit/editor-common": "^96.3.0",
36
+ "@atlaskit/editor-common": "^96.8.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
38
- "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
38
+ "@atlaskit/editor-plugin-primary-toolbar": "^2.1.0",
39
39
  "@atlaskit/editor-prosemirror": "6.2.1",
40
40
  "@atlaskit/editor-shared-styles": "^3.2.0",
41
- "@atlaskit/form": "^10.6.0",
41
+ "@atlaskit/form": "^11.0.0",
42
42
  "@atlaskit/icon": "^23.1.0",
43
43
  "@atlaskit/platform-feature-flags": "^0.3.0",
44
44
  "@atlaskit/primitives": "^13.3.0",
45
45
  "@atlaskit/textfield": "^6.7.0",
46
46
  "@atlaskit/theme": "^14.0.0",
47
- "@atlaskit/tokens": "^2.4.0",
47
+ "@atlaskit/tokens": "^2.5.0",
48
48
  "@atlaskit/tooltip": "^19.0.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "@emotion/react": "^11.7.1",