@atlaskit/renderer 109.50.7 → 109.51.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,18 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.51.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#134423](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/134423)
8
+ [`026952a6b9ee5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/026952a6b9ee5) -
9
+ [ux] EDF-1284: Cleanup platform.editor.renderer-error-boundary-for-dom-errors platform flag in
10
+ renderer
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 109.50.7
4
17
 
5
18
  ### Patch Changes
@@ -33,9 +33,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
33
33
  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); }; }
34
34
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
35
35
  var isTableResizingEnabled = exports.isTableResizingEnabled = function isTableResizingEnabled(appearance) {
36
- return (0, _appearance.isFullWidthOrFullPageAppearance)(appearance) ||
37
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
38
- (0, _appearance.isCommentAppearance)(appearance) && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment');
36
+ return (0, _appearance.isFullWidthOrFullPageAppearance)(appearance) || (0, _appearance.isCommentAppearance)(appearance) && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment');
39
37
  };
40
38
  var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus) {
41
39
  if (!tableOrderStatus || tableOrderStatus.order === _types.SortOrder.NO_ORDER) {
@@ -322,9 +320,7 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
322
320
  }
323
321
  };
324
322
  var tableWidth = calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode);
325
- var isCommentAppearanceAndTableAlignmentEnabled =
326
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
327
- allowTableAlignment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment');
323
+ var isCommentAppearanceAndTableAlignmentEnabled = allowTableAlignment && (0, _platformFeatureFlags.fg)('platform_editor_table_support_in_comment');
328
324
 
329
325
  // Logic for table alignment in renderer
330
326
  var isTableAlignStart = ((0, _appearance.isFullWidthOrFullPageAppearance)(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment && (0, _platformFeatureFlags.fg)('platform.editor.table.allow-table-alignment'); // allowTableAlignment should be used instead of fg('platform.editor.table.allow-table-alignment') after this fg cleanup
@@ -14,7 +14,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _react = _interopRequireDefault(require("react"));
16
16
  var _analytics = require("@atlaskit/editor-common/analytics");
17
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
17
  var _analyticsListeners = require("@atlaskit/analytics-listeners");
19
18
  var _monitoring = require("@atlaskit/editor-common/monitoring");
20
19
  var _events = require("../../analytics/events");
@@ -77,26 +76,24 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
77
76
  (0, _monitoring.logException)(error, {
78
77
  location: 'renderer'
79
78
  });
80
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.renderer-error-boundary-for-dom-errors')) {
81
- var pattern = /Failed to execute.*on 'Node'.*/;
82
- var matchesPattern = pattern.test(error.message);
83
- if (matchesPattern) {
84
- this.fireAnalyticsEvent({
85
- action: _analytics.ACTION.CAUGHT_DOM_ERROR,
86
- actionSubject: this.props.component,
87
- actionSubjectId: this.props.componentId,
88
- eventType: _analytics.EVENT_TYPE.OPERATIONAL,
89
- attributes: {
90
- platform: _events.PLATFORM.WEB,
91
- errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
92
- }
93
- });
94
- this.setState(function () {
95
- return {
96
- domError: true
97
- };
98
- });
99
- }
79
+ var pattern = /Failed to execute.*on 'Node'.*/;
80
+ var matchesPattern = pattern.test(error.message);
81
+ if (matchesPattern) {
82
+ this.fireAnalyticsEvent({
83
+ action: _analytics.ACTION.CAUGHT_DOM_ERROR,
84
+ actionSubject: this.props.component,
85
+ actionSubjectId: this.props.componentId,
86
+ eventType: _analytics.EVENT_TYPE.OPERATIONAL,
87
+ attributes: {
88
+ platform: _events.PLATFORM.WEB,
89
+ errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
90
+ }
91
+ });
92
+ this.setState(function () {
93
+ return {
94
+ domError: true
95
+ };
96
+ });
100
97
  }
101
98
  if (this.hasFallback()) {
102
99
  this.setState({
@@ -111,12 +108,10 @@ var ErrorBoundary = exports.ErrorBoundary = /*#__PURE__*/function (_React$Compon
111
108
  }, {
112
109
  key: "render",
113
110
  value: function render() {
114
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.renderer-error-boundary-for-dom-errors')) {
115
- if (this.state.domError) {
116
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
117
- key: (0, _uuid.default)()
118
- }, this.props.children);
119
- }
111
+ if (this.state.domError) {
112
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
113
+ key: (0, _uuid.default)()
114
+ }, this.props.children);
120
115
  }
121
116
  if (this.shouldRecover()) {
122
117
  return this.props.fallbackComponent;
@@ -60,7 +60,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
60
60
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
61
61
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
62
62
  var packageName = "@atlaskit/renderer";
63
- var packageVersion = "109.50.7";
63
+ var packageVersion = "109.51.0";
64
64
  var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
65
65
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
66
66
  (0, _inherits2.default)(Renderer, _PureComponent);
@@ -14,9 +14,7 @@ import { withSmartCardStorage } from '../../ui/SmartCardStorage';
14
14
  import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky';
15
15
  import { Table } from './table/table';
16
16
  import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
17
- export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppearance(appearance) ||
18
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
19
- isCommentAppearance(appearance) && fg('platform_editor_table_support_in_comment');
17
+ export const isTableResizingEnabled = appearance => isFullWidthOrFullPageAppearance(appearance) || isCommentAppearance(appearance) && fg('platform_editor_table_support_in_comment');
20
18
  const orderChildren = (children, tableNode, smartCardStorage, tableOrderStatus) => {
21
19
  if (!tableOrderStatus || tableOrderStatus.order === SortOrder.NO_ORDER) {
22
20
  return children;
@@ -269,9 +267,7 @@ export class TableContainer extends React.Component {
269
267
  }
270
268
  };
271
269
  const tableWidth = calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode);
272
- const isCommentAppearanceAndTableAlignmentEnabled =
273
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
274
- allowTableAlignment && fg('platform_editor_table_support_in_comment');
270
+ const isCommentAppearanceAndTableAlignmentEnabled = allowTableAlignment && fg('platform_editor_table_support_in_comment');
275
271
 
276
272
  // Logic for table alignment in renderer
277
273
  const isTableAlignStart = (isFullWidthOrFullPageAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment && fg('platform.editor.table.allow-table-alignment'); // allowTableAlignment should be used instead of fg('platform.editor.table.allow-table-alignment') after this fg cleanup
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
4
  import { FabricChannel } from '@atlaskit/analytics-listeners';
6
5
  import { logException } from '@atlaskit/editor-common/monitoring';
7
6
  import { PLATFORM } from '../../analytics/events';
@@ -47,24 +46,22 @@ export class ErrorBoundary extends React.Component {
47
46
  logException(error, {
48
47
  location: 'renderer'
49
48
  });
50
- if (getBooleanFF('platform.editor.renderer-error-boundary-for-dom-errors')) {
51
- const pattern = /Failed to execute.*on 'Node'.*/;
52
- const matchesPattern = pattern.test(error.message);
53
- if (matchesPattern) {
54
- this.fireAnalyticsEvent({
55
- action: ACTION.CAUGHT_DOM_ERROR,
56
- actionSubject: this.props.component,
57
- actionSubjectId: this.props.componentId,
58
- eventType: EVENT_TYPE.OPERATIONAL,
59
- attributes: {
60
- platform: PLATFORM.WEB,
61
- errorMessage: `${additionalInfo}${error === null || error === void 0 ? void 0 : error.message}`
62
- }
63
- });
64
- this.setState(() => ({
65
- domError: true
66
- }));
67
- }
49
+ const pattern = /Failed to execute.*on 'Node'.*/;
50
+ const matchesPattern = pattern.test(error.message);
51
+ if (matchesPattern) {
52
+ this.fireAnalyticsEvent({
53
+ action: ACTION.CAUGHT_DOM_ERROR,
54
+ actionSubject: this.props.component,
55
+ actionSubjectId: this.props.componentId,
56
+ eventType: EVENT_TYPE.OPERATIONAL,
57
+ attributes: {
58
+ platform: PLATFORM.WEB,
59
+ errorMessage: `${additionalInfo}${error === null || error === void 0 ? void 0 : error.message}`
60
+ }
61
+ });
62
+ this.setState(() => ({
63
+ domError: true
64
+ }));
68
65
  }
69
66
  if (this.hasFallback()) {
70
67
  this.setState({
@@ -77,12 +74,10 @@ export class ErrorBoundary extends React.Component {
77
74
  }
78
75
  }
79
76
  render() {
80
- if (getBooleanFF('platform.editor.renderer-error-boundary-for-dom-errors')) {
81
- if (this.state.domError) {
82
- return /*#__PURE__*/React.createElement(React.Fragment, {
83
- key: uuid()
84
- }, this.props.children);
85
- }
77
+ if (this.state.domError) {
78
+ return /*#__PURE__*/React.createElement(React.Fragment, {
79
+ key: uuid()
80
+ }, this.props.children);
86
81
  }
87
82
  if (this.shouldRecover()) {
88
83
  return this.props.fallbackComponent;
@@ -42,7 +42,7 @@ import { nodeToReact } from '../../react/nodes';
42
42
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
43
43
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
44
44
  const packageName = "@atlaskit/renderer";
45
- const packageVersion = "109.50.7";
45
+ const packageVersion = "109.51.0";
46
46
  export const defaultNodeComponents = nodeToReact;
47
47
  export class Renderer extends PureComponent {
48
48
  constructor(props) {
@@ -26,9 +26,7 @@ import { StickyTable, tableStickyPadding, OverflowParent } from './table/sticky'
26
26
  import { Table } from './table/table';
27
27
  import { isCommentAppearance, isFullPageAppearance, isFullWidthAppearance, isFullWidthOrFullPageAppearance } from '../utils/appearance';
28
28
  export var isTableResizingEnabled = function isTableResizingEnabled(appearance) {
29
- return isFullWidthOrFullPageAppearance(appearance) ||
30
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
31
- isCommentAppearance(appearance) && fg('platform_editor_table_support_in_comment');
29
+ return isFullWidthOrFullPageAppearance(appearance) || isCommentAppearance(appearance) && fg('platform_editor_table_support_in_comment');
32
30
  };
33
31
  var orderChildren = function orderChildren(children, tableNode, smartCardStorage, tableOrderStatus) {
34
32
  if (!tableOrderStatus || tableOrderStatus.order === SortOrder.NO_ORDER) {
@@ -315,9 +313,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
315
313
  }
316
314
  };
317
315
  var tableWidth = calcDefaultLayoutWidthByAppearance(rendererAppearance, tableNode);
318
- var isCommentAppearanceAndTableAlignmentEnabled =
319
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
320
- allowTableAlignment && fg('platform_editor_table_support_in_comment');
316
+ var isCommentAppearanceAndTableAlignmentEnabled = allowTableAlignment && fg('platform_editor_table_support_in_comment');
321
317
 
322
318
  // Logic for table alignment in renderer
323
319
  var isTableAlignStart = (isFullWidthOrFullPageAppearance(rendererAppearance) || isCommentAppearanceAndTableAlignmentEnabled) && tableNode && tableNode.attrs && tableNode.attrs.layout === 'align-start' && allowTableAlignment && fg('platform.editor.table.allow-table-alignment'); // allowTableAlignment should be used instead of fg('platform.editor.table.allow-table-alignment') after this fg cleanup
@@ -9,7 +9,6 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import React from 'react';
11
11
  import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
12
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
13
12
  import { FabricChannel } from '@atlaskit/analytics-listeners';
14
13
  import { logException } from '@atlaskit/editor-common/monitoring';
15
14
  import { PLATFORM } from '../../analytics/events';
@@ -70,26 +69,24 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
70
69
  logException(error, {
71
70
  location: 'renderer'
72
71
  });
73
- if (getBooleanFF('platform.editor.renderer-error-boundary-for-dom-errors')) {
74
- var pattern = /Failed to execute.*on 'Node'.*/;
75
- var matchesPattern = pattern.test(error.message);
76
- if (matchesPattern) {
77
- this.fireAnalyticsEvent({
78
- action: ACTION.CAUGHT_DOM_ERROR,
79
- actionSubject: this.props.component,
80
- actionSubjectId: this.props.componentId,
81
- eventType: EVENT_TYPE.OPERATIONAL,
82
- attributes: {
83
- platform: PLATFORM.WEB,
84
- errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
85
- }
86
- });
87
- this.setState(function () {
88
- return {
89
- domError: true
90
- };
91
- });
92
- }
72
+ var pattern = /Failed to execute.*on 'Node'.*/;
73
+ var matchesPattern = pattern.test(error.message);
74
+ if (matchesPattern) {
75
+ this.fireAnalyticsEvent({
76
+ action: ACTION.CAUGHT_DOM_ERROR,
77
+ actionSubject: this.props.component,
78
+ actionSubjectId: this.props.componentId,
79
+ eventType: EVENT_TYPE.OPERATIONAL,
80
+ attributes: {
81
+ platform: PLATFORM.WEB,
82
+ errorMessage: "".concat(additionalInfo).concat(error === null || error === void 0 ? void 0 : error.message)
83
+ }
84
+ });
85
+ this.setState(function () {
86
+ return {
87
+ domError: true
88
+ };
89
+ });
93
90
  }
94
91
  if (this.hasFallback()) {
95
92
  this.setState({
@@ -104,12 +101,10 @@ export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
104
101
  }, {
105
102
  key: "render",
106
103
  value: function render() {
107
- if (getBooleanFF('platform.editor.renderer-error-boundary-for-dom-errors')) {
108
- if (this.state.domError) {
109
- return /*#__PURE__*/React.createElement(React.Fragment, {
110
- key: uuid()
111
- }, this.props.children);
112
- }
104
+ if (this.state.domError) {
105
+ return /*#__PURE__*/React.createElement(React.Fragment, {
106
+ key: uuid()
107
+ }, this.props.children);
113
108
  }
114
109
  if (this.shouldRecover()) {
115
110
  return this.props.fallbackComponent;
@@ -52,7 +52,7 @@ import { nodeToReact } from '../../react/nodes';
52
52
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
53
53
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
54
54
  var packageName = "@atlaskit/renderer";
55
- var packageVersion = "109.50.7";
55
+ var packageVersion = "109.51.0";
56
56
  export var defaultNodeComponents = nodeToReact;
57
57
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
58
58
  _inherits(Renderer, _PureComponent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.50.7",
3
+ "version": "109.51.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,8 +30,8 @@
30
30
  "@atlaskit/analytics-namespaced-context": "^6.11.0",
31
31
  "@atlaskit/analytics-next": "^10.1.0",
32
32
  "@atlaskit/button": "^20.1.0",
33
- "@atlaskit/code": "^15.5.0",
34
- "@atlaskit/editor-common": "^88.2.0",
33
+ "@atlaskit/code": "^15.6.0",
34
+ "@atlaskit/editor-common": "^88.3.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.18.0",
36
36
  "@atlaskit/editor-palette": "1.6.0",
37
37
  "@atlaskit/editor-prosemirror": "5.0.1",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/media-ui": "^25.11.0",
49
49
  "@atlaskit/media-viewer": "^48.7.0",
50
50
  "@atlaskit/platform-feature-flags": "^0.3.0",
51
- "@atlaskit/smart-card": "^27.18.0",
51
+ "@atlaskit/smart-card": "^27.19.0",
52
52
  "@atlaskit/status": "^1.4.0",
53
53
  "@atlaskit/task-decision": "^17.10.0",
54
54
  "@atlaskit/theme": "^13.0.0",
@@ -137,9 +137,6 @@
137
137
  "editor_inline_comments_on_inline_nodes": {
138
138
  "type": "boolean"
139
139
  },
140
- "platform.editor.renderer-error-boundary-for-dom-errors": {
141
- "type": "boolean"
142
- },
143
140
  "platform.editor.table.use-increased-scaling-percent": {
144
141
  "type": "boolean"
145
142
  },