@atlaskit/editor-plugin-find-replace 1.3.0 → 1.3.2

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,20 @@
1
1
  # @atlaskit/editor-plugin-find-replace
2
2
 
3
+ ## 1.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#113632](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113632)
8
+ [`20724f0cd35f3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/20724f0cd35f3) -
9
+ Fix missing 'Replace with' translation
10
+ - Updated dependencies
11
+
12
+ ## 1.3.1
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 1.3.0
4
19
 
5
20
  ### Minor Changes
@@ -25,7 +25,7 @@ var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
25
25
  var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
26
26
  var _styles = require("./styles");
27
27
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
28
- 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 */ /** @jsx jsx */
28
+ 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 */ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
29
29
  var FIND_DEBOUNCE_MS = exports.FIND_DEBOUNCE_MS = 100;
30
30
  // eslint-disable-next-line @repo/internal/react/no-class-components
31
31
  var Find = /*#__PURE__*/function (_React$Component) {
@@ -202,11 +202,15 @@ var Find = /*#__PURE__*/function (_React$Component) {
202
202
  selectedMatchPosition: count.index + 1,
203
203
  totalResultsCount: count.total
204
204
  });
205
- var elemAfterInput = (0, _react2.jsx)("div", {
205
+ var elemAfterInput =
206
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
207
+ (0, _react2.jsx)("div", {
206
208
  css: _styles.afterInputSection
207
209
  }, (0, _react2.jsx)("div", {
208
210
  "aria-live": "polite"
209
- }, findText && (0, _react2.jsx)("span", {
211
+ }, findText &&
212
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
213
+ (0, _react2.jsx)("span", {
210
214
  "data-testid": "textfield-count",
211
215
  css: [_styles.countStyles, _styles.countStylesAlternateStyles]
212
216
  }, count.total === 0 ? this.noResultsFound : resultsCount)), (0, _react2.jsx)("div", {
@@ -220,28 +224,31 @@ var Find = /*#__PURE__*/function (_React$Component) {
220
224
  onClick: this.handleMatchCaseClick,
221
225
  isPressed: shouldMatchCase
222
226
  })));
223
- return (0, _react2.jsx)("div", {
224
- css: [_styles.sectionWrapperStyles, _styles.sectionWrapperStylesAlternate]
225
- }, (0, _react2.jsx)("div", {
226
- css: _styles.textFieldWrapper
227
- }, (0, _react2.jsx)(_form.Label, {
228
- htmlFor: "find-text-field"
229
- }, this.find), (0, _react2.jsx)(_textfield.default, {
230
- name: "find",
231
- id: "find-text-field",
232
- testId: "find-field",
233
- appearance: "standard",
234
- value: this.state.localFindText,
235
- ref: this.findTextfieldRef,
236
- autoComplete: "off",
237
- onChange: this.handleFindChange,
238
- onKeyDown: this.handleFindKeyDown,
239
- onKeyUp: this.handleFindKeyUp,
240
- onBlur: this.props.onFindBlur,
241
- onCompositionStart: this.handleCompositionStart,
242
- onCompositionEnd: this.handleCompositionEnd,
243
- elemAfterInput: elemAfterInput
244
- })));
227
+ return (
228
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
229
+ (0, _react2.jsx)("div", {
230
+ css: [_styles.sectionWrapperStyles, _styles.sectionWrapperStylesAlternate]
231
+ }, (0, _react2.jsx)("div", {
232
+ css: _styles.textFieldWrapper
233
+ }, (0, _react2.jsx)(_form.Label, {
234
+ htmlFor: "find-text-field"
235
+ }, this.find), (0, _react2.jsx)(_textfield.default, {
236
+ name: "find",
237
+ id: "find-text-field",
238
+ testId: "find-field",
239
+ appearance: "standard",
240
+ value: this.state.localFindText,
241
+ ref: this.findTextfieldRef,
242
+ autoComplete: "off",
243
+ onChange: this.handleFindChange,
244
+ onKeyDown: this.handleFindKeyDown,
245
+ onKeyUp: this.handleFindKeyUp,
246
+ onBlur: this.props.onFindBlur,
247
+ onCompositionStart: this.handleCompositionStart,
248
+ onCompositionEnd: this.handleCompositionEnd,
249
+ elemAfterInput: elemAfterInput
250
+ })))
251
+ );
245
252
  }
246
253
  }]);
247
254
  return Find;
@@ -18,7 +18,7 @@ var _Find = _interopRequireDefault(require("./Find"));
18
18
  var _Replace = _interopRequireDefault(require("./Replace"));
19
19
  var _styles = require("./styles");
20
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
21
- 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 */ /** @jsx jsx */
21
+ 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 */ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
22
  // eslint-disable-next-line @repo/internal/react/no-class-components
23
23
  var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
24
24
  (0, _inherits2.default)(FindReplace, _React$PureComponent);
@@ -111,44 +111,47 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
111
111
  shouldMatchCase = _this$props.shouldMatchCase,
112
112
  onToggleMatchCase = _this$props.onToggleMatchCase;
113
113
  var focusToolbarButton = this.props.focusToolbarButton || function () {};
114
- return (0, _react2.jsx)("div", {
115
- ref: this.modalRef,
116
- css: [_styles.wrapperStyles, _styles.wrapperPaddingStyles]
117
- }, (0, _react2.jsx)(_Find.default, {
118
- allowMatchCase: allowMatchCase,
119
- shouldMatchCase: shouldMatchCase,
120
- onToggleMatchCase: onToggleMatchCase,
121
- findText: findText,
122
- count: count,
123
- shouldFocus: shouldFocus,
124
- onFind: onFind,
125
- onFindBlur: onFindBlur,
126
- onFindPrev: onFindPrev,
127
- onFindNext: onFindNext,
128
- onFindTextfieldRefSet: this.setFindTextfieldRef,
129
- onCancel: onCancel,
130
- onArrowDown: this.setFocusToReplace,
131
- findTyped: this.state.findTyped,
132
- setFindTyped: this.setFindTyped
133
- }), (0, _react2.jsx)("hr", {
134
- css: _styles.ruleStyles,
135
- id: "replace-hr-element"
136
- }), (0, _react2.jsx)(_Replace.default, {
137
- canReplace: count.total > 0,
138
- replaceText: replaceText,
139
- onReplace: onReplace,
140
- onReplaceAll: onReplaceAll,
141
- onReplaceTextfieldRefSet: this.setReplaceTextfieldRef,
142
- onArrowUp: this.setFocusToFind,
143
- onCancel: onCancel,
144
- count: count,
145
- onFindPrev: onFindPrev,
146
- onFindNext: onFindNext,
147
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
148
- findTyped: this.state.findTyped,
149
- setFindTyped: this.setFindTyped,
150
- focusToolbarButton: focusToolbarButton
151
- }));
114
+ return (
115
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
116
+ (0, _react2.jsx)("div", {
117
+ ref: this.modalRef,
118
+ css: [_styles.wrapperStyles, _styles.wrapperPaddingStyles]
119
+ }, (0, _react2.jsx)(_Find.default, {
120
+ allowMatchCase: allowMatchCase,
121
+ shouldMatchCase: shouldMatchCase,
122
+ onToggleMatchCase: onToggleMatchCase,
123
+ findText: findText,
124
+ count: count,
125
+ shouldFocus: shouldFocus,
126
+ onFind: onFind,
127
+ onFindBlur: onFindBlur,
128
+ onFindPrev: onFindPrev,
129
+ onFindNext: onFindNext,
130
+ onFindTextfieldRefSet: this.setFindTextfieldRef,
131
+ onCancel: onCancel,
132
+ onArrowDown: this.setFocusToReplace,
133
+ findTyped: this.state.findTyped,
134
+ setFindTyped: this.setFindTyped
135
+ }), (0, _react2.jsx)("hr", {
136
+ css: _styles.ruleStyles,
137
+ id: "replace-hr-element"
138
+ }), (0, _react2.jsx)(_Replace.default, {
139
+ canReplace: count.total > 0,
140
+ replaceText: replaceText,
141
+ onReplace: onReplace,
142
+ onReplaceAll: onReplaceAll,
143
+ onReplaceTextfieldRefSet: this.setReplaceTextfieldRef,
144
+ onArrowUp: this.setFocusToFind,
145
+ onCancel: onCancel,
146
+ count: count,
147
+ onFindPrev: onFindPrev,
148
+ onFindNext: onFindNext,
149
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
150
+ findTyped: this.state.findTyped,
151
+ setFindTyped: this.setFindTyped,
152
+ focusToolbarButton: focusToolbarButton
153
+ }))
154
+ );
152
155
  }
153
156
  }]);
154
157
  return FindReplace;
@@ -27,6 +27,7 @@ var _FindReplace = _interopRequireDefault(require("./FindReplace"));
27
27
  var _templateObject;
28
28
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
29
29
  /** @jsx jsx */
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
30
31
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
31
32
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
32
33
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
@@ -29,7 +29,7 @@ var _styles = require("./styles");
29
29
  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
30
  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 && Object.prototype.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
31
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
32
- 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 */ /** @jsx jsx */
32
+ 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 */ /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
33
33
  // eslint-disable-next-line @repo/internal/react/no-class-components
34
34
  var Replace = /*#__PURE__*/function (_React$PureComponent) {
35
35
  (0, _inherits2.default)(Replace, _React$PureComponent);
@@ -153,6 +153,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
153
153
  replaceCount: 0
154
154
  };
155
155
  _this.replace = formatMessage(_messages.findReplaceMessages.replace);
156
+ _this.replaceWith = formatMessage(_messages.findReplaceMessages.replaceWith);
156
157
  _this.replaceAll = formatMessage(_messages.findReplaceMessages.replaceAll);
157
158
  _this.findNext = formatMessage(_messages.findReplaceMessages.findNext);
158
159
  _this.findPrevious = formatMessage(_messages.findReplaceMessages.findPrevious);
@@ -217,7 +218,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
217
218
  css: _styles.textFieldWrapper
218
219
  }, (0, _react2.jsx)(_form.Label, {
219
220
  htmlFor: "replace-text-field"
220
- }, "Replace with"), (0, _react2.jsx)(_textfield.default, {
221
+ }, this.replaceWith), (0, _react2.jsx)(_textfield.default, {
221
222
  name: "replace",
222
223
  id: "replace-text-field",
223
224
  testId: "replace-field",
@@ -261,7 +262,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
261
262
  onClick: this.handleFindPrevClick,
262
263
  disabled: count.total <= 1
263
264
  })), (0, _react2.jsx)(_primitives.Inline, {
264
- space: "space.075",
265
+ space: "space.075"
266
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
267
+ ,
265
268
  xcss: (0, _primitives.xcss)({
266
269
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
267
270
  paddingInlineStart: 'space.050',
@@ -11,6 +11,7 @@ var _constants = require("@atlaskit/theme/constants");
11
11
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
12
12
  /* eslint-disable @repo/internal/styles/no-exported-styles */
13
13
  /** @jsx jsx */
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
15
 
15
16
  var fontSize = (0, _constants.fontSize)();
16
17
  var gridSize = (0, _constants.gridSize)();
@@ -2,6 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
3
3
  /** @jsx jsx */
4
4
  import React from 'react';
5
+
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
7
  import { jsx } from '@emotion/react';
6
8
  import debounce from 'lodash/debounce';
7
9
  import rafSchd from 'raf-schd';
@@ -181,11 +183,15 @@ class Find extends React.Component {
181
183
  selectedMatchPosition: count.index + 1,
182
184
  totalResultsCount: count.total
183
185
  });
184
- const elemAfterInput = jsx("div", {
186
+ const elemAfterInput =
187
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
188
+ jsx("div", {
185
189
  css: afterInputSection
186
190
  }, jsx("div", {
187
191
  "aria-live": "polite"
188
- }, findText && jsx("span", {
192
+ }, findText &&
193
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
194
+ jsx("span", {
189
195
  "data-testid": "textfield-count",
190
196
  css: [countStyles, countStylesAlternateStyles]
191
197
  }, count.total === 0 ? this.noResultsFound : resultsCount)), jsx("div", {
@@ -199,28 +205,31 @@ class Find extends React.Component {
199
205
  onClick: this.handleMatchCaseClick,
200
206
  isPressed: shouldMatchCase
201
207
  })));
202
- return jsx("div", {
203
- css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
204
- }, jsx("div", {
205
- css: textFieldWrapper
206
- }, jsx(Label, {
207
- htmlFor: "find-text-field"
208
- }, this.find), jsx(Textfield, {
209
- name: "find",
210
- id: "find-text-field",
211
- testId: "find-field",
212
- appearance: "standard",
213
- value: this.state.localFindText,
214
- ref: this.findTextfieldRef,
215
- autoComplete: "off",
216
- onChange: this.handleFindChange,
217
- onKeyDown: this.handleFindKeyDown,
218
- onKeyUp: this.handleFindKeyUp,
219
- onBlur: this.props.onFindBlur,
220
- onCompositionStart: this.handleCompositionStart,
221
- onCompositionEnd: this.handleCompositionEnd,
222
- elemAfterInput: elemAfterInput
223
- })));
208
+ return (
209
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
210
+ jsx("div", {
211
+ css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
212
+ }, jsx("div", {
213
+ css: textFieldWrapper
214
+ }, jsx(Label, {
215
+ htmlFor: "find-text-field"
216
+ }, this.find), jsx(Textfield, {
217
+ name: "find",
218
+ id: "find-text-field",
219
+ testId: "find-field",
220
+ appearance: "standard",
221
+ value: this.state.localFindText,
222
+ ref: this.findTextfieldRef,
223
+ autoComplete: "off",
224
+ onChange: this.handleFindChange,
225
+ onKeyDown: this.handleFindKeyDown,
226
+ onKeyUp: this.handleFindKeyUp,
227
+ onBlur: this.props.onFindBlur,
228
+ onCompositionStart: this.handleCompositionStart,
229
+ onCompositionEnd: this.handleCompositionEnd,
230
+ elemAfterInput: elemAfterInput
231
+ })))
232
+ );
224
233
  }
225
234
  }
226
235
  export default injectIntl(Find);
@@ -3,6 +3,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  /* eslint-disable @atlaskit/design-system/prefer-primitives */
4
4
  /** @jsx jsx */
5
5
  import React from 'react';
6
+
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
8
  import { jsx } from '@emotion/react';
7
9
  import Find from './Find';
8
10
  import Replace from './Replace';
@@ -85,44 +87,47 @@ class FindReplace extends React.PureComponent {
85
87
  onToggleMatchCase
86
88
  } = this.props;
87
89
  const focusToolbarButton = this.props.focusToolbarButton || (() => {});
88
- return jsx("div", {
89
- ref: this.modalRef,
90
- css: [wrapperStyles, wrapperPaddingStyles]
91
- }, jsx(Find, {
92
- allowMatchCase: allowMatchCase,
93
- shouldMatchCase: shouldMatchCase,
94
- onToggleMatchCase: onToggleMatchCase,
95
- findText: findText,
96
- count: count,
97
- shouldFocus: shouldFocus,
98
- onFind: onFind,
99
- onFindBlur: onFindBlur,
100
- onFindPrev: onFindPrev,
101
- onFindNext: onFindNext,
102
- onFindTextfieldRefSet: this.setFindTextfieldRef,
103
- onCancel: onCancel,
104
- onArrowDown: this.setFocusToReplace,
105
- findTyped: this.state.findTyped,
106
- setFindTyped: this.setFindTyped
107
- }), jsx("hr", {
108
- css: ruleStyles,
109
- id: "replace-hr-element"
110
- }), jsx(Replace, {
111
- canReplace: count.total > 0,
112
- replaceText: replaceText,
113
- onReplace: onReplace,
114
- onReplaceAll: onReplaceAll,
115
- onReplaceTextfieldRefSet: this.setReplaceTextfieldRef,
116
- onArrowUp: this.setFocusToFind,
117
- onCancel: onCancel,
118
- count: count,
119
- onFindPrev: onFindPrev,
120
- onFindNext: onFindNext,
121
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
122
- findTyped: this.state.findTyped,
123
- setFindTyped: this.setFindTyped,
124
- focusToolbarButton: focusToolbarButton
125
- }));
90
+ return (
91
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
92
+ jsx("div", {
93
+ ref: this.modalRef,
94
+ css: [wrapperStyles, wrapperPaddingStyles]
95
+ }, jsx(Find, {
96
+ allowMatchCase: allowMatchCase,
97
+ shouldMatchCase: shouldMatchCase,
98
+ onToggleMatchCase: onToggleMatchCase,
99
+ findText: findText,
100
+ count: count,
101
+ shouldFocus: shouldFocus,
102
+ onFind: onFind,
103
+ onFindBlur: onFindBlur,
104
+ onFindPrev: onFindPrev,
105
+ onFindNext: onFindNext,
106
+ onFindTextfieldRefSet: this.setFindTextfieldRef,
107
+ onCancel: onCancel,
108
+ onArrowDown: this.setFocusToReplace,
109
+ findTyped: this.state.findTyped,
110
+ setFindTyped: this.setFindTyped
111
+ }), jsx("hr", {
112
+ css: ruleStyles,
113
+ id: "replace-hr-element"
114
+ }), jsx(Replace, {
115
+ canReplace: count.total > 0,
116
+ replaceText: replaceText,
117
+ onReplace: onReplace,
118
+ onReplaceAll: onReplaceAll,
119
+ onReplaceTextfieldRefSet: this.setReplaceTextfieldRef,
120
+ onArrowUp: this.setFocusToFind,
121
+ onCancel: onCancel,
122
+ count: count,
123
+ onFindPrev: onFindPrev,
124
+ onFindNext: onFindNext,
125
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
126
+ findTyped: this.state.findTyped,
127
+ setFindTyped: this.setFindTyped,
128
+ focusToolbarButton: focusToolbarButton
129
+ }))
130
+ );
126
131
  }
127
132
  }
128
133
  export default FindReplace;
@@ -3,6 +3,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
4
4
  /** @jsx jsx */
5
5
  import React from 'react';
6
+
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
8
  import { css, jsx } from '@emotion/react';
7
9
  import { injectIntl } from 'react-intl-next';
8
10
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
@@ -2,6 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
3
3
  /** @jsx jsx */
4
4
  import React, { Fragment } from 'react';
5
+
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
7
  import { jsx } from '@emotion/react';
6
8
  import { injectIntl } from 'react-intl-next';
7
9
  import Button from '@atlaskit/button/new';
@@ -131,6 +133,7 @@ class Replace extends React.PureComponent {
131
133
  replaceCount: 0
132
134
  };
133
135
  this.replace = formatMessage(messages.replace);
136
+ this.replaceWith = formatMessage(messages.replaceWith);
134
137
  this.replaceAll = formatMessage(messages.replaceAll);
135
138
  this.findNext = formatMessage(messages.findNext);
136
139
  this.findPrevious = formatMessage(messages.findPrevious);
@@ -193,7 +196,7 @@ class Replace extends React.PureComponent {
193
196
  css: textFieldWrapper
194
197
  }, jsx(Label, {
195
198
  htmlFor: "replace-text-field"
196
- }, "Replace with"), jsx(Textfield, {
199
+ }, this.replaceWith), jsx(Textfield, {
197
200
  name: "replace",
198
201
  id: "replace-text-field",
199
202
  testId: "replace-field",
@@ -237,7 +240,9 @@ class Replace extends React.PureComponent {
237
240
  onClick: this.handleFindPrevClick,
238
241
  disabled: count.total <= 1
239
242
  })), jsx(Inline, {
240
- space: "space.075",
243
+ space: "space.075"
244
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
245
+ ,
241
246
  xcss: xcss({
242
247
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
243
248
  paddingInlineStart: 'space.050',
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
2
2
  /* eslint-disable @repo/internal/styles/no-exported-styles */
3
3
  /** @jsx jsx */
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { css } from '@emotion/react';
5
6
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
7
  import { N30A } from '@atlaskit/theme/colors';
@@ -10,6 +10,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
11
11
  /** @jsx jsx */
12
12
  import React from 'react';
13
+
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
15
  import { jsx } from '@emotion/react';
14
16
  import debounce from 'lodash/debounce';
15
17
  import rafSchd from 'raf-schd';
@@ -197,11 +199,15 @@ var Find = /*#__PURE__*/function (_React$Component) {
197
199
  selectedMatchPosition: count.index + 1,
198
200
  totalResultsCount: count.total
199
201
  });
200
- var elemAfterInput = jsx("div", {
202
+ var elemAfterInput =
203
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
204
+ jsx("div", {
201
205
  css: afterInputSection
202
206
  }, jsx("div", {
203
207
  "aria-live": "polite"
204
- }, findText && jsx("span", {
208
+ }, findText &&
209
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
210
+ jsx("span", {
205
211
  "data-testid": "textfield-count",
206
212
  css: [countStyles, countStylesAlternateStyles]
207
213
  }, count.total === 0 ? this.noResultsFound : resultsCount)), jsx("div", {
@@ -215,28 +221,31 @@ var Find = /*#__PURE__*/function (_React$Component) {
215
221
  onClick: this.handleMatchCaseClick,
216
222
  isPressed: shouldMatchCase
217
223
  })));
218
- return jsx("div", {
219
- css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
220
- }, jsx("div", {
221
- css: textFieldWrapper
222
- }, jsx(Label, {
223
- htmlFor: "find-text-field"
224
- }, this.find), jsx(Textfield, {
225
- name: "find",
226
- id: "find-text-field",
227
- testId: "find-field",
228
- appearance: "standard",
229
- value: this.state.localFindText,
230
- ref: this.findTextfieldRef,
231
- autoComplete: "off",
232
- onChange: this.handleFindChange,
233
- onKeyDown: this.handleFindKeyDown,
234
- onKeyUp: this.handleFindKeyUp,
235
- onBlur: this.props.onFindBlur,
236
- onCompositionStart: this.handleCompositionStart,
237
- onCompositionEnd: this.handleCompositionEnd,
238
- elemAfterInput: elemAfterInput
239
- })));
224
+ return (
225
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
226
+ jsx("div", {
227
+ css: [sectionWrapperStyles, sectionWrapperStylesAlternate]
228
+ }, jsx("div", {
229
+ css: textFieldWrapper
230
+ }, jsx(Label, {
231
+ htmlFor: "find-text-field"
232
+ }, this.find), jsx(Textfield, {
233
+ name: "find",
234
+ id: "find-text-field",
235
+ testId: "find-field",
236
+ appearance: "standard",
237
+ value: this.state.localFindText,
238
+ ref: this.findTextfieldRef,
239
+ autoComplete: "off",
240
+ onChange: this.handleFindChange,
241
+ onKeyDown: this.handleFindKeyDown,
242
+ onKeyUp: this.handleFindKeyUp,
243
+ onBlur: this.props.onFindBlur,
244
+ onCompositionStart: this.handleCompositionStart,
245
+ onCompositionEnd: this.handleCompositionEnd,
246
+ elemAfterInput: elemAfterInput
247
+ })))
248
+ );
240
249
  }
241
250
  }]);
242
251
  return Find;
@@ -11,6 +11,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
11
11
  /* eslint-disable @atlaskit/design-system/prefer-primitives */
12
12
  /** @jsx jsx */
13
13
  import React from 'react';
14
+
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
16
  import { jsx } from '@emotion/react';
15
17
  import Find from './Find';
16
18
  import Replace from './Replace';
@@ -107,44 +109,47 @@ var FindReplace = /*#__PURE__*/function (_React$PureComponent) {
107
109
  shouldMatchCase = _this$props.shouldMatchCase,
108
110
  onToggleMatchCase = _this$props.onToggleMatchCase;
109
111
  var focusToolbarButton = this.props.focusToolbarButton || function () {};
110
- return jsx("div", {
111
- ref: this.modalRef,
112
- css: [wrapperStyles, wrapperPaddingStyles]
113
- }, jsx(Find, {
114
- allowMatchCase: allowMatchCase,
115
- shouldMatchCase: shouldMatchCase,
116
- onToggleMatchCase: onToggleMatchCase,
117
- findText: findText,
118
- count: count,
119
- shouldFocus: shouldFocus,
120
- onFind: onFind,
121
- onFindBlur: onFindBlur,
122
- onFindPrev: onFindPrev,
123
- onFindNext: onFindNext,
124
- onFindTextfieldRefSet: this.setFindTextfieldRef,
125
- onCancel: onCancel,
126
- onArrowDown: this.setFocusToReplace,
127
- findTyped: this.state.findTyped,
128
- setFindTyped: this.setFindTyped
129
- }), jsx("hr", {
130
- css: ruleStyles,
131
- id: "replace-hr-element"
132
- }), jsx(Replace, {
133
- canReplace: count.total > 0,
134
- replaceText: replaceText,
135
- onReplace: onReplace,
136
- onReplaceAll: onReplaceAll,
137
- onReplaceTextfieldRefSet: this.setReplaceTextfieldRef,
138
- onArrowUp: this.setFocusToFind,
139
- onCancel: onCancel,
140
- count: count,
141
- onFindPrev: onFindPrev,
142
- onFindNext: onFindNext,
143
- dispatchAnalyticsEvent: dispatchAnalyticsEvent,
144
- findTyped: this.state.findTyped,
145
- setFindTyped: this.setFindTyped,
146
- focusToolbarButton: focusToolbarButton
147
- }));
112
+ return (
113
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
114
+ jsx("div", {
115
+ ref: this.modalRef,
116
+ css: [wrapperStyles, wrapperPaddingStyles]
117
+ }, jsx(Find, {
118
+ allowMatchCase: allowMatchCase,
119
+ shouldMatchCase: shouldMatchCase,
120
+ onToggleMatchCase: onToggleMatchCase,
121
+ findText: findText,
122
+ count: count,
123
+ shouldFocus: shouldFocus,
124
+ onFind: onFind,
125
+ onFindBlur: onFindBlur,
126
+ onFindPrev: onFindPrev,
127
+ onFindNext: onFindNext,
128
+ onFindTextfieldRefSet: this.setFindTextfieldRef,
129
+ onCancel: onCancel,
130
+ onArrowDown: this.setFocusToReplace,
131
+ findTyped: this.state.findTyped,
132
+ setFindTyped: this.setFindTyped
133
+ }), jsx("hr", {
134
+ css: ruleStyles,
135
+ id: "replace-hr-element"
136
+ }), jsx(Replace, {
137
+ canReplace: count.total > 0,
138
+ replaceText: replaceText,
139
+ onReplace: onReplace,
140
+ onReplaceAll: onReplaceAll,
141
+ onReplaceTextfieldRefSet: this.setReplaceTextfieldRef,
142
+ onArrowUp: this.setFocusToFind,
143
+ onCancel: onCancel,
144
+ count: count,
145
+ onFindPrev: onFindPrev,
146
+ onFindNext: onFindNext,
147
+ dispatchAnalyticsEvent: dispatchAnalyticsEvent,
148
+ findTyped: this.state.findTyped,
149
+ setFindTyped: this.setFindTyped,
150
+ focusToolbarButton: focusToolbarButton
151
+ }))
152
+ );
148
153
  }
149
154
  }]);
150
155
  return FindReplace;
@@ -13,6 +13,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
13
13
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
14
14
  /** @jsx jsx */
15
15
  import React from 'react';
16
+
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
18
  import { css, jsx } from '@emotion/react';
17
19
  import { injectIntl } from 'react-intl-next';
18
20
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
@@ -10,6 +10,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
11
11
  /** @jsx jsx */
12
12
  import React, { Fragment } from 'react';
13
+
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
15
  import { jsx } from '@emotion/react';
14
16
  import { injectIntl } from 'react-intl-next';
15
17
  import Button from '@atlaskit/button/new';
@@ -145,6 +147,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
145
147
  replaceCount: 0
146
148
  };
147
149
  _this.replace = formatMessage(messages.replace);
150
+ _this.replaceWith = formatMessage(messages.replaceWith);
148
151
  _this.replaceAll = formatMessage(messages.replaceAll);
149
152
  _this.findNext = formatMessage(messages.findNext);
150
153
  _this.findPrevious = formatMessage(messages.findPrevious);
@@ -209,7 +212,7 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
209
212
  css: textFieldWrapper
210
213
  }, jsx(Label, {
211
214
  htmlFor: "replace-text-field"
212
- }, "Replace with"), jsx(Textfield, {
215
+ }, this.replaceWith), jsx(Textfield, {
213
216
  name: "replace",
214
217
  id: "replace-text-field",
215
218
  testId: "replace-field",
@@ -253,7 +256,9 @@ var Replace = /*#__PURE__*/function (_React$PureComponent) {
253
256
  onClick: this.handleFindPrevClick,
254
257
  disabled: count.total <= 1
255
258
  })), jsx(Inline, {
256
- space: "space.075",
259
+ space: "space.075"
260
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
261
+ ,
257
262
  xcss: xcss({
258
263
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
259
264
  paddingInlineStart: 'space.050',
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable @atlaskit/design-system/no-nested-styles */
2
2
  /* eslint-disable @repo/internal/styles/no-exported-styles */
3
3
  /** @jsx jsx */
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
5
  import { css } from '@emotion/react';
5
6
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
6
7
  import { N30A } from '@atlaskit/theme/colors';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-find-replace",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "find replace plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -19,28 +19,33 @@
19
19
  "types": "dist/types/index.d.ts",
20
20
  "typesVersions": {
21
21
  ">=4.5 <4.9": {
22
- "*": ["dist/types-ts4.5/*", "dist/types-ts4.5/index.d.ts"]
22
+ "*": [
23
+ "dist/types-ts4.5/*",
24
+ "dist/types-ts4.5/index.d.ts"
25
+ ]
23
26
  }
24
27
  },
25
- "sideEffects": ["*.compiled.css"],
28
+ "sideEffects": [
29
+ "*.compiled.css"
30
+ ],
26
31
  "atlaskit:src": "src/index.ts",
27
32
  "af:exports": {
28
33
  ".": "./src/index.ts",
29
34
  "./styles": "./src/styles.ts"
30
35
  },
31
36
  "dependencies": {
32
- "@atlaskit/button": "^17.17.0",
33
- "@atlaskit/editor-common": "^82.6.0",
37
+ "@atlaskit/button": "^17.23.0",
38
+ "@atlaskit/editor-common": "^82.11.0",
34
39
  "@atlaskit/editor-plugin-analytics": "^1.2.0",
35
40
  "@atlaskit/editor-prosemirror": "4.0.1",
36
41
  "@atlaskit/editor-shared-styles": "^2.12.0",
37
- "@atlaskit/form": "^10.3.0",
38
- "@atlaskit/icon": "^22.3.0",
39
- "@atlaskit/primitives": "^7.2.0",
40
- "@atlaskit/textfield": "^6.3.0",
41
- "@atlaskit/theme": "^12.9.0",
42
- "@atlaskit/tokens": "^1.50.0",
43
- "@atlaskit/tooltip": "^18.4.0",
42
+ "@atlaskit/form": "^10.4.0",
43
+ "@atlaskit/icon": "^22.4.0",
44
+ "@atlaskit/primitives": "^8.0.0",
45
+ "@atlaskit/textfield": "^6.4.0",
46
+ "@atlaskit/theme": "^12.11.0",
47
+ "@atlaskit/tokens": "^1.52.0",
48
+ "@atlaskit/tooltip": "^18.5.0",
44
49
  "@babel/runtime": "^7.0.0",
45
50
  "@emotion/react": "^11.7.1",
46
51
  "lodash": "^4.17.21",
@@ -62,23 +67,42 @@
62
67
  },
63
68
  "techstack": {
64
69
  "@atlassian/frontend": {
65
- "import-structure": ["atlassian-conventions"],
66
- "circular-dependencies": ["file-and-folder-level"]
70
+ "import-structure": [
71
+ "atlassian-conventions"
72
+ ],
73
+ "circular-dependencies": [
74
+ "file-and-folder-level"
75
+ ]
67
76
  },
68
77
  "@repo/internal": {
69
78
  "dom-events": "use-bind-event-listener",
70
- "analytics": ["analytics-next"],
71
- "design-tokens": ["color"],
72
- "theming": ["react-context"],
73
- "ui-components": ["lite-mode"],
79
+ "analytics": [
80
+ "analytics-next"
81
+ ],
82
+ "design-tokens": [
83
+ "color"
84
+ ],
85
+ "theming": [
86
+ "react-context"
87
+ ],
88
+ "ui-components": [
89
+ "lite-mode"
90
+ ],
74
91
  "deprecation": "no-deprecated-imports",
75
- "styling": ["emotion", "emotion"],
76
- "imports": ["import-no-extraneous-disable-for-examples-and-docs"]
92
+ "styling": [
93
+ "emotion",
94
+ "emotion"
95
+ ],
96
+ "imports": [
97
+ "import-no-extraneous-disable-for-examples-and-docs"
98
+ ]
77
99
  }
78
100
  },
79
101
  "stricter": {
80
102
  "no-unused-dependencies": {
81
- "exclude": ["@atlaskit/editor-plugin-analytics"]
103
+ "exclude": [
104
+ "@atlaskit/editor-plugin-analytics"
105
+ ]
82
106
  }
83
107
  }
84
108
  }