@atlaskit/editor-common 93.3.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 +16 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Popup/index.js +9 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Popup/index.js +9 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Popup/index.js +9 -1
- package/dist/types/types/floating-toolbar.d.ts +1 -0
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +1 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
11
|
+
## 93.4.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#151707](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151707)
|
|
16
|
+
[`b6edd84148f5e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6edd84148f5e) -
|
|
17
|
+
[ux] Migrated the layout toolbar to use the new ADS icons
|
|
18
|
+
|
|
3
19
|
## 93.3.0
|
|
4
20
|
|
|
5
21
|
### 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.
|
|
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.
|
|
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
|
-
|
|
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
|
+
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.
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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/"
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"@atlaskit/code": "^15.6.0",
|
|
120
120
|
"@atlaskit/codemod-utils": "^4.2.0",
|
|
121
121
|
"@atlaskit/custom-steps": "^0.8.0",
|
|
122
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
122
|
+
"@atlaskit/dropdown-menu": "^12.20.0",
|
|
123
123
|
"@atlaskit/editor-json-transformer": "^8.19.0",
|
|
124
124
|
"@atlaskit/editor-palette": "1.6.1",
|
|
125
125
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"@atlaskit/media-card": "^78.5.0",
|
|
134
134
|
"@atlaskit/media-client": "^28.0.0",
|
|
135
135
|
"@atlaskit/media-client-react": "^2.2.0",
|
|
136
|
-
"@atlaskit/media-common": "^11.
|
|
136
|
+
"@atlaskit/media-common": "^11.6.0",
|
|
137
137
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
138
138
|
"@atlaskit/media-picker": "^66.7.0",
|
|
139
139
|
"@atlaskit/media-ui": "^25.15.0",
|
|
@@ -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.
|
|
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",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"devDependencies": {
|
|
190
190
|
"@af/visual-regression": "*",
|
|
191
191
|
"@atlaskit/media-core": "^34.3.0",
|
|
192
|
-
"@atlaskit/media-test-helpers": "^34.
|
|
192
|
+
"@atlaskit/media-test-helpers": "^34.5.0",
|
|
193
193
|
"@atlaskit/util-data-test": "^17.9.0",
|
|
194
194
|
"@atlaskit/visual-regression": "*",
|
|
195
195
|
"@testing-library/dom": "^10.1.0",
|