@atlaskit/smart-card 39.2.2 → 39.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 +19 -0
- package/dist/cjs/extractors/flexible/index.js +3 -7
- package/dist/cjs/state/flexible-ui-context/index.js +3 -24
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +8 -21
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.js +6 -16
- package/dist/cjs/view/BlockCard/views/utils/index.js +3 -10
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/index.js +7 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +7 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +7 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +14 -46
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +5 -12
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +8 -20
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +3 -22
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +8 -28
- package/dist/cjs/view/FlexibleCard/components/container/index.js +36 -126
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/elements/title-element/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/index.js +11 -30
- package/dist/cjs/view/FlexibleCard/utils.js +3 -7
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +10 -22
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +8 -21
- package/dist/cjs/view/HoverCard/styled.js +1 -12
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +0 -3
- package/dist/es2019/extractors/flexible/index.js +2 -7
- package/dist/es2019/state/flexible-ui-context/index.js +2 -23
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +10 -23
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.js +7 -17
- package/dist/es2019/view/BlockCard/views/utils/index.js +2 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/index.js +5 -16
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +5 -16
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +5 -16
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +12 -44
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +3 -10
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +7 -18
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +4 -24
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +7 -26
- package/dist/es2019/view/FlexibleCard/components/container/index.js +8 -100
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +6 -2
- package/dist/es2019/view/FlexibleCard/components/elements/title-element/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/index.js +14 -33
- package/dist/es2019/view/FlexibleCard/utils.js +4 -8
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -2
- package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +10 -22
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +9 -22
- package/dist/es2019/view/HoverCard/styled.js +0 -11
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +0 -3
- package/dist/esm/extractors/flexible/index.js +4 -8
- package/dist/esm/state/flexible-ui-context/index.js +2 -23
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +10 -23
- package/dist/esm/view/BlockCard/views/unresolved-view/index.js +7 -17
- package/dist/esm/view/BlockCard/views/utils/index.js +2 -9
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/index.js +7 -18
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +7 -18
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +7 -18
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +14 -46
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -12
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +8 -20
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +4 -23
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +8 -28
- package/dist/esm/view/FlexibleCard/components/container/index.js +39 -130
- package/dist/esm/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/elements/title-element/index.js +2 -3
- package/dist/esm/view/FlexibleCard/index.js +14 -33
- package/dist/esm/view/FlexibleCard/utils.js +3 -7
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -2
- package/dist/esm/view/HoverCard/components/views/forbidden/index.js +10 -22
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +9 -22
- package/dist/esm/view/HoverCard/styled.js +0 -11
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +0 -3
- package/dist/types/state/flexible-ui-context/index.d.ts +0 -12
- package/dist/types/state/flexible-ui-context/types.d.ts +0 -7
- package/dist/types/view/BlockCard/views/utils/index.d.ts +0 -4
- package/dist/types/view/FlexibleCard/components/blocks/ai-footer-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +1 -13
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -8
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types/view/HoverCard/styled.d.ts +0 -4
- package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +0 -12
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +0 -7
- package/dist/types-ts4.5/view/BlockCard/views/utils/index.d.ts +0 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-footer-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/footer-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/types.d.ts +1 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +1 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/styled.d.ts +0 -4
- package/package.json +4 -7
|
@@ -4,7 +4,6 @@ import "./index.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback, useState } from 'react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { SmartLinkStatus } from '../../../../../constants';
|
|
9
8
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
10
9
|
import { useFlexibleCardContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -49,13 +48,10 @@ const TitleBlock = ({
|
|
|
49
48
|
hideTitleTooltip,
|
|
50
49
|
maxLines,
|
|
51
50
|
onActionMenuOpenChange,
|
|
52
|
-
onClick,
|
|
53
|
-
status: statusProp = SmartLinkStatus.Fallback,
|
|
54
51
|
showActionOnHover,
|
|
55
52
|
testId = 'smart-block-title',
|
|
56
53
|
text,
|
|
57
54
|
icon,
|
|
58
|
-
theme,
|
|
59
55
|
hideRetry,
|
|
60
56
|
metadataPosition,
|
|
61
57
|
hideIcon = false,
|
|
@@ -67,18 +63,11 @@ const TitleBlock = ({
|
|
|
67
63
|
...props
|
|
68
64
|
}) => {
|
|
69
65
|
var _props$size;
|
|
70
|
-
const cardContext =
|
|
71
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
72
|
-
useFlexibleCardContext() : undefined;
|
|
66
|
+
const cardContext = useFlexibleCardContext();
|
|
73
67
|
const {
|
|
74
68
|
status = SmartLinkStatus.Fallback,
|
|
75
69
|
ui
|
|
76
70
|
} = cardContext || {};
|
|
77
|
-
if (!fg('platform-linking-flexible-card-unresolved-action')) {
|
|
78
|
-
if (hideRetry && props.retry) {
|
|
79
|
-
delete props.retry;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
71
|
const [actionDropdownOpen, setActionDropdownOpen] = useState(false);
|
|
83
72
|
const onDropdownOpenChange = useCallback(isOpen => {
|
|
84
73
|
setActionDropdownOpen(isOpen);
|
|
@@ -99,16 +88,13 @@ const TitleBlock = ({
|
|
|
99
88
|
const onMouseDown = useMouseDownEvent();
|
|
100
89
|
const title = /*#__PURE__*/React.createElement(Title, _extends({
|
|
101
90
|
hideTooltip: hideTitleTooltip,
|
|
102
|
-
maxLines: maxLines
|
|
103
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
104
|
-
onClick
|
|
105
|
-
}, {
|
|
91
|
+
maxLines: maxLines,
|
|
106
92
|
onMouseDown: onMouseDown,
|
|
107
93
|
target: anchorTarget,
|
|
108
|
-
theme:
|
|
94
|
+
theme: ui === null || ui === void 0 ? void 0 : ui.theme,
|
|
109
95
|
anchorRef: anchorRef
|
|
110
96
|
}, overrideText));
|
|
111
|
-
const Component = getTitleBlockViewComponent(
|
|
97
|
+
const Component = getTitleBlockViewComponent(status);
|
|
112
98
|
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
113
99
|
actionGroup: actionGroup
|
|
114
100
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -117,16 +103,11 @@ const TitleBlock = ({
|
|
|
117
103
|
testId: testId,
|
|
118
104
|
title: title,
|
|
119
105
|
metadataPosition: metadataPosition,
|
|
120
|
-
hideIcon: hideIcon
|
|
121
|
-
|
|
122
|
-
hideRetry
|
|
123
|
-
} : undefined, {
|
|
106
|
+
hideIcon: hideIcon,
|
|
107
|
+
hideRetry: hideRetry,
|
|
124
108
|
icon: icon,
|
|
125
109
|
hideIconLoadingSkeleton: hideIconLoadingSkeleton,
|
|
126
|
-
size:
|
|
127
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
128
|
-
theme
|
|
129
|
-
}, {
|
|
110
|
+
size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : ui === null || ui === void 0 ? void 0 : ui.size,
|
|
130
111
|
CompetitorPrompt: CompetitorPrompt,
|
|
131
112
|
url: url
|
|
132
113
|
}));
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
4
4
|
import "./index.compiled.css";
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import React
|
|
6
|
+
import React from 'react';
|
|
7
7
|
import { di } from 'react-magnetic-di';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { FlexibleUiContext, useFlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
8
|
+
import { MediaPlacement, SmartLinkSize } from '../../../../constants';
|
|
9
|
+
import { useFlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
11
10
|
import { isFlexUiPreviewPresent } from '../../../../state/flexible-ui-context/utils';
|
|
12
|
-
import { isFlexibleUiBlock, isFlexibleUiPreviewBlock,
|
|
11
|
+
import { isFlexibleUiBlock, isFlexibleUiPreviewBlock, isStyleCacheProvider } from '../../../../utils/flexible';
|
|
13
12
|
import { TitleBlock } from '../blocks';
|
|
14
13
|
import HoverCardControl from './hover-card-control';
|
|
15
14
|
import LayeredLink from './layered-link';
|
|
@@ -40,91 +39,6 @@ const filterChildren = (children, removeBlockRestriction) => {
|
|
|
40
39
|
}
|
|
41
40
|
return React.Children.map(children, child => /*#__PURE__*/React.isValidElement(child) && isFlexibleUiBlock(child) ? child : undefined);
|
|
42
41
|
};
|
|
43
|
-
const renderChildren = (children, containerSize, containerTheme, status, retry, onClick, removeBlockRestriction) => {
|
|
44
|
-
return React.Children.map(children, child => {
|
|
45
|
-
if ( /*#__PURE__*/React.isValidElement(child) && isFlexibleUiBlock(child)) {
|
|
46
|
-
if (isFlexibleUiTitleBlock(child)) {
|
|
47
|
-
if (isStyleCacheProvider(child)) {
|
|
48
|
-
return updateChildrenTitleBlock(child, {
|
|
49
|
-
onClick,
|
|
50
|
-
retry,
|
|
51
|
-
containerSize,
|
|
52
|
-
status,
|
|
53
|
-
theme: containerTheme
|
|
54
|
-
});
|
|
55
|
-
} else {
|
|
56
|
-
const {
|
|
57
|
-
size: blockSize
|
|
58
|
-
} = child.props;
|
|
59
|
-
const size = blockSize || containerSize;
|
|
60
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
61
|
-
// @ts-expect-error
|
|
62
|
-
onClick,
|
|
63
|
-
size,
|
|
64
|
-
status,
|
|
65
|
-
theme: containerTheme,
|
|
66
|
-
...(fg('platform-linking-flexible-card-unresolved-action') ? undefined : {
|
|
67
|
-
retry
|
|
68
|
-
})
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
const {
|
|
73
|
-
size: blockSize
|
|
74
|
-
} = child.props;
|
|
75
|
-
const size = blockSize || containerSize;
|
|
76
|
-
if (isStyleCacheProvider(child)) {
|
|
77
|
-
return updateChildrenBlock(child, size, status);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// @ts-expect-error
|
|
81
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
82
|
-
size,
|
|
83
|
-
status
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
if (removeBlockRestriction) {
|
|
87
|
-
return child;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
const updateChildrenBlock = (node, size, status) => {
|
|
92
|
-
const updatedChildren = React.Children.map(node.props.children, child => {
|
|
93
|
-
if ( /*#__PURE__*/React.isValidElement(child) && isFlexibleUiBlock(child)) {
|
|
94
|
-
// @ts-expect-error
|
|
95
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
96
|
-
size,
|
|
97
|
-
status
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
return child;
|
|
101
|
-
});
|
|
102
|
-
return /*#__PURE__*/React.cloneElement(node, {
|
|
103
|
-
children: updatedChildren
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
const updateChildrenTitleBlock = (node, {
|
|
107
|
-
containerSize,
|
|
108
|
-
...props
|
|
109
|
-
}) => {
|
|
110
|
-
const updatedChildren = React.Children.map(node.props.children, child => {
|
|
111
|
-
if ( /*#__PURE__*/React.isValidElement(child) && isFlexibleUiTitleBlock(child)) {
|
|
112
|
-
const {
|
|
113
|
-
size: blockSize
|
|
114
|
-
} = child.props;
|
|
115
|
-
const size = blockSize || containerSize;
|
|
116
|
-
return /*#__PURE__*/React.cloneElement(child, {
|
|
117
|
-
...props,
|
|
118
|
-
size
|
|
119
|
-
});
|
|
120
|
-
} else {
|
|
121
|
-
return child;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
return /*#__PURE__*/React.cloneElement(node, {
|
|
125
|
-
children: updatedChildren
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
42
|
|
|
129
43
|
/**
|
|
130
44
|
* Note: This function is only necessary for CompiledCSS within Jest tests due to the way it handles Styles.
|
|
@@ -161,7 +75,6 @@ const getTitleBlockProps = children => {
|
|
|
161
75
|
const getLayeredLink = (testId, context, children, onClick) => {
|
|
162
76
|
const {
|
|
163
77
|
linkTitle,
|
|
164
|
-
title,
|
|
165
78
|
url = ''
|
|
166
79
|
} = context || {};
|
|
167
80
|
const {
|
|
@@ -172,7 +85,7 @@ const getLayeredLink = (testId, context, children, onClick) => {
|
|
|
172
85
|
onClick: onClick,
|
|
173
86
|
target: target,
|
|
174
87
|
testId: testId,
|
|
175
|
-
text: text ||
|
|
88
|
+
text: text || (linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text),
|
|
176
89
|
url: url
|
|
177
90
|
});
|
|
178
91
|
};
|
|
@@ -253,16 +166,11 @@ const Container = ({
|
|
|
253
166
|
removeBlockRestriction = false,
|
|
254
167
|
size = SmartLinkSize.Medium,
|
|
255
168
|
status,
|
|
256
|
-
testId = 'smart-links-container'
|
|
257
|
-
theme = SmartLinkTheme.Link
|
|
169
|
+
testId = 'smart-links-container'
|
|
258
170
|
}) => {
|
|
259
171
|
const padding = hidePadding ? '0px' : getPadding(size);
|
|
260
172
|
const gap = getGap(size);
|
|
261
|
-
const context =
|
|
262
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
263
|
-
useFlexibleUiContext() :
|
|
264
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
265
|
-
useContext(FlexibleUiContext);
|
|
173
|
+
const context = useFlexibleUiContext();
|
|
266
174
|
const {
|
|
267
175
|
previewOnLeft,
|
|
268
176
|
previewOnRight
|
|
@@ -281,7 +189,7 @@ const Container = ({
|
|
|
281
189
|
"--_73mooq": ix(previewOnLeft ? gap : padding),
|
|
282
190
|
"--_12k13bg": ix(previewOnRight ? gap : padding)
|
|
283
191
|
}
|
|
284
|
-
}, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null,
|
|
192
|
+
}, clickableContainer ? getLayeredLink(testId, context, children, onClick) : null, filterChildren(children, removeBlockRestriction));
|
|
285
193
|
if (context !== null && context !== void 0 && context.url && (canShowHoverPreview || canShowAuthTooltip)) {
|
|
286
194
|
return /*#__PURE__*/React.createElement(HoverCardControl, {
|
|
287
195
|
isHoverPreview: canShowHoverPreview,
|
package/dist/es2019/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
6
|
import { useMemo } from 'react';
|
|
6
7
|
import { useIntl } from 'react-intl-next';
|
|
7
8
|
import AtlaskitAvatarGroup from '@atlaskit/avatar-group';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
10
|
import { ElementName, SmartLinkSize } from '../../../../../../constants';
|
|
9
11
|
import { messages } from '../../../../../../messages';
|
|
10
12
|
import { getFormattedMessageAsString } from '../../../utils';
|
|
@@ -71,14 +73,16 @@ const BaseAvatarGroup = ({
|
|
|
71
73
|
if (!data.length) {
|
|
72
74
|
return null;
|
|
73
75
|
}
|
|
74
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
76
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, fg('platform-linking-enable-avatar-data-separator') ? {
|
|
77
|
+
['data-separator']: true
|
|
78
|
+
} : {}, {
|
|
75
79
|
"data-smart-element": name,
|
|
76
80
|
"data-smart-element-avatar-group": true,
|
|
77
81
|
"data-testid": testId
|
|
78
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
79
83
|
,
|
|
80
84
|
className: ax([stylesMap[size], "_1ul91ns9", className])
|
|
81
|
-
}, /*#__PURE__*/React.createElement(AtlaskitAvatarGroup, {
|
|
85
|
+
}), /*#__PURE__*/React.createElement(AtlaskitAvatarGroup, {
|
|
82
86
|
maxCount: maxCount,
|
|
83
87
|
appearance: "stack",
|
|
84
88
|
size: "small",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { ElementName } from '../../../../../constants';
|
|
5
4
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
6
|
-
import { BaseLinkElement
|
|
5
|
+
import { BaseLinkElement } from '../common';
|
|
7
6
|
const TitleElement = props => {
|
|
8
7
|
const context = useFlexibleUiContext();
|
|
9
|
-
const data = context ?
|
|
8
|
+
const data = context ? context === null || context === void 0 ? void 0 : context.linkTitle : null;
|
|
10
9
|
return data ? /*#__PURE__*/React.createElement(BaseLinkElement, _extends({}, data, props, {
|
|
11
10
|
name: ElementName.Title
|
|
12
11
|
})) : null;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect, useMemo } from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
|
-
import { SmartLinkStatus } from '../../constants';
|
|
6
|
-
import { FlexibleCardContext
|
|
4
|
+
import { InternalActionName, SmartLinkStatus } from '../../constants';
|
|
5
|
+
import { FlexibleCardContext } from '../../state/flexible-ui-context';
|
|
7
6
|
import { useAISummaryConfig } from '../../state/hooks/use-ai-summary-config';
|
|
8
7
|
import useResolve from '../../state/hooks/use-resolve';
|
|
9
8
|
import Container from './components/container';
|
|
10
|
-
import { getContextByStatus
|
|
9
|
+
import { getContextByStatus } from './utils';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* This represents a Flexible Card: a link represented by a card with metadata.
|
|
@@ -33,6 +32,7 @@ const FlexibleCard = ({
|
|
|
33
32
|
ui,
|
|
34
33
|
url
|
|
35
34
|
}) => {
|
|
35
|
+
var _flexibleCardContext$, _flexibleCardContext$2;
|
|
36
36
|
const aiSummaryConfig = useAISummaryConfig();
|
|
37
37
|
const resolve = useResolve();
|
|
38
38
|
const {
|
|
@@ -58,19 +58,15 @@ const FlexibleCard = ({
|
|
|
58
58
|
status,
|
|
59
59
|
url
|
|
60
60
|
}), [aiSummaryConfig, appearance, fireEvent, details, id, onAuthorize, onClick, origin, renderers, resolve, actionOptions, status, url]);
|
|
61
|
-
const flexibleCardContext =
|
|
62
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
63
|
-
useMemo(() => ({
|
|
61
|
+
const flexibleCardContext = useMemo(() => ({
|
|
64
62
|
data: context,
|
|
65
63
|
status,
|
|
66
64
|
ui
|
|
67
|
-
}), [context, status, ui])
|
|
68
|
-
const retry = fg('platform-linking-flexible-card-unresolved-action') ? undefined : getRetryOptions(url, status, details, onAuthorize);
|
|
65
|
+
}), [context, status, ui]);
|
|
69
66
|
const {
|
|
70
|
-
linkTitle
|
|
71
|
-
title: titleOld
|
|
67
|
+
linkTitle
|
|
72
68
|
} = context || {};
|
|
73
|
-
const title =
|
|
69
|
+
const title = linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text;
|
|
74
70
|
useEffect(() => {
|
|
75
71
|
switch (status) {
|
|
76
72
|
case SmartLinkStatus.Resolved:
|
|
@@ -95,33 +91,18 @@ const FlexibleCard = ({
|
|
|
95
91
|
break;
|
|
96
92
|
}
|
|
97
93
|
}, [onError, onResolve, status, title, url]);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}, /*#__PURE__*/React.createElement(Container, _extends({
|
|
102
|
-
testId: testId
|
|
103
|
-
}, ui, {
|
|
104
|
-
onClick: onClick,
|
|
105
|
-
retry: retry,
|
|
106
|
-
showHoverPreview: showHoverPreview,
|
|
107
|
-
hoverPreviewOptions: hoverPreviewOptions,
|
|
108
|
-
actionOptions: actionOptions,
|
|
109
|
-
status: status
|
|
110
|
-
}), children));
|
|
111
|
-
}
|
|
112
|
-
return /*#__PURE__*/React.createElement(FlexibleUiOptionContext.Provider, {
|
|
113
|
-
value: ui
|
|
114
|
-
}, /*#__PURE__*/React.createElement(FlexibleUiContext.Provider, {
|
|
115
|
-
value: context
|
|
94
|
+
const retry = (_flexibleCardContext$ = flexibleCardContext.data) === null || _flexibleCardContext$ === void 0 ? void 0 : (_flexibleCardContext$2 = _flexibleCardContext$.actions) === null || _flexibleCardContext$2 === void 0 ? void 0 : _flexibleCardContext$2[InternalActionName.UnresolvedAction];
|
|
95
|
+
return /*#__PURE__*/React.createElement(FlexibleCardContext.Provider, {
|
|
96
|
+
value: flexibleCardContext
|
|
116
97
|
}, /*#__PURE__*/React.createElement(Container, _extends({
|
|
117
98
|
testId: testId
|
|
118
99
|
}, ui, {
|
|
119
100
|
onClick: onClick,
|
|
120
|
-
retry: retry,
|
|
121
101
|
showHoverPreview: showHoverPreview,
|
|
122
102
|
hoverPreviewOptions: hoverPreviewOptions,
|
|
123
103
|
actionOptions: actionOptions,
|
|
124
|
-
status: status
|
|
125
|
-
|
|
104
|
+
status: status,
|
|
105
|
+
retry: retry
|
|
106
|
+
}), children));
|
|
126
107
|
};
|
|
127
108
|
export default FlexibleCard;
|
|
@@ -21,12 +21,9 @@ export const getContextByStatus = params => {
|
|
|
21
21
|
switch (status) {
|
|
22
22
|
case SmartLinkStatus.Pending:
|
|
23
23
|
case SmartLinkStatus.Resolving:
|
|
24
|
-
return
|
|
24
|
+
return {
|
|
25
25
|
linkTitle: extractLinkTitle(status, url, response, onClick),
|
|
26
26
|
url
|
|
27
|
-
} : {
|
|
28
|
-
title: url,
|
|
29
|
-
url
|
|
30
27
|
};
|
|
31
28
|
case SmartLinkStatus.Resolved:
|
|
32
29
|
return extractFlexibleUiContext(params);
|
|
@@ -38,14 +35,13 @@ export const getContextByStatus = params => {
|
|
|
38
35
|
default:
|
|
39
36
|
return {
|
|
40
37
|
url,
|
|
41
|
-
title: fg('platform-linking-flexible-card-context') ? undefined : url,
|
|
42
38
|
linkIcon: extractErrorIcon(response, status),
|
|
43
|
-
linkTitle:
|
|
39
|
+
linkTitle: extractLinkTitle(status, url, response, onClick),
|
|
44
40
|
preview: extractSmartLinkPreviewImage(response),
|
|
45
41
|
provider: extractSmartLinkProviderIcon(response),
|
|
46
|
-
actions:
|
|
42
|
+
actions: {
|
|
47
43
|
[InternalActionName.UnresolvedAction]: getRetryOptions(url, status, response, params.onAuthorize)
|
|
48
|
-
}
|
|
44
|
+
},
|
|
49
45
|
...(fg('bandicoots-smart-card-teamwork-context') ? {
|
|
50
46
|
meta: {
|
|
51
47
|
accessType: response === null || response === void 0 ? void 0 : (_response$meta = response.meta) === null || _response$meta === void 0 ? void 0 : (_response$meta$reques = _response$meta.requestAccess) === null || _response$meta$reques === void 0 ? void 0 : _response$meta$reques.accessType
|
|
@@ -9,7 +9,7 @@ import { useSmartCardState } from '../../../state/store';
|
|
|
9
9
|
import { isSpecialEvent } from '../../../utils';
|
|
10
10
|
import { getIsAISummaryEnabled } from '../../../utils/ai-summary';
|
|
11
11
|
import { fireLinkClickedEvent } from '../../../utils/analytics/click';
|
|
12
|
-
import { flexibleUiOptions
|
|
12
|
+
import { flexibleUiOptions } from '../styled';
|
|
13
13
|
import { getMetadata } from '../utils';
|
|
14
14
|
import ContentContainer from './ContentContainer';
|
|
15
15
|
import HoverCardForbiddenView from './views/forbidden';
|
|
@@ -105,7 +105,7 @@ const HoverCardContent = ({
|
|
|
105
105
|
position: SmartLinkPosition.Center,
|
|
106
106
|
subtitle: subtitle
|
|
107
107
|
};
|
|
108
|
-
const uiOptions =
|
|
108
|
+
const uiOptions = flexibleUiOptions;
|
|
109
109
|
if (fg('cc-ai-linking-platform-snippet-renderer')) {
|
|
110
110
|
uiOptions.enableSnippetRenderer = true;
|
|
111
111
|
}
|
|
@@ -9,7 +9,6 @@ import ButtonOld from '@atlaskit/button';
|
|
|
9
9
|
import Button from '@atlaskit/button/new';
|
|
10
10
|
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { SmartLinkStatus } from '../../../../../constants';
|
|
13
12
|
import { extractRequestAccessContextImproved } from '../../../../../extractors/common/context/extractAccessContext';
|
|
14
13
|
import extractHostname from '../../../../../extractors/common/hostname/extractHostname';
|
|
15
14
|
import { messages } from '../../../../../messages';
|
|
@@ -51,39 +50,28 @@ const HoverCardForbiddenView = ({
|
|
|
51
50
|
const ButtonComponent = fg('platform-smart-card-remove-legacy-button') ? Button : ButtonOld;
|
|
52
51
|
return /*#__PURE__*/React.createElement(FlexibleCard, _extends({}, flexibleCardProps, {
|
|
53
52
|
testId: testId
|
|
54
|
-
}), /*#__PURE__*/React.createElement(PreviewBlock,
|
|
53
|
+
}), /*#__PURE__*/React.createElement(PreviewBlock, {
|
|
55
54
|
ignoreContainerPadding: true,
|
|
56
|
-
testId: testId
|
|
57
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
58
|
-
status: SmartLinkStatus.Forbidden
|
|
59
|
-
}, {
|
|
55
|
+
testId: testId,
|
|
60
56
|
className: ax(["_13lipd34 _qrwqpd34 _otyru2gc"])
|
|
61
|
-
})
|
|
62
|
-
testId: `${testId}-title
|
|
63
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
64
|
-
status: SmartLinkStatus.Forbidden
|
|
65
|
-
}, {
|
|
57
|
+
}), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
58
|
+
testId: `${testId}-title`,
|
|
66
59
|
className: ax(["_1bah1h6o _k48p1pd9 _19pku2gc"])
|
|
67
|
-
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[titleMessageKey], {
|
|
68
61
|
values: {
|
|
69
62
|
product
|
|
70
63
|
}
|
|
71
|
-
}))), /*#__PURE__*/React.createElement(CustomBlock,
|
|
72
|
-
testId: `${testId}-content
|
|
73
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
74
|
-
status: SmartLinkStatus.Forbidden
|
|
75
|
-
}, {
|
|
64
|
+
}))), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
65
|
+
testId: `${testId}-content`,
|
|
76
66
|
className: ax(["_11c8dcr7 _1e0c1nu9 _1bah1h6o _19pkze3t _y3gn1h6o"])
|
|
77
|
-
}
|
|
67
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
|
|
78
68
|
values: {
|
|
79
69
|
product,
|
|
80
70
|
hostname
|
|
81
71
|
}
|
|
82
|
-
}))), action && /*#__PURE__*/React.createElement(CustomBlock,
|
|
83
|
-
status: SmartLinkStatus.Forbidden
|
|
84
|
-
}, {
|
|
72
|
+
}))), action && /*#__PURE__*/React.createElement(CustomBlock, {
|
|
85
73
|
className: ax(["_1bah1h6o _19pku2gc"])
|
|
86
|
-
}
|
|
74
|
+
}, /*#__PURE__*/React.createElement(ButtonComponent, {
|
|
87
75
|
testId: `${testId}-button`,
|
|
88
76
|
onClick: action === null || action === void 0 ? void 0 : action.promise,
|
|
89
77
|
appearance: "primary",
|
|
@@ -3,9 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
8
|
-
import { CardDisplay, SmartLinkPosition, SmartLinkSize
|
|
7
|
+
import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
|
|
9
8
|
import { succeedUfoExperience } from '../../../../../state/analytics';
|
|
10
9
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
11
10
|
import { ActionBlock, AIFooterBlock, AISummaryBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
|
|
@@ -61,40 +60,28 @@ const HoverCardResolvedView = ({
|
|
|
61
60
|
fallbackElementHeight: snippetHeight.current,
|
|
62
61
|
response: cardState.details
|
|
63
62
|
});
|
|
64
|
-
const snippet = imagePreview ? null : /*#__PURE__*/React.createElement(SnippetBlock,
|
|
65
|
-
status: SmartLinkStatus.Resolved
|
|
66
|
-
}, {
|
|
63
|
+
const snippet = imagePreview ? null : /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
67
64
|
className: ax(["_ca0q1b66"])
|
|
68
|
-
})
|
|
65
|
+
});
|
|
69
66
|
const aiSummaryMinHeight = snippet ? snippetHeight.current : 0;
|
|
70
67
|
return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
|
|
71
|
-
metadataPosition: SmartLinkPosition.Top
|
|
72
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
73
|
-
status: SmartLinkStatus.Resolved
|
|
74
|
-
}, {
|
|
68
|
+
metadataPosition: SmartLinkPosition.Top,
|
|
75
69
|
className: ax(["_zulpu2gc _quenze3t _oebj1txw _13mh1pd9"])
|
|
76
|
-
})), /*#__PURE__*/React.createElement(MetadataBlock,
|
|
70
|
+
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
77
71
|
primary: primary,
|
|
78
72
|
secondary: secondary,
|
|
79
73
|
maxLines: 1,
|
|
80
74
|
size: SmartLinkSize.Medium
|
|
81
|
-
},
|
|
82
|
-
status: SmartLinkStatus.Resolved
|
|
83
|
-
})), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, _extends({
|
|
75
|
+
}), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
84
76
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
85
77
|
placeholder: snippet
|
|
86
|
-
}
|
|
87
|
-
status: SmartLinkStatus.Resolved
|
|
88
|
-
})) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, _extends({
|
|
78
|
+
}) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
89
79
|
testId: "hidden-snippet",
|
|
90
80
|
onRender: onSnippetRender,
|
|
91
|
-
blockRef: snippetBlockRef
|
|
92
|
-
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
93
|
-
status: SmartLinkStatus.Resolved
|
|
94
|
-
}, {
|
|
81
|
+
blockRef: snippetBlockRef,
|
|
95
82
|
isHidden: true,
|
|
96
83
|
className: ax(["_3um015vq _kqswstnw"])
|
|
97
|
-
})
|
|
84
|
+
}), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
98
85
|
onClick: onActionClick,
|
|
99
86
|
spaceInline: "space.100",
|
|
100
87
|
className: ax(["_n3td1b66"])
|
|
@@ -2,17 +2,6 @@ import { layers } from '@atlaskit/theme/constants';
|
|
|
2
2
|
import { SmartLinkSize } from '../../constants';
|
|
3
3
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
4
4
|
export const HOVER_CARD_Z_INDEX = layers.modal();
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Remove on platform-linking-flexible-card-context cleanup
|
|
8
|
-
*/
|
|
9
|
-
export const flexibleUiOptionsOld = {
|
|
10
|
-
hideBackground: true,
|
|
11
|
-
hideElevation: true,
|
|
12
|
-
hideLegacyButton: true,
|
|
13
|
-
size: SmartLinkSize.Medium,
|
|
14
|
-
zIndex: HOVER_CARD_Z_INDEX + 1
|
|
15
|
-
};
|
|
16
5
|
export const flexibleUiOptions = {
|
|
17
6
|
hideBackground: true,
|
|
18
7
|
hideElevation: true,
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "39.
|
|
13
|
+
packageVersion: "39.3.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -3,7 +3,6 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { SmartLinkStatus } from '../../../../constants';
|
|
7
6
|
import { Card, ElementName, SmartLinkPosition, SmartLinkSize, SmartLinkTheme, TitleBlock } from '../../../../index';
|
|
8
7
|
const hoverStyleOld = null;
|
|
9
8
|
const hoverStyle = null;
|
|
@@ -43,8 +42,6 @@ const RelatedLinkItem = ({
|
|
|
43
42
|
subtitle: subtitle,
|
|
44
43
|
anchorTarget: "_blank",
|
|
45
44
|
size: ui.size,
|
|
46
|
-
theme: ui.theme,
|
|
47
|
-
status: SmartLinkStatus.Resolved,
|
|
48
45
|
className: ax(["_zulputpp _11c81o8v _ca0qu2gc _n3tdu2gc"])
|
|
49
46
|
})));
|
|
50
47
|
};
|
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["appearance", "fireEvent", "id", "onClick", "origin", "renderers", "resolve", "actionOptions", "response", "status", "aiSummaryConfig"];
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
-
import { extractPersonOwnedBy, extractSmartLinkAri, extractSmartLinkAuthorGroup, extractSmartLinkCreatedBy, extractSmartLinkCreatedOn, extractSmartLinkModifiedBy, extractSmartLinkModifiedOn,
|
|
6
|
+
import { extractPersonOwnedBy, extractSmartLinkAri, extractSmartLinkAuthorGroup, extractSmartLinkCreatedBy, extractSmartLinkCreatedOn, extractSmartLinkModifiedBy, extractSmartLinkModifiedOn, extractSmartLinkUrl, extractType } from '@atlaskit/link-extractors';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { extractSmartLinkSummary } from '../common/primitives/extractSummary';
|
|
9
9
|
import { extractFlexibleCardActions } from './actions';
|
|
@@ -36,7 +36,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
36
36
|
var data = response.data;
|
|
37
37
|
var meta = response.meta;
|
|
38
38
|
var url = extractSmartLinkUrl(response);
|
|
39
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(
|
|
39
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
40
40
|
actions: extractFlexibleCardActions({
|
|
41
41
|
actionOptions: actionOptions,
|
|
42
42
|
aiSummaryConfig: aiSummaryConfig,
|
|
@@ -64,10 +64,8 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
64
64
|
createdOn: extractSmartLinkCreatedOn(response),
|
|
65
65
|
dueOn: extractDueOn(data),
|
|
66
66
|
latestCommit: extractLatestCommit(data),
|
|
67
|
-
linkIcon: extractSmartLinkIcon(response)
|
|
68
|
-
|
|
69
|
-
linkTitle: extractLinkTitle(status, props.url, response, onClick)
|
|
70
|
-
}), {}, {
|
|
67
|
+
linkIcon: extractSmartLinkIcon(response),
|
|
68
|
+
linkTitle: extractLinkTitle(status, props.url, response, onClick),
|
|
71
69
|
location: extractLocation(data),
|
|
72
70
|
modifiedBy: extractSmartLinkModifiedBy(response),
|
|
73
71
|
modifiedOn: extractSmartLinkModifiedOn(response),
|
|
@@ -87,8 +85,6 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
87
85
|
targetBranch: extractTargetBranch(data)
|
|
88
86
|
}, fg('platform-linking-user-attributes-component') && {
|
|
89
87
|
userAttributes: extractUserAttributes(data)
|
|
90
|
-
}), fg('platform-linking-flexible-card-context') ? undefined : {
|
|
91
|
-
title: extractSmartLinkTitle(response) || url
|
|
92
88
|
}), fg('platform-linking-team-member-count-component') && {
|
|
93
89
|
teamMemberCount: extractTeamMemberCount(data)
|
|
94
90
|
}), {}, {
|