@atlaskit/renderer 111.2.9 → 111.3.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 111.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 111.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#156093](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/156093)
14
+ [`a5156f7d85a6d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a5156f7d85a6d) -
15
+ Changes related to the nested renderer causing multiple callback binding to the annotation click
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 111.2.9
4
22
 
5
23
  ### Patch Changes
@@ -65,7 +65,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
65
65
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
66
66
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
67
67
  var packageName = "@atlaskit/renderer";
68
- var packageVersion = "111.2.9";
68
+ var packageVersion = "111.3.1";
69
69
  var setAsQueryContainerStyles = (0, _react2.css)({
70
70
  containerName: 'ak-renderer-wrapper',
71
71
  containerType: 'inline-size',
@@ -83,10 +83,11 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
83
83
  annotationClickEvent = _useState6[0],
84
84
  setAnnotationClickEvent = _useState6[1];
85
85
  var updateSubscriber = props.updateSubscriber,
86
- createAnalyticsEvent = props.createAnalyticsEvent;
86
+ createAnalyticsEvent = props.createAnalyticsEvent,
87
+ isNestedRender = props.isNestedRender;
87
88
  var isInlineCommentsKbAccessible = _featureGateJsClient.default.checkGate('inline_comments_keyboard_accessible_renderer');
88
89
  (0, _react.useLayoutEffect)(function () {
89
- if (!updateSubscriber) {
90
+ if (!updateSubscriber || isNestedRender) {
90
91
  return;
91
92
  }
92
93
  var clickCb = function clickCb(_ref3) {
@@ -135,6 +136,6 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
135
136
  updateSubscriber.off(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
136
137
  updateSubscriber.off(_types.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
137
138
  };
138
- }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
139
+ }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible, isNestedRender]);
139
140
  return annotationClickEvent;
140
141
  };
@@ -73,6 +73,7 @@ var AnnotationsWrapper = exports.AnnotationsWrapper = function AnnotationsWrappe
73
73
  adfDocument: adfDocument,
74
74
  isNestedRender: isNestedRender
75
75
  }), /*#__PURE__*/_react.default.createElement(_view.AnnotationView, {
76
+ isNestedRender: isNestedRender,
76
77
  createAnalyticsEvent: createAnalyticsEvent
77
78
  }), children)))));
78
79
  };
@@ -18,7 +18,8 @@ var AnnotationView = exports.AnnotationView = function AnnotationView(props) {
18
18
  var updateSubscriber = inlineCommentProvider && inlineCommentProvider.updateSubscriber || null;
19
19
  var viewComponentProps = (0, _hooks.useAnnotationClickEvent)({
20
20
  updateSubscriber: updateSubscriber,
21
- createAnalyticsEvent: props.createAnalyticsEvent
21
+ createAnalyticsEvent: props.createAnalyticsEvent,
22
+ isNestedRender: props.isNestedRender
22
23
  });
23
24
  var ViewComponent = inlineCommentProvider && inlineCommentProvider.viewComponent;
24
25
  var deleteAnnotation = (0, _react.useMemo)(function () {
@@ -45,7 +45,7 @@ import { countNodes } from './count-nodes';
45
45
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  const packageName = "@atlaskit/renderer";
48
- const packageVersion = "111.2.9";
48
+ const packageVersion = "111.3.1";
49
49
  const setAsQueryContainerStyles = css({
50
50
  containerName: 'ak-renderer-wrapper',
51
51
  containerType: 'inline-size',
@@ -72,11 +72,12 @@ export const useAnnotationClickEvent = props => {
72
72
  const [annotationClickEvent, setAnnotationClickEvent] = useState(null);
73
73
  const {
74
74
  updateSubscriber,
75
- createAnalyticsEvent
75
+ createAnalyticsEvent,
76
+ isNestedRender
76
77
  } = props;
77
78
  const isInlineCommentsKbAccessible = FeatureGates.checkGate('inline_comments_keyboard_accessible_renderer');
78
79
  useLayoutEffect(() => {
79
- if (!updateSubscriber) {
80
+ if (!updateSubscriber || isNestedRender) {
80
81
  return;
81
82
  }
82
83
  const clickCb = ({
@@ -122,6 +123,6 @@ export const useAnnotationClickEvent = props => {
122
123
  updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
123
124
  updateSubscriber.off(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
124
125
  };
125
- }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
126
+ }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible, isNestedRender]);
126
127
  return annotationClickEvent;
127
128
  };
@@ -56,6 +56,7 @@ export const AnnotationsWrapper = props => {
56
56
  adfDocument: adfDocument,
57
57
  isNestedRender: isNestedRender
58
58
  }), /*#__PURE__*/React.createElement(AnnotationView, {
59
+ isNestedRender: isNestedRender,
59
60
  createAnalyticsEvent: createAnalyticsEvent
60
61
  }), children)))));
61
62
  };
@@ -9,7 +9,8 @@ const AnnotationView = props => {
9
9
  const updateSubscriber = inlineCommentProvider && inlineCommentProvider.updateSubscriber || null;
10
10
  const viewComponentProps = useAnnotationClickEvent({
11
11
  updateSubscriber,
12
- createAnalyticsEvent: props.createAnalyticsEvent
12
+ createAnalyticsEvent: props.createAnalyticsEvent,
13
+ isNestedRender: props.isNestedRender
13
14
  });
14
15
  const ViewComponent = inlineCommentProvider && inlineCommentProvider.viewComponent;
15
16
  const deleteAnnotation = useMemo(() => annotationInfo => actionContext.deleteAnnotation(annotationInfo.id, annotationInfo.type), [actionContext]);
@@ -55,7 +55,7 @@ import { countNodes } from './count-nodes';
55
55
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
56
56
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "111.2.9";
58
+ var packageVersion = "111.3.1";
59
59
  var setAsQueryContainerStyles = css({
60
60
  containerName: 'ak-renderer-wrapper',
61
61
  containerType: 'inline-size',
@@ -76,10 +76,11 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
76
76
  annotationClickEvent = _useState6[0],
77
77
  setAnnotationClickEvent = _useState6[1];
78
78
  var updateSubscriber = props.updateSubscriber,
79
- createAnalyticsEvent = props.createAnalyticsEvent;
79
+ createAnalyticsEvent = props.createAnalyticsEvent,
80
+ isNestedRender = props.isNestedRender;
80
81
  var isInlineCommentsKbAccessible = FeatureGates.checkGate('inline_comments_keyboard_accessible_renderer');
81
82
  useLayoutEffect(function () {
82
- if (!updateSubscriber) {
83
+ if (!updateSubscriber || isNestedRender) {
83
84
  return;
84
85
  }
85
86
  var clickCb = function clickCb(_ref3) {
@@ -128,6 +129,6 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
128
129
  updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
129
130
  updateSubscriber.off(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
130
131
  };
131
- }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
132
+ }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible, isNestedRender]);
132
133
  return annotationClickEvent;
133
134
  };
@@ -52,6 +52,7 @@ export var AnnotationsWrapper = function AnnotationsWrapper(props) {
52
52
  adfDocument: adfDocument,
53
53
  isNestedRender: isNestedRender
54
54
  }), /*#__PURE__*/React.createElement(AnnotationView, {
55
+ isNestedRender: isNestedRender,
55
56
  createAnalyticsEvent: createAnalyticsEvent
56
57
  }), children)))));
57
58
  };
@@ -9,7 +9,8 @@ var AnnotationView = function AnnotationView(props) {
9
9
  var updateSubscriber = inlineCommentProvider && inlineCommentProvider.updateSubscriber || null;
10
10
  var viewComponentProps = useAnnotationClickEvent({
11
11
  updateSubscriber: updateSubscriber,
12
- createAnalyticsEvent: props.createAnalyticsEvent
12
+ createAnalyticsEvent: props.createAnalyticsEvent,
13
+ isNestedRender: props.isNestedRender
13
14
  });
14
15
  var ViewComponent = inlineCommentProvider && inlineCommentProvider.viewComponent;
15
16
  var deleteAnnotation = useMemo(function () {
@@ -6,6 +6,7 @@ type ListenEventProps = {
6
6
  id: AnnotationId;
7
7
  updateSubscriber: AnnotationUpdateEmitter | null;
8
8
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
9
+ isNestedRender?: boolean;
9
10
  };
10
11
  type UseAnnotationUpdateSatteByEventProps = {
11
12
  type: AnnotationTypes;
@@ -14,5 +15,5 @@ type UseAnnotationUpdateSatteByEventProps = {
14
15
  export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
15
16
  export declare const useHasFocusEvent: ({ id, updateSubscriber }: ListenEventProps) => boolean;
16
17
  type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
17
- export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
18
+ export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent' | 'isNestedRender'>) => AnnotationsWithClickTarget;
18
19
  export {};
@@ -2,6 +2,7 @@
2
2
  import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  type Props = {
4
4
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
5
+ isNestedRender: boolean;
5
6
  };
6
7
  declare const AnnotationView: (props: Props) => JSX.Element | null;
7
8
  export { AnnotationView };
@@ -6,6 +6,7 @@ type ListenEventProps = {
6
6
  id: AnnotationId;
7
7
  updateSubscriber: AnnotationUpdateEmitter | null;
8
8
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
9
+ isNestedRender?: boolean;
9
10
  };
10
11
  type UseAnnotationUpdateSatteByEventProps = {
11
12
  type: AnnotationTypes;
@@ -14,5 +15,5 @@ type UseAnnotationUpdateSatteByEventProps = {
14
15
  export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
15
16
  export declare const useHasFocusEvent: ({ id, updateSubscriber }: ListenEventProps) => boolean;
16
17
  type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
17
- export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
18
+ export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent' | 'isNestedRender'>) => AnnotationsWithClickTarget;
18
19
  export {};
@@ -2,6 +2,7 @@
2
2
  import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  type Props = {
4
4
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
5
+ isNestedRender: boolean;
5
6
  };
6
7
  declare const AnnotationView: (props: Props) => JSX.Element | null;
7
8
  export { AnnotationView };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "111.2.9",
3
+ "version": "111.3.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,21 +29,21 @@
29
29
  "@atlaskit/analytics-next": "^10.1.0",
30
30
  "@atlaskit/button": "^20.3.0",
31
31
  "@atlaskit/code": "^15.6.0",
32
- "@atlaskit/editor-common": "^94.2.0",
32
+ "@atlaskit/editor-common": "^94.4.0",
33
33
  "@atlaskit/editor-json-transformer": "^8.20.0",
34
34
  "@atlaskit/editor-palette": "1.6.2",
35
35
  "@atlaskit/editor-prosemirror": "6.0.0",
36
- "@atlaskit/editor-shared-styles": "^3.0.0",
36
+ "@atlaskit/editor-shared-styles": "^3.1.0",
37
37
  "@atlaskit/emoji": "^67.8.0",
38
38
  "@atlaskit/feature-gate-js-client": "^4.20.0",
39
39
  "@atlaskit/icon": "^22.24.0",
40
40
  "@atlaskit/link-datasource": "^3.6.0",
41
- "@atlaskit/media-card": "^78.8.0",
41
+ "@atlaskit/media-card": "^78.9.0",
42
42
  "@atlaskit/media-client": "^28.0.0",
43
43
  "@atlaskit/media-client-react": "^2.2.0",
44
- "@atlaskit/media-common": "^11.6.0",
44
+ "@atlaskit/media-common": "^11.7.0",
45
45
  "@atlaskit/media-filmstrip": "^47.4.0",
46
- "@atlaskit/media-ui": "^25.16.0",
46
+ "@atlaskit/media-ui": "^26.0.0",
47
47
  "@atlaskit/media-viewer": "^49.2.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.3.0",
49
49
  "@atlaskit/smart-card": "^30.1.0",