@atlaskit/renderer 133.3.2 → 133.4.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 +12 -0
- package/dist/cjs/react/index.js +9 -7
- package/dist/cjs/ui/MediaCard.js +3 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/index.js +8 -7
- package/dist/es2019/ui/MediaCard.js +3 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/index.js +9 -7
- package/dist/esm/ui/MediaCard.js +3 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/ui/MediaCard.d.ts +6 -0
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 133.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`19773530cd51c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/19773530cd51c) -
|
|
8
|
+
Add fallbackMediaNameFetcher support to MediaCard (FileCard) and MediaViewer (header display),
|
|
9
|
+
gated behind the platform_editor_media_name_fallback_viewer_card experiment
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 133.3.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/cjs/react/index.js
CHANGED
|
@@ -500,7 +500,8 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
500
500
|
var _this6 = this,
|
|
501
501
|
_this$media,
|
|
502
502
|
_this$media2,
|
|
503
|
-
_this$media3
|
|
503
|
+
_this$media3,
|
|
504
|
+
_this$media4;
|
|
504
505
|
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
505
506
|
var _node$type$schema$mar = node.type.schema.marks,
|
|
506
507
|
annotation = _node$type$schema$mar.annotation,
|
|
@@ -536,6 +537,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
536
537
|
allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
|
|
537
538
|
enableSyncMediaCard: (_this$media2 = this.media) === null || _this$media2 === void 0 ? void 0 : _this$media2.enableSyncMediaCard,
|
|
538
539
|
mediaViewerExtensions: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.mediaViewerExtensions,
|
|
540
|
+
fallbackMediaNameFetcher: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.fallbackMediaNameFetcher,
|
|
539
541
|
nestedUnder: nestedUnder
|
|
540
542
|
});
|
|
541
543
|
}
|
|
@@ -588,22 +590,22 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
588
590
|
}, {
|
|
589
591
|
key: "getMediaGroupProps",
|
|
590
592
|
value: function getMediaGroupProps(node) {
|
|
591
|
-
var _this$
|
|
593
|
+
var _this$media5, _this$media6;
|
|
592
594
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
593
595
|
shouldOpenMediaViewer: this.shouldOpenMediaViewer,
|
|
594
596
|
allowAltTextOnImages: this.allowAltTextOnImages,
|
|
595
597
|
featureFlags: this.media && this.media.featureFlags,
|
|
596
|
-
enableDownloadButton: (_this$
|
|
597
|
-
ssr: (_this$
|
|
598
|
+
enableDownloadButton: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.enableDownloadButton,
|
|
599
|
+
ssr: (_this$media6 = this.media) === null || _this$media6 === void 0 ? void 0 : _this$media6.ssr
|
|
598
600
|
});
|
|
599
601
|
}
|
|
600
602
|
}, {
|
|
601
603
|
key: "getMediaInlineProps",
|
|
602
604
|
value: function getMediaInlineProps(node) {
|
|
603
|
-
var _this$
|
|
605
|
+
var _this$media7, _this$media8;
|
|
604
606
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
605
|
-
ssr: (_this$
|
|
606
|
-
fallbackMediaNameFetcher: (_this$
|
|
607
|
+
ssr: (_this$media7 = this.media) === null || _this$media7 === void 0 ? void 0 : _this$media7.ssr,
|
|
608
|
+
fallbackMediaNameFetcher: (_this$media8 = this.media) === null || _this$media8 === void 0 ? void 0 : _this$media8.fallbackMediaNameFetcher
|
|
607
609
|
});
|
|
608
610
|
}
|
|
609
611
|
}, {
|
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -308,7 +308,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
308
308
|
dataAttributes = _this$props7.dataAttributes,
|
|
309
309
|
enableSyncMediaCard = _this$props7.enableSyncMediaCard,
|
|
310
310
|
localId = _this$props7.localId,
|
|
311
|
-
mediaViewerExtensions = _this$props7.mediaViewerExtensions
|
|
311
|
+
mediaViewerExtensions = _this$props7.mediaViewerExtensions,
|
|
312
|
+
fallbackMediaNameFetcher = _this$props7.fallbackMediaNameFetcher;
|
|
312
313
|
var isMobile = false;
|
|
313
314
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
314
315
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
@@ -370,6 +371,7 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
370
371
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
371
372
|
shouldHideTooltip: isMobile,
|
|
372
373
|
mediaViewerExtensions: mediaViewerExtensions,
|
|
374
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
373
375
|
onError: (0, _expValEquals.expValEquals)('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
374
376
|
}));
|
|
375
377
|
}
|
|
@@ -72,7 +72,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
72
72
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
73
73
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
74
74
|
var packageName = "@atlaskit/renderer";
|
|
75
|
-
var packageVersion = "133.3.
|
|
75
|
+
var packageVersion = "133.3.2";
|
|
76
76
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
77
77
|
containerName: 'ak-renderer-wrapper',
|
|
78
78
|
containerType: 'inline-size'
|
|
@@ -456,7 +456,7 @@ export default class ReactSerializer {
|
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
458
|
getMediaProps(node, path = []) {
|
|
459
|
-
var _this$media, _this$media2, _this$media3;
|
|
459
|
+
var _this$media, _this$media2, _this$media3, _this$media4;
|
|
460
460
|
const {
|
|
461
461
|
marks: {
|
|
462
462
|
annotation,
|
|
@@ -487,6 +487,7 @@ export default class ReactSerializer {
|
|
|
487
487
|
allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
|
|
488
488
|
enableSyncMediaCard: (_this$media2 = this.media) === null || _this$media2 === void 0 ? void 0 : _this$media2.enableSyncMediaCard,
|
|
489
489
|
mediaViewerExtensions: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.mediaViewerExtensions,
|
|
490
|
+
fallbackMediaNameFetcher: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.fallbackMediaNameFetcher,
|
|
490
491
|
nestedUnder
|
|
491
492
|
};
|
|
492
493
|
}
|
|
@@ -527,22 +528,22 @@ export default class ReactSerializer {
|
|
|
527
528
|
};
|
|
528
529
|
}
|
|
529
530
|
getMediaGroupProps(node) {
|
|
530
|
-
var _this$
|
|
531
|
+
var _this$media5, _this$media6;
|
|
531
532
|
return {
|
|
532
533
|
...this.getProps(node),
|
|
533
534
|
shouldOpenMediaViewer: this.shouldOpenMediaViewer,
|
|
534
535
|
allowAltTextOnImages: this.allowAltTextOnImages,
|
|
535
536
|
featureFlags: this.media && this.media.featureFlags,
|
|
536
|
-
enableDownloadButton: (_this$
|
|
537
|
-
ssr: (_this$
|
|
537
|
+
enableDownloadButton: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.enableDownloadButton,
|
|
538
|
+
ssr: (_this$media6 = this.media) === null || _this$media6 === void 0 ? void 0 : _this$media6.ssr
|
|
538
539
|
};
|
|
539
540
|
}
|
|
540
541
|
getMediaInlineProps(node) {
|
|
541
|
-
var _this$
|
|
542
|
+
var _this$media7, _this$media8;
|
|
542
543
|
return {
|
|
543
544
|
...this.getProps(node),
|
|
544
|
-
ssr: (_this$
|
|
545
|
-
fallbackMediaNameFetcher: (_this$
|
|
545
|
+
ssr: (_this$media7 = this.media) === null || _this$media7 === void 0 ? void 0 : _this$media7.ssr,
|
|
546
|
+
fallbackMediaNameFetcher: (_this$media8 = this.media) === null || _this$media8 === void 0 ? void 0 : _this$media8.fallbackMediaNameFetcher
|
|
546
547
|
};
|
|
547
548
|
}
|
|
548
549
|
getTaskItemProps(node, path = []) {
|
|
@@ -247,7 +247,8 @@ export class MediaCardView extends Component {
|
|
|
247
247
|
dataAttributes,
|
|
248
248
|
enableSyncMediaCard,
|
|
249
249
|
localId,
|
|
250
|
-
mediaViewerExtensions
|
|
250
|
+
mediaViewerExtensions,
|
|
251
|
+
fallbackMediaNameFetcher
|
|
251
252
|
} = this.props;
|
|
252
253
|
const isMobile = false;
|
|
253
254
|
const shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
@@ -310,6 +311,7 @@ export class MediaCardView extends Component {
|
|
|
310
311
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
311
312
|
shouldHideTooltip: isMobile,
|
|
312
313
|
mediaViewerExtensions: mediaViewerExtensions,
|
|
314
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
313
315
|
onError: expValEquals('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
314
316
|
}));
|
|
315
317
|
}
|
|
@@ -58,7 +58,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
58
58
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
59
59
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
60
60
|
const packageName = "@atlaskit/renderer";
|
|
61
|
-
const packageVersion = "133.3.
|
|
61
|
+
const packageVersion = "133.3.2";
|
|
62
62
|
const setAsQueryContainerStyles = css({
|
|
63
63
|
containerName: 'ak-renderer-wrapper',
|
|
64
64
|
containerType: 'inline-size'
|
package/dist/esm/react/index.js
CHANGED
|
@@ -493,7 +493,8 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
493
493
|
var _this6 = this,
|
|
494
494
|
_this$media,
|
|
495
495
|
_this$media2,
|
|
496
|
-
_this$media3
|
|
496
|
+
_this$media3,
|
|
497
|
+
_this$media4;
|
|
497
498
|
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
498
499
|
var _node$type$schema$mar = node.type.schema.marks,
|
|
499
500
|
annotation = _node$type$schema$mar.annotation,
|
|
@@ -529,6 +530,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
529
530
|
allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
|
|
530
531
|
enableSyncMediaCard: (_this$media2 = this.media) === null || _this$media2 === void 0 ? void 0 : _this$media2.enableSyncMediaCard,
|
|
531
532
|
mediaViewerExtensions: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.mediaViewerExtensions,
|
|
533
|
+
fallbackMediaNameFetcher: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.fallbackMediaNameFetcher,
|
|
532
534
|
nestedUnder: nestedUnder
|
|
533
535
|
});
|
|
534
536
|
}
|
|
@@ -581,22 +583,22 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
581
583
|
}, {
|
|
582
584
|
key: "getMediaGroupProps",
|
|
583
585
|
value: function getMediaGroupProps(node) {
|
|
584
|
-
var _this$
|
|
586
|
+
var _this$media5, _this$media6;
|
|
585
587
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
586
588
|
shouldOpenMediaViewer: this.shouldOpenMediaViewer,
|
|
587
589
|
allowAltTextOnImages: this.allowAltTextOnImages,
|
|
588
590
|
featureFlags: this.media && this.media.featureFlags,
|
|
589
|
-
enableDownloadButton: (_this$
|
|
590
|
-
ssr: (_this$
|
|
591
|
+
enableDownloadButton: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.enableDownloadButton,
|
|
592
|
+
ssr: (_this$media6 = this.media) === null || _this$media6 === void 0 ? void 0 : _this$media6.ssr
|
|
591
593
|
});
|
|
592
594
|
}
|
|
593
595
|
}, {
|
|
594
596
|
key: "getMediaInlineProps",
|
|
595
597
|
value: function getMediaInlineProps(node) {
|
|
596
|
-
var _this$
|
|
598
|
+
var _this$media7, _this$media8;
|
|
597
599
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
598
|
-
ssr: (_this$
|
|
599
|
-
fallbackMediaNameFetcher: (_this$
|
|
600
|
+
ssr: (_this$media7 = this.media) === null || _this$media7 === void 0 ? void 0 : _this$media7.ssr,
|
|
601
|
+
fallbackMediaNameFetcher: (_this$media8 = this.media) === null || _this$media8 === void 0 ? void 0 : _this$media8.fallbackMediaNameFetcher
|
|
600
602
|
});
|
|
601
603
|
}
|
|
602
604
|
}, {
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -299,7 +299,8 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
299
299
|
dataAttributes = _this$props7.dataAttributes,
|
|
300
300
|
enableSyncMediaCard = _this$props7.enableSyncMediaCard,
|
|
301
301
|
localId = _this$props7.localId,
|
|
302
|
-
mediaViewerExtensions = _this$props7.mediaViewerExtensions
|
|
302
|
+
mediaViewerExtensions = _this$props7.mediaViewerExtensions,
|
|
303
|
+
fallbackMediaNameFetcher = _this$props7.fallbackMediaNameFetcher;
|
|
303
304
|
var isMobile = false;
|
|
304
305
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
305
306
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
@@ -361,6 +362,7 @@ export var MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
361
362
|
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode,
|
|
362
363
|
shouldHideTooltip: isMobile,
|
|
363
364
|
mediaViewerExtensions: mediaViewerExtensions,
|
|
365
|
+
fallbackMediaNameFetcher: fallbackMediaNameFetcher,
|
|
364
366
|
onError: expValEquals('platform_editor_media_error_analytics', 'isEnabled', true) ? this.onError : undefined
|
|
365
367
|
}));
|
|
366
368
|
}
|
|
@@ -63,7 +63,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
63
63
|
var TABLE_INFO_TIMEOUT = 10000;
|
|
64
64
|
var RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
65
65
|
var packageName = "@atlaskit/renderer";
|
|
66
|
-
var packageVersion = "133.3.
|
|
66
|
+
var packageVersion = "133.3.2";
|
|
67
67
|
var setAsQueryContainerStyles = css({
|
|
68
68
|
containerName: 'ak-renderer-wrapper',
|
|
69
69
|
containerType: 'inline-size'
|
|
@@ -29,6 +29,12 @@ export interface MediaCardProps {
|
|
|
29
29
|
onClick?: CardOnClickCallback;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Optional fallback fetcher to retrieve the media filename from another service.
|
|
34
|
+
* Workaround for #hot-301450 where media service is missing filenames for DC -> Cloud migrated media.
|
|
35
|
+
* Receives the file ID and should resolve to the filename string.
|
|
36
|
+
*/
|
|
37
|
+
fallbackMediaNameFetcher?: (id: string) => Promise<string>;
|
|
32
38
|
featureFlags?: MediaFeatureFlags;
|
|
33
39
|
id?: string;
|
|
34
40
|
imageStatus?: ImageStatus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "133.
|
|
3
|
+
"version": "133.4.0",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^
|
|
33
|
+
"@atlaskit/adf-schema": "^56.0.0",
|
|
34
34
|
"@atlaskit/adf-utils": "^20.0.0",
|
|
35
35
|
"@atlaskit/afm-i18n-platform-editor-renderer": "2.158.0",
|
|
36
36
|
"@atlaskit/analytics-listeners": "^11.0.0",
|
|
37
37
|
"@atlaskit/analytics-namespaced-context": "^8.0.0",
|
|
38
38
|
"@atlaskit/analytics-next": "^12.0.0",
|
|
39
39
|
"@atlaskit/browser-apis": "^1.0.0",
|
|
40
|
-
"@atlaskit/button": "^24.
|
|
40
|
+
"@atlaskit/button": "^24.1.0",
|
|
41
41
|
"@atlaskit/code": "^18.0.0",
|
|
42
42
|
"@atlaskit/editor-json-transformer": "^9.0.0",
|
|
43
43
|
"@atlaskit/editor-palette": "^3.1.0",
|
|
@@ -49,24 +49,24 @@
|
|
|
49
49
|
"@atlaskit/icon": "^36.0.0",
|
|
50
50
|
"@atlaskit/link": "^4.0.0",
|
|
51
51
|
"@atlaskit/link-datasource": "^6.0.0",
|
|
52
|
-
"@atlaskit/link-extractors": "^3.
|
|
52
|
+
"@atlaskit/link-extractors": "^3.1.0",
|
|
53
53
|
"@atlaskit/linking-common": "^10.0.0",
|
|
54
|
-
"@atlaskit/media-card": "^81.
|
|
54
|
+
"@atlaskit/media-card": "^81.1.0",
|
|
55
55
|
"@atlaskit/media-client": "^37.0.0",
|
|
56
56
|
"@atlaskit/media-client-react": "^6.0.0",
|
|
57
57
|
"@atlaskit/media-common": "^14.0.0",
|
|
58
|
-
"@atlaskit/media-filmstrip": "^52.
|
|
58
|
+
"@atlaskit/media-filmstrip": "^52.1.0",
|
|
59
59
|
"@atlaskit/media-ui": "^30.1.0",
|
|
60
|
-
"@atlaskit/media-viewer": "^54.
|
|
60
|
+
"@atlaskit/media-viewer": "^54.1.0",
|
|
61
61
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
62
62
|
"@atlaskit/platform-feature-flags-react": "^1.0.0",
|
|
63
63
|
"@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
|
|
64
64
|
"@atlaskit/react-ufo": "^7.1.0",
|
|
65
|
-
"@atlaskit/smart-card": "^45.
|
|
65
|
+
"@atlaskit/smart-card": "^45.2.0",
|
|
66
66
|
"@atlaskit/status": "^5.1.0",
|
|
67
67
|
"@atlaskit/task-decision": "^21.1.0",
|
|
68
68
|
"@atlaskit/theme": "^26.0.0",
|
|
69
|
-
"@atlaskit/tmp-editor-statsig": "^108.
|
|
69
|
+
"@atlaskit/tmp-editor-statsig": "^108.3.0",
|
|
70
70
|
"@atlaskit/tokens": "^14.0.0",
|
|
71
71
|
"@atlaskit/tooltip": "^23.0.0",
|
|
72
72
|
"@atlaskit/visually-hidden": "^4.0.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"uuid": "^3.1.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"@atlaskit/editor-common": "^116.
|
|
84
|
+
"@atlaskit/editor-common": "^116.4.0",
|
|
85
85
|
"@atlaskit/link-provider": "^5.0.0",
|
|
86
86
|
"@atlaskit/media-core": "^38.0.0",
|
|
87
87
|
"react": "^18.2.0",
|