@atlaskit/editor-core 190.1.19 → 190.1.20
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 +8 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +9 -5
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ErrorBoundary.js +10 -7
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +10 -7
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 190.1.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#63392](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63392) [`7240ee0cf279`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7240ee0cf279) - [ED-21646] Only rerender once in error boundary to avoid overreporting and infinite rerendering
|
|
8
|
+
- [#62416](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62416) [`9f3c36680d89`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9f3c36680d89) - [ux] Updated table context menu styling.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 190.1.19
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -16,13 +16,13 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _react = _interopRequireDefault(require("react"));
|
|
18
18
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
19
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
20
|
+
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
19
21
|
var _ufo = require("@atlaskit/editor-common/ufo");
|
|
20
22
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
21
23
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
22
|
-
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
23
24
|
var _documentLogger = require("../utils/document-logger");
|
|
24
25
|
var _WithEditorView = require("./WithEditorView");
|
|
25
|
-
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
26
26
|
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; }
|
|
27
27
|
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; }
|
|
28
28
|
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); }; }
|
|
@@ -151,6 +151,10 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
|
|
|
151
151
|
key: "componentDidCatch",
|
|
152
152
|
value: function componentDidCatch(error, errorInfo) {
|
|
153
153
|
var _this2 = this;
|
|
154
|
+
// Only report and re-render once, to avoid over-reporting errors and infinite rerendering
|
|
155
|
+
if (this.state.error) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
154
158
|
if (this.props.errorTracking) {
|
|
155
159
|
this.sendErrorData({
|
|
156
160
|
error: error,
|
|
@@ -159,13 +163,13 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
|
|
|
159
163
|
});
|
|
160
164
|
}
|
|
161
165
|
|
|
162
|
-
//
|
|
163
|
-
//
|
|
166
|
+
// Update state to allow a re-render to attempt graceful recovery (in the event that
|
|
167
|
+
// the error was caused by a race condition or is intermittent)
|
|
164
168
|
this.setState({
|
|
165
169
|
error: error
|
|
166
170
|
}, function () {
|
|
167
171
|
if (_this2.props.rethrow) {
|
|
168
|
-
// Now that a re-render has
|
|
172
|
+
// Now that a re-render has occurred, we re-throw to allow product error boundaries
|
|
169
173
|
// to catch and handle the error too.
|
|
170
174
|
//
|
|
171
175
|
// Note that when rethrowing inside a error boundary, the stack trace
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import uuid from 'uuid';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
|
+
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
4
6
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
5
7
|
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
6
|
-
import { sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
7
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
import { isOutdatedBrowser, sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
8
9
|
import { getDocStructure } from '../utils/document-logger';
|
|
9
10
|
import { WithEditorView } from './WithEditorView';
|
|
10
|
-
import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
|
|
11
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
12
11
|
export class ErrorBoundaryWithEditorView extends React.Component {
|
|
13
12
|
constructor(props) {
|
|
14
13
|
super(props);
|
|
@@ -99,6 +98,10 @@ export class ErrorBoundaryWithEditorView extends React.Component {
|
|
|
99
98
|
}
|
|
100
99
|
}
|
|
101
100
|
componentDidCatch(error, errorInfo) {
|
|
101
|
+
// Only report and re-render once, to avoid over-reporting errors and infinite rerendering
|
|
102
|
+
if (this.state.error) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
102
105
|
if (this.props.errorTracking) {
|
|
103
106
|
this.sendErrorData({
|
|
104
107
|
error,
|
|
@@ -107,13 +110,13 @@ export class ErrorBoundaryWithEditorView extends React.Component {
|
|
|
107
110
|
});
|
|
108
111
|
}
|
|
109
112
|
|
|
110
|
-
//
|
|
111
|
-
//
|
|
113
|
+
// Update state to allow a re-render to attempt graceful recovery (in the event that
|
|
114
|
+
// the error was caused by a race condition or is intermittent)
|
|
112
115
|
this.setState({
|
|
113
116
|
error
|
|
114
117
|
}, () => {
|
|
115
118
|
if (this.props.rethrow) {
|
|
116
|
-
// Now that a re-render has
|
|
119
|
+
// Now that a re-render has occurred, we re-throw to allow product error boundaries
|
|
117
120
|
// to catch and handle the error too.
|
|
118
121
|
//
|
|
119
122
|
// Note that when rethrowing inside a error boundary, the stack trace
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "190.1.
|
|
2
|
+
export const version = "190.1.20";
|
|
@@ -13,14 +13,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
13
13
|
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; } }
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import uuid from 'uuid';
|
|
16
|
+
import { ACTION, ACTION_SUBJECT, editorAnalyticsChannel, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
17
|
+
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
16
18
|
import { ExperienceStore } from '@atlaskit/editor-common/ufo';
|
|
17
19
|
import { IntlErrorBoundary } from '@atlaskit/editor-common/ui';
|
|
18
|
-
import { sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
19
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, editorAnalyticsChannel } from '@atlaskit/editor-common/analytics';
|
|
20
|
+
import { isOutdatedBrowser, sniffUserBrowserExtensions } from '@atlaskit/editor-common/utils';
|
|
20
21
|
import { getDocStructure } from '../utils/document-logger';
|
|
21
22
|
import { WithEditorView } from './WithEditorView';
|
|
22
|
-
import { isOutdatedBrowser } from '@atlaskit/editor-common/utils';
|
|
23
|
-
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
24
23
|
export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
25
24
|
_inherits(ErrorBoundaryWithEditorView, _React$Component);
|
|
26
25
|
var _super = _createSuper(ErrorBoundaryWithEditorView);
|
|
@@ -145,6 +144,10 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
|
|
|
145
144
|
key: "componentDidCatch",
|
|
146
145
|
value: function componentDidCatch(error, errorInfo) {
|
|
147
146
|
var _this2 = this;
|
|
147
|
+
// Only report and re-render once, to avoid over-reporting errors and infinite rerendering
|
|
148
|
+
if (this.state.error) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
148
151
|
if (this.props.errorTracking) {
|
|
149
152
|
this.sendErrorData({
|
|
150
153
|
error: error,
|
|
@@ -153,13 +156,13 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
|
|
|
153
156
|
});
|
|
154
157
|
}
|
|
155
158
|
|
|
156
|
-
//
|
|
157
|
-
//
|
|
159
|
+
// Update state to allow a re-render to attempt graceful recovery (in the event that
|
|
160
|
+
// the error was caused by a race condition or is intermittent)
|
|
158
161
|
this.setState({
|
|
159
162
|
error: error
|
|
160
163
|
}, function () {
|
|
161
164
|
if (_this2.props.rethrow) {
|
|
162
|
-
// Now that a re-render has
|
|
165
|
+
// Now that a re-render has occurred, we re-throw to allow product error boundaries
|
|
163
166
|
// to catch and handle the error too.
|
|
164
167
|
//
|
|
165
168
|
// Note that when rethrowing inside a error boundary, the stack trace
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "190.1.
|
|
2
|
+
export var version = "190.1.20";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "190.1.
|
|
3
|
+
"version": "190.1.20",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"@atlaskit/editor-plugin-selection-toolbar": "^0.1.0",
|
|
112
112
|
"@atlaskit/editor-plugin-status": "^0.2.0",
|
|
113
113
|
"@atlaskit/editor-plugin-submit-editor": "^0.1.0",
|
|
114
|
-
"@atlaskit/editor-plugin-table": "^5.
|
|
114
|
+
"@atlaskit/editor-plugin-table": "^5.7.0",
|
|
115
115
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^0.2.0",
|
|
116
116
|
"@atlaskit/editor-plugin-text-color": "^0.1.0",
|
|
117
117
|
"@atlaskit/editor-plugin-text-formatting": "^0.4.0",
|
|
@@ -342,6 +342,10 @@
|
|
|
342
342
|
"type": "boolean",
|
|
343
343
|
"referenceOnly": "true"
|
|
344
344
|
},
|
|
345
|
+
"platform.editor.table.new-cell-context-menu-styling": {
|
|
346
|
+
"type": "boolean",
|
|
347
|
+
"referenceOnly": "true"
|
|
348
|
+
},
|
|
345
349
|
"platform.editor.ordered-list-auto-join-improvements_mrlv5": {
|
|
346
350
|
"type": "boolean",
|
|
347
351
|
"referenceOnly": "true"
|