@atlaskit/renderer 110.6.0 → 111.0.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 +15 -0
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/hooks/use-events.js +5 -7
- package/dist/cjs/ui/annotations/view/index.js +1 -3
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/hooks/use-events.js +4 -7
- package/dist/es2019/ui/annotations/view/index.js +1 -3
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/hooks/use-events.js +5 -7
- package/dist/esm/ui/annotations/view/index.js +1 -3
- package/dist/types/types/smartLinksOptions.d.ts +0 -6
- package/dist/types/ui/annotations/hooks/use-events.d.ts +1 -3
- package/dist/types-ts4.5/types/smartLinksOptions.d.ts +0 -6
- package/dist/types-ts4.5/ui/annotations/hooks/use-events.d.ts +1 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 111.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#147220](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147220)
|
|
8
|
+
[`07a9416026f88`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/07a9416026f88) -
|
|
9
|
+
Remove showActions and showServerActions from smart-card
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#147094](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/147094)
|
|
14
|
+
[`9e12a8f47cfef`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9e12a8f47cfef) -
|
|
15
|
+
[ED-24721] Clean up FF `confluence.frontend.fabric.editor.comments-on-media-analytics`
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 110.6.0
|
|
4
19
|
|
|
5
20
|
### 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 = "
|
|
66
|
+
var packageVersion = "111.0.0";
|
|
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:
|
|
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,
|
|
138
|
+
}, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
|
|
141
139
|
return annotationClickEvent;
|
|
142
140
|
};
|
|
@@ -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 = "
|
|
48
|
+
const packageVersion = "111.0.0";
|
|
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
|
-
|
|
102
|
-
|
|
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,
|
|
125
|
+
}, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
|
|
129
126
|
return annotationClickEvent;
|
|
130
127
|
};
|
|
@@ -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 = "
|
|
58
|
+
var packageVersion = "111.0.0";
|
|
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:
|
|
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,
|
|
131
|
+
}, [updateSubscriber, createAnalyticsEvent, isInlineCommentsKbAccessible]);
|
|
134
132
|
return annotationClickEvent;
|
|
135
133
|
};
|
|
@@ -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,
|
|
18
|
-
isCommentsOnMediaAnalyticsEnabled?: boolean | undefined;
|
|
19
|
-
}) => AnnotationsWithClickTarget;
|
|
17
|
+
export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
|
|
20
18
|
export {};
|
|
@@ -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,
|
|
18
|
-
isCommentsOnMediaAnalyticsEnabled?: boolean | undefined;
|
|
19
|
-
}) => AnnotationsWithClickTarget;
|
|
17
|
+
export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
|
|
20
18
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "111.0.0",
|
|
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": "^
|
|
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": "^
|
|
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",
|