@atlaskit/renderer 109.11.0 → 109.11.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 +6 -0
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/selection/range-validator.js +6 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/selection/range-validator.js +6 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/selection/range-validator.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#85141](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/85141) [`eb4d99e5be1e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eb4d99e5be1e) - Adding a try-catch around selection validation to prevent errors being thrown by nested renderers
|
|
8
|
+
|
|
3
9
|
## 109.11.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -55,7 +55,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
55
55
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
56
56
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
57
57
|
var packageName = "@atlaskit/renderer";
|
|
58
|
-
var packageVersion = "109.11.
|
|
58
|
+
var packageVersion = "109.11.1";
|
|
59
59
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
60
60
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
61
61
|
var _super = _createSuper(Renderer);
|
|
@@ -33,7 +33,12 @@ var SelectionRangeValidator = exports.SelectionRangeValidator = function Selecti
|
|
|
33
33
|
var documentPosition = actions.getPositionFromRange(range);
|
|
34
34
|
|
|
35
35
|
// This property is drilled down to consumers when a new range is selected to test it's validity
|
|
36
|
-
var isAnnotationAllowedOnRange =
|
|
36
|
+
var isAnnotationAllowedOnRange = false;
|
|
37
|
+
try {
|
|
38
|
+
isAnnotationAllowedOnRange = documentPosition && actions.isValidAnnotationPosition(documentPosition);
|
|
39
|
+
} catch (_unused) {
|
|
40
|
+
isAnnotationAllowedOnRange = false;
|
|
41
|
+
}
|
|
37
42
|
return /*#__PURE__*/_react.default.createElement(_mounter.SelectionInlineCommentMounter, {
|
|
38
43
|
range: range,
|
|
39
44
|
draftRange: draftRange,
|
|
@@ -36,7 +36,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
36
36
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
37
37
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
38
38
|
const packageName = "@atlaskit/renderer";
|
|
39
|
-
const packageVersion = "109.11.
|
|
39
|
+
const packageVersion = "109.11.1";
|
|
40
40
|
export class Renderer extends PureComponent {
|
|
41
41
|
constructor(props) {
|
|
42
42
|
super(props);
|
|
@@ -20,7 +20,12 @@ export const SelectionRangeValidator = props => {
|
|
|
20
20
|
const documentPosition = actions.getPositionFromRange(range);
|
|
21
21
|
|
|
22
22
|
// This property is drilled down to consumers when a new range is selected to test it's validity
|
|
23
|
-
|
|
23
|
+
let isAnnotationAllowedOnRange = false;
|
|
24
|
+
try {
|
|
25
|
+
isAnnotationAllowedOnRange = documentPosition && actions.isValidAnnotationPosition(documentPosition);
|
|
26
|
+
} catch {
|
|
27
|
+
isAnnotationAllowedOnRange = false;
|
|
28
|
+
}
|
|
24
29
|
return /*#__PURE__*/React.createElement(SelectionInlineCommentMounter, {
|
|
25
30
|
range: range,
|
|
26
31
|
draftRange: draftRange,
|
|
@@ -46,7 +46,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
46
46
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
47
47
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
48
48
|
var packageName = "@atlaskit/renderer";
|
|
49
|
-
var packageVersion = "109.11.
|
|
49
|
+
var packageVersion = "109.11.1";
|
|
50
50
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
51
51
|
_inherits(Renderer, _PureComponent);
|
|
52
52
|
var _super = _createSuper(Renderer);
|
|
@@ -23,7 +23,12 @@ export var SelectionRangeValidator = function SelectionRangeValidator(props) {
|
|
|
23
23
|
var documentPosition = actions.getPositionFromRange(range);
|
|
24
24
|
|
|
25
25
|
// This property is drilled down to consumers when a new range is selected to test it's validity
|
|
26
|
-
var isAnnotationAllowedOnRange =
|
|
26
|
+
var isAnnotationAllowedOnRange = false;
|
|
27
|
+
try {
|
|
28
|
+
isAnnotationAllowedOnRange = documentPosition && actions.isValidAnnotationPosition(documentPosition);
|
|
29
|
+
} catch (_unused) {
|
|
30
|
+
isAnnotationAllowedOnRange = false;
|
|
31
|
+
}
|
|
27
32
|
return /*#__PURE__*/React.createElement(SelectionInlineCommentMounter, {
|
|
28
33
|
range: range,
|
|
29
34
|
draftRange: draftRange,
|