@atlaskit/renderer 109.11.0 → 109.11.2

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,17 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.11.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#84404](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84404) [`eb8c1300b8ee`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eb8c1300b8ee) - Click on media with annotation will no longer open the annotation view behind the media preview
8
+
9
+ ## 109.11.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#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
14
+
3
15
  ## 109.11.0
4
16
 
5
17
  ### 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.0";
58
+ var packageVersion = "109.11.2";
59
59
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -32,13 +32,16 @@ var MarkElement = exports.MarkElement = function MarkElement(_ref) {
32
32
  if (!updateSubscriber) {
33
33
  return;
34
34
  }
35
+ if (useBlockLevel) {
36
+ return;
37
+ }
35
38
  var eventTarget = props.eventTarget,
36
39
  annotationIds = props.annotationIds;
37
40
  updateSubscriber.emit(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, {
38
41
  annotationIds: annotationIds,
39
42
  eventTarget: eventTarget
40
43
  });
41
- }, [updateSubscriber]);
44
+ }, [updateSubscriber, useBlockLevel]);
42
45
  var activeParentIds = (0, _hooks.useInlineCommentsFilter)({
43
46
  annotationIds: annotationParentIds,
44
47
  filter: {
@@ -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 = documentPosition && actions.isValidAnnotationPosition(documentPosition);
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.0";
39
+ const packageVersion = "109.11.2";
40
40
  export class Renderer extends PureComponent {
41
41
  constructor(props) {
42
42
  super(props);
@@ -22,6 +22,9 @@ const MarkElement = ({
22
22
  if (!updateSubscriber) {
23
23
  return;
24
24
  }
25
+ if (useBlockLevel) {
26
+ return;
27
+ }
25
28
  const {
26
29
  eventTarget,
27
30
  annotationIds
@@ -30,7 +33,7 @@ const MarkElement = ({
30
33
  annotationIds,
31
34
  eventTarget
32
35
  });
33
- }, [updateSubscriber]);
36
+ }, [updateSubscriber, useBlockLevel]);
34
37
  const activeParentIds = useInlineCommentsFilter({
35
38
  annotationIds: annotationParentIds,
36
39
  filter: {
@@ -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
- const isAnnotationAllowedOnRange = documentPosition && actions.isValidAnnotationPosition(documentPosition);
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.0";
49
+ var packageVersion = "109.11.2";
50
50
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
51
51
  _inherits(Renderer, _PureComponent);
52
52
  var _super = _createSuper(Renderer);
@@ -23,13 +23,16 @@ var MarkElement = function MarkElement(_ref) {
23
23
  if (!updateSubscriber) {
24
24
  return;
25
25
  }
26
+ if (useBlockLevel) {
27
+ return;
28
+ }
26
29
  var eventTarget = props.eventTarget,
27
30
  annotationIds = props.annotationIds;
28
31
  updateSubscriber.emit(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, {
29
32
  annotationIds: annotationIds,
30
33
  eventTarget: eventTarget
31
34
  });
32
- }, [updateSubscriber]);
35
+ }, [updateSubscriber, useBlockLevel]);
33
36
  var activeParentIds = useInlineCommentsFilter({
34
37
  annotationIds: annotationParentIds,
35
38
  filter: {
@@ -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 = documentPosition && actions.isValidAnnotationPosition(documentPosition);
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.11.0",
3
+ "version": "109.11.2",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"