@atlaskit/renderer 110.6.0 → 111.0.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,28 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 111.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#147384](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147384)
8
+ [`dd88ce6ba197e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dd88ce6ba197e) -
9
+ Adds a onLoadComplete callback for useLoadAnnotations annotations hook
10
+
11
+ ## 111.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - [#147220](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147220)
16
+ [`07a9416026f88`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/07a9416026f88) -
17
+ Remove showActions and showServerActions from smart-card
18
+
19
+ ### Patch Changes
20
+
21
+ - [#147094](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147094)
22
+ [`9e12a8f47cfef`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9e12a8f47cfef) -
23
+ [ED-24721] Clean up FF `confluence.frontend.fabric.editor.comments-on-media-analytics`
24
+ - Updated dependencies
25
+
3
26
  ## 110.6.0
4
27
 
5
28
  ### Minor Changes
@@ -63,7 +63,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
63
63
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
64
64
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
65
65
  var packageName = "@atlaskit/renderer";
66
- var packageVersion = "110.6.0";
66
+ var packageVersion = "111.0.1";
67
67
  var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
68
68
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
69
69
  (0, _inherits2.default)(Renderer, _PureComponent);
@@ -83,8 +83,7 @@ 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,
87
- isCommentsOnMediaAnalyticsEnabled = props.isCommentsOnMediaAnalyticsEnabled;
86
+ createAnalyticsEvent = props.createAnalyticsEvent;
88
87
  var isInlineCommentsKbAccessible = _featureGateJsClient.default.checkGate('inline_comments_keyboard_accessible_renderer');
89
88
  (0, _react.useLayoutEffect)(function () {
90
89
  if (!updateSubscriber) {
@@ -109,12 +108,11 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
109
108
  actionSubject: _analytics.ACTION_SUBJECT.ANNOTATION,
110
109
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.INLINE_COMMENT,
111
110
  eventType: _analytics.EVENT_TYPE.TRACK,
112
- attributes: _objectSpread({
113
- overlap: annotationsByType.length || 0
114
- }, isCommentsOnMediaAnalyticsEnabled && {
111
+ attributes: {
112
+ overlap: annotationsByType.length || 0,
115
113
  targetNodeType: eventTargetType,
116
114
  method: viewMethod
117
- })
115
+ }
118
116
  }).fire(_types2.FabricChannel.editor);
119
117
  }
120
118
  setAnnotationClickEvent({
@@ -137,6 +135,6 @@ var useAnnotationClickEvent = exports.useAnnotationClickEvent = function useAnno
137
135
  updateSubscriber.off(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
138
136
  updateSubscriber.off(_types.AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
139
137
  };
140
- }, [updateSubscriber, createAnalyticsEvent, isCommentsOnMediaAnalyticsEnabled, isInlineCommentsKbAccessible]);
138
+ }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
141
139
  return annotationClickEvent;
142
140
  };
@@ -14,7 +14,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
14
14
  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; }
15
15
  var useLoadAnnotations = exports.useLoadAnnotations = function useLoadAnnotations(_ref) {
16
16
  var adfDocument = _ref.adfDocument,
17
- isNestedRender = _ref.isNestedRender;
17
+ isNestedRender = _ref.isNestedRender,
18
+ onLoadComplete = _ref.onLoadComplete;
18
19
  var actions = (0, _react.useContext)(_RendererActionsContext.RendererContext);
19
20
  var providers = (0, _react.useContext)(_context.ProvidersContext);
20
21
  (0, _react.useEffect)(function () {
@@ -27,6 +28,9 @@ var useLoadAnnotations = exports.useLoadAnnotations = function useLoadAnnotation
27
28
  var annotations = actions.getAnnotationMarks();
28
29
  // we don't want to request integrators for state with an empty list of ids.
29
30
  if (!annotations.length) {
31
+ onLoadComplete && onLoadComplete({
32
+ numberOfUnresolvedInlineComments: 0
33
+ });
30
34
  return;
31
35
  }
32
36
  var ids = annotations.map(function (mark) {
@@ -40,7 +44,12 @@ var useLoadAnnotations = exports.useLoadAnnotations = function useLoadAnnotation
40
44
  return _objectSpread(_objectSpread({}, acc), {}, (0, _defineProperty2.default)({}, value.id, value));
41
45
  }, {});
42
46
  updateSubscriberInlineComment.emit(_types.AnnotationUpdateEvent.SET_ANNOTATION_STATE, payload);
47
+ onLoadComplete && onLoadComplete({
48
+ numberOfUnresolvedInlineComments: data.filter(function (data) {
49
+ return data.state === 'active';
50
+ }).length
51
+ });
43
52
  };
44
53
  inlineCommentGetState(ids, isNestedRender).then(cb);
45
- }, [actions, providers, adfDocument, isNestedRender]);
54
+ }, [actions, providers, adfDocument, isNestedRender, onLoadComplete]);
46
55
  };
@@ -31,10 +31,12 @@ var _draft = require("./draft");
31
31
  var _element = require("./element");
32
32
  var LoadAnnotations = /*#__PURE__*/_react.default.memo(function (_ref) {
33
33
  var adfDocument = _ref.adfDocument,
34
- isNestedRender = _ref.isNestedRender;
34
+ isNestedRender = _ref.isNestedRender,
35
+ onLoadComplete = _ref.onLoadComplete;
35
36
  (0, _useLoadAnnotations.useLoadAnnotations)({
36
37
  adfDocument: adfDocument,
37
- isNestedRender: isNestedRender
38
+ isNestedRender: isNestedRender,
39
+ onLoadComplete: onLoadComplete
38
40
  });
39
41
  return null;
40
42
  });
@@ -44,7 +46,8 @@ var AnnotationsWrapper = exports.AnnotationsWrapper = function AnnotationsWrappe
44
46
  annotationProvider = props.annotationProvider,
45
47
  rendererRef = props.rendererRef,
46
48
  adfDocument = props.adfDocument,
47
- isNestedRender = props.isNestedRender;
49
+ isNestedRender = props.isNestedRender,
50
+ onLoadComplete = props.onLoadComplete;
48
51
  var updateSubscriber = annotationProvider && annotationProvider.inlineComment && annotationProvider.inlineComment.updateSubscriber;
49
52
  var inlineCommentAnnotationsState = (0, _useEvents.useAnnotationStateByTypeEvent)({
50
53
  type: _adfSchema.AnnotationTypes.INLINE_COMMENT,
@@ -63,7 +66,8 @@ var AnnotationsWrapper = exports.AnnotationsWrapper = function AnnotationsWrappe
63
66
  rendererRef: rendererRef
64
67
  }, /*#__PURE__*/_react.default.createElement(LoadAnnotations, {
65
68
  adfDocument: adfDocument,
66
- isNestedRender: isNestedRender
69
+ isNestedRender: isNestedRender,
70
+ onLoadComplete: onLoadComplete
67
71
  }), /*#__PURE__*/_react.default.createElement(_view.AnnotationView, {
68
72
  createAnalyticsEvent: createAnalyticsEvent
69
73
  }), children)))));
@@ -16,11 +16,9 @@ var AnnotationView = exports.AnnotationView = function AnnotationView(props) {
16
16
  var actionContext = (0, _react.useContext)(_RendererActionsContext.RendererContext);
17
17
  var inlineCommentProvider = providers && providers.inlineComment;
18
18
  var updateSubscriber = inlineCommentProvider && inlineCommentProvider.updateSubscriber || null;
19
- var isCommentsOnMediaAnalyticsEnabled = inlineCommentProvider === null || inlineCommentProvider === void 0 ? void 0 : inlineCommentProvider.isCommentsOnMediaAnalyticsEnabled;
20
19
  var viewComponentProps = (0, _hooks.useAnnotationClickEvent)({
21
20
  updateSubscriber: updateSubscriber,
22
- createAnalyticsEvent: props.createAnalyticsEvent,
23
- isCommentsOnMediaAnalyticsEnabled: isCommentsOnMediaAnalyticsEnabled
21
+ createAnalyticsEvent: props.createAnalyticsEvent
24
22
  });
25
23
  var ViewComponent = inlineCommentProvider && inlineCommentProvider.viewComponent;
26
24
  var deleteAnnotation = (0, _react.useMemo)(function () {
@@ -45,7 +45,7 @@ import { nodeToReact } from '../../react/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 = "110.6.0";
48
+ const packageVersion = "111.0.1";
49
49
  export const defaultNodeComponents = nodeToReact;
50
50
  export class Renderer extends PureComponent {
51
51
  constructor(props) {
@@ -72,8 +72,7 @@ export const useAnnotationClickEvent = props => {
72
72
  const [annotationClickEvent, setAnnotationClickEvent] = useState(null);
73
73
  const {
74
74
  updateSubscriber,
75
- createAnalyticsEvent,
76
- isCommentsOnMediaAnalyticsEnabled
75
+ createAnalyticsEvent
77
76
  } = props;
78
77
  const isInlineCommentsKbAccessible = FeatureGates.checkGate('inline_comments_keyboard_accessible_renderer');
79
78
  useLayoutEffect(() => {
@@ -98,10 +97,8 @@ export const useAnnotationClickEvent = props => {
98
97
  eventType: EVENT_TYPE.TRACK,
99
98
  attributes: {
100
99
  overlap: annotationsByType.length || 0,
101
- ...(isCommentsOnMediaAnalyticsEnabled && {
102
- targetNodeType: eventTargetType,
103
- method: viewMethod
104
- })
100
+ targetNodeType: eventTargetType,
101
+ method: viewMethod
105
102
  }
106
103
  }).fire(FabricChannel.editor);
107
104
  }
@@ -125,6 +122,6 @@ export const useAnnotationClickEvent = props => {
125
122
  updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
126
123
  updateSubscriber.off(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
127
124
  };
128
- }, [updateSubscriber, createAnalyticsEvent, isCommentsOnMediaAnalyticsEnabled, isInlineCommentsKbAccessible]);
125
+ }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
129
126
  return annotationClickEvent;
130
127
  };
@@ -4,7 +4,8 @@ import { ProvidersContext } from '../context';
4
4
  import { RendererContext as ActionsContext } from '../../RendererActionsContext';
5
5
  export const useLoadAnnotations = ({
6
6
  adfDocument,
7
- isNestedRender
7
+ isNestedRender,
8
+ onLoadComplete
8
9
  }) => {
9
10
  const actions = useContext(ActionsContext);
10
11
  const providers = useContext(ProvidersContext);
@@ -21,6 +22,9 @@ export const useLoadAnnotations = ({
21
22
  const annotations = actions.getAnnotationMarks();
22
23
  // we don't want to request integrators for state with an empty list of ids.
23
24
  if (!annotations.length) {
25
+ onLoadComplete && onLoadComplete({
26
+ numberOfUnresolvedInlineComments: 0
27
+ });
24
28
  return;
25
29
  }
26
30
  const ids = annotations.map(mark => mark.attrs.id);
@@ -33,7 +37,10 @@ export const useLoadAnnotations = ({
33
37
  [value.id]: value
34
38
  }), {});
35
39
  updateSubscriberInlineComment.emit(AnnotationUpdateEvent.SET_ANNOTATION_STATE, payload);
40
+ onLoadComplete && onLoadComplete({
41
+ numberOfUnresolvedInlineComments: data.filter(data => data.state === 'active').length
42
+ });
36
43
  };
37
44
  inlineCommentGetState(ids, isNestedRender).then(cb);
38
- }, [actions, providers, adfDocument, isNestedRender]);
45
+ }, [actions, providers, adfDocument, isNestedRender, onLoadComplete]);
39
46
  };
@@ -10,11 +10,13 @@ import { AnnotationRangeProvider } from './contexts/AnnotationRangeContext';
10
10
  import { AnnotationHoverContext } from './contexts/AnnotationHoverContext';
11
11
  const LoadAnnotations = /*#__PURE__*/React.memo(({
12
12
  adfDocument,
13
- isNestedRender
13
+ isNestedRender,
14
+ onLoadComplete
14
15
  }) => {
15
16
  useLoadAnnotations({
16
17
  adfDocument,
17
- isNestedRender
18
+ isNestedRender,
19
+ onLoadComplete
18
20
  });
19
21
  return null;
20
22
  });
@@ -25,7 +27,8 @@ export const AnnotationsWrapper = props => {
25
27
  annotationProvider,
26
28
  rendererRef,
27
29
  adfDocument,
28
- isNestedRender
30
+ isNestedRender,
31
+ onLoadComplete
29
32
  } = props;
30
33
  const updateSubscriber = annotationProvider && annotationProvider.inlineComment && annotationProvider.inlineComment.updateSubscriber;
31
34
  const inlineCommentAnnotationsState = useAnnotationStateByTypeEvent({
@@ -46,7 +49,8 @@ export const AnnotationsWrapper = props => {
46
49
  rendererRef: rendererRef
47
50
  }, /*#__PURE__*/React.createElement(LoadAnnotations, {
48
51
  adfDocument: adfDocument,
49
- isNestedRender: isNestedRender
52
+ isNestedRender: isNestedRender,
53
+ onLoadComplete: onLoadComplete
50
54
  }), /*#__PURE__*/React.createElement(AnnotationView, {
51
55
  createAnalyticsEvent: createAnalyticsEvent
52
56
  }), children)))));
@@ -7,11 +7,9 @@ const AnnotationView = props => {
7
7
  const actionContext = useContext(RendererContext);
8
8
  const inlineCommentProvider = providers && providers.inlineComment;
9
9
  const updateSubscriber = inlineCommentProvider && inlineCommentProvider.updateSubscriber || null;
10
- const isCommentsOnMediaAnalyticsEnabled = inlineCommentProvider === null || inlineCommentProvider === void 0 ? void 0 : inlineCommentProvider.isCommentsOnMediaAnalyticsEnabled;
11
10
  const viewComponentProps = useAnnotationClickEvent({
12
11
  updateSubscriber,
13
- createAnalyticsEvent: props.createAnalyticsEvent,
14
- isCommentsOnMediaAnalyticsEnabled
12
+ createAnalyticsEvent: props.createAnalyticsEvent
15
13
  });
16
14
  const ViewComponent = inlineCommentProvider && inlineCommentProvider.viewComponent;
17
15
  const deleteAnnotation = useMemo(() => annotationInfo => actionContext.deleteAnnotation(annotationInfo.id, annotationInfo.type), [actionContext]);
@@ -55,7 +55,7 @@ import { nodeToReact } from '../../react/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 = "110.6.0";
58
+ var packageVersion = "111.0.1";
59
59
  export var defaultNodeComponents = nodeToReact;
60
60
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
61
61
  _inherits(Renderer, _PureComponent);
@@ -76,8 +76,7 @@ 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,
80
- isCommentsOnMediaAnalyticsEnabled = props.isCommentsOnMediaAnalyticsEnabled;
79
+ createAnalyticsEvent = props.createAnalyticsEvent;
81
80
  var isInlineCommentsKbAccessible = FeatureGates.checkGate('inline_comments_keyboard_accessible_renderer');
82
81
  useLayoutEffect(function () {
83
82
  if (!updateSubscriber) {
@@ -102,12 +101,11 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
102
101
  actionSubject: ACTION_SUBJECT.ANNOTATION,
103
102
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
104
103
  eventType: EVENT_TYPE.TRACK,
105
- attributes: _objectSpread({
106
- overlap: annotationsByType.length || 0
107
- }, isCommentsOnMediaAnalyticsEnabled && {
104
+ attributes: {
105
+ overlap: annotationsByType.length || 0,
108
106
  targetNodeType: eventTargetType,
109
107
  method: viewMethod
110
- })
108
+ }
111
109
  }).fire(FabricChannel.editor);
112
110
  }
113
111
  setAnnotationClickEvent({
@@ -130,6 +128,6 @@ export var useAnnotationClickEvent = function useAnnotationClickEvent(props) {
130
128
  updateSubscriber.off(AnnotationUpdateEvent.ON_ANNOTATION_CLICK, clickCb);
131
129
  updateSubscriber.off(AnnotationUpdateEvent.DESELECT_ANNOTATIONS, deselectCb);
132
130
  };
133
- }, [updateSubscriber, createAnalyticsEvent, isCommentsOnMediaAnalyticsEnabled, isInlineCommentsKbAccessible]);
131
+ }, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
134
132
  return annotationClickEvent;
135
133
  };
@@ -7,7 +7,8 @@ import { ProvidersContext } from '../context';
7
7
  import { RendererContext as ActionsContext } from '../../RendererActionsContext';
8
8
  export var useLoadAnnotations = function useLoadAnnotations(_ref) {
9
9
  var adfDocument = _ref.adfDocument,
10
- isNestedRender = _ref.isNestedRender;
10
+ isNestedRender = _ref.isNestedRender,
11
+ onLoadComplete = _ref.onLoadComplete;
11
12
  var actions = useContext(ActionsContext);
12
13
  var providers = useContext(ProvidersContext);
13
14
  useEffect(function () {
@@ -20,6 +21,9 @@ export var useLoadAnnotations = function useLoadAnnotations(_ref) {
20
21
  var annotations = actions.getAnnotationMarks();
21
22
  // we don't want to request integrators for state with an empty list of ids.
22
23
  if (!annotations.length) {
24
+ onLoadComplete && onLoadComplete({
25
+ numberOfUnresolvedInlineComments: 0
26
+ });
23
27
  return;
24
28
  }
25
29
  var ids = annotations.map(function (mark) {
@@ -33,7 +37,12 @@ export var useLoadAnnotations = function useLoadAnnotations(_ref) {
33
37
  return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, value.id, value));
34
38
  }, {});
35
39
  updateSubscriberInlineComment.emit(AnnotationUpdateEvent.SET_ANNOTATION_STATE, payload);
40
+ onLoadComplete && onLoadComplete({
41
+ numberOfUnresolvedInlineComments: data.filter(function (data) {
42
+ return data.state === 'active';
43
+ }).length
44
+ });
36
45
  };
37
46
  inlineCommentGetState(ids, isNestedRender).then(cb);
38
- }, [actions, providers, adfDocument, isNestedRender]);
47
+ }, [actions, providers, adfDocument, isNestedRender, onLoadComplete]);
39
48
  };
@@ -10,10 +10,12 @@ import { AnnotationRangeProvider } from './contexts/AnnotationRangeContext';
10
10
  import { AnnotationHoverContext } from './contexts/AnnotationHoverContext';
11
11
  var LoadAnnotations = /*#__PURE__*/React.memo(function (_ref) {
12
12
  var adfDocument = _ref.adfDocument,
13
- isNestedRender = _ref.isNestedRender;
13
+ isNestedRender = _ref.isNestedRender,
14
+ onLoadComplete = _ref.onLoadComplete;
14
15
  useLoadAnnotations({
15
16
  adfDocument: adfDocument,
16
- isNestedRender: isNestedRender
17
+ isNestedRender: isNestedRender,
18
+ onLoadComplete: onLoadComplete
17
19
  });
18
20
  return null;
19
21
  });
@@ -23,7 +25,8 @@ export var AnnotationsWrapper = function AnnotationsWrapper(props) {
23
25
  annotationProvider = props.annotationProvider,
24
26
  rendererRef = props.rendererRef,
25
27
  adfDocument = props.adfDocument,
26
- isNestedRender = props.isNestedRender;
28
+ isNestedRender = props.isNestedRender,
29
+ onLoadComplete = props.onLoadComplete;
27
30
  var updateSubscriber = annotationProvider && annotationProvider.inlineComment && annotationProvider.inlineComment.updateSubscriber;
28
31
  var inlineCommentAnnotationsState = useAnnotationStateByTypeEvent({
29
32
  type: AnnotationTypes.INLINE_COMMENT,
@@ -42,7 +45,8 @@ export var AnnotationsWrapper = function AnnotationsWrapper(props) {
42
45
  rendererRef: rendererRef
43
46
  }, /*#__PURE__*/React.createElement(LoadAnnotations, {
44
47
  adfDocument: adfDocument,
45
- isNestedRender: isNestedRender
48
+ isNestedRender: isNestedRender,
49
+ onLoadComplete: onLoadComplete
46
50
  }), /*#__PURE__*/React.createElement(AnnotationView, {
47
51
  createAnalyticsEvent: createAnalyticsEvent
48
52
  }), children)))));
@@ -7,11 +7,9 @@ var AnnotationView = function AnnotationView(props) {
7
7
  var actionContext = useContext(RendererContext);
8
8
  var inlineCommentProvider = providers && providers.inlineComment;
9
9
  var updateSubscriber = inlineCommentProvider && inlineCommentProvider.updateSubscriber || null;
10
- var isCommentsOnMediaAnalyticsEnabled = inlineCommentProvider === null || inlineCommentProvider === void 0 ? void 0 : inlineCommentProvider.isCommentsOnMediaAnalyticsEnabled;
11
10
  var viewComponentProps = useAnnotationClickEvent({
12
11
  updateSubscriber: updateSubscriber,
13
- createAnalyticsEvent: props.createAnalyticsEvent,
14
- isCommentsOnMediaAnalyticsEnabled: isCommentsOnMediaAnalyticsEnabled
12
+ createAnalyticsEvent: props.createAnalyticsEvent
15
13
  });
16
14
  var ViewComponent = inlineCommentProvider && inlineCommentProvider.viewComponent;
17
15
  var deleteAnnotation = useMemo(function () {
@@ -3,12 +3,6 @@ export interface SmartLinksOptions {
3
3
  ssr?: boolean;
4
4
  showAuthTooltip?: boolean;
5
5
  hideHoverPreview?: boolean;
6
- /**
7
- * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-6348 Internal documentation for deprecation (no external access)}
8
- *
9
- * Prefer `actionOptions` prop.
10
- */
11
- showServerActions?: boolean;
12
6
  actionOptions?: CardProps['actionOptions'];
13
7
  frameStyle?: CardProps['frameStyle'];
14
8
  }
@@ -14,7 +14,5 @@ type UseAnnotationUpdateSatteByEventProps = {
14
14
  export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
15
15
  export declare const useHasFocusEvent: ({ id, updateSubscriber }: ListenEventProps) => boolean;
16
16
  type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
17
- export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, "createAnalyticsEvent" | "updateSubscriber"> & {
18
- isCommentsOnMediaAnalyticsEnabled?: boolean | undefined;
19
- }) => AnnotationsWithClickTarget;
17
+ export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
20
18
  export {};
@@ -2,6 +2,9 @@ import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
2
2
  type Props = {
3
3
  adfDocument: JSONDocNode;
4
4
  isNestedRender: boolean;
5
+ onLoadComplete?: ({ numberOfUnresolvedInlineComments, }: {
6
+ numberOfUnresolvedInlineComments: number;
7
+ }) => void;
5
8
  };
6
- export declare const useLoadAnnotations: ({ adfDocument, isNestedRender }: Props) => void;
9
+ export declare const useLoadAnnotations: ({ adfDocument, isNestedRender, onLoadComplete }: Props) => void;
7
10
  export {};
@@ -16,6 +16,9 @@ export type AnnotationsWrapperProps = React.PropsWithChildren<{
16
16
  annotationProvider: AnnotationProviders | null | undefined;
17
17
  rendererRef: React.RefObject<HTMLDivElement>;
18
18
  isNestedRender: boolean;
19
+ onLoadComplete?: ({ numberOfUnresolvedInlineComments, }: {
20
+ numberOfUnresolvedInlineComments: number;
21
+ }) => void;
19
22
  }>;
20
23
  export type TextPosition = {
21
24
  start: number;
@@ -3,12 +3,6 @@ export interface SmartLinksOptions {
3
3
  ssr?: boolean;
4
4
  showAuthTooltip?: boolean;
5
5
  hideHoverPreview?: boolean;
6
- /**
7
- * @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-6348 Internal documentation for deprecation (no external access)}
8
- *
9
- * Prefer `actionOptions` prop.
10
- */
11
- showServerActions?: boolean;
12
6
  actionOptions?: CardProps['actionOptions'];
13
7
  frameStyle?: CardProps['frameStyle'];
14
8
  }
@@ -14,7 +14,5 @@ type UseAnnotationUpdateSatteByEventProps = {
14
14
  export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
15
15
  export declare const useHasFocusEvent: ({ id, updateSubscriber }: ListenEventProps) => boolean;
16
16
  type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
17
- export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, "createAnalyticsEvent" | "updateSubscriber"> & {
18
- isCommentsOnMediaAnalyticsEnabled?: boolean | undefined;
19
- }) => AnnotationsWithClickTarget;
17
+ export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
20
18
  export {};
@@ -2,6 +2,9 @@ import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
2
2
  type Props = {
3
3
  adfDocument: JSONDocNode;
4
4
  isNestedRender: boolean;
5
+ onLoadComplete?: ({ numberOfUnresolvedInlineComments, }: {
6
+ numberOfUnresolvedInlineComments: number;
7
+ }) => void;
5
8
  };
6
- export declare const useLoadAnnotations: ({ adfDocument, isNestedRender }: Props) => void;
9
+ export declare const useLoadAnnotations: ({ adfDocument, isNestedRender, onLoadComplete }: Props) => void;
7
10
  export {};
@@ -16,6 +16,9 @@ export type AnnotationsWrapperProps = React.PropsWithChildren<{
16
16
  annotationProvider: AnnotationProviders | null | undefined;
17
17
  rendererRef: React.RefObject<HTMLDivElement>;
18
18
  isNestedRender: boolean;
19
+ onLoadComplete?: ({ numberOfUnresolvedInlineComments, }: {
20
+ numberOfUnresolvedInlineComments: number;
21
+ }) => void;
19
22
  }>;
20
23
  export type TextPosition = {
21
24
  start: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "110.6.0",
3
+ "version": "111.0.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/analytics-next": "^10.1.0",
30
30
  "@atlaskit/button": "^20.2.0",
31
31
  "@atlaskit/code": "^15.6.0",
32
- "@atlaskit/editor-common": "^91.2.0",
32
+ "@atlaskit/editor-common": "^92.0.0",
33
33
  "@atlaskit/editor-json-transformer": "^8.18.0",
34
34
  "@atlaskit/editor-palette": "1.6.1",
35
35
  "@atlaskit/editor-prosemirror": "6.0.0",
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/media-ui": "^25.15.0",
47
47
  "@atlaskit/media-viewer": "^48.10.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.3.0",
49
- "@atlaskit/smart-card": "^28.4.0",
49
+ "@atlaskit/smart-card": "^29.0.0",
50
50
  "@atlaskit/status": "^1.5.0",
51
51
  "@atlaskit/task-decision": "^17.11.0",
52
52
  "@atlaskit/theme": "^13.0.0",