@atlaskit/renderer 120.4.1 → 120.4.3
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 +19 -0
- package/actions/package.json +1 -1
- package/afm-passionfruit/tsconfig.json +135 -0
- package/afm-volt/tsconfig.json +10 -4
- package/consts/package.json +1 -1
- package/custom-nodes/package.json +1 -1
- package/dist/cjs/react/index.js +9 -7
- package/dist/cjs/react/nodes/inlineCard.js +68 -33
- package/dist/cjs/react/nodes/orderedList.js +1 -2
- package/dist/cjs/ui/MediaCard.js +9 -4
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +11 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/index.js +8 -7
- package/dist/es2019/react/nodes/inlineCard.js +60 -28
- package/dist/es2019/react/nodes/orderedList.js +1 -2
- package/dist/es2019/ui/MediaCard.js +8 -3
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +11 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/index.js +9 -7
- package/dist/esm/react/nodes/inlineCard.js +69 -34
- package/dist/esm/react/nodes/orderedList.js +1 -2
- package/dist/esm/ui/MediaCard.js +8 -3
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +11 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/types/mediaOptions.d.ts +1 -0
- package/dist/types/ui/MediaCard.d.ts +1 -0
- package/dist/types-ts4.5/types/mediaOptions.d.ts +1 -0
- package/dist/types-ts4.5/ui/MediaCard.d.ts +1 -0
- package/experimental-sync-custom-nodes/cards/package.json +1 -1
- package/experimental-sync-custom-nodes/media/package.json +1 -1
- package/experimental-sync-custom-nodes/small-nodes/package.json +1 -1
- package/messages/package.json +1 -1
- package/package.json +11 -11
- package/render-document/package.json +1 -1
- package/renderer-context/package.json +1 -1
- package/serializer/package.json +1 -1
- package/text-serializer/package.json +1 -1
- package/use-feature-flags/package.json +1 -1
- package/utils/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 120.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0198dcd9d80fe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0198dcd9d80fe) -
|
|
8
|
+
Added the enableSyncMediaCard media toggle, that loads the MediaCard in sync without
|
|
9
|
+
react-loadable.
|
|
10
|
+
- [`3fff102f55da9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3fff102f55da9) -
|
|
11
|
+
Cleanup FG platform_editor_ol_padding_fix
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 120.4.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`598cea2432fa9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/598cea2432fa9) -
|
|
19
|
+
[ux] UI and behaviour updates of the HoverLinkOverlay for the Preview Panels.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 120.4.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/actions/package.json
CHANGED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../../tsconfig.entry-points.passionfruit.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"target": "es5",
|
|
6
|
+
"outDir": "../../../../../passionfruit/tsDist/@atlaskit__renderer/app",
|
|
7
|
+
"rootDir": "../",
|
|
8
|
+
"composite": true
|
|
9
|
+
},
|
|
10
|
+
"include": [
|
|
11
|
+
"../src/**/*.ts",
|
|
12
|
+
"../src/**/*.tsx"
|
|
13
|
+
],
|
|
14
|
+
"exclude": [
|
|
15
|
+
"../src/**/__tests__/*",
|
|
16
|
+
"../src/**/*.test.*",
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
24
|
+
],
|
|
25
|
+
"references": [
|
|
26
|
+
{
|
|
27
|
+
"path": "../../adf-utils/afm-passionfruit/tsconfig.json"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "../../../analytics/analytics-listeners/afm-passionfruit/tsconfig.json"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "../../../analytics/analytics-namespaced-context/afm-passionfruit/tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"path": "../../../analytics/analytics-next/afm-passionfruit/tsconfig.json"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "../../../design-system/button/afm-passionfruit/tsconfig.json"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "../../../design-system/code/afm-passionfruit/tsconfig.json"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"path": "../../editor-json-transformer/afm-passionfruit/tsconfig.json"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "../../editor-palette/afm-passionfruit/tsconfig.json"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"path": "../../editor-shared-styles/afm-passionfruit/tsconfig.json"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"path": "../../editor-tables/afm-passionfruit/tsconfig.json"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"path": "../../../elements/emoji/afm-passionfruit/tsconfig.json"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"path": "../../../measurement/feature-gate-js-client/afm-passionfruit/tsconfig.json"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"path": "../../../design-system/icon/afm-passionfruit/tsconfig.json"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"path": "../../../design-system/link/afm-passionfruit/tsconfig.json"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"path": "../../../linking-platform/link-datasource/afm-passionfruit/tsconfig.json"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "../../../media/media-card/afm-passionfruit/tsconfig.json"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "../../../media/media-client/afm-passionfruit/tsconfig.json"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "../../../media/media-client-react/afm-passionfruit/tsconfig.json"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "../../../media/media-common/afm-passionfruit/tsconfig.json"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"path": "../../../media/media-filmstrip/afm-passionfruit/tsconfig.json"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"path": "../../../media/media-ui/afm-passionfruit/tsconfig.json"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "../../../media/media-viewer/afm-passionfruit/tsconfig.json"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"path": "../../../platform/feature-flags/afm-passionfruit/tsconfig.json"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"path": "../../../platform/feature-flags-react/afm-passionfruit/tsconfig.json"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"path": "../../../react-ufo/atlaskit/afm-passionfruit/tsconfig.json"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"path": "../../../linking-platform/smart-card/afm-passionfruit/tsconfig.json"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"path": "../../../elements/status/afm-passionfruit/tsconfig.json"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"path": "../../../elements/task-decision/afm-passionfruit/tsconfig.json"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"path": "../../../design-system/theme/afm-passionfruit/tsconfig.json"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"path": "../../tmp-editor-statsig/afm-passionfruit/tsconfig.json"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"path": "../../../design-system/tokens/afm-passionfruit/tsconfig.json"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"path": "../../../design-system/tooltip/afm-passionfruit/tsconfig.json"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"path": "../../../design-system/visually-hidden/afm-passionfruit/tsconfig.json"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"path": "../../editor-common/afm-passionfruit/tsconfig.json"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"path": "../../../linking-platform/link-provider/afm-passionfruit/tsconfig.json"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"path": "../../../media/media-core/afm-passionfruit/tsconfig.json"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
package/afm-volt/tsconfig.json
CHANGED
|
@@ -14,7 +14,13 @@
|
|
|
14
14
|
"exclude": [
|
|
15
15
|
"../src/**/__tests__/*",
|
|
16
16
|
"../src/**/*.test.*",
|
|
17
|
-
"../src/**/test.*"
|
|
17
|
+
"../src/**/test.*",
|
|
18
|
+
"../src/**/examples.*",
|
|
19
|
+
"../src/**/examples/*",
|
|
20
|
+
"../src/**/examples/**/*",
|
|
21
|
+
"../src/**/*.stories.*",
|
|
22
|
+
"../src/**/stories/*",
|
|
23
|
+
"../src/**/stories/**/*"
|
|
18
24
|
],
|
|
19
25
|
"references": [
|
|
20
26
|
{
|
|
@@ -35,9 +41,6 @@
|
|
|
35
41
|
{
|
|
36
42
|
"path": "../../../design-system/code/afm-volt/tsconfig.json"
|
|
37
43
|
},
|
|
38
|
-
{
|
|
39
|
-
"path": "../../editor-common/afm-volt/tsconfig.json"
|
|
40
|
-
},
|
|
41
44
|
{
|
|
42
45
|
"path": "../../editor-json-transformer/afm-volt/tsconfig.json"
|
|
43
46
|
},
|
|
@@ -119,6 +122,9 @@
|
|
|
119
122
|
{
|
|
120
123
|
"path": "../../../design-system/visually-hidden/afm-volt/tsconfig.json"
|
|
121
124
|
},
|
|
125
|
+
{
|
|
126
|
+
"path": "../../editor-common/afm-volt/tsconfig.json"
|
|
127
|
+
},
|
|
122
128
|
{
|
|
123
129
|
"path": "../../../linking-platform/link-provider/afm-volt/tsconfig.json"
|
|
124
130
|
},
|
package/consts/package.json
CHANGED
package/dist/cjs/react/index.js
CHANGED
|
@@ -460,7 +460,8 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
460
460
|
key: "getMediaProps",
|
|
461
461
|
value: function getMediaProps(node) {
|
|
462
462
|
var _this6 = this,
|
|
463
|
-
_this$media
|
|
463
|
+
_this$media,
|
|
464
|
+
_this$media2;
|
|
464
465
|
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
465
466
|
var _node$type$schema$mar = node.type.schema.marks,
|
|
466
467
|
annotation = _node$type$schema$mar.annotation,
|
|
@@ -491,7 +492,8 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
491
492
|
shouldOpenMediaViewer: this.shouldOpenMediaViewer,
|
|
492
493
|
ssr: (_this$media = this.media) === null || _this$media === void 0 ? void 0 : _this$media.ssr,
|
|
493
494
|
// surroundTextNodesWithTextWrapper checks inlineComment.allowDraftMode
|
|
494
|
-
allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper
|
|
495
|
+
allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
|
|
496
|
+
enableSyncMediaCard: (_this$media2 = this.media) === null || _this$media2 === void 0 ? void 0 : _this$media2.enableSyncMediaCard
|
|
495
497
|
});
|
|
496
498
|
}
|
|
497
499
|
}, {
|
|
@@ -532,21 +534,21 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
|
|
|
532
534
|
}, {
|
|
533
535
|
key: "getMediaGroupProps",
|
|
534
536
|
value: function getMediaGroupProps(node) {
|
|
535
|
-
var _this$
|
|
537
|
+
var _this$media3, _this$media4;
|
|
536
538
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
537
539
|
shouldOpenMediaViewer: this.shouldOpenMediaViewer,
|
|
538
540
|
allowAltTextOnImages: this.allowAltTextOnImages,
|
|
539
541
|
featureFlags: this.media && this.media.featureFlags,
|
|
540
|
-
enableDownloadButton: (_this$
|
|
541
|
-
ssr: (_this$
|
|
542
|
+
enableDownloadButton: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.enableDownloadButton,
|
|
543
|
+
ssr: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.ssr
|
|
542
544
|
});
|
|
543
545
|
}
|
|
544
546
|
}, {
|
|
545
547
|
key: "getMediaInlineProps",
|
|
546
548
|
value: function getMediaInlineProps(node) {
|
|
547
|
-
var _this$
|
|
549
|
+
var _this$media5;
|
|
548
550
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
549
|
-
ssr: (_this$
|
|
551
|
+
ssr: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.ssr
|
|
550
552
|
});
|
|
551
553
|
}
|
|
552
554
|
}, {
|
|
@@ -11,6 +11,7 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
13
13
|
var _smartCard = require("@atlaskit/smart-card");
|
|
14
|
+
var _hooks = require("@atlaskit/smart-card/hooks");
|
|
14
15
|
var _ssr = require("@atlaskit/smart-card/ssr");
|
|
15
16
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
16
17
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -34,8 +35,64 @@ var HoverLinkOverlayNoop = function HoverLinkOverlayNoop(props) {
|
|
|
34
35
|
var HoverLinkOverlayWithCondition = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
35
36
|
return (0, _platformFeatureFlags.fg)('platform_editor_preview_panel_linking');
|
|
36
37
|
}, _ui.HoverLinkOverlay, HoverLinkOverlayNoop);
|
|
37
|
-
var
|
|
38
|
+
var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
38
39
|
var _cardContext$value, _cardContext$value2, _cardContext$value2$i, _cardContext$value3;
|
|
40
|
+
var rendererAppearance = _ref.rendererAppearance,
|
|
41
|
+
isResolvedViewRendered = _ref.isResolvedViewRendered,
|
|
42
|
+
url = _ref.url,
|
|
43
|
+
children = _ref.children;
|
|
44
|
+
var cardContext = (0, _linkProvider.useSmartCardContext)();
|
|
45
|
+
// Note: useSmartLinkActions throws without smart card context. Using it here is safe
|
|
46
|
+
// because we checked cardContext availability in the parent component
|
|
47
|
+
var actions = (0, _hooks.useSmartLinkActions)({
|
|
48
|
+
url: url,
|
|
49
|
+
appearance: 'inline'
|
|
50
|
+
});
|
|
51
|
+
var preview = (0, _react.useMemo)(function () {
|
|
52
|
+
return actions.find(function (action) {
|
|
53
|
+
return action.id === 'preview-content';
|
|
54
|
+
});
|
|
55
|
+
}, [actions]);
|
|
56
|
+
var cardState = cardContext === null || cardContext === void 0 || (_cardContext$value = cardContext.value) === null || _cardContext$value === void 0 || (_cardContext$value = _cardContext$value.store) === null || _cardContext$value === void 0 ? void 0 : _cardContext$value.getState()[url || ''];
|
|
57
|
+
var ari = (0, _smartCard.getObjectAri)(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
58
|
+
var name = (0, _smartCard.getObjectName)(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
59
|
+
var iconUrl = (0, _smartCard.getObjectIconUrl)(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
60
|
+
var isPanelAvailable = ari && (cardContext === null || cardContext === void 0 || (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 || (_cardContext$value2$i = _cardContext$value2.isPreviewPanelAvailable) === null || _cardContext$value2$i === void 0 ? void 0 : _cardContext$value2$i.call(_cardContext$value2, {
|
|
61
|
+
ari: ari
|
|
62
|
+
}));
|
|
63
|
+
var openPreviewPanel = cardContext === null || cardContext === void 0 || (_cardContext$value3 = cardContext.value) === null || _cardContext$value3 === void 0 ? void 0 : _cardContext$value3.openPreviewPanel;
|
|
64
|
+
var isPreviewPanelAvailable = Boolean(openPreviewPanel && isPanelAvailable);
|
|
65
|
+
var isPreviewModalAvailable = Boolean(preview);
|
|
66
|
+
var isPreviewAvailable = isPreviewModalAvailable || isPreviewPanelAvailable;
|
|
67
|
+
var showPanelButtonIcon = isPreviewPanelAvailable ? 'panel' : isPreviewModalAvailable ? 'modal' : undefined;
|
|
68
|
+
var Overlay = isPreviewAvailable ? HoverLinkOverlayWithCondition : HoverLinkOverlayNoop;
|
|
69
|
+
return (0, _react2.jsx)(Overlay, {
|
|
70
|
+
isVisible: isResolvedViewRendered,
|
|
71
|
+
url: url,
|
|
72
|
+
compactPadding: rendererAppearance === 'comment',
|
|
73
|
+
showPanelButton: isPreviewAvailable,
|
|
74
|
+
showPanelButtonIcon: showPanelButtonIcon,
|
|
75
|
+
onClick: function onClick(event) {
|
|
76
|
+
if (isPreviewPanelAvailable) {
|
|
77
|
+
// Prevent anchor default behaviour(click to open the anchor link)
|
|
78
|
+
// When glance panel is available, let openPreviewPanel handle it
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
openPreviewPanel === null || openPreviewPanel === void 0 || openPreviewPanel({
|
|
81
|
+
url: url || '',
|
|
82
|
+
ari: ari || '',
|
|
83
|
+
name: name || '',
|
|
84
|
+
iconUrl: iconUrl
|
|
85
|
+
});
|
|
86
|
+
} else if (isPreviewModalAvailable) {
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
if (preview) {
|
|
89
|
+
preview.invoke();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, children);
|
|
94
|
+
};
|
|
95
|
+
var InlineCard = function InlineCard(props) {
|
|
39
96
|
var url = props.url,
|
|
40
97
|
data = props.data,
|
|
41
98
|
eventHandlers = props.eventHandlers,
|
|
@@ -54,10 +111,10 @@ var InlineCard = function InlineCard(props) {
|
|
|
54
111
|
onClick: onClick,
|
|
55
112
|
container: portal
|
|
56
113
|
};
|
|
57
|
-
var
|
|
58
|
-
hideHoverPreview =
|
|
59
|
-
actionOptions =
|
|
60
|
-
ssr =
|
|
114
|
+
var _ref2 = smartLinks || {},
|
|
115
|
+
hideHoverPreview = _ref2.hideHoverPreview,
|
|
116
|
+
actionOptions = _ref2.actionOptions,
|
|
117
|
+
ssr = _ref2.ssr;
|
|
61
118
|
var analyticsData = {
|
|
62
119
|
attributes: {
|
|
63
120
|
location: 'renderer'
|
|
@@ -101,33 +158,13 @@ var InlineCard = function InlineCard(props) {
|
|
|
101
158
|
onClick: onClick
|
|
102
159
|
}));
|
|
103
160
|
}
|
|
104
|
-
var onError = function onError(
|
|
105
|
-
var err =
|
|
161
|
+
var onError = function onError(_ref3) {
|
|
162
|
+
var err = _ref3.err;
|
|
106
163
|
if (err) {
|
|
107
164
|
throw err;
|
|
108
165
|
}
|
|
109
166
|
};
|
|
110
|
-
var
|
|
111
|
-
var ari = (0, _smartCard.getObjectAri)(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
112
|
-
var name = (0, _smartCard.getObjectName)(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
113
|
-
var iconUrl = (0, _smartCard.getObjectIconUrl)(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
114
|
-
var isPanelAvailable = ari && (cardContext === null || cardContext === void 0 || (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 || (_cardContext$value2$i = _cardContext$value2.isPreviewPanelAvailable) === null || _cardContext$value2$i === void 0 ? void 0 : _cardContext$value2$i.call(_cardContext$value2, {
|
|
115
|
-
ari: ari
|
|
116
|
-
}));
|
|
117
|
-
var openPreviewPanel = cardContext === null || cardContext === void 0 || (_cardContext$value3 = cardContext.value) === null || _cardContext$value3 === void 0 ? void 0 : _cardContext$value3.openPreviewPanel;
|
|
118
|
-
var handleOpenGlancePanelClick = function handleOpenGlancePanelClick(event) {
|
|
119
|
-
if (openPreviewPanel && isPanelAvailable) {
|
|
120
|
-
// Prevent anchor default behaviour(click to open the anchor link)
|
|
121
|
-
// When glance panel is available, let openPreviewPanel handle it
|
|
122
|
-
event.preventDefault();
|
|
123
|
-
openPreviewPanel({
|
|
124
|
-
url: url || '',
|
|
125
|
-
ari: ari,
|
|
126
|
-
name: name || '',
|
|
127
|
-
iconUrl: iconUrl
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
};
|
|
167
|
+
var MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
131
168
|
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
132
169
|
data: analyticsData
|
|
133
170
|
}, (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
@@ -140,12 +177,10 @@ var InlineCard = function InlineCard(props) {
|
|
|
140
177
|
unsupportedComponent: _ui.UnsupportedInline
|
|
141
178
|
// Ignored via go/ees005
|
|
142
179
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
143
|
-
}, cardProps), (0, _react2.jsx)(
|
|
144
|
-
isVisible: isResolvedViewRendered,
|
|
180
|
+
}, cardProps), (0, _react2.jsx)(MaybeOverlay, {
|
|
145
181
|
url: url || '',
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
onClick: handleOpenGlancePanelClick
|
|
182
|
+
rendererAppearance: rendererAppearance,
|
|
183
|
+
isResolvedViewRendered: isResolvedViewRendered
|
|
149
184
|
}, (0, _react2.jsx)(_smartCard.Card, (0, _extends2.default)({
|
|
150
185
|
appearance: "inline",
|
|
151
186
|
showHoverPreview: !hideHoverPreview,
|
|
@@ -11,7 +11,6 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
11
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
13
|
var _lists = require("../utils/lists");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
function OrderedList(props) {
|
|
16
15
|
var _props$content;
|
|
17
16
|
var extraProps = {};
|
|
@@ -19,7 +18,7 @@ function OrderedList(props) {
|
|
|
19
18
|
order: props.order,
|
|
20
19
|
itemsCount: props === null || props === void 0 || (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
|
|
21
20
|
});
|
|
22
|
-
if (itemCounterDigitsSize && itemCounterDigitsSize >
|
|
21
|
+
if (itemCounterDigitsSize && itemCounterDigitsSize > 1) {
|
|
23
22
|
extraProps.style = (0, _styles.getOrderedListInlineStyles)(itemCounterDigitsSize, 'object');
|
|
24
23
|
}
|
|
25
24
|
if (props.order !== undefined) {
|
package/dist/cjs/ui/MediaCard.js
CHANGED
|
@@ -17,6 +17,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
var _traverse = require("@atlaskit/adf-utils/traverse");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _mediaCard = require("@atlaskit/media-card");
|
|
21
22
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
22
23
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -216,7 +217,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
216
217
|
featureFlags = _this$props4.featureFlags,
|
|
217
218
|
ssr = _this$props4.ssr,
|
|
218
219
|
mediaClient = _this$props4.mediaClient,
|
|
219
|
-
dataAttributes = _this$props4.dataAttributes
|
|
220
|
+
dataAttributes = _this$props4.dataAttributes,
|
|
221
|
+
enableSyncMediaCard = _this$props4.enableSyncMediaCard;
|
|
220
222
|
if (imageStatus === 'loading' || !url) {
|
|
221
223
|
return this.renderLoadingCard();
|
|
222
224
|
}
|
|
@@ -228,13 +230,14 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
228
230
|
|
|
229
231
|
// we need this statement for the mandatory mediaClientConfig below
|
|
230
232
|
var mediaClientConfig = mediaClient === null || mediaClient === void 0 ? void 0 : mediaClient.mediaClientConfig;
|
|
233
|
+
var Card = enableSyncMediaCard && (0, _platformFeatureFlags.fg)('jfp-magma-ssr-iv-editor-media') ? _mediaCard.CardSync : _mediaCard.Card;
|
|
231
234
|
return (
|
|
232
235
|
/*#__PURE__*/
|
|
233
236
|
// Ignored via go/ees005
|
|
234
237
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
235
238
|
_react.default.createElement("div", (0, _extends2.default)({}, dataAttributes, {
|
|
236
239
|
"data-node-type": "media"
|
|
237
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
240
|
+
}), /*#__PURE__*/_react.default.createElement(Card
|
|
238
241
|
// TODO: MPT-315 - clean up after we move mediaClientConfig into FileIdentifier
|
|
239
242
|
// context is not really used when the type is external and we want to render the component asap
|
|
240
243
|
// Ignored via go/ees005
|
|
@@ -277,7 +280,8 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
277
280
|
shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
|
|
278
281
|
ssr = _this$props5.ssr,
|
|
279
282
|
mediaClient = _this$props5.mediaClient,
|
|
280
|
-
dataAttributes = _this$props5.dataAttributes
|
|
283
|
+
dataAttributes = _this$props5.dataAttributes,
|
|
284
|
+
enableSyncMediaCard = _this$props5.enableSyncMediaCard;
|
|
281
285
|
var isMobile = false;
|
|
282
286
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
283
287
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
@@ -305,6 +309,7 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
305
309
|
collectionName: collection,
|
|
306
310
|
occurrenceKey: occurrenceKey
|
|
307
311
|
};
|
|
312
|
+
var Card = enableSyncMediaCard && (0, _platformFeatureFlags.fg)('jfp-magma-ssr-iv-editor-media') ? _mediaCard.CardSync : _mediaCard.Card;
|
|
308
313
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, getClipboardAttrs({
|
|
309
314
|
id: id,
|
|
310
315
|
alt: alt,
|
|
@@ -312,7 +317,7 @@ var MediaCardView = exports.MediaCardView = /*#__PURE__*/function (_Component) {
|
|
|
312
317
|
contextIdentifierProvider: contextIdentifierProvider,
|
|
313
318
|
originalDimensions: originalDimensions,
|
|
314
319
|
fileState: fileState
|
|
315
|
-
}), dataAttributes), /*#__PURE__*/_react.default.createElement(
|
|
320
|
+
}), dataAttributes), /*#__PURE__*/_react.default.createElement(Card, {
|
|
316
321
|
identifier: identifier,
|
|
317
322
|
alt: alt,
|
|
318
323
|
contextId: contextId,
|
|
@@ -781,6 +781,16 @@ var smartCardStylesAvatarMarginFix2 = (0, _react.css)((0, _defineProperty2.defau
|
|
|
781
781
|
marginTop: 0
|
|
782
782
|
}
|
|
783
783
|
}));
|
|
784
|
+
|
|
785
|
+
// In Renderer in Jira there is no SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, so using data-inline-cart="true"
|
|
786
|
+
var headerSmartCardStyles = (0, _react.css)({
|
|
787
|
+
'[data-inline-card="true"]': {
|
|
788
|
+
'[data-inlinecard-button-overlay="icon-wrapper-line-height"] span': {
|
|
789
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
790
|
+
lineHeight: 0
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
});
|
|
784
794
|
var baseOtherStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
785
795
|
'& .UnknownBlock': {
|
|
786
796
|
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
@@ -1453,7 +1463,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
|
|
|
1453
1463
|
'--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
|
|
1454
1464
|
'--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
|
|
1455
1465
|
},
|
|
1456
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, _browser.browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _platformFeatureFlags.fg)('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, (0, _platformFeatureFlags.fg)('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1466
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, _browser.browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _platformFeatureFlags.fg)('platform_editor_preview_panel_linking') && headerSmartCardStyles, (0, _platformFeatureFlags.fg)('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, (0, _platformFeatureFlags.fg)('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1457
1467
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1458
1468
|
(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1459
1469
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -63,7 +63,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
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 = "120.4.
|
|
66
|
+
var packageVersion = "120.4.2";
|
|
67
67
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
68
68
|
containerName: 'ak-renderer-wrapper',
|
|
69
69
|
containerType: 'inline-size'
|
|
@@ -419,7 +419,7 @@ export default class ReactSerializer {
|
|
|
419
419
|
};
|
|
420
420
|
}
|
|
421
421
|
getMediaProps(node, path = []) {
|
|
422
|
-
var _this$media;
|
|
422
|
+
var _this$media, _this$media2;
|
|
423
423
|
const {
|
|
424
424
|
marks: {
|
|
425
425
|
annotation,
|
|
@@ -445,7 +445,8 @@ export default class ReactSerializer {
|
|
|
445
445
|
shouldOpenMediaViewer: this.shouldOpenMediaViewer,
|
|
446
446
|
ssr: (_this$media = this.media) === null || _this$media === void 0 ? void 0 : _this$media.ssr,
|
|
447
447
|
// surroundTextNodesWithTextWrapper checks inlineComment.allowDraftMode
|
|
448
|
-
allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper
|
|
448
|
+
allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
|
|
449
|
+
enableSyncMediaCard: (_this$media2 = this.media) === null || _this$media2 === void 0 ? void 0 : _this$media2.enableSyncMediaCard
|
|
449
450
|
};
|
|
450
451
|
}
|
|
451
452
|
getExtensionProps(node, path = []) {
|
|
@@ -476,21 +477,21 @@ export default class ReactSerializer {
|
|
|
476
477
|
};
|
|
477
478
|
}
|
|
478
479
|
getMediaGroupProps(node) {
|
|
479
|
-
var _this$
|
|
480
|
+
var _this$media3, _this$media4;
|
|
480
481
|
return {
|
|
481
482
|
...this.getProps(node),
|
|
482
483
|
shouldOpenMediaViewer: this.shouldOpenMediaViewer,
|
|
483
484
|
allowAltTextOnImages: this.allowAltTextOnImages,
|
|
484
485
|
featureFlags: this.media && this.media.featureFlags,
|
|
485
|
-
enableDownloadButton: (_this$
|
|
486
|
-
ssr: (_this$
|
|
486
|
+
enableDownloadButton: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.enableDownloadButton,
|
|
487
|
+
ssr: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.ssr
|
|
487
488
|
};
|
|
488
489
|
}
|
|
489
490
|
getMediaInlineProps(node) {
|
|
490
|
-
var _this$
|
|
491
|
+
var _this$media5;
|
|
491
492
|
return {
|
|
492
493
|
...this.getProps(node),
|
|
493
|
-
ssr: (_this$
|
|
494
|
+
ssr: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.ssr
|
|
494
495
|
};
|
|
495
496
|
}
|
|
496
497
|
getTaskItemProps(node, path = []) {
|