@atlaskit/renderer 120.4.1 → 120.4.2
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 +8 -0
- package/afm-passionfruit/tsconfig.json +135 -0
- package/afm-volt/tsconfig.json +10 -4
- package/dist/cjs/react/nodes/inlineCard.js +68 -33
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +11 -1
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/inlineCard.js +60 -28
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +11 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/inlineCard.js +69 -34
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +11 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 120.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`598cea2432fa9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/598cea2432fa9) -
|
|
8
|
+
[ux] UI and behaviour updates of the HoverLinkOverlay for the Preview Panels.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 120.4.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -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
|
},
|
|
@@ -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,
|
|
@@ -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.1";
|
|
67
67
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
68
68
|
containerName: 'ak-renderer-wrapper',
|
|
69
69
|
containerType: 'inline-size'
|
|
@@ -3,11 +3,12 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
* @jsxRuntime classic
|
|
4
4
|
* @jsx jsx
|
|
5
5
|
*/
|
|
6
|
-
import { Fragment, useState } from 'react';
|
|
6
|
+
import { Fragment, useState, useMemo } from 'react';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { jsx } from '@emotion/react';
|
|
9
9
|
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
10
10
|
import { Card, getObjectAri, getObjectIconUrl, getObjectName } from '@atlaskit/smart-card';
|
|
11
|
+
import { useSmartLinkActions } from '@atlaskit/smart-card/hooks';
|
|
11
12
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
12
13
|
import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
13
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -20,8 +21,61 @@ import { useInlineAnnotationProps } from '../../ui/annotations/element/useInline
|
|
|
20
21
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
21
22
|
const HoverLinkOverlayNoop = props => jsx(Fragment, null, props.children);
|
|
22
23
|
const HoverLinkOverlayWithCondition = componentWithCondition(() => fg('platform_editor_preview_panel_linking'), HoverLinkOverlay, HoverLinkOverlayNoop);
|
|
23
|
-
const
|
|
24
|
+
const OverlayWithCardContext = ({
|
|
25
|
+
rendererAppearance,
|
|
26
|
+
isResolvedViewRendered,
|
|
27
|
+
url,
|
|
28
|
+
children
|
|
29
|
+
}) => {
|
|
24
30
|
var _cardContext$value, _cardContext$value$st, _cardContext$value2, _cardContext$value2$i, _cardContext$value3;
|
|
31
|
+
const cardContext = useSmartCardContext();
|
|
32
|
+
// Note: useSmartLinkActions throws without smart card context. Using it here is safe
|
|
33
|
+
// because we checked cardContext availability in the parent component
|
|
34
|
+
const actions = useSmartLinkActions({
|
|
35
|
+
url,
|
|
36
|
+
appearance: 'inline'
|
|
37
|
+
});
|
|
38
|
+
const preview = useMemo(() => actions.find(action => action.id === 'preview-content'), [actions]);
|
|
39
|
+
const cardState = cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value = cardContext.value) === null || _cardContext$value === void 0 ? void 0 : (_cardContext$value$st = _cardContext$value.store) === null || _cardContext$value$st === void 0 ? void 0 : _cardContext$value$st.getState()[url || ''];
|
|
40
|
+
const ari = getObjectAri(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
41
|
+
const name = getObjectName(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
42
|
+
const iconUrl = getObjectIconUrl(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
43
|
+
const isPanelAvailable = ari && (cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : (_cardContext$value2$i = _cardContext$value2.isPreviewPanelAvailable) === null || _cardContext$value2$i === void 0 ? void 0 : _cardContext$value2$i.call(_cardContext$value2, {
|
|
44
|
+
ari
|
|
45
|
+
}));
|
|
46
|
+
const openPreviewPanel = cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value3 = cardContext.value) === null || _cardContext$value3 === void 0 ? void 0 : _cardContext$value3.openPreviewPanel;
|
|
47
|
+
const isPreviewPanelAvailable = Boolean(openPreviewPanel && isPanelAvailable);
|
|
48
|
+
const isPreviewModalAvailable = Boolean(preview);
|
|
49
|
+
const isPreviewAvailable = isPreviewModalAvailable || isPreviewPanelAvailable;
|
|
50
|
+
const showPanelButtonIcon = isPreviewPanelAvailable ? 'panel' : isPreviewModalAvailable ? 'modal' : undefined;
|
|
51
|
+
const Overlay = isPreviewAvailable ? HoverLinkOverlayWithCondition : HoverLinkOverlayNoop;
|
|
52
|
+
return jsx(Overlay, {
|
|
53
|
+
isVisible: isResolvedViewRendered,
|
|
54
|
+
url: url,
|
|
55
|
+
compactPadding: rendererAppearance === 'comment',
|
|
56
|
+
showPanelButton: isPreviewAvailable,
|
|
57
|
+
showPanelButtonIcon: showPanelButtonIcon,
|
|
58
|
+
onClick: event => {
|
|
59
|
+
if (isPreviewPanelAvailable) {
|
|
60
|
+
// Prevent anchor default behaviour(click to open the anchor link)
|
|
61
|
+
// When glance panel is available, let openPreviewPanel handle it
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
openPreviewPanel === null || openPreviewPanel === void 0 ? void 0 : openPreviewPanel({
|
|
64
|
+
url: url || '',
|
|
65
|
+
ari: ari || '',
|
|
66
|
+
name: name || '',
|
|
67
|
+
iconUrl
|
|
68
|
+
});
|
|
69
|
+
} else if (isPreviewModalAvailable) {
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
if (preview) {
|
|
72
|
+
preview.invoke();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, children);
|
|
77
|
+
};
|
|
78
|
+
const InlineCard = props => {
|
|
25
79
|
const {
|
|
26
80
|
url,
|
|
27
81
|
data,
|
|
@@ -94,27 +148,7 @@ const InlineCard = props => {
|
|
|
94
148
|
throw err;
|
|
95
149
|
}
|
|
96
150
|
};
|
|
97
|
-
const
|
|
98
|
-
const ari = getObjectAri(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
99
|
-
const name = getObjectName(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
100
|
-
const iconUrl = getObjectIconUrl(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
101
|
-
const isPanelAvailable = ari && (cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value2 = cardContext.value) === null || _cardContext$value2 === void 0 ? void 0 : (_cardContext$value2$i = _cardContext$value2.isPreviewPanelAvailable) === null || _cardContext$value2$i === void 0 ? void 0 : _cardContext$value2$i.call(_cardContext$value2, {
|
|
102
|
-
ari
|
|
103
|
-
}));
|
|
104
|
-
const openPreviewPanel = cardContext === null || cardContext === void 0 ? void 0 : (_cardContext$value3 = cardContext.value) === null || _cardContext$value3 === void 0 ? void 0 : _cardContext$value3.openPreviewPanel;
|
|
105
|
-
const handleOpenGlancePanelClick = event => {
|
|
106
|
-
if (openPreviewPanel && isPanelAvailable) {
|
|
107
|
-
// Prevent anchor default behaviour(click to open the anchor link)
|
|
108
|
-
// When glance panel is available, let openPreviewPanel handle it
|
|
109
|
-
event.preventDefault();
|
|
110
|
-
openPreviewPanel({
|
|
111
|
-
url: url || '',
|
|
112
|
-
ari,
|
|
113
|
-
name: name || '',
|
|
114
|
-
iconUrl
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
};
|
|
151
|
+
const MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
118
152
|
return jsx(AnalyticsContext, {
|
|
119
153
|
data: analyticsData
|
|
120
154
|
}, jsx("span", _extends({
|
|
@@ -127,12 +161,10 @@ const InlineCard = props => {
|
|
|
127
161
|
unsupportedComponent: UnsupportedInline
|
|
128
162
|
// Ignored via go/ees005
|
|
129
163
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
130
|
-
}, cardProps), jsx(
|
|
131
|
-
isVisible: isResolvedViewRendered,
|
|
164
|
+
}, cardProps), jsx(MaybeOverlay, {
|
|
132
165
|
url: url || '',
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
onClick: handleOpenGlancePanelClick
|
|
166
|
+
rendererAppearance: rendererAppearance,
|
|
167
|
+
isResolvedViewRendered: isResolvedViewRendered
|
|
136
168
|
}, jsx(Card, _extends({
|
|
137
169
|
appearance: "inline",
|
|
138
170
|
showHoverPreview: !hideHoverPreview,
|
|
@@ -916,6 +916,16 @@ const smartCardStylesAvatarMarginFix2 = css({
|
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
918
|
});
|
|
919
|
+
|
|
920
|
+
// In Renderer in Jira there is no SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, so using data-inline-cart="true"
|
|
921
|
+
const headerSmartCardStyles = css({
|
|
922
|
+
'[data-inline-card="true"]': {
|
|
923
|
+
'[data-inlinecard-button-overlay="icon-wrapper-line-height"] span': {
|
|
924
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
925
|
+
lineHeight: 0
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
});
|
|
919
929
|
const baseOtherStyles = css({
|
|
920
930
|
'& .UnknownBlock': {
|
|
921
931
|
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
@@ -1852,7 +1862,7 @@ export const RendererStyleContainer = props => {
|
|
|
1852
1862
|
'--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
|
|
1853
1863
|
'--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
|
|
1854
1864
|
},
|
|
1855
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1865
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('platform_editor_preview_panel_linking') && headerSmartCardStyles, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1856
1866
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1857
1867
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1858
1868
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -49,7 +49,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
49
49
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
50
50
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
51
51
|
const packageName = "@atlaskit/renderer";
|
|
52
|
-
const packageVersion = "120.4.
|
|
52
|
+
const packageVersion = "120.4.1";
|
|
53
53
|
const setAsQueryContainerStyles = css({
|
|
54
54
|
containerName: 'ak-renderer-wrapper',
|
|
55
55
|
containerType: 'inline-size'
|
|
@@ -4,11 +4,12 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
* @jsxRuntime classic
|
|
5
5
|
* @jsx jsx
|
|
6
6
|
*/
|
|
7
|
-
import { Fragment, useState } from 'react';
|
|
7
|
+
import { Fragment, useState, useMemo } from 'react';
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { jsx } from '@emotion/react';
|
|
10
10
|
import { useSmartCardContext } from '@atlaskit/link-provider';
|
|
11
11
|
import { Card, getObjectAri, getObjectIconUrl, getObjectName } from '@atlaskit/smart-card';
|
|
12
|
+
import { useSmartLinkActions } from '@atlaskit/smart-card/hooks';
|
|
12
13
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
13
14
|
import { HoverLinkOverlay, UnsupportedInline } from '@atlaskit/editor-common/ui';
|
|
14
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -25,8 +26,64 @@ var HoverLinkOverlayNoop = function HoverLinkOverlayNoop(props) {
|
|
|
25
26
|
var HoverLinkOverlayWithCondition = componentWithCondition(function () {
|
|
26
27
|
return fg('platform_editor_preview_panel_linking');
|
|
27
28
|
}, HoverLinkOverlay, HoverLinkOverlayNoop);
|
|
28
|
-
var
|
|
29
|
+
var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
29
30
|
var _cardContext$value, _cardContext$value2, _cardContext$value2$i, _cardContext$value3;
|
|
31
|
+
var rendererAppearance = _ref.rendererAppearance,
|
|
32
|
+
isResolvedViewRendered = _ref.isResolvedViewRendered,
|
|
33
|
+
url = _ref.url,
|
|
34
|
+
children = _ref.children;
|
|
35
|
+
var cardContext = useSmartCardContext();
|
|
36
|
+
// Note: useSmartLinkActions throws without smart card context. Using it here is safe
|
|
37
|
+
// because we checked cardContext availability in the parent component
|
|
38
|
+
var actions = useSmartLinkActions({
|
|
39
|
+
url: url,
|
|
40
|
+
appearance: 'inline'
|
|
41
|
+
});
|
|
42
|
+
var preview = useMemo(function () {
|
|
43
|
+
return actions.find(function (action) {
|
|
44
|
+
return action.id === 'preview-content';
|
|
45
|
+
});
|
|
46
|
+
}, [actions]);
|
|
47
|
+
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 || ''];
|
|
48
|
+
var ari = getObjectAri(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
49
|
+
var name = getObjectName(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
50
|
+
var iconUrl = getObjectIconUrl(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
51
|
+
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, {
|
|
52
|
+
ari: ari
|
|
53
|
+
}));
|
|
54
|
+
var openPreviewPanel = cardContext === null || cardContext === void 0 || (_cardContext$value3 = cardContext.value) === null || _cardContext$value3 === void 0 ? void 0 : _cardContext$value3.openPreviewPanel;
|
|
55
|
+
var isPreviewPanelAvailable = Boolean(openPreviewPanel && isPanelAvailable);
|
|
56
|
+
var isPreviewModalAvailable = Boolean(preview);
|
|
57
|
+
var isPreviewAvailable = isPreviewModalAvailable || isPreviewPanelAvailable;
|
|
58
|
+
var showPanelButtonIcon = isPreviewPanelAvailable ? 'panel' : isPreviewModalAvailable ? 'modal' : undefined;
|
|
59
|
+
var Overlay = isPreviewAvailable ? HoverLinkOverlayWithCondition : HoverLinkOverlayNoop;
|
|
60
|
+
return jsx(Overlay, {
|
|
61
|
+
isVisible: isResolvedViewRendered,
|
|
62
|
+
url: url,
|
|
63
|
+
compactPadding: rendererAppearance === 'comment',
|
|
64
|
+
showPanelButton: isPreviewAvailable,
|
|
65
|
+
showPanelButtonIcon: showPanelButtonIcon,
|
|
66
|
+
onClick: function onClick(event) {
|
|
67
|
+
if (isPreviewPanelAvailable) {
|
|
68
|
+
// Prevent anchor default behaviour(click to open the anchor link)
|
|
69
|
+
// When glance panel is available, let openPreviewPanel handle it
|
|
70
|
+
event.preventDefault();
|
|
71
|
+
openPreviewPanel === null || openPreviewPanel === void 0 || openPreviewPanel({
|
|
72
|
+
url: url || '',
|
|
73
|
+
ari: ari || '',
|
|
74
|
+
name: name || '',
|
|
75
|
+
iconUrl: iconUrl
|
|
76
|
+
});
|
|
77
|
+
} else if (isPreviewModalAvailable) {
|
|
78
|
+
event.preventDefault();
|
|
79
|
+
if (preview) {
|
|
80
|
+
preview.invoke();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, children);
|
|
85
|
+
};
|
|
86
|
+
var InlineCard = function InlineCard(props) {
|
|
30
87
|
var url = props.url,
|
|
31
88
|
data = props.data,
|
|
32
89
|
eventHandlers = props.eventHandlers,
|
|
@@ -45,10 +102,10 @@ var InlineCard = function InlineCard(props) {
|
|
|
45
102
|
onClick: onClick,
|
|
46
103
|
container: portal
|
|
47
104
|
};
|
|
48
|
-
var
|
|
49
|
-
hideHoverPreview =
|
|
50
|
-
actionOptions =
|
|
51
|
-
ssr =
|
|
105
|
+
var _ref2 = smartLinks || {},
|
|
106
|
+
hideHoverPreview = _ref2.hideHoverPreview,
|
|
107
|
+
actionOptions = _ref2.actionOptions,
|
|
108
|
+
ssr = _ref2.ssr;
|
|
52
109
|
var analyticsData = {
|
|
53
110
|
attributes: {
|
|
54
111
|
location: 'renderer'
|
|
@@ -92,33 +149,13 @@ var InlineCard = function InlineCard(props) {
|
|
|
92
149
|
onClick: onClick
|
|
93
150
|
}));
|
|
94
151
|
}
|
|
95
|
-
var onError = function onError(
|
|
96
|
-
var err =
|
|
152
|
+
var onError = function onError(_ref3) {
|
|
153
|
+
var err = _ref3.err;
|
|
97
154
|
if (err) {
|
|
98
155
|
throw err;
|
|
99
156
|
}
|
|
100
157
|
};
|
|
101
|
-
var
|
|
102
|
-
var ari = getObjectAri(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
103
|
-
var name = getObjectName(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
104
|
-
var iconUrl = getObjectIconUrl(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
105
|
-
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, {
|
|
106
|
-
ari: ari
|
|
107
|
-
}));
|
|
108
|
-
var openPreviewPanel = cardContext === null || cardContext === void 0 || (_cardContext$value3 = cardContext.value) === null || _cardContext$value3 === void 0 ? void 0 : _cardContext$value3.openPreviewPanel;
|
|
109
|
-
var handleOpenGlancePanelClick = function handleOpenGlancePanelClick(event) {
|
|
110
|
-
if (openPreviewPanel && isPanelAvailable) {
|
|
111
|
-
// Prevent anchor default behaviour(click to open the anchor link)
|
|
112
|
-
// When glance panel is available, let openPreviewPanel handle it
|
|
113
|
-
event.preventDefault();
|
|
114
|
-
openPreviewPanel({
|
|
115
|
-
url: url || '',
|
|
116
|
-
ari: ari,
|
|
117
|
-
name: name || '',
|
|
118
|
-
iconUrl: iconUrl
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
};
|
|
158
|
+
var MaybeOverlay = cardContext !== null && cardContext !== void 0 && cardContext.value ? OverlayWithCardContext : HoverLinkOverlayNoop;
|
|
122
159
|
return jsx(AnalyticsContext, {
|
|
123
160
|
data: analyticsData
|
|
124
161
|
}, jsx("span", _extends({
|
|
@@ -131,12 +168,10 @@ var InlineCard = function InlineCard(props) {
|
|
|
131
168
|
unsupportedComponent: UnsupportedInline
|
|
132
169
|
// Ignored via go/ees005
|
|
133
170
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
134
|
-
}, cardProps), jsx(
|
|
135
|
-
isVisible: isResolvedViewRendered,
|
|
171
|
+
}, cardProps), jsx(MaybeOverlay, {
|
|
136
172
|
url: url || '',
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
onClick: handleOpenGlancePanelClick
|
|
173
|
+
rendererAppearance: rendererAppearance,
|
|
174
|
+
isResolvedViewRendered: isResolvedViewRendered
|
|
140
175
|
}, jsx(Card, _extends({
|
|
141
176
|
appearance: "inline",
|
|
142
177
|
showHoverPreview: !hideHoverPreview,
|
|
@@ -774,6 +774,16 @@ var smartCardStylesAvatarMarginFix2 = css(_defineProperty({}, ".".concat(SmartCa
|
|
|
774
774
|
marginTop: 0
|
|
775
775
|
}
|
|
776
776
|
}));
|
|
777
|
+
|
|
778
|
+
// In Renderer in Jira there is no SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, so using data-inline-cart="true"
|
|
779
|
+
var headerSmartCardStyles = css({
|
|
780
|
+
'[data-inline-card="true"]': {
|
|
781
|
+
'[data-inlinecard-button-overlay="icon-wrapper-line-height"] span': {
|
|
782
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
783
|
+
lineHeight: 0
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
});
|
|
777
787
|
var baseOtherStyles = css(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
778
788
|
'& .UnknownBlock': {
|
|
779
789
|
fontFamily: "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
@@ -1446,7 +1456,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
|
|
|
1446
1456
|
'--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
|
|
1447
1457
|
'--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
|
|
1448
1458
|
},
|
|
1449
|
-
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1459
|
+
css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, appearance === 'full-width' && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, telepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, fg('platform_editor_typography_ugc') ? paragraphSharedStylesWithEditorUGC : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, fg('platform_editor_preview_panel_linking') && headerSmartCardStyles, fg('smartcard_avatar_margin_fix') && smartCardStylesAvatarMarginFix, fg('platform_editor_avatar_group_margin_fix') && smartCardStylesAvatarMarginFix2,
|
|
1450
1460
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
1451
1461
|
fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
|
|
1452
1462
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning, @atlaskit/platform/ensure-feature-flag-prefix
|
|
@@ -54,7 +54,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
54
54
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
55
55
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
var packageName = "@atlaskit/renderer";
|
|
57
|
-
var packageVersion = "120.4.
|
|
57
|
+
var packageVersion = "120.4.1";
|
|
58
58
|
var setAsQueryContainerStyles = css({
|
|
59
59
|
containerName: 'ak-renderer-wrapper',
|
|
60
60
|
containerType: 'inline-size'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "120.4.
|
|
3
|
+
"version": "120.4.2",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
38
38
|
"@atlaskit/emoji": "^69.3.0",
|
|
39
39
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
40
|
-
"@atlaskit/icon": "^27.
|
|
40
|
+
"@atlaskit/icon": "^27.12.0",
|
|
41
41
|
"@atlaskit/link": "^3.2.0",
|
|
42
42
|
"@atlaskit/link-datasource": "^4.19.0",
|
|
43
43
|
"@atlaskit/media-card": "^79.5.0",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"@atlaskit/media-viewer": "^52.4.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
51
|
"@atlaskit/platform-feature-flags-react": "^0.2.0",
|
|
52
|
-
"@atlaskit/react-ufo": "^4.
|
|
53
|
-
"@atlaskit/smart-card": "^40.
|
|
52
|
+
"@atlaskit/react-ufo": "^4.3.0",
|
|
53
|
+
"@atlaskit/smart-card": "^40.10.0",
|
|
54
54
|
"@atlaskit/status": "^3.0.0",
|
|
55
55
|
"@atlaskit/task-decision": "^19.2.0",
|
|
56
56
|
"@atlaskit/theme": "^19.0.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^9.28.0",
|
|
58
58
|
"@atlaskit/tokens": "^6.0.0",
|
|
59
59
|
"@atlaskit/tooltip": "^20.4.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uuid": "^3.1.0"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@atlaskit/editor-common": "^107.
|
|
71
|
+
"@atlaskit/editor-common": "^107.23.0",
|
|
72
72
|
"@atlaskit/link-provider": "^3.4.0",
|
|
73
73
|
"@atlaskit/media-core": "^37.0.0",
|
|
74
74
|
"react": "^18.2.0",
|
|
@@ -85,11 +85,11 @@
|
|
|
85
85
|
"@atlaskit/linking-common": "^9.2.0",
|
|
86
86
|
"@atlaskit/media-core": "^37.0.0",
|
|
87
87
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
88
|
-
"@atlaskit/media-test-helpers": "^
|
|
88
|
+
"@atlaskit/media-test-helpers": "^38.0.0",
|
|
89
89
|
"@atlaskit/mention": "^24.2.0",
|
|
90
90
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
91
91
|
"@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-d1445f2f74.patch",
|
|
92
|
-
"@atlaskit/profilecard": "^24.
|
|
92
|
+
"@atlaskit/profilecard": "^24.5.0",
|
|
93
93
|
"@atlaskit/util-data-test": "^18.1.0",
|
|
94
94
|
"@atlaskit/visual-regression": "workspace:^",
|
|
95
95
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|