@atlaskit/editor-common 93.4.0 → 93.4.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
+ ## 93.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#151694](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151694)
8
+ [`69ec2bfcedd81`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/69ec2bfcedd81) -
9
+ Remediate usage of UNSAFE lifecycle method for Popup
10
+
3
11
  ## 93.4.0
4
12
 
5
13
  ### Minor Changes
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  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; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "93.4.0";
20
+ var packageVersion = "93.4.1";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -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 = "93.4.0";
27
+ var packageVersion = "93.4.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -23,6 +23,7 @@ var _focusTrap = _interopRequireDefault(require("focus-trap"));
23
23
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
24
24
  var _reactDom = require("react-dom");
25
25
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
26
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
26
27
  var _utils = require("./utils");
27
28
  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; }
28
29
  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; }
@@ -207,7 +208,9 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
207
208
  value: function UNSAFE_componentWillReceiveProps(newProps) {
208
209
  // We are delaying `updatePosition` otherwise it happens before the children
209
210
  // get rendered and we end up with a wrong position
210
- this.scheduledUpdatePosition(newProps);
211
+ if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
212
+ this.scheduledUpdatePosition(newProps);
213
+ }
211
214
  }
212
215
  }, {
213
216
  key: "destroyFocusTrap",
@@ -248,6 +251,11 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
248
251
  key: "componentDidUpdate",
249
252
  value: function componentDidUpdate(prevProps) {
250
253
  this.handleChangedFocusTrapProp(prevProps);
254
+ if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
255
+ if (this.props !== prevProps) {
256
+ this.scheduledUpdatePosition(prevProps);
257
+ }
258
+ }
251
259
  }
252
260
  }, {
253
261
  key: "componentDidMount",
@@ -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 = "93.4.0";
4
+ const packageVersion = "93.4.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "93.4.0";
16
+ const packageVersion = "93.4.1";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -4,6 +4,7 @@ import createFocusTrap from 'focus-trap';
4
4
  import rafSchedule from 'raf-schd';
5
5
  import { createPortal, flushSync } from 'react-dom';
6
6
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { calculatePlacement, calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
8
9
  export default class Popup extends React.Component {
9
10
  constructor(...args) {
@@ -167,7 +168,9 @@ export default class Popup extends React.Component {
167
168
  UNSAFE_componentWillReceiveProps(newProps) {
168
169
  // We are delaying `updatePosition` otherwise it happens before the children
169
170
  // get rendered and we end up with a wrong position
170
- this.scheduledUpdatePosition(newProps);
171
+ if (!fg('platform_editor_react18_phase2')) {
172
+ this.scheduledUpdatePosition(newProps);
173
+ }
171
174
  }
172
175
  /**
173
176
  * Cancels the initialisation of the focus trap if it has not yet occured
@@ -201,6 +204,11 @@ export default class Popup extends React.Component {
201
204
  }
202
205
  componentDidUpdate(prevProps) {
203
206
  this.handleChangedFocusTrapProp(prevProps);
207
+ if (fg('platform_editor_react18_phase2')) {
208
+ if (this.props !== prevProps) {
209
+ this.scheduledUpdatePosition(prevProps);
210
+ }
211
+ }
204
212
  }
205
213
  componentDidMount() {
206
214
  window.addEventListener('resize', this.onResize);
@@ -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 = "93.4.0";
10
+ var packageVersion = "93.4.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
21
21
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "93.4.0";
24
+ var packageVersion = "93.4.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var DropList = /*#__PURE__*/function (_Component) {
@@ -14,6 +14,7 @@ import createFocusTrap from 'focus-trap';
14
14
  import rafSchedule from 'raf-schd';
15
15
  import { createPortal, flushSync } from 'react-dom';
16
16
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
17
+ import { fg } from '@atlaskit/platform-feature-flags';
17
18
  import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
18
19
  var Popup = /*#__PURE__*/function (_React$Component) {
19
20
  _inherits(Popup, _React$Component);
@@ -194,7 +195,9 @@ var Popup = /*#__PURE__*/function (_React$Component) {
194
195
  value: function UNSAFE_componentWillReceiveProps(newProps) {
195
196
  // We are delaying `updatePosition` otherwise it happens before the children
196
197
  // get rendered and we end up with a wrong position
197
- this.scheduledUpdatePosition(newProps);
198
+ if (!fg('platform_editor_react18_phase2')) {
199
+ this.scheduledUpdatePosition(newProps);
200
+ }
198
201
  }
199
202
  }, {
200
203
  key: "destroyFocusTrap",
@@ -235,6 +238,11 @@ var Popup = /*#__PURE__*/function (_React$Component) {
235
238
  key: "componentDidUpdate",
236
239
  value: function componentDidUpdate(prevProps) {
237
240
  this.handleChangedFocusTrapProp(prevProps);
241
+ if (fg('platform_editor_react18_phase2')) {
242
+ if (this.props !== prevProps) {
243
+ this.scheduledUpdatePosition(prevProps);
244
+ }
245
+ }
238
246
  }
239
247
  }, {
240
248
  key: "componentDidMount",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "93.4.0",
3
+ "version": "93.4.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/"
@@ -145,7 +145,7 @@
145
145
  "@atlaskit/primitives": "^12.2.0",
146
146
  "@atlaskit/profilecard": "^20.4.0",
147
147
  "@atlaskit/section-message": "^6.6.0",
148
- "@atlaskit/smart-card": "^30.0.0",
148
+ "@atlaskit/smart-card": "^30.1.0",
149
149
  "@atlaskit/smart-user-picker": "^6.10.0",
150
150
  "@atlaskit/spinner": "^16.3.0",
151
151
  "@atlaskit/task-decision": "^17.11.0",