@atlaskit/editor-common 74.25.2 → 74.26.0

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-common
2
2
 
3
+ ## 74.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3920dcfd848`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3920dcfd848) - This removes the feature flag made for upgrading the `focus-trap` dependency and keeps `focus-trap` at it's original version.
8
+
3
9
  ## 74.25.2
4
10
 
5
11
  ### Patch Changes
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
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 = "74.25.2";
19
+ var packageVersion = "74.26.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
24
24
  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); }; }
25
25
  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 */
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "74.25.2";
27
+ var packageVersion = "74.26.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -19,12 +19,10 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
19
19
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
20
20
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
21
21
  var _react = _interopRequireDefault(require("react"));
22
- var _focusTrap = require("focus-trap");
23
- var _focusTrapV = _interopRequireDefault(require("focus-trap-v2"));
22
+ var _focusTrap = _interopRequireDefault(require("focus-trap"));
24
23
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
25
24
  var _reactDom = require("react-dom");
26
25
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
27
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
26
  var _utils = require("./utils");
29
27
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
30
28
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
@@ -77,11 +75,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
77
75
  fallbackFocus: popup,
78
76
  returnFocusOnDeactivate: false
79
77
  };
80
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.focus-trap-upgrade_p2cei')) {
81
- _this.focusTrap = (0, _focusTrap.createFocusTrap)(popup, trapConfig);
82
- } else {
83
- _this.focusTrap = (0, _focusTrapV.default)(popup, trapConfig);
84
- }
78
+ _this.focusTrap = (0, _focusTrap.default)(popup, trapConfig);
85
79
  _this.focusTrap.activate();
86
80
  }));
87
81
  return _this;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.25.2",
3
+ "version": "74.26.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "74.25.2";
3
+ const packageVersion = "74.26.0";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
8
8
  import { borderRadius } from '@atlaskit/theme/constants';
9
9
  import Layer from '../Layer';
10
10
  const packageName = "@atlaskit/editor-common";
11
- const packageVersion = "74.25.2";
11
+ const packageVersion = "74.26.0";
12
12
  const halfFocusRing = 1;
13
13
  const dropOffset = '0, 8';
14
14
  class DropList extends Component {
@@ -1,11 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
- import { createFocusTrap } from 'focus-trap';
4
- import createFocusTrapV2 from 'focus-trap-v2';
3
+ import createFocusTrap from 'focus-trap';
5
4
  import rafSchedule from 'raf-schd';
6
5
  import { createPortal } from 'react-dom';
7
6
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
8
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
7
  import { calculatePlacement, calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
10
8
  export default class Popup extends React.Component {
11
9
  constructor(...args) {
@@ -45,11 +43,7 @@ export default class Popup extends React.Component {
45
43
  fallbackFocus: popup,
46
44
  returnFocusOnDeactivate: false
47
45
  };
48
- if (getBooleanFF('platform.design-system-team.focus-trap-upgrade_p2cei')) {
49
- this.focusTrap = createFocusTrap(popup, trapConfig);
50
- } else {
51
- this.focusTrap = createFocusTrapV2(popup, trapConfig);
52
- }
46
+ this.focusTrap = createFocusTrap(popup, trapConfig);
53
47
  this.focusTrap.activate();
54
48
  }));
55
49
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.25.2",
3
+ "version": "74.26.0",
4
4
  "sideEffects": false
5
5
  }
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
6
6
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "74.25.2";
9
+ var packageVersion = "74.26.0";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
18
18
  import { borderRadius } from '@atlaskit/theme/constants';
19
19
  import Layer from '../Layer';
20
20
  var packageName = "@atlaskit/editor-common";
21
- var packageVersion = "74.25.2";
21
+ var packageVersion = "74.26.0";
22
22
  var halfFocusRing = 1;
23
23
  var dropOffset = '0, 8';
24
24
  var DropList = /*#__PURE__*/function (_Component) {
@@ -10,12 +10,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
10
10
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
11
  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; } }
12
12
  import React from 'react';
13
- import { createFocusTrap } from 'focus-trap';
14
- import createFocusTrapV2 from 'focus-trap-v2';
13
+ import createFocusTrap from 'focus-trap';
15
14
  import rafSchedule from 'raf-schd';
16
15
  import { createPortal } from 'react-dom';
17
16
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
18
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
19
17
  import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
20
18
  var Popup = /*#__PURE__*/function (_React$Component) {
21
19
  _inherits(Popup, _React$Component);
@@ -64,11 +62,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
64
62
  fallbackFocus: popup,
65
63
  returnFocusOnDeactivate: false
66
64
  };
67
- if (getBooleanFF('platform.design-system-team.focus-trap-upgrade_p2cei')) {
68
- _this.focusTrap = createFocusTrap(popup, trapConfig);
69
- } else {
70
- _this.focusTrap = createFocusTrapV2(popup, trapConfig);
71
- }
65
+ _this.focusTrap = createFocusTrap(popup, trapConfig);
72
66
  _this.focusTrap.activate();
73
67
  }));
74
68
  return _this;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.25.2",
3
+ "version": "74.26.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { FocusTrap } from 'focus-trap';
3
2
  import { Position } from './utils';
4
3
  export interface Props {
5
4
  zIndex?: number;
@@ -70,7 +69,7 @@ export default class Popup extends React.Component<Props, State> {
70
69
  /**
71
70
  * Handle pausing, unpausing, and initialising (if not yet initialised) of the focus trap
72
71
  */
73
- handleChangedFocusTrapProp(prevProps: Props): void | FocusTrap;
72
+ handleChangedFocusTrapProp(prevProps: Props): void;
74
73
  componentDidUpdate(prevProps: Props): void;
75
74
  componentDidMount(): void;
76
75
  componentWillUnmount(): void;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { FocusTrap } from 'focus-trap';
3
2
  import { Position } from './utils';
4
3
  export interface Props {
5
4
  zIndex?: number;
@@ -73,7 +72,7 @@ export default class Popup extends React.Component<Props, State> {
73
72
  /**
74
73
  * Handle pausing, unpausing, and initialising (if not yet initialised) of the focus trap
75
74
  */
76
- handleChangedFocusTrapProp(prevProps: Props): void | FocusTrap;
75
+ handleChangedFocusTrapProp(prevProps: Props): void;
77
76
  componentDidUpdate(prevProps: Props): void;
78
77
  componentDidMount(): void;
79
78
  componentWillUnmount(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "74.25.2",
3
+ "version": "74.26.0",
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/"
@@ -116,8 +116,7 @@
116
116
  "chromatism": "^2.6.0",
117
117
  "classnames": "^2.2.5",
118
118
  "date-fns": "^2.17.0",
119
- "focus-trap": "^7.0.0",
120
- "focus-trap-v2": "npm:focus-trap@^2.4.5",
119
+ "focus-trap": "^2.4.5",
121
120
  "linkify-it": "^2.0.3",
122
121
  "lodash": "^4.17.21",
123
122
  "markdown-it": "^12.3.2",
@@ -189,9 +188,6 @@
189
188
  "platform.design-system-team.menu-selected-state-change_0see9": {
190
189
  "type": "boolean"
191
190
  },
192
- "platform.design-system-team.focus-trap-upgrade_p2cei": {
193
- "type": "boolean"
194
- },
195
191
  "platform.linking-platform.datasource-jira_issues": {
196
192
  "type": "boolean"
197
193
  }