@atlaskit/editor-core 189.3.0 → 189.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,17 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 189.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#42567](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42567) [`7c771cc4e22`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7c771cc4e22) - [ux] [ECA11Y-142] Added feature flag to rollout A11y changes for find and replace
8
+
9
+ ## 189.3.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 189.3.0
4
16
 
5
17
  ### Minor Changes
@@ -25,6 +25,7 @@ var _styles = require("./styles");
25
25
  var _analytics = require("@atlaskit/editor-common/analytics");
26
26
  var _FindReplaceTooltipButton = require("./FindReplaceTooltipButton");
27
27
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
28
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
29
  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); }; }
29
30
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
30
31
  var FIND_DEBOUNCE_MS = exports.FIND_DEBOUNCE_MS = 100;
@@ -220,19 +221,21 @@ var Find = /*#__PURE__*/function (_React$Component) {
220
221
  }, {
221
222
  key: "componentDidUpdate",
222
223
  value: function componentDidUpdate(prevProps) {
223
- var _this$state2,
224
- _this3 = this;
224
+ var _this3 = this;
225
225
  // focus on update if find text did not change
226
- if (this.props.findText === ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.localFindText)) {
227
- this.focusFindTextfield();
228
- }
229
- if (this.props.findText !== prevProps.findText) {
230
- this.syncFindText(function () {
231
- // focus after input is synced if find text provided
232
- if (_this3.props.findText) {
233
- _this3.focusFindTextfield();
234
- }
235
- });
226
+ if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.a11y-find-replace')) {
227
+ var _this$state2;
228
+ if (this.props.findText === ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.localFindText)) {
229
+ this.focusFindTextfield();
230
+ }
231
+ if (this.props.findText !== prevProps.findText) {
232
+ this.syncFindText(function () {
233
+ // focus after input is synced if find text provided
234
+ if (_this3.props.findText) {
235
+ _this3.focusFindTextfield();
236
+ }
237
+ });
238
+ }
236
239
  }
237
240
  }
238
241
  }, {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "189.3.0";
8
+ var version = exports.version = "189.3.2";
9
9
  var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
10
10
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
11
11
  };
@@ -13,6 +13,7 @@ import { countStyles, sectionWrapperStyles } from './styles';
13
13
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
14
14
  import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
15
15
  import rafSchd from 'raf-schd';
16
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
16
17
  export const FIND_DEBOUNCE_MS = 100;
17
18
  const messages = defineMessages({
18
19
  find: {
@@ -200,18 +201,20 @@ class Find extends React.Component {
200
201
  });
201
202
  }
202
203
  componentDidUpdate(prevProps) {
203
- var _this$state2;
204
204
  // focus on update if find text did not change
205
- if (this.props.findText === ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.localFindText)) {
206
- this.focusFindTextfield();
207
- }
208
- if (this.props.findText !== prevProps.findText) {
209
- this.syncFindText(() => {
210
- // focus after input is synced if find text provided
211
- if (this.props.findText) {
212
- this.focusFindTextfield();
213
- }
214
- });
205
+ if (!getBooleanFF('platform.editor.a11y-find-replace')) {
206
+ var _this$state2;
207
+ if (this.props.findText === ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.localFindText)) {
208
+ this.focusFindTextfield();
209
+ }
210
+ if (this.props.findText !== prevProps.findText) {
211
+ this.syncFindText(() => {
212
+ // focus after input is synced if find text provided
213
+ if (this.props.findText) {
214
+ this.focusFindTextfield();
215
+ }
216
+ });
217
+ }
215
218
  }
216
219
  }
217
220
  componentWillUnmount() {
@@ -1,5 +1,5 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "189.3.0";
2
+ export const version = "189.3.2";
3
3
  export const nextMajorVersion = () => {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
@@ -21,6 +21,7 @@ import { countStyles, sectionWrapperStyles } from './styles';
21
21
  import { TRIGGER_METHOD } from '@atlaskit/editor-common/analytics';
22
22
  import { FindReplaceTooltipButton } from './FindReplaceTooltipButton';
23
23
  import rafSchd from 'raf-schd';
24
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
24
25
  export var FIND_DEBOUNCE_MS = 100;
25
26
  var messages = defineMessages({
26
27
  find: {
@@ -214,19 +215,21 @@ var Find = /*#__PURE__*/function (_React$Component) {
214
215
  }, {
215
216
  key: "componentDidUpdate",
216
217
  value: function componentDidUpdate(prevProps) {
217
- var _this$state2,
218
- _this3 = this;
218
+ var _this3 = this;
219
219
  // focus on update if find text did not change
220
- if (this.props.findText === ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.localFindText)) {
221
- this.focusFindTextfield();
222
- }
223
- if (this.props.findText !== prevProps.findText) {
224
- this.syncFindText(function () {
225
- // focus after input is synced if find text provided
226
- if (_this3.props.findText) {
227
- _this3.focusFindTextfield();
228
- }
229
- });
220
+ if (!getBooleanFF('platform.editor.a11y-find-replace')) {
221
+ var _this$state2;
222
+ if (this.props.findText === ((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.localFindText)) {
223
+ this.focusFindTextfield();
224
+ }
225
+ if (this.props.findText !== prevProps.findText) {
226
+ this.syncFindText(function () {
227
+ // focus after input is synced if find text provided
228
+ if (_this3.props.findText) {
229
+ _this3.focusFindTextfield();
230
+ }
231
+ });
232
+ }
230
233
  }
231
234
  }
232
235
  }, {
@@ -1,5 +1,5 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "189.3.0";
2
+ export var version = "189.3.2";
3
3
  export var nextMajorVersion = function nextMajorVersion() {
4
4
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "189.3.0",
3
+ "version": "189.3.2",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/avatar": "^21.4.0",
50
50
  "@atlaskit/avatar-group": "^9.4.0",
51
51
  "@atlaskit/button": "^16.13.0",
52
- "@atlaskit/checkbox": "^12.6.0",
52
+ "@atlaskit/checkbox": "^13.0.0",
53
53
  "@atlaskit/code": "^14.6.0",
54
54
  "@atlaskit/date": "^0.10.0",
55
55
  "@atlaskit/datetime-picker": "^12.10.0",
@@ -323,6 +323,9 @@
323
323
  },
324
324
  "platform.editor.multi-bodied-extension_0rygg": {
325
325
  "type": "boolean"
326
+ },
327
+ "platform.editor.a11y-find-replace": {
328
+ "type": "boolean"
326
329
  }
327
330
  }
328
331
  }