@atlaskit/renderer 111.2.8 → 111.3.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 +24 -0
- package/dist/cjs/ui/MediaCard.js +42 -18
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/annotations/hooks/use-events.js +4 -3
- package/dist/cjs/ui/annotations/index.js +1 -0
- package/dist/cjs/ui/annotations/view/index.js +2 -1
- package/dist/es2019/ui/MediaCard.js +42 -18
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/annotations/hooks/use-events.js +4 -3
- package/dist/es2019/ui/annotations/index.js +1 -0
- package/dist/es2019/ui/annotations/view/index.js +2 -1
- package/dist/esm/ui/MediaCard.js +42 -18
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/annotations/hooks/use-events.js +4 -3
- package/dist/esm/ui/annotations/index.js +1 -0
- package/dist/esm/ui/annotations/view/index.js +2 -1
- package/dist/types/ui/annotations/hooks/use-events.d.ts +2 -1
- package/dist/types/ui/annotations/view/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/annotations/hooks/use-events.d.ts +2 -1
- package/dist/types-ts4.5/ui/annotations/view/index.d.ts +1 -0
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 111.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#156093](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/156093)
|
|
8
|
+
[`a5156f7d85a6d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a5156f7d85a6d) -
|
|
9
|
+
Changes related to the nested renderer causing multiple callback binding to the annotation click
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 111.2.9
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#155853](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155853)
|
|
20
|
+
[`1986c9bd0cc15`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1986c9bd0cc15) -
|
|
21
|
+
[ux] ED-25409 Support comments on media for external images in renderer
|
|
22
|
+
- [#155735](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155735)
|
|
23
|
+
[`1beeeda29023a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1beeeda29023a) -
|
|
24
|
+
Upgrades editor packages to react 18
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 111.2.8
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -21,6 +21,7 @@ var _traverse = require("@atlaskit/adf-utils/traverse");
|
|
|
21
21
|
var _mediaCard = require("@atlaskit/media-card");
|
|
22
22
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
23
23
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
24
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
24
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
27
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -215,7 +216,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
215
216
|
alt = _this$props4.alt,
|
|
216
217
|
featureFlags = _this$props4.featureFlags,
|
|
217
218
|
ssr = _this$props4.ssr,
|
|
218
|
-
mediaClient = _this$props4.mediaClient
|
|
219
|
+
mediaClient = _this$props4.mediaClient,
|
|
220
|
+
dataAttributes = _this$props4.dataAttributes;
|
|
219
221
|
if (imageStatus === 'loading' || !url) {
|
|
220
222
|
return this.renderLoadingCard();
|
|
221
223
|
}
|
|
@@ -227,23 +229,45 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
227
229
|
|
|
228
230
|
// we need this statement for the mandatory mediaClientConfig below
|
|
229
231
|
var mediaClientConfig = mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
232
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_external_media_comment_bugfix')) {
|
|
233
|
+
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, dataAttributes, {
|
|
234
|
+
"data-node-type": "media"
|
|
235
|
+
}), /*#__PURE__*/_react.default.createElement(_mediaCard.Card
|
|
236
|
+
// TODO MPT-315: clean up after we move mediaClientConfig into FileIdentifier
|
|
237
|
+
// context is not really used when the type is external and we want to render the component asap
|
|
238
|
+
, {
|
|
239
|
+
mediaClientConfig: mediaClientConfig,
|
|
240
|
+
alt: alt,
|
|
241
|
+
identifier: identifier,
|
|
242
|
+
dimensions: cardDimensions,
|
|
243
|
+
appearance: appearance,
|
|
244
|
+
resizeMode: resizeMode,
|
|
245
|
+
disableOverlay: disableOverlay,
|
|
246
|
+
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
247
|
+
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
248
|
+
featureFlags: featureFlags,
|
|
249
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
250
|
+
shouldHideTooltip: false
|
|
251
|
+
}));
|
|
252
|
+
} else {
|
|
253
|
+
return /*#__PURE__*/_react.default.createElement(_mediaCard.Card
|
|
254
|
+
// TODO MPT-315: clean up after we move mediaClientConfig into FileIdentifier
|
|
255
|
+
// context is not really used when the type is external and we want to render the component asap
|
|
256
|
+
, {
|
|
257
|
+
mediaClientConfig: mediaClientConfig,
|
|
258
|
+
alt: alt,
|
|
259
|
+
identifier: identifier,
|
|
260
|
+
dimensions: cardDimensions,
|
|
261
|
+
appearance: appearance,
|
|
262
|
+
resizeMode: resizeMode,
|
|
263
|
+
disableOverlay: disableOverlay,
|
|
264
|
+
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
265
|
+
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
266
|
+
featureFlags: featureFlags,
|
|
267
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
268
|
+
shouldHideTooltip: false
|
|
269
|
+
});
|
|
270
|
+
}
|
|
247
271
|
}
|
|
248
272
|
}, {
|
|
249
273
|
key: "render",
|
|
@@ -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.
|
|
68
|
+
var packageVersion = "111.3.0";
|
|
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 () {
|
|
@@ -5,6 +5,7 @@ import { filter } from '@atlaskit/adf-utils/traverse';
|
|
|
5
5
|
import { Card, CardLoading, CardError } from '@atlaskit/media-card';
|
|
6
6
|
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
7
7
|
import { withImageLoader } from '@atlaskit/editor-common/utils';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
export const mediaIdentifierMap = new Map();
|
|
9
10
|
export const getListOfIdentifiersFromDoc = doc => {
|
|
10
11
|
if (!doc) {
|
|
@@ -147,7 +148,8 @@ export class MediaCardView extends Component {
|
|
|
147
148
|
alt,
|
|
148
149
|
featureFlags,
|
|
149
150
|
ssr,
|
|
150
|
-
mediaClient
|
|
151
|
+
mediaClient,
|
|
152
|
+
dataAttributes
|
|
151
153
|
} = this.props;
|
|
152
154
|
if (imageStatus === 'loading' || !url) {
|
|
153
155
|
return this.renderLoadingCard();
|
|
@@ -160,23 +162,45 @@ export class MediaCardView extends Component {
|
|
|
160
162
|
|
|
161
163
|
// we need this statement for the mandatory mediaClientConfig below
|
|
162
164
|
const mediaClientConfig = mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
165
|
+
if (fg('platform_editor_external_media_comment_bugfix')) {
|
|
166
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, dataAttributes, {
|
|
167
|
+
"data-node-type": "media"
|
|
168
|
+
}), /*#__PURE__*/React.createElement(Card
|
|
169
|
+
// TODO MPT-315: clean up after we move mediaClientConfig into FileIdentifier
|
|
170
|
+
// context is not really used when the type is external and we want to render the component asap
|
|
171
|
+
, {
|
|
172
|
+
mediaClientConfig: mediaClientConfig,
|
|
173
|
+
alt: alt,
|
|
174
|
+
identifier: identifier,
|
|
175
|
+
dimensions: cardDimensions,
|
|
176
|
+
appearance: appearance,
|
|
177
|
+
resizeMode: resizeMode,
|
|
178
|
+
disableOverlay: disableOverlay,
|
|
179
|
+
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
180
|
+
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
181
|
+
featureFlags: featureFlags,
|
|
182
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
183
|
+
shouldHideTooltip: false
|
|
184
|
+
}));
|
|
185
|
+
} else {
|
|
186
|
+
return /*#__PURE__*/React.createElement(Card
|
|
187
|
+
// TODO MPT-315: clean up after we move mediaClientConfig into FileIdentifier
|
|
188
|
+
// context is not really used when the type is external and we want to render the component asap
|
|
189
|
+
, {
|
|
190
|
+
mediaClientConfig: mediaClientConfig,
|
|
191
|
+
alt: alt,
|
|
192
|
+
identifier: identifier,
|
|
193
|
+
dimensions: cardDimensions,
|
|
194
|
+
appearance: appearance,
|
|
195
|
+
resizeMode: resizeMode,
|
|
196
|
+
disableOverlay: disableOverlay,
|
|
197
|
+
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
198
|
+
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
199
|
+
featureFlags: featureFlags,
|
|
200
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
201
|
+
shouldHideTooltip: false
|
|
202
|
+
});
|
|
203
|
+
}
|
|
180
204
|
}
|
|
181
205
|
render() {
|
|
182
206
|
const {
|
|
@@ -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.
|
|
48
|
+
const packageVersion = "111.3.0";
|
|
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]);
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -17,6 +17,7 @@ import { filter } from '@atlaskit/adf-utils/traverse';
|
|
|
17
17
|
import { Card, CardLoading, CardError } from '@atlaskit/media-card';
|
|
18
18
|
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
19
19
|
import { withImageLoader } from '@atlaskit/editor-common/utils';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
21
|
export var mediaIdentifierMap = new Map();
|
|
21
22
|
export var getListOfIdentifiersFromDoc = function getListOfIdentifiersFromDoc(doc) {
|
|
22
23
|
if (!doc) {
|
|
@@ -205,7 +206,8 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
205
206
|
alt = _this$props4.alt,
|
|
206
207
|
featureFlags = _this$props4.featureFlags,
|
|
207
208
|
ssr = _this$props4.ssr,
|
|
208
|
-
mediaClient = _this$props4.mediaClient
|
|
209
|
+
mediaClient = _this$props4.mediaClient,
|
|
210
|
+
dataAttributes = _this$props4.dataAttributes;
|
|
209
211
|
if (imageStatus === 'loading' || !url) {
|
|
210
212
|
return this.renderLoadingCard();
|
|
211
213
|
}
|
|
@@ -217,23 +219,45 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
217
219
|
|
|
218
220
|
// we need this statement for the mandatory mediaClientConfig below
|
|
219
221
|
var mediaClientConfig = mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
222
|
+
if (fg('platform_editor_external_media_comment_bugfix')) {
|
|
223
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, dataAttributes, {
|
|
224
|
+
"data-node-type": "media"
|
|
225
|
+
}), /*#__PURE__*/React.createElement(Card
|
|
226
|
+
// TODO MPT-315: clean up after we move mediaClientConfig into FileIdentifier
|
|
227
|
+
// context is not really used when the type is external and we want to render the component asap
|
|
228
|
+
, {
|
|
229
|
+
mediaClientConfig: mediaClientConfig,
|
|
230
|
+
alt: alt,
|
|
231
|
+
identifier: identifier,
|
|
232
|
+
dimensions: cardDimensions,
|
|
233
|
+
appearance: appearance,
|
|
234
|
+
resizeMode: resizeMode,
|
|
235
|
+
disableOverlay: disableOverlay,
|
|
236
|
+
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
237
|
+
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
238
|
+
featureFlags: featureFlags,
|
|
239
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
240
|
+
shouldHideTooltip: false
|
|
241
|
+
}));
|
|
242
|
+
} else {
|
|
243
|
+
return /*#__PURE__*/React.createElement(Card
|
|
244
|
+
// TODO MPT-315: clean up after we move mediaClientConfig into FileIdentifier
|
|
245
|
+
// context is not really used when the type is external and we want to render the component asap
|
|
246
|
+
, {
|
|
247
|
+
mediaClientConfig: mediaClientConfig,
|
|
248
|
+
alt: alt,
|
|
249
|
+
identifier: identifier,
|
|
250
|
+
dimensions: cardDimensions,
|
|
251
|
+
appearance: appearance,
|
|
252
|
+
resizeMode: resizeMode,
|
|
253
|
+
disableOverlay: disableOverlay,
|
|
254
|
+
shouldOpenMediaViewer: shouldOpenMediaViewer,
|
|
255
|
+
mediaViewerItems: Array.from(mediaIdentifierMap.values()),
|
|
256
|
+
featureFlags: featureFlags,
|
|
257
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
258
|
+
shouldHideTooltip: false
|
|
259
|
+
});
|
|
260
|
+
}
|
|
237
261
|
}
|
|
238
262
|
}, {
|
|
239
263
|
key: "render",
|
|
@@ -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.
|
|
58
|
+
var packageVersion = "111.3.0";
|
|
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.
|
|
3
|
+
"version": "111.3.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@atlaskit/adf-schema": "^42.3.1",
|
|
26
|
-
"@atlaskit/adf-utils": "^19.
|
|
26
|
+
"@atlaskit/adf-utils": "^19.10.0",
|
|
27
27
|
"@atlaskit/analytics-listeners": "^8.11.0",
|
|
28
28
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
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.
|
|
32
|
+
"@atlaskit/editor-common": "^94.3.0",
|
|
33
33
|
"@atlaskit/editor-json-transformer": "^8.20.0",
|
|
34
|
-
"@atlaskit/editor-palette": "1.6.
|
|
34
|
+
"@atlaskit/editor-palette": "1.6.2",
|
|
35
35
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
36
36
|
"@atlaskit/editor-shared-styles": "^3.0.0",
|
|
37
37
|
"@atlaskit/emoji": "^67.8.0",
|
|
38
38
|
"@atlaskit/feature-gate-js-client": "^4.20.0",
|
|
39
|
-
"@atlaskit/icon": "^22.
|
|
39
|
+
"@atlaskit/icon": "^22.24.0",
|
|
40
40
|
"@atlaskit/link-datasource": "^3.6.0",
|
|
41
|
-
"@atlaskit/media-card": "^78.
|
|
41
|
+
"@atlaskit/media-card": "^78.8.0",
|
|
42
42
|
"@atlaskit/media-client": "^28.0.0",
|
|
43
43
|
"@atlaskit/media-client-react": "^2.2.0",
|
|
44
|
-
"@atlaskit/media-common": "^11.
|
|
44
|
+
"@atlaskit/media-common": "^11.7.0",
|
|
45
45
|
"@atlaskit/media-filmstrip": "^47.4.0",
|
|
46
46
|
"@atlaskit/media-ui": "^25.16.0",
|
|
47
47
|
"@atlaskit/media-viewer": "^49.2.0",
|
|
@@ -93,8 +93,6 @@
|
|
|
93
93
|
"jsdom": "^22.0.0",
|
|
94
94
|
"mockdate": "^3.0.5",
|
|
95
95
|
"puppeteer": "13.7.0",
|
|
96
|
-
"react": "^16.8.0",
|
|
97
|
-
"react-dom": "^16.8.0",
|
|
98
96
|
"react-live-clock": "^5.0.0",
|
|
99
97
|
"react-magnetic-di": "^3.1.4",
|
|
100
98
|
"react-moment": "^1.1.2",
|
|
@@ -136,6 +134,9 @@
|
|
|
136
134
|
},
|
|
137
135
|
"platform-datasources-enable-two-way-sync": {
|
|
138
136
|
"type": "boolean"
|
|
137
|
+
},
|
|
138
|
+
"platform_editor_external_media_comment_bugfix": {
|
|
139
|
+
"type": "boolean"
|
|
139
140
|
}
|
|
140
141
|
},
|
|
141
142
|
"af:exports": {
|