@atlaskit/editor-common 110.34.0 → 110.34.1

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,13 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.34.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`24092f8832d34`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/24092f8832d34) -
8
+ [EDITOR-3321] Clean up platform_editor_update_modal_close_button
9
+ - Updated dependencies
10
+
3
11
  ## 110.34.0
4
12
 
5
13
  ### Minor Changes
@@ -161,15 +161,10 @@ function StatelessElementBrowser(props) {
161
161
  // clear the flag if the search happens after a user has chosen the category
162
162
  categoryBeenChosen.current = false;
163
163
  }
164
- if ((0, _platformFeatureFlags.fg)('platform_editor_update_modal_close_button')) {
165
- // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
166
- // After user pick some category the category should stay focused.
167
- isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
168
- } else {
169
- // A11Y: if categories exists, on the initial render search element should receive focus.
170
- // After user pick some category the category should stay focused.
171
- isFocusSearch = !categoryBeenChosen.current || !isEmptySearchTerm;
172
- }
164
+
165
+ // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
166
+ // After user pick some category the category should stay focused.
167
+ isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
173
168
  }
174
169
  var itemIsDisabled = (0, _react.useCallback)(function (index) {
175
170
  var _items$index$isDisabl, _items$index;
@@ -246,7 +246,7 @@ var skipBackwardOffsetToSafeItem = function skipBackwardOffsetToSafeItem(current
246
246
  return currentIndex + 1;
247
247
  };
248
248
  function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, itemIsDisabled, isFocusSearch, autoFocusSearch) {
249
- var _useReducer = (0, _react.useReducer)(reducer, autoFocusSearch && (0, _platformFeatureFlags.fg)('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore)),
249
+ var _useReducer = (0, _react.useReducer)(reducer, autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore)),
250
250
  _useReducer2 = (0, _slicedToArray2.default)(_useReducer, 2),
251
251
  state = _useReducer2[0],
252
252
  dispatch = _useReducer2[1];
@@ -267,7 +267,7 @@ function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, it
267
267
 
268
268
  // calls if items size changed
269
269
  var reset = (0, _react.useCallback)(function (listSize) {
270
- var defaultState = autoFocusSearch && (0, _platformFeatureFlags.fg)('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled;
270
+ var defaultState = autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled;
271
271
  var payload = _objectSpread(_objectSpread({}, defaultState), {}, {
272
272
  listSize: listSize
273
273
  });
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "110.33.2";
19
+ var packageVersion = "110.34.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "110.33.2";
27
+ var packageVersion = "110.34.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -146,15 +146,10 @@ function StatelessElementBrowser(props) {
146
146
  // clear the flag if the search happens after a user has chosen the category
147
147
  categoryBeenChosen.current = false;
148
148
  }
149
- if (fg('platform_editor_update_modal_close_button')) {
150
- // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
151
- // After user pick some category the category should stay focused.
152
- isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
153
- } else {
154
- // A11Y: if categories exists, on the initial render search element should receive focus.
155
- // After user pick some category the category should stay focused.
156
- isFocusSearch = !categoryBeenChosen.current || !isEmptySearchTerm;
157
- }
149
+
150
+ // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
151
+ // After user pick some category the category should stay focused.
152
+ isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
158
153
  }
159
154
  const itemIsDisabled = useCallback(index => {
160
155
  var _items$index$isDisabl, _items$index;
@@ -250,7 +250,7 @@ const skipBackwardOffsetToSafeItem = (currentIndex, stepSize, itemIsDisabled) =>
250
250
  return currentIndex + 1;
251
251
  };
252
252
  function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, itemIsDisabled, isFocusSearch, autoFocusSearch) {
253
- const [state, dispatch] = useReducer(reducer, autoFocusSearch && fg('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore));
253
+ const [state, dispatch] = useReducer(reducer, autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore));
254
254
  useEffect(() => {
255
255
  dispatch({
256
256
  type: ACTIONS.UPDATE_STATE,
@@ -270,7 +270,7 @@ function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, it
270
270
 
271
271
  // calls if items size changed
272
272
  const reset = useCallback(listSize => {
273
- const defaultState = autoFocusSearch && fg('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled;
273
+ const defaultState = autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled;
274
274
  let payload = {
275
275
  ...defaultState,
276
276
  listSize
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "110.33.2";
4
+ const packageVersion = "110.34.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "110.33.2";
17
+ const packageVersion = "110.34.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -151,15 +151,10 @@ function StatelessElementBrowser(props) {
151
151
  // clear the flag if the search happens after a user has chosen the category
152
152
  categoryBeenChosen.current = false;
153
153
  }
154
- if (fg('platform_editor_update_modal_close_button')) {
155
- // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
156
- // After user pick some category the category should stay focused.
157
- isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
158
- } else {
159
- // A11Y: if categories exists, on the initial render search element should receive focus.
160
- // After user pick some category the category should stay focused.
161
- isFocusSearch = !categoryBeenChosen.current || !isEmptySearchTerm;
162
- }
154
+
155
+ // A11Y: if categories exists and search can be focused, on the initial render it should receive focus.
156
+ // After user pick some category the category should stay focused.
157
+ isFocusSearch = canFocusSearch && (!categoryBeenChosen.current || !isEmptySearchTerm);
163
158
  }
164
159
  var itemIsDisabled = useCallback(function (index) {
165
160
  var _items$index$isDisabl, _items$index;
@@ -240,7 +240,7 @@ var skipBackwardOffsetToSafeItem = function skipBackwardOffsetToSafeItem(current
240
240
  return currentIndex + 1;
241
241
  };
242
242
  function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, itemIsDisabled, isFocusSearch, autoFocusSearch) {
243
- var _useReducer = useReducer(reducer, autoFocusSearch && fg('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore)),
243
+ var _useReducer = useReducer(reducer, autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled, getInitialState(listSize, canFocusViewMore)),
244
244
  _useReducer2 = _slicedToArray(_useReducer, 2),
245
245
  state = _useReducer2[0],
246
246
  dispatch = _useReducer2[1];
@@ -261,7 +261,7 @@ function useSelectAndFocusOnArrowNavigation(listSize, step, canFocusViewMore, it
261
261
 
262
262
  // calls if items size changed
263
263
  var reset = useCallback(function (listSize) {
264
- var defaultState = autoFocusSearch && fg('platform_editor_update_modal_close_button') ? initialState : initialStateWithFocusOnSearchDisabled;
264
+ var defaultState = autoFocusSearch ? initialState : initialStateWithFocusOnSearchDisabled;
265
265
  var payload = _objectSpread(_objectSpread({}, defaultState), {}, {
266
266
  listSize: listSize
267
267
  });
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "110.33.2";
10
+ var packageVersion = "110.34.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "110.33.2";
24
+ var packageVersion = "110.34.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.34.0",
3
+ "version": "110.34.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -246,9 +246,6 @@
246
246
  "platform_editor_toolbar_aifc_patch_7": {
247
247
  "type": "boolean"
248
248
  },
249
- "platform_editor_update_modal_close_button": {
250
- "type": "boolean"
251
- },
252
249
  "platform_editor_content_mode_button_mvp": {
253
250
  "type": "boolean"
254
251
  },