@atlaskit/smart-card 38.8.0 → 38.9.1
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 +18 -0
- package/dist/cjs/extractors/common/context/index.js +2 -1
- package/dist/cjs/extractors/embed/index.js +4 -16
- package/dist/cjs/extractors/flexible/extract-link-title.js +2 -4
- package/dist/cjs/extractors/flexible/index.js +12 -14
- package/dist/cjs/extractors/inline/index.js +7 -18
- package/dist/cjs/state/hooks/use-resolve/index.js +1 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/index.js +4 -2
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +1 -1
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +3 -1
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +2 -3
- package/dist/cjs/view/CardWithUrl/component.js +15 -10
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +47 -15
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-icon-element/index.js +7 -3
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/utils.js +5 -8
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -1
- package/dist/cjs/view/HoverCard/components/ImagePreview.js +2 -15
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +3 -4
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -3
- package/dist/cjs/view/InlineCard/ErroredView/index.js +3 -3
- package/dist/cjs/view/InlineCard/index.js +3 -5
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/common/context/index.js +2 -1
- package/dist/es2019/extractors/embed/index.js +6 -19
- package/dist/es2019/extractors/flexible/extract-link-title.js +3 -5
- package/dist/es2019/extractors/flexible/index.js +15 -15
- package/dist/es2019/extractors/inline/index.js +8 -22
- package/dist/es2019/state/hooks/use-resolve/index.js +1 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/index.js +4 -2
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +2 -2
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -2
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +3 -1
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +3 -4
- package/dist/es2019/view/CardWithUrl/component.js +16 -11
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +49 -22
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-icon-element/index.js +7 -4
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/utils.js +7 -8
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +2 -1
- package/dist/es2019/view/HoverCard/components/ImagePreview.js +2 -15
- package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +4 -5
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +3 -4
- package/dist/es2019/view/InlineCard/ErroredView/index.js +4 -4
- package/dist/es2019/view/InlineCard/index.js +5 -7
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/common/context/index.js +2 -1
- package/dist/esm/extractors/embed/index.js +6 -18
- package/dist/esm/extractors/flexible/extract-link-title.js +3 -5
- package/dist/esm/extractors/flexible/index.js +15 -15
- package/dist/esm/extractors/inline/index.js +8 -21
- package/dist/esm/state/hooks/use-resolve/index.js +1 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/index.js +4 -2
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +2 -2
- package/dist/esm/view/BlockCard/views/NotFoundView.js +2 -2
- package/dist/esm/view/BlockCard/views/ResolvedView.js +3 -1
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +3 -4
- package/dist/esm/view/CardWithUrl/component.js +16 -11
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +46 -14
- package/dist/esm/view/FlexibleCard/components/elements/common/base-icon-element/index.js +7 -3
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +5 -3
- package/dist/esm/view/FlexibleCard/utils.js +7 -8
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +2 -1
- package/dist/esm/view/HoverCard/components/ImagePreview.js +2 -15
- package/dist/esm/view/HoverCard/components/views/forbidden/index.js +4 -5
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -4
- package/dist/esm/view/InlineCard/ErroredView/index.js +4 -4
- package/dist/esm/view/InlineCard/index.js +5 -7
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/ssr.d.ts +1 -0
- package/dist/types/view/BlockCard/index.d.ts +1 -1
- package/dist/types/view/BlockCard/types.d.ts +1 -0
- package/dist/types/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/image-icon/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +5 -1
- package/dist/types/view/FlexibleCard/types.d.ts +4 -0
- package/dist/types-ts4.5/ssr.d.ts +1 -0
- package/dist/types-ts4.5/view/BlockCard/index.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/types.d.ts +1 -0
- package/dist/types-ts4.5/view/BlockCard/views/types.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +1 -0
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +1 -0
- 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/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/types.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +5 -1
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +4 -0
- package/package.json +10 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import ErrorIcon from '@atlaskit/icon/
|
|
5
|
+
import ErrorIcon from '@atlaskit/icon/core/migration/error';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import MotionWrapper from '../../../common/motion-wrapper';
|
|
@@ -22,7 +22,8 @@ const getIcon = appearance => {
|
|
|
22
22
|
label: "Error",
|
|
23
23
|
LEGACY_size: "small",
|
|
24
24
|
testId: "action-error-icon",
|
|
25
|
-
LEGACY_margin: `0 ${"var(--ds-space-negative-025, -2px)"}
|
|
25
|
+
LEGACY_margin: `0 ${"var(--ds-space-negative-025, -2px)"}`,
|
|
26
|
+
size: "small"
|
|
26
27
|
});
|
|
27
28
|
default:
|
|
28
29
|
return null;
|
|
@@ -63,6 +63,7 @@ const TitleBlock = ({
|
|
|
63
63
|
anchorRef,
|
|
64
64
|
CompetitorPrompt,
|
|
65
65
|
url,
|
|
66
|
+
hideIconLoadingSkeleton,
|
|
66
67
|
...props
|
|
67
68
|
}) => {
|
|
68
69
|
var _props$size;
|
|
@@ -121,6 +122,7 @@ const TitleBlock = ({
|
|
|
121
122
|
hideRetry
|
|
122
123
|
} : undefined, {
|
|
123
124
|
icon: icon,
|
|
125
|
+
hideIconLoadingSkeleton: hideIconLoadingSkeleton,
|
|
124
126
|
size: fg('platform-linking-flexible-card-context') ? (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : ui === null || ui === void 0 ? void 0 : ui.size : props === null || props === void 0 ? void 0 : props.size
|
|
125
127
|
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
126
128
|
theme
|
|
@@ -33,6 +33,7 @@ const TitleBlockResolvedView = ({
|
|
|
33
33
|
hideIcon,
|
|
34
34
|
CompetitorPrompt,
|
|
35
35
|
url,
|
|
36
|
+
hideIconLoadingSkeleton,
|
|
36
37
|
...blockProps
|
|
37
38
|
}) => {
|
|
38
39
|
const {
|
|
@@ -45,7 +46,8 @@ const TitleBlockResolvedView = ({
|
|
|
45
46
|
}), !hideIcon && /*#__PURE__*/React.createElement(LinkIcon, {
|
|
46
47
|
overrideIcon: icon,
|
|
47
48
|
position: position,
|
|
48
|
-
size: size
|
|
49
|
+
size: size,
|
|
50
|
+
hideLoadingSkeleton: hideIconLoadingSkeleton
|
|
49
51
|
}), /*#__PURE__*/React.createElement(ElementGroup, {
|
|
50
52
|
direction: SmartLinkDirection.Vertical,
|
|
51
53
|
width: SmartLinkWidth.Flexible,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { useEffect, useState } from 'react';
|
|
5
6
|
import ImageLoader from 'react-render-image';
|
|
6
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { LoadingSkeleton } from '../loading-skeleton';
|
|
@@ -16,26 +17,52 @@ const ImageIcon = ({
|
|
|
16
17
|
height,
|
|
17
18
|
appearance = 'square',
|
|
18
19
|
onError,
|
|
19
|
-
onLoad
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
onLoad,
|
|
21
|
+
hideLoadingSkeleton = false
|
|
22
|
+
}) => {
|
|
23
|
+
const [hasImageErrored, setHasImageErrored] = useState(false);
|
|
24
|
+
|
|
25
|
+
// If url changes, reset state
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
setHasImageErrored(false);
|
|
28
|
+
}, [url]);
|
|
29
|
+
if (hasImageErrored) {
|
|
30
|
+
return defaultIcon;
|
|
31
|
+
}
|
|
32
|
+
if (hideLoadingSkeleton && fg('platform_fix_block_card_img_icon_vc')) {
|
|
33
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
34
|
+
src: url,
|
|
35
|
+
"data-testid": `${testId}-image`,
|
|
36
|
+
alt: "",
|
|
37
|
+
style: {
|
|
38
|
+
width,
|
|
39
|
+
height
|
|
40
|
+
},
|
|
41
|
+
onError: () => setHasImageErrored(true),
|
|
42
|
+
className: ax([appearance === 'round' && fg('platform-linking-visual-refresh-v2') && styles.roundImg])
|
|
43
|
+
});
|
|
44
|
+
} else {
|
|
45
|
+
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
46
|
+
src: url,
|
|
47
|
+
loading: /*#__PURE__*/React.createElement(LoadingSkeleton, {
|
|
48
|
+
testId: `${testId}-loading`,
|
|
49
|
+
width: width,
|
|
50
|
+
height: height
|
|
51
|
+
}),
|
|
52
|
+
loaded: /*#__PURE__*/React.createElement("img", {
|
|
53
|
+
src: url,
|
|
54
|
+
"data-testid": `${testId}-image`,
|
|
55
|
+
alt: "",
|
|
56
|
+
style: {
|
|
57
|
+
width,
|
|
58
|
+
height
|
|
59
|
+
},
|
|
60
|
+
className: ax([appearance === 'round' && fg('platform-linking-visual-refresh-v2') && styles.roundImg])
|
|
61
|
+
}),
|
|
62
|
+
errored: defaultIcon,
|
|
63
|
+
onError: onError,
|
|
64
|
+
onLoad: onLoad
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
41
68
|
export default ImageIcon;
|
|
@@ -47,7 +47,7 @@ const renderDefaultIcon = (label, testId) => /*#__PURE__*/React.createElement(Li
|
|
|
47
47
|
testId: `${testId}-default`,
|
|
48
48
|
color: "currentColor"
|
|
49
49
|
});
|
|
50
|
-
const renderImageIcon = (defaultIcon, url, testId, size = SmartLinkSize.Medium, appearance) => {
|
|
50
|
+
const renderImageIcon = (defaultIcon, url, testId, size = SmartLinkSize.Medium, appearance, hideLoadingSkeleton) => {
|
|
51
51
|
const width = size === SmartLinkSize.Large ? "var(--ds-space-300, 24px)" : "var(--ds-space-200, 16px)";
|
|
52
52
|
if (url) {
|
|
53
53
|
return /*#__PURE__*/React.createElement(ImageIcon, _extends({
|
|
@@ -58,6 +58,8 @@ const renderImageIcon = (defaultIcon, url, testId, size = SmartLinkSize.Medium,
|
|
|
58
58
|
height: width
|
|
59
59
|
}, fg('platform-linking-visual-refresh-v2') && {
|
|
60
60
|
appearance
|
|
61
|
+
}, {
|
|
62
|
+
hideLoadingSkeleton: hideLoadingSkeleton
|
|
61
63
|
}));
|
|
62
64
|
}
|
|
63
65
|
};
|
|
@@ -79,12 +81,13 @@ const IconElement = ({
|
|
|
79
81
|
size = SmartLinkSize.Medium,
|
|
80
82
|
testId = 'smart-element-icon',
|
|
81
83
|
url,
|
|
82
|
-
appearance = 'square'
|
|
84
|
+
appearance = 'square',
|
|
85
|
+
hideLoadingSkeleton
|
|
83
86
|
}) => {
|
|
84
87
|
const element = useMemo(() => {
|
|
85
88
|
const defaultIcon = renderDefaultIcon(label, testId);
|
|
86
|
-
return overrideIcon || (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId, size, fg('platform-linking-visual-refresh-v2') ? appearance : undefined) || renderAtlaskitIcon(icon, testId, size) || defaultIcon;
|
|
87
|
-
}, [label, testId, overrideIcon, render, url, size, appearance, icon]);
|
|
89
|
+
return overrideIcon || (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId, size, fg('platform-linking-visual-refresh-v2') ? appearance : undefined, hideLoadingSkeleton) || renderAtlaskitIcon(icon, testId, size) || defaultIcon;
|
|
90
|
+
}, [label, testId, overrideIcon, render, url, size, appearance, hideLoadingSkeleton, icon]);
|
|
88
91
|
const width = getIconWidth(size);
|
|
89
92
|
return /*#__PURE__*/React.createElement("div", _extends({}, fg('platform-linking-visual-refresh-v1') ? {} : {
|
|
90
93
|
['data-fit-to-content']: true
|
|
@@ -7,7 +7,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
|
|
8
8
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
9
9
|
import { cx } from '@compiled/react';
|
|
10
|
-
import ChevronDownIcon from '@atlaskit/icon/
|
|
10
|
+
import ChevronDownIcon from '@atlaskit/icon/core/migration/chevron-down';
|
|
11
11
|
import { withFeatureFlaggedComponent } from '@atlaskit/linking-common';
|
|
12
12
|
import Lozenge from '@atlaskit/lozenge';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -42,7 +42,8 @@ const LozengeActionTriggerOld = ({
|
|
|
42
42
|
color: "currentColor",
|
|
43
43
|
label: "options",
|
|
44
44
|
LEGACY_size: "medium",
|
|
45
|
-
LEGACY_margin: "-4px -8px -4px -7px"
|
|
45
|
+
LEGACY_margin: "-4px -8px -4px -7px",
|
|
46
|
+
size: "small"
|
|
46
47
|
})))), [appearance, isBold, text]);
|
|
47
48
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
48
49
|
type: "button"
|
|
@@ -109,7 +110,8 @@ const LozengeActionTrigger = ({
|
|
|
109
110
|
color: "currentColor",
|
|
110
111
|
label: "options",
|
|
111
112
|
LEGACY_size: "medium",
|
|
112
|
-
LEGACY_margin: "-4px -8px -4px -7px"
|
|
113
|
+
LEGACY_margin: "-4px -8px -4px -7px",
|
|
114
|
+
size: "small"
|
|
113
115
|
})))));
|
|
114
116
|
}, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
|
|
115
117
|
return /*#__PURE__*/React.createElement("button", _extends({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import { InternalActionName, SmartLinkStatus } from '../../constants';
|
|
4
4
|
import { extractRequestAccessContextImproved } from '../../extractors/common/context';
|
|
5
5
|
import extractFlexibleUiContext from '../../extractors/flexible';
|
|
6
6
|
import extractLinkTitle from '../../extractors/flexible/extract-link-title';
|
|
7
|
-
import
|
|
7
|
+
import { extractSmartLinkPreviewImage } from '../../extractors/flexible/extract-preview';
|
|
8
8
|
import { extractErrorIcon } from '../../extractors/flexible/icon';
|
|
9
|
-
import
|
|
9
|
+
import { extractSmartLinkProviderIcon } from '../../extractors/flexible/icon/extract-provider-icon';
|
|
10
10
|
import { messages } from '../../messages';
|
|
11
11
|
import { handleOnClick } from '../../utils';
|
|
12
|
-
import {
|
|
12
|
+
import { getForbiddenJsonLd } from '../../utils/jsonld';
|
|
13
13
|
export const getContextByStatus = params => {
|
|
14
14
|
const {
|
|
15
15
|
onClick,
|
|
@@ -40,8 +40,8 @@ export const getContextByStatus = params => {
|
|
|
40
40
|
title: fg('platform-linking-flexible-card-context') ? undefined : url,
|
|
41
41
|
linkIcon: extractErrorIcon(response, status),
|
|
42
42
|
linkTitle: fg('platform-linking-flexible-card-context') ? extractLinkTitle(status, url, response, onClick) : undefined,
|
|
43
|
-
preview:
|
|
44
|
-
provider:
|
|
43
|
+
preview: extractSmartLinkPreviewImage(response),
|
|
44
|
+
provider: extractSmartLinkProviderIcon(response),
|
|
45
45
|
actions: fg('platform-linking-flexible-card-unresolved-action') ? {
|
|
46
46
|
[InternalActionName.UnresolvedAction]: getRetryOptions(url, status, response, params.onAuthorize)
|
|
47
47
|
} : undefined
|
|
@@ -68,8 +68,7 @@ const getForbiddenMessageKey = meta => {
|
|
|
68
68
|
};
|
|
69
69
|
export const getRetryOptions = (url, status, response, onAuthorize) => {
|
|
70
70
|
var _response$meta, _access$action, _access$buttonDisable;
|
|
71
|
-
const
|
|
72
|
-
const provider = fg('smart_links_noun_support') ? extractSmartLinkProvider(response) : extractProvider(data);
|
|
71
|
+
const provider = extractSmartLinkProvider(response);
|
|
73
72
|
const context = provider === null || provider === void 0 ? void 0 : provider.text;
|
|
74
73
|
const values = context ? {
|
|
75
74
|
context
|
|
@@ -217,6 +217,7 @@ export const HoverCardComponent = ({
|
|
|
217
217
|
label: label
|
|
218
218
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
219
219
|
,
|
|
220
|
-
popupComponent: CustomPopupContainer
|
|
220
|
+
popupComponent: CustomPopupContainer,
|
|
221
|
+
shouldRenderToParent: fg('should-render-to-parent-should-be-true-linking-pla')
|
|
221
222
|
});
|
|
222
223
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useRef, useState } from 'react';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import
|
|
3
|
+
import { extractSmartLinkPreviewImage } from '../../../extractors/flexible/extract-preview';
|
|
4
4
|
import { PreviewBlock } from '../../FlexibleCard/components/blocks';
|
|
5
5
|
const ImagePreview = ({
|
|
6
6
|
fallbackElementHeight,
|
|
@@ -10,7 +10,6 @@ const ImagePreview = ({
|
|
|
10
10
|
const previewBlockRef = useRef(null);
|
|
11
11
|
const [showPreview, setShowPreview] = useState(true);
|
|
12
12
|
const [dynamicStyles, setDynamicStyles] = useState({});
|
|
13
|
-
const data = response === null || response === void 0 ? void 0 : response.data;
|
|
14
13
|
|
|
15
14
|
// Set Preview to a fixed height to enable transitions
|
|
16
15
|
const onPreviewRender = useCallback(() => {
|
|
@@ -41,19 +40,7 @@ const ImagePreview = ({
|
|
|
41
40
|
const onPreviewTransitionEnd = useCallback(() => {
|
|
42
41
|
setShowPreview(false);
|
|
43
42
|
}, []);
|
|
44
|
-
|
|
45
|
-
return showPreview && extractSmartLinkPreviewImage(response) ? /*#__PURE__*/React.createElement(PreviewBlock, {
|
|
46
|
-
onError: onPreviewError,
|
|
47
|
-
ignoreContainerPadding: true,
|
|
48
|
-
onTransitionEnd: onPreviewTransitionEnd,
|
|
49
|
-
blockRef: previewBlockRef,
|
|
50
|
-
onRender: onPreviewRender
|
|
51
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
52
|
-
,
|
|
53
|
-
style: dynamicStyles
|
|
54
|
-
}) : null;
|
|
55
|
-
}
|
|
56
|
-
return showPreview && data && extractPreview(data) ? /*#__PURE__*/React.createElement(PreviewBlock, {
|
|
43
|
+
return showPreview && extractSmartLinkPreviewImage(response) ? /*#__PURE__*/React.createElement(PreviewBlock, {
|
|
57
44
|
onError: onPreviewError,
|
|
58
45
|
ignoreContainerPadding: true,
|
|
59
46
|
onTransitionEnd: onPreviewTransitionEnd,
|
|
@@ -7,7 +7,7 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
7
7
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
8
|
import ButtonOld from '@atlaskit/button';
|
|
9
9
|
import Button from '@atlaskit/button/new';
|
|
10
|
-
import {
|
|
10
|
+
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { SmartLinkStatus } from '../../../../../constants';
|
|
13
13
|
import { extractRequestAccessContextImproved } from '../../../../../extractors/common/context/extractAccessContext';
|
|
@@ -27,7 +27,7 @@ const HoverCardForbiddenView = ({
|
|
|
27
27
|
flexibleCardProps,
|
|
28
28
|
testId = 'hover-card-forbidden-view'
|
|
29
29
|
}) => {
|
|
30
|
-
var _cardState$details,
|
|
30
|
+
var _cardState$details, _extractSmartLinkProv, _extractSmartLinkProv2, _extractRequestAccess;
|
|
31
31
|
const {
|
|
32
32
|
createAnalyticsEvent
|
|
33
33
|
} = useAnalyticsEvents();
|
|
@@ -35,9 +35,8 @@ const HoverCardForbiddenView = ({
|
|
|
35
35
|
cardState,
|
|
36
36
|
url
|
|
37
37
|
} = flexibleCardProps;
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const product = fg('smart_links_noun_support') ? (_extractSmartLinkProv = (_extractSmartLinkProv2 = extractSmartLinkProvider(cardState.details)) === null || _extractSmartLinkProv2 === void 0 ? void 0 : _extractSmartLinkProv2.text) !== null && _extractSmartLinkProv !== void 0 ? _extractSmartLinkProv : '' : (_extractProvider$text = (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text) !== null && _extractProvider$text !== void 0 ? _extractProvider$text : '';
|
|
38
|
+
const meta = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.meta;
|
|
39
|
+
const product = (_extractSmartLinkProv = (_extractSmartLinkProv2 = extractSmartLinkProvider(cardState.details)) === null || _extractSmartLinkProv2 === void 0 ? void 0 : _extractSmartLinkProv2.text) !== null && _extractSmartLinkProv !== void 0 ? _extractSmartLinkProv : '';
|
|
41
40
|
const hostname = /*#__PURE__*/React.createElement("b", null, extractHostname(url));
|
|
42
41
|
const {
|
|
43
42
|
action,
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback, useMemo } from 'react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
|
-
import {
|
|
8
|
+
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
11
11
|
import { ActionName, CardDisplay } from '../../../../../constants';
|
|
@@ -29,12 +29,11 @@ const HoverCardUnauthorisedView = ({
|
|
|
29
29
|
testId = 'hover-card-unauthorised-view',
|
|
30
30
|
url
|
|
31
31
|
}) => {
|
|
32
|
-
var
|
|
32
|
+
var _extractSmartLinkProv;
|
|
33
33
|
const {
|
|
34
34
|
cardState
|
|
35
35
|
} = flexibleCardProps;
|
|
36
|
-
const
|
|
37
|
-
const providerName = fg('smart_links_noun_support') ? (_extractSmartLinkProv = extractSmartLinkProvider(cardState.details)) === null || _extractSmartLinkProv === void 0 ? void 0 : _extractSmartLinkProv.text : (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
|
|
36
|
+
const providerName = (_extractSmartLinkProv = extractSmartLinkProvider(cardState.details)) === null || _extractSmartLinkProv === void 0 ? void 0 : _extractSmartLinkProv.text;
|
|
38
37
|
const isProductIntegrationSupported = hasAuthScopeOverrides(cardState.details);
|
|
39
38
|
const {
|
|
40
39
|
authorize
|
|
@@ -4,8 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import ButtonOld from '@atlaskit/button';
|
|
7
|
-
import
|
|
8
|
-
import ErrorIcon from '@atlaskit/icon/utility/migration/error';
|
|
7
|
+
import ErrorIcon from '@atlaskit/icon/core/migration/error';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import { messages } from '../../../messages';
|
|
@@ -20,7 +19,7 @@ const styles = {
|
|
|
20
19
|
};
|
|
21
20
|
const fallbackIcon = () => {
|
|
22
21
|
if (fg('platform-linking-visual-refresh-v1')) {
|
|
23
|
-
return /*#__PURE__*/React.createElement(
|
|
22
|
+
return /*#__PURE__*/React.createElement(ErrorIcon, {
|
|
24
23
|
color: "var(--ds-icon-danger, #C9372C)",
|
|
25
24
|
label: "error",
|
|
26
25
|
LEGACY_size: "small",
|
|
@@ -34,7 +33,8 @@ const fallbackIcon = () => {
|
|
|
34
33
|
color: "var(--ds-icon-danger, #C9372C)",
|
|
35
34
|
label: "error",
|
|
36
35
|
LEGACY_size: "small",
|
|
37
|
-
testId: "errored-view-default-icon"
|
|
36
|
+
testId: "errored-view-default-icon",
|
|
37
|
+
size: "small"
|
|
38
38
|
}));
|
|
39
39
|
};
|
|
40
40
|
export const InlineCardErroredView = ({
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
4
|
-
import {
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
6
5
|
import { SmartLinkStatus } from '../../constants';
|
|
7
6
|
import { extractRequestAccessContextImproved } from '../../extractors/common/context/extractAccessContext';
|
|
8
7
|
import { extractInlineProps } from '../../extractors/inline';
|
|
9
8
|
import { getExtensionKey } from '../../state/helpers';
|
|
10
|
-
import {
|
|
9
|
+
import { getForbiddenJsonLd } from '../../utils/jsonld';
|
|
11
10
|
import { CardLinkView } from '../LinkView';
|
|
12
11
|
import { InlineCardErroredView } from './ErroredView';
|
|
13
12
|
import { InlineCardForbiddenView } from './ForbiddenView';
|
|
@@ -43,7 +42,6 @@ export const InlineCard = ({
|
|
|
43
42
|
status,
|
|
44
43
|
details
|
|
45
44
|
} = cardState;
|
|
46
|
-
const cardDetails = details && details.data || getEmptyJsonLd();
|
|
47
45
|
const extensionKey = getExtensionKey(details);
|
|
48
46
|
const testIdWithStatus = testId ? `${testId}-${status}-view` : undefined;
|
|
49
47
|
const resolvedProps = status === SmartLinkStatus.Resolved ? extractInlineProps(details, renderers, removeTextHighlightingFromTitle, false) : {};
|
|
@@ -95,7 +93,7 @@ export const InlineCard = ({
|
|
|
95
93
|
truncateInline: truncateInline
|
|
96
94
|
}));
|
|
97
95
|
case 'unauthorized':
|
|
98
|
-
const provider =
|
|
96
|
+
const provider = extractSmartLinkProvider(details);
|
|
99
97
|
return /*#__PURE__*/React.createElement(InlineCardUnauthorizedView, {
|
|
100
98
|
icon: provider && provider.icon,
|
|
101
99
|
context: provider && provider.text,
|
|
@@ -110,7 +108,7 @@ export const InlineCard = ({
|
|
|
110
108
|
truncateInline: truncateInline
|
|
111
109
|
});
|
|
112
110
|
case 'forbidden':
|
|
113
|
-
const providerForbidden =
|
|
111
|
+
const providerForbidden = extractSmartLinkProvider(details);
|
|
114
112
|
const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
115
113
|
const requestAccessContext = extractRequestAccessContextImproved({
|
|
116
114
|
jsonLd: cardMetadata,
|
|
@@ -131,7 +129,7 @@ export const InlineCard = ({
|
|
|
131
129
|
truncateInline: truncateInline
|
|
132
130
|
});
|
|
133
131
|
case 'not_found':
|
|
134
|
-
const providerNotFound =
|
|
132
|
+
const providerNotFound = extractSmartLinkProvider(details);
|
|
135
133
|
return /*#__PURE__*/React.createElement(InlineCardErroredView, {
|
|
136
134
|
url: url,
|
|
137
135
|
icon: providerNotFound && providerNotFound.icon,
|
|
@@ -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: "38.
|
|
13
|
+
packageVersion: "38.9.1",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
import { extractEntityProvider, extractProvider, extractProviderIcon, extractUrlFromIconJsonLd, isEntityPresent } from '@atlaskit/link-extractors';
|
|
5
|
+
import { getEmptyJsonLd } from '../../../utils/jsonld';
|
|
5
6
|
import { prioritiseIcon } from '../icon/prioritiseIcon';
|
|
6
7
|
export { extractRequestAccessContextImproved } from './extractAccessContext';
|
|
7
8
|
export function generateContext(jsonLd) {
|
|
@@ -34,5 +35,5 @@ export function extractSmartLinkContext(response) {
|
|
|
34
35
|
if (isEntityPresent(response)) {
|
|
35
36
|
return extractEntityProvider(response);
|
|
36
37
|
}
|
|
37
|
-
return generateContext(response === null || response === void 0 ? void 0 : response.data);
|
|
38
|
+
return generateContext((response === null || response === void 0 ? void 0 : response.data) || getEmptyJsonLd());
|
|
38
39
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
-
import {
|
|
4
|
+
import { extractPreview, extractSmartLinkEmbed, extractSmartLinkTitle, extractSmartLinkUrl, extractType } from '@atlaskit/link-extractors';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { getEmptyJsonLd } from '../../utils/jsonld';
|
|
7
|
-
import { extractSmartLinkContext
|
|
7
|
+
import { extractSmartLinkContext } from '../common/context';
|
|
8
8
|
import { extractIsSupportTheming } from '../common/meta/extractIsSupportTheming';
|
|
9
9
|
import { extractIsTrusted } from '../common/meta/extractIsTrusted';
|
|
10
10
|
var extractEmbedPreview = function extractEmbedPreview(jsonLd, platform, iframeUrlType) {
|
|
@@ -18,23 +18,11 @@ var extractEmbedPreview = function extractEmbedPreview(jsonLd, platform, iframeU
|
|
|
18
18
|
export var extractEmbedProps = function extractEmbedProps(response, platform, iframeUrlType) {
|
|
19
19
|
var meta = response === null || response === void 0 ? void 0 : response.meta;
|
|
20
20
|
var jsonLd = (response === null || response === void 0 ? void 0 : response.data) || getEmptyJsonLd();
|
|
21
|
-
if (fg('smart_links_noun_support')) {
|
|
22
|
-
return _objectSpread({
|
|
23
|
-
link: extractSmartLinkUrl(response) || '',
|
|
24
|
-
title: extractSmartLinkTitle(response),
|
|
25
|
-
context: extractSmartLinkContext(response),
|
|
26
|
-
preview: extractSmartLinkEmbed(response, iframeUrlType),
|
|
27
|
-
isTrusted: extractIsTrusted(meta),
|
|
28
|
-
isSupportTheming: extractIsSupportTheming(meta)
|
|
29
|
-
}, fg('platform-linking-visual-refresh-v2') && {
|
|
30
|
-
type: extractType(jsonLd)
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
21
|
return _objectSpread({
|
|
34
|
-
link:
|
|
35
|
-
title:
|
|
36
|
-
context:
|
|
37
|
-
preview: extractEmbedPreview(jsonLd, platform, iframeUrlType),
|
|
22
|
+
link: extractSmartLinkUrl(response) || '',
|
|
23
|
+
title: extractSmartLinkTitle(response),
|
|
24
|
+
context: extractSmartLinkContext(response),
|
|
25
|
+
preview: fg('smart_links_noun_support') ? extractSmartLinkEmbed(response, iframeUrlType) : extractEmbedPreview(jsonLd, platform, iframeUrlType),
|
|
38
26
|
isTrusted: extractIsTrusted(meta),
|
|
39
27
|
isSupportTheming: extractIsSupportTheming(meta)
|
|
40
28
|
}, fg('platform-linking-visual-refresh-v2') && {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
|
+
import { extractSmartLinkTitle, extractSmartLinkUrl } from '@atlaskit/link-extractors';
|
|
3
2
|
import { SmartLinkStatus } from '../../constants';
|
|
4
3
|
var extractLinkTitle = function extractLinkTitle(status, propUrl, response, onClick) {
|
|
5
4
|
var _ref;
|
|
6
|
-
var
|
|
7
|
-
var responseUrl = fg('smart_links_noun_support') ? extractSmartLinkUrl(response) : extractLink(data);
|
|
5
|
+
var responseUrl = extractSmartLinkUrl(response);
|
|
8
6
|
var url = status === SmartLinkStatus.Resolved ? responseUrl !== null && responseUrl !== void 0 ? responseUrl : propUrl : propUrl;
|
|
9
|
-
var name =
|
|
7
|
+
var name = extractSmartLinkTitle(response);
|
|
10
8
|
var text = status === SmartLinkStatus.Resolved ? (_ref = name !== null && name !== void 0 ? name : responseUrl) !== null && _ref !== void 0 ? _ref : propUrl : propUrl;
|
|
11
9
|
return {
|
|
12
10
|
onClick: onClick,
|
|
@@ -3,19 +3,19 @@ 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 {
|
|
6
|
+
import { extractPersonCreatedBy, extractPersonOwnedBy, extractSmartLinkAri, extractSmartLinkCreatedBy, extractSmartLinkCreatedOn, extractSmartLinkModifiedBy, extractSmartLinkModifiedOn, extractSmartLinkTitle, extractSmartLinkUrl, extractType } from '@atlaskit/link-extractors';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { extractSummary } from '../common/primitives';
|
|
9
9
|
import { extractFlexibleCardActions } from './actions';
|
|
10
10
|
import { extractPersonsUpdatedBy } from './collaboratorGroup';
|
|
11
11
|
import extractLinkTitle from './extract-link-title';
|
|
12
|
-
import
|
|
12
|
+
import { extractSmartLinkPreviewImage } from './extract-preview';
|
|
13
13
|
import extractPriority from './extract-priority';
|
|
14
14
|
import extractState from './extract-state';
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
15
|
+
import { extractSmartLinkIcon } from './icon';
|
|
16
|
+
import { extractSmartLinkProviderIcon } from './icon/extract-provider-icon';
|
|
17
17
|
import { extractLatestCommit } from './latest-commit';
|
|
18
|
-
import { extractAppliedToComponentsCount, extractAssignedTo, extractAttachmentCount, extractChecklistProgress, extractCommentCount,
|
|
18
|
+
import { extractAppliedToComponentsCount, extractAssignedTo, extractAttachmentCount, extractChecklistProgress, extractCommentCount, extractDueOn, extractLocation, extractMetaObjectId, extractMetaResourceType, extractMetaTenantId, extractOwnedBy, extractPersonAssignedToAsArray, extractProgrammingLanguage, extractReactCount, extractReadTime, extractSentOn, extractSourceBranch, extractStoryPoints, extractSubscriberCount, extractSubTasksProgress, extractTargetBranch, extractViewCount, extractVoteCount } from './utils';
|
|
19
19
|
var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
20
20
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
21
21
|
var appearance = _ref.appearance,
|
|
@@ -35,7 +35,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
35
35
|
}
|
|
36
36
|
var data = response.data;
|
|
37
37
|
var meta = response.meta;
|
|
38
|
-
var url =
|
|
38
|
+
var url = extractSmartLinkUrl(response);
|
|
39
39
|
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
40
40
|
actions: extractFlexibleCardActions({
|
|
41
41
|
actionOptions: actionOptions,
|
|
@@ -58,22 +58,22 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
58
58
|
reactCount: extractReactCount(data),
|
|
59
59
|
voteCount: extractVoteCount(data),
|
|
60
60
|
checklistProgress: extractChecklistProgress(data),
|
|
61
|
-
createdBy:
|
|
61
|
+
createdBy: extractSmartLinkCreatedBy(response),
|
|
62
62
|
ownedBy: extractOwnedBy(data),
|
|
63
63
|
assignedTo: extractAssignedTo(data),
|
|
64
|
-
createdOn:
|
|
64
|
+
createdOn: extractSmartLinkCreatedOn(response),
|
|
65
65
|
dueOn: extractDueOn(data),
|
|
66
66
|
latestCommit: extractLatestCommit(data),
|
|
67
|
-
linkIcon:
|
|
67
|
+
linkIcon: extractSmartLinkIcon(response)
|
|
68
68
|
}, fg('platform-linking-flexible-card-context') && {
|
|
69
69
|
linkTitle: extractLinkTitle(status, props.url, response, onClick)
|
|
70
70
|
}), {}, {
|
|
71
71
|
location: extractLocation(data),
|
|
72
|
-
modifiedBy:
|
|
73
|
-
modifiedOn:
|
|
74
|
-
preview:
|
|
72
|
+
modifiedBy: extractSmartLinkModifiedBy(response),
|
|
73
|
+
modifiedOn: extractSmartLinkModifiedOn(response),
|
|
74
|
+
preview: extractSmartLinkPreviewImage(response),
|
|
75
75
|
priority: extractPriority(data),
|
|
76
|
-
provider:
|
|
76
|
+
provider: extractSmartLinkProviderIcon(response),
|
|
77
77
|
programmingLanguage: extractProgrammingLanguage(data),
|
|
78
78
|
readTime: extractReadTime(data),
|
|
79
79
|
sentOn: extractSentOn(data),
|
|
@@ -86,10 +86,10 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
86
86
|
storyPoints: extractStoryPoints(data),
|
|
87
87
|
targetBranch: extractTargetBranch(data)
|
|
88
88
|
}, fg('platform-linking-flexible-card-context') ? undefined : {
|
|
89
|
-
title:
|
|
89
|
+
title: extractSmartLinkTitle(response) || url
|
|
90
90
|
}), {}, {
|
|
91
91
|
url: url,
|
|
92
|
-
ari:
|
|
92
|
+
ari: extractSmartLinkAri(response)
|
|
93
93
|
}, fg('platform-linking-visual-refresh-v2') && {
|
|
94
94
|
type: extractType(data)
|
|
95
95
|
}), fg('cc-ai-linking-platform-snippet-renderer') && {
|