@atlaskit/smart-card 35.1.2 → 35.1.4
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 +17 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/index.js +1 -1
- package/dist/cjs/view/BlockCard/views/ForbiddenView.compiled.css +1 -0
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +23 -8
- package/dist/cjs/view/BlockCard/views/ForbiddenViewOld.js +110 -0
- package/dist/cjs/view/BlockCard/views/NotFoundView.compiled.css +1 -0
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +22 -7
- package/dist/cjs/view/BlockCard/views/NotFoundViewOld.js +74 -0
- package/dist/cjs/view/BlockCard/views/ResolvedView.compiled.css +7 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +7 -5
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.compiled.css +3 -1
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +3 -1
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.compiled.css +11 -2
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.js +6 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +5 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.compiled.css +4 -4
- package/dist/cjs/view/FlexibleCard/components/container/index.js +8 -8
- package/dist/cjs/view/HoverCard/components/ImagePreview.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.compiled.css +1 -0
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +8 -4
- package/dist/cjs/view/HoverCard/components/views/resolved/index.compiled.css +3 -0
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +11 -6
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.compiled.css +3 -0
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +6 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/index.js +1 -1
- package/dist/es2019/view/BlockCard/views/ForbiddenView.compiled.css +1 -0
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +17 -3
- package/dist/es2019/view/BlockCard/views/ForbiddenViewOld.js +103 -0
- package/dist/es2019/view/BlockCard/views/NotFoundView.compiled.css +1 -0
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +17 -3
- package/dist/es2019/view/BlockCard/views/NotFoundViewOld.js +61 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.compiled.css +7 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +7 -5
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.compiled.css +3 -1
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +3 -1
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.compiled.css +11 -2
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.js +6 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +5 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.compiled.css +4 -4
- package/dist/es2019/view/FlexibleCard/components/container/index.js +8 -8
- package/dist/es2019/view/HoverCard/components/ImagePreview.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/forbidden/index.compiled.css +1 -0
- package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +8 -4
- package/dist/es2019/view/HoverCard/components/views/resolved/index.compiled.css +3 -0
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +11 -6
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.compiled.css +3 -0
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +6 -3
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/index.js +1 -1
- package/dist/esm/view/BlockCard/views/ForbiddenView.compiled.css +1 -0
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +17 -3
- package/dist/esm/view/BlockCard/views/ForbiddenViewOld.js +101 -0
- package/dist/esm/view/BlockCard/views/NotFoundView.compiled.css +1 -0
- package/dist/esm/view/BlockCard/views/NotFoundView.js +17 -3
- package/dist/esm/view/BlockCard/views/NotFoundViewOld.js +65 -0
- package/dist/esm/view/BlockCard/views/ResolvedView.compiled.css +7 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +7 -5
- package/dist/esm/view/BlockCard/views/UnauthorisedView.compiled.css +3 -1
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +3 -1
- package/dist/esm/view/BlockCard/views/unresolved-view/index.compiled.css +11 -2
- package/dist/esm/view/BlockCard/views/unresolved-view/index.js +6 -3
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +5 -2
- package/dist/esm/view/FlexibleCard/components/container/index.compiled.css +4 -4
- package/dist/esm/view/FlexibleCard/components/container/index.js +8 -8
- package/dist/esm/view/HoverCard/components/ImagePreview.js +1 -1
- package/dist/esm/view/HoverCard/components/views/forbidden/index.compiled.css +1 -0
- package/dist/esm/view/HoverCard/components/views/forbidden/index.js +8 -4
- package/dist/esm/view/HoverCard/components/views/resolved/index.compiled.css +3 -0
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +11 -6
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.compiled.css +3 -0
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +6 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/BlockCard/views/ForbiddenViewOld.d.ts +10 -0
- package/dist/types/view/BlockCard/views/NotFoundViewOld.d.ts +9 -0
- package/dist/types-ts4.5/view/BlockCard/views/ForbiddenViewOld.d.ts +10 -0
- package/dist/types-ts4.5/view/BlockCard/views/NotFoundViewOld.d.ts +9 -0
- package/package.json +2 -2
|
@@ -8,8 +8,11 @@ import FlexibleCard from '../../../FlexibleCard';
|
|
|
8
8
|
import { CustomBlock, InternalFooterBlock, PreviewBlock, TitleBlock } from '../../../FlexibleCard/components/blocks';
|
|
9
9
|
import { FlexibleCardUiOptions, PreviewBlockOptions, titleBlockOptions } from '../utils';
|
|
10
10
|
import UnresolvedViewOld from './UnresolvedViewOld';
|
|
11
|
+
const customBlockStylesOld = null;
|
|
11
12
|
const customBlockStyles = null;
|
|
13
|
+
const titleBlockCssOld = null;
|
|
12
14
|
const titleBlockCss = null;
|
|
15
|
+
const footerBlockCssOld = null;
|
|
13
16
|
const footerBlockCss = null;
|
|
14
17
|
const UnresolvedView = ({
|
|
15
18
|
actions,
|
|
@@ -36,17 +39,17 @@ const UnresolvedView = ({
|
|
|
36
39
|
hideIcon: !!title,
|
|
37
40
|
text: title,
|
|
38
41
|
status: cardState.status,
|
|
39
|
-
className: ax(["_zulp1f3t _13mh1pd9"])
|
|
42
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9 _2yhz14q2" : "_zulp1f3t _13mh1pd9"])
|
|
40
43
|
})), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
41
44
|
status: cardState.status,
|
|
42
|
-
className: ax(["_4cvr1y6m"])
|
|
45
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc01fxt" : "_4cvr1y6m"])
|
|
43
46
|
}, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, _extends({}, PreviewBlockOptions, {
|
|
44
47
|
status: cardState.status
|
|
45
48
|
})), /*#__PURE__*/React.createElement(InternalFooterBlock, {
|
|
46
49
|
actions: actions,
|
|
47
50
|
testId: "smart-block-card-footer",
|
|
48
51
|
status: cardState.status,
|
|
49
|
-
className: ax(["_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
52
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
50
53
|
}));
|
|
51
54
|
export const UnresolvedViewExported = props => {
|
|
52
55
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
@@ -48,6 +48,7 @@ const ActionBlockNew = ({
|
|
|
48
48
|
onClick: onClickCallback,
|
|
49
49
|
size,
|
|
50
50
|
spaceInline,
|
|
51
|
+
className,
|
|
51
52
|
testId = 'smart-block-action'
|
|
52
53
|
}) => {
|
|
53
54
|
const context = useFlexibleUiContext();
|
|
@@ -92,8 +93,10 @@ const ActionBlockNew = ({
|
|
|
92
93
|
}, [context === null || context === void 0 ? void 0 : context.actions, onClick, onError, padding, size, spaceInline, isLoading, onLoadingChange]);
|
|
93
94
|
return actions ? /*#__PURE__*/React.createElement("div", {
|
|
94
95
|
ref: blockRef,
|
|
95
|
-
"data-testid": testId
|
|
96
|
-
|
|
96
|
+
"data-testid": testId
|
|
97
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
98
|
+
,
|
|
99
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_1e0c1txw _2lx21bp4 _vchhusvi _16jlkb7n _1bsb129b _18u01ivi _2hwxc10g" : "_1e0c1txw _2lx21bp4 _vchhusvi _16jlkb7n _1bsb1osq _18u01ivi _2hwxc10g", className])
|
|
97
100
|
}, actions, /*#__PURE__*/React.createElement(ActionFooter, {
|
|
98
101
|
message: message,
|
|
99
102
|
testId: testId
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
._19bv16ru{padding-left:calc(var(--preview-block-width) + var(--ds-space-250, 20px))}
|
|
17
17
|
._19bv1g7w{padding-left:calc(var(--preview-block-width) + var(--ds-space-200, 1pc))}
|
|
18
18
|
._19bv1ltm{padding-left:calc(var(--preview-block-width) + .25rem)}
|
|
19
|
-
.
|
|
19
|
+
._19bver0k{padding-left:calc(var(--preview-block-width) + var(--ds-space-300, 24px))}
|
|
20
20
|
._19bvf557{padding-left:calc(var(--preview-block-width) + 1rem)}
|
|
21
21
|
._19bvlbes{padding-left:calc(var(--preview-block-width) + var(--ds-space-100, 8px))}
|
|
22
22
|
._19bvqox2{padding-left:calc(var(--preview-block-width) + .5rem)}
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
._1reo15vq{overflow-x:hidden}
|
|
27
27
|
._1t4ckb7n .has-action, ._1nxdkb7n a, ._xnbykb7n button{z-index:1}
|
|
28
28
|
._1ul9idpf{min-width:0}
|
|
29
|
-
._1yob1b66{--container-gap-right:var(--ds-space-050,4px)}
|
|
30
29
|
._1yob1eak{--container-gap-right:var(--ds-space-200,16px)}
|
|
30
|
+
._1yob1ejb{--container-gap-right:var(--ds-space-300,24px)}
|
|
31
31
|
._1yob1j6v{--container-gap-right:1rem}
|
|
32
32
|
._1yob1k92{--container-gap-right:1.25rem}
|
|
33
33
|
._1yob1kwk{--container-gap-right:.5rem}
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
._u5f316ru{padding-right:calc(var(--preview-block-width) + var(--ds-space-250, 20px))}
|
|
48
48
|
._u5f31g7w{padding-right:calc(var(--preview-block-width) + var(--ds-space-200, 1pc))}
|
|
49
49
|
._u5f31ltm{padding-right:calc(var(--preview-block-width) + .25rem)}
|
|
50
|
-
.
|
|
50
|
+
._u5f3er0k{padding-right:calc(var(--preview-block-width) + var(--ds-space-300, 24px))}
|
|
51
51
|
._u5f3f557{padding-right:calc(var(--preview-block-width) + 1rem)}
|
|
52
52
|
._u5f3lbes{padding-right:calc(var(--preview-block-width) + var(--ds-space-100, 8px))}
|
|
53
53
|
._u5f3qox2{padding-right:calc(var(--preview-block-width) + .5rem)}
|
|
54
54
|
._y5vk167t{--container-gap-left:var(--_73mooq)}
|
|
55
|
-
._y5vk1b66{--container-gap-left:var(--ds-space-050,4px)}
|
|
56
55
|
._y5vk1eak{--container-gap-left:var(--ds-space-200,16px)}
|
|
56
|
+
._y5vk1ejb{--container-gap-left:var(--ds-space-300,24px)}
|
|
57
57
|
._y5vk1j6v{--container-gap-left:1rem}
|
|
58
58
|
._y5vk1k92{--container-gap-left:1.25rem}
|
|
59
59
|
._y5vk1kwk{--container-gap-left:.5rem}
|
|
@@ -215,10 +215,10 @@ const previewOnLeftStyleMapOld = {
|
|
|
215
215
|
small: "_19bv1ltm _y5vk6mu8"
|
|
216
216
|
};
|
|
217
217
|
const previewOnLeftStyleMap = {
|
|
218
|
-
xlarge: "
|
|
219
|
-
large: "
|
|
220
|
-
medium: "
|
|
221
|
-
small: "
|
|
218
|
+
xlarge: "_19bver0k _y5vk1ejb",
|
|
219
|
+
large: "_19bv16ru _y5vkv47k",
|
|
220
|
+
medium: "_19bv1g7w _y5vk1eak",
|
|
221
|
+
small: "_19bvlbes _y5vku2gc"
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
@@ -229,10 +229,10 @@ const previewOnRightStyleMapOld = {
|
|
|
229
229
|
small: "_u5f31ltm _1yob6mu8"
|
|
230
230
|
};
|
|
231
231
|
const previewOnRightStyleMap = {
|
|
232
|
-
xlarge: "
|
|
233
|
-
large: "
|
|
234
|
-
medium: "
|
|
235
|
-
small: "
|
|
232
|
+
xlarge: "_u5f3er0k _1yob1ejb",
|
|
233
|
+
large: "_u5f316ru _1yobv47k",
|
|
234
|
+
medium: "_u5f31g7w _1yob1eak",
|
|
235
|
+
small: "_u5f3lbes _1yobu2gc"
|
|
236
236
|
};
|
|
237
237
|
|
|
238
238
|
/**
|
|
@@ -20,7 +20,7 @@ const ImagePreviewNew = ({
|
|
|
20
20
|
setDynamicStyles({
|
|
21
21
|
borderTopLeftRadius: "var(--ds-border-radius-200, 8px)",
|
|
22
22
|
borderTopRightRadius: "var(--ds-border-radius-200, 8px)",
|
|
23
|
-
marginBottom: '0.5rem',
|
|
23
|
+
marginBottom: fg('platform-linking-visual-refresh-v1') ? "var(--ds-space-100, 8px)" : '0.5rem',
|
|
24
24
|
...(previewHeight ? {
|
|
25
25
|
height: `${previewHeight}px`
|
|
26
26
|
} : {})
|
|
@@ -6,5 +6,6 @@
|
|
|
6
6
|
._1e0c1nu9{display:inline}
|
|
7
7
|
._k48p1pd9{font-weight:var(--ds-font-weight-semibold,600)}
|
|
8
8
|
._otyrcxkx{margin-bottom:var(--ds-space-100,.5rem)}
|
|
9
|
+
._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
|
|
9
10
|
._qrwqpd34{border-top-right-radius:var(--ds-border-radius-200,8px)}
|
|
10
11
|
._y3gn1h6o{text-align:center}
|
|
@@ -15,9 +15,13 @@ import { messages } from '../../../../../messages';
|
|
|
15
15
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
16
16
|
import { CustomBlock, PreviewBlock } from '../../../../FlexibleCard/components/blocks';
|
|
17
17
|
import HoverCardForbiddenViewOld from './HoverCardForbiddenViewOld';
|
|
18
|
+
const titleBlockStylesOld = null;
|
|
18
19
|
const titleBlockStyles = null;
|
|
20
|
+
const mainTextStylesOld = null;
|
|
19
21
|
const mainTextStyles = null;
|
|
22
|
+
const connectButtonStylesOld = null;
|
|
20
23
|
const connectButtonStyles = null;
|
|
24
|
+
const basePreviewStylesOld = null;
|
|
21
25
|
const basePreviewStyles = null;
|
|
22
26
|
const HoverCardForbiddenViewNew = ({
|
|
23
27
|
flexibleCardProps,
|
|
@@ -55,11 +59,11 @@ const HoverCardForbiddenViewNew = ({
|
|
|
55
59
|
ignoreContainerPadding: true,
|
|
56
60
|
testId: testId,
|
|
57
61
|
status: SmartLinkStatus.Forbidden,
|
|
58
|
-
className: ax(["_13lipd34 _qrwqpd34 _otyrcxkx"])
|
|
62
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_13lipd34 _qrwqpd34 _otyru2gc" : "_13lipd34 _qrwqpd34 _otyrcxkx"])
|
|
59
63
|
}), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
60
64
|
testId: `${testId}-title`,
|
|
61
65
|
status: SmartLinkStatus.Forbidden,
|
|
62
|
-
className: ax(["_1bah1h6o _k48p1pd9 _19pku2gc"])
|
|
66
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_1bah1h6o _k48p1pd9 _19pku2gc" : "_1bah1h6o _k48p1pd9 _19pku2gc"])
|
|
63
67
|
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[titleMessageKey], {
|
|
64
68
|
values: {
|
|
65
69
|
product
|
|
@@ -67,7 +71,7 @@ const HoverCardForbiddenViewNew = ({
|
|
|
67
71
|
}))), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
68
72
|
testId: `${testId}-content`,
|
|
69
73
|
status: SmartLinkStatus.Forbidden,
|
|
70
|
-
className: ax(["_11c8qk37 _1e0c1nu9 _1bah1h6o _19pkze3t _y3gn1h6o"])
|
|
74
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_11c8qk37 _1e0c1nu9 _1bah1h6o _19pkze3t _y3gn1h6o" : "_11c8qk37 _1e0c1nu9 _1bah1h6o _19pkze3t _y3gn1h6o"])
|
|
71
75
|
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
|
|
72
76
|
values: {
|
|
73
77
|
product,
|
|
@@ -75,7 +79,7 @@ const HoverCardForbiddenViewNew = ({
|
|
|
75
79
|
}
|
|
76
80
|
}))), action && /*#__PURE__*/React.createElement(CustomBlock, {
|
|
77
81
|
status: SmartLinkStatus.Forbidden,
|
|
78
|
-
className: ax(["_1bah1h6o _19pku2gc"])
|
|
82
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_1bah1h6o _19pku2gc" : "_1bah1h6o _19pku2gc"])
|
|
79
83
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
80
84
|
testId: `${testId}-button`,
|
|
81
85
|
onClick: action === null || action === void 0 ? void 0 : action.promise,
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
._2aco1vlj [data-smart-element-group]{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
3
3
|
._quenui7n [data-smart-element-group]{gap:.06rem}
|
|
4
|
+
._quenze3t [data-smart-element-group]{gap:var(--ds-space-0,0)}
|
|
4
5
|
._zulpidpf{gap:0}
|
|
5
6
|
._zulpu2gc{gap:var(--ds-space-100,8px)}._13mh1pd9 [data-smart-element=Title]{font-weight:var(--ds-font-weight-semibold,600)}
|
|
6
7
|
._1ljqu2gc [data-separator]+[data-separator]:before{margin-right:var(--ds-space-100,8px)}
|
|
7
8
|
._3tmpcxkx [data-smart-element-group]:nth-of-type(2)>span{margin-left:var(--ds-space-100,.5rem)}
|
|
8
9
|
._3um015vq{visibility:hidden}
|
|
10
|
+
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
9
11
|
._fmt31ohn [data-smart-element-group]:first-of-type{flex-grow:7}
|
|
10
12
|
._ia0l11wp [data-smart-element-group]:nth-of-type(2){flex-grow:3}
|
|
11
13
|
._kqswstnw{position:absolute}
|
|
14
|
+
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
12
15
|
._oebj1txw [data-smart-element-group]{display:flex}
|
|
13
16
|
._w3mucxkx [data-smart-element-group]:first-of-type>span{margin-right:var(--ds-space-100,.5rem)}
|
|
14
17
|
._x7z0u2gc [data-smart-element-group]>[data-smart-element-group]>span{margin-right:var(--ds-space-100,8px)}
|
|
@@ -13,12 +13,15 @@ import { getMetadata } from '../../../utils';
|
|
|
13
13
|
import ImagePreview from '../../ImagePreview';
|
|
14
14
|
import HoverCardResolvedViewOld from './HoverCardResolvedViewOld';
|
|
15
15
|
const hiddenSnippetStyles = null;
|
|
16
|
-
const
|
|
16
|
+
const metadataBlockCssOld = null;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Moved from HoverCardContent.tsx due to CompiledCSS migration.
|
|
20
20
|
*/
|
|
21
|
-
const
|
|
21
|
+
const titleBlockStyleOld = null;
|
|
22
|
+
const titleBlockStyles = null;
|
|
23
|
+
const snippetBlockCss = null;
|
|
24
|
+
const actionBlockCss = null;
|
|
22
25
|
const HoverCardResolvedViewNew = ({
|
|
23
26
|
cardState,
|
|
24
27
|
extensionKey,
|
|
@@ -66,20 +69,21 @@ const HoverCardResolvedViewNew = ({
|
|
|
66
69
|
fallbackElementHeight: snippetHeight.current
|
|
67
70
|
});
|
|
68
71
|
const snippet = imagePreview ? null : /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
69
|
-
status: SmartLinkStatus.Resolved
|
|
72
|
+
status: SmartLinkStatus.Resolved,
|
|
73
|
+
className: ax([fg('platform-linking-visual-refresh-v1') && "_ca0q1b66"])
|
|
70
74
|
});
|
|
71
75
|
const aiSummaryMinHeight = snippet ? snippetHeight.current : 0;
|
|
72
76
|
return /*#__PURE__*/React.createElement(FlexibleCard, flexibleCardProps, imagePreview, /*#__PURE__*/React.createElement(TitleBlock, _extends({}, titleBlockProps, {
|
|
73
77
|
metadataPosition: SmartLinkPosition.Top,
|
|
74
78
|
status: SmartLinkStatus.Resolved,
|
|
75
|
-
className: ax(["_zulpu2gc _quenui7n _oebj1txw _x7z0u2gc _1ljqu2gc _13mh1pd9"])
|
|
79
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _quenze3t _oebj1txw _13mh1pd9" : "_zulpu2gc _quenui7n _oebj1txw _x7z0u2gc _1ljqu2gc _13mh1pd9"])
|
|
76
80
|
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
77
81
|
primary: primary,
|
|
78
82
|
secondary: secondary,
|
|
79
83
|
maxLines: 1,
|
|
80
84
|
size: SmartLinkSize.Medium,
|
|
81
85
|
status: SmartLinkStatus.Resolved,
|
|
82
|
-
className: ax(["_zulpidpf _2aco1vlj _fmt31ohn _yklxcxkx _w3mucxkx _ia0l11wp _3tmpcxkx"])
|
|
86
|
+
className: ax([!fg('platform-linking-visual-refresh-v1') && "_zulpidpf _2aco1vlj _fmt31ohn _yklxcxkx _w3mucxkx _ia0l11wp _3tmpcxkx"])
|
|
83
87
|
}), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
84
88
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
85
89
|
placeholder: snippet,
|
|
@@ -92,7 +96,8 @@ const HoverCardResolvedViewNew = ({
|
|
|
92
96
|
className: ax(["_3um015vq _kqswstnw"])
|
|
93
97
|
}), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
94
98
|
onClick: onActionClick,
|
|
95
|
-
spaceInline: "space.100"
|
|
99
|
+
spaceInline: "space.100",
|
|
100
|
+
className: ax([fg('platform-linking-visual-refresh-v1') && "_n3td1b66"])
|
|
96
101
|
}), /*#__PURE__*/React.createElement(AIFooterBlock, null));
|
|
97
102
|
};
|
|
98
103
|
const HoverCardResolvedView = props => {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._zulp5l1i{gap:.5rem .5rem}
|
|
3
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
4
|
+
._13mh1pd9 [data-smart-element=Title]{font-weight:var(--ds-font-weight-semibold,600)}
|
|
3
5
|
._19pkcxkx{margin-top:var(--ds-space-100,.5rem)}
|
|
6
|
+
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
4
7
|
._1bahesu3{justify-content:flex-end}
|
|
5
8
|
._bpsp1wq8 a{font-weight:var(--ds-font-weight-medium,500)}
|
|
@@ -18,8 +18,11 @@ import { CustomBlock } from '../../../../FlexibleCard/components/blocks';
|
|
|
18
18
|
import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
|
|
19
19
|
import { LinkIcon } from '../../../../FlexibleCard/components/elements';
|
|
20
20
|
import HoverCardUnauthorisedViewOld from './HoverCardUnauthorisedViewOld';
|
|
21
|
+
const connectButtonStylesOld = null;
|
|
21
22
|
const connectButtonStyles = null;
|
|
23
|
+
const titleBlockStylesOld = null;
|
|
22
24
|
const titleBlockStyles = null;
|
|
25
|
+
const mainTextStylesOld = null;
|
|
23
26
|
const mainTextStyles = null;
|
|
24
27
|
const HoverCardUnauthorisedViewNew = ({
|
|
25
28
|
id = '',
|
|
@@ -59,20 +62,20 @@ const HoverCardUnauthorisedViewNew = ({
|
|
|
59
62
|
testId: testId
|
|
60
63
|
}), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
61
64
|
testId: `${testId}-title`,
|
|
62
|
-
className: ax(["_zulp5l1i _bpsp1wq8"])
|
|
65
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9" : "_zulp5l1i _bpsp1wq8"])
|
|
63
66
|
}, /*#__PURE__*/React.createElement(LinkIcon, null), /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
|
|
64
67
|
values: {
|
|
65
68
|
context: providerName
|
|
66
69
|
}
|
|
67
70
|
}))), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
68
71
|
testId: `${testId}-content`,
|
|
69
|
-
className: ax(["_11c8qk37 _19pkcxkx"])
|
|
72
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_11c8qk37 _19pku2gc" : "_11c8qk37 _19pkcxkx"])
|
|
70
73
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
71
74
|
providerName: providerName,
|
|
72
75
|
isProductIntegrationSupported: isProductIntegrationSupported
|
|
73
76
|
}))), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
74
77
|
testId: `${testId}-button`,
|
|
75
|
-
className: ax(["_1bahesu3 _19pkcxkx"])
|
|
78
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_1bahesu3 _19pku2gc" : "_1bahesu3 _19pkcxkx"])
|
|
76
79
|
}, /*#__PURE__*/React.createElement(ActionGroup, {
|
|
77
80
|
items: actions,
|
|
78
81
|
appearance: "primary"
|
|
@@ -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: "35.1.
|
|
13
|
+
packageVersion: "35.1.4",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "35.1.
|
|
7
|
+
packageVersion: "35.1.4"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -38,7 +38,7 @@ export var BlockCard = function BlockCard(_ref) {
|
|
|
38
38
|
case 'pending':
|
|
39
39
|
case 'resolving':
|
|
40
40
|
return /*#__PURE__*/React.createElement(ResolvedView, _extends({}, blockCardProps, {
|
|
41
|
-
testId:
|
|
41
|
+
testId: "smart-block-resolving-view"
|
|
42
42
|
}));
|
|
43
43
|
case 'resolved':
|
|
44
44
|
return /*#__PURE__*/React.createElement(ResolvedView, blockCardProps);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
/* ForbiddenView.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
5
|
var _excluded = ["testId"];
|
|
5
|
-
import
|
|
6
|
+
import "./ForbiddenView.compiled.css";
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
9
|
+
import { useMemo } from 'react';
|
|
6
10
|
import { useIntl } from 'react-intl-next';
|
|
7
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
12
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
@@ -17,8 +21,10 @@ import { toMessage } from '../../../utils/intl-utils';
|
|
|
17
21
|
import { getForbiddenJsonLd } from '../../../utils/jsonld';
|
|
18
22
|
import Text from '../../FlexibleCard/components/elements/text';
|
|
19
23
|
import { ForbiddenAction } from '../actions/ForbiddenAction';
|
|
24
|
+
import { ForbiddenViewOld } from './ForbiddenViewOld';
|
|
20
25
|
import UnresolvedView from './unresolved-view';
|
|
21
26
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
27
|
+
var textStyles = null;
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
* This view represent a Block Card with the 'Forbidden' status.
|
|
@@ -27,7 +33,7 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
|
|
|
27
33
|
* @see SmartLinkStatus
|
|
28
34
|
* @see FlexibleCardProps
|
|
29
35
|
*/
|
|
30
|
-
var
|
|
36
|
+
var ForbiddenViewNew = function ForbiddenViewNew(_ref) {
|
|
31
37
|
var _details$meta;
|
|
32
38
|
var _ref$testId = _ref.testId,
|
|
33
39
|
testId = _ref$testId === void 0 ? 'smart-block-forbidden-view' : _ref$testId,
|
|
@@ -97,7 +103,15 @@ var ForbiddenView = function ForbiddenView(_ref) {
|
|
|
97
103
|
message: {
|
|
98
104
|
descriptor: toMessage(messages.invalid_permissions_description, requestAccessContext === null || requestAccessContext === void 0 ? void 0 : requestAccessContext.descriptiveMessageKey),
|
|
99
105
|
values: messageContext
|
|
100
|
-
}
|
|
106
|
+
},
|
|
107
|
+
className: ax([fg('platform-linking-visual-refresh-v1') && "_syaz1fxt"])
|
|
101
108
|
}));
|
|
102
109
|
};
|
|
110
|
+
var ForbiddenView = function ForbiddenView(props) {
|
|
111
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
112
|
+
return /*#__PURE__*/React.createElement(ForbiddenViewNew, props);
|
|
113
|
+
} else {
|
|
114
|
+
return /*#__PURE__*/React.createElement(ForbiddenViewOld, props);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
103
117
|
export default withFlexibleUIBlockCardStyle(ForbiddenView);
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["testId"];
|
|
5
|
+
import React, { useMemo } from 'react';
|
|
6
|
+
import { useIntl } from 'react-intl-next';
|
|
7
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
|
+
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
9
|
+
import LegacyLockIcon from '@atlaskit/icon/glyph/lock';
|
|
10
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
13
|
+
import { extractRequestAccessContextImproved } from '../../../extractors/common/context/extractAccessContext';
|
|
14
|
+
import extractHostname from '../../../extractors/common/hostname/extractHostname';
|
|
15
|
+
import { messages } from '../../../messages';
|
|
16
|
+
import { toMessage } from '../../../utils/intl-utils';
|
|
17
|
+
import { getForbiddenJsonLd } from '../../../utils/jsonld';
|
|
18
|
+
import Text from '../../FlexibleCard/components/elements/text';
|
|
19
|
+
import { ForbiddenAction } from '../actions/ForbiddenAction';
|
|
20
|
+
import UnresolvedView from './unresolved-view';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* This view represent a Block Card with the 'Forbidden' status.
|
|
24
|
+
* It should have a "Try another account" button that will allow a user to connect another account and view the block card.
|
|
25
|
+
*
|
|
26
|
+
* @see SmartLinkStatus
|
|
27
|
+
* @see FlexibleCardProps
|
|
28
|
+
*/
|
|
29
|
+
export var ForbiddenViewOld = function ForbiddenViewOld(_ref) {
|
|
30
|
+
var _details$meta;
|
|
31
|
+
var _ref$testId = _ref.testId,
|
|
32
|
+
testId = _ref$testId === void 0 ? 'smart-block-forbidden-view' : _ref$testId,
|
|
33
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
35
|
+
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
36
|
+
var intl = useIntl();
|
|
37
|
+
var cardState = props.cardState,
|
|
38
|
+
onAuthorize = props.onAuthorize,
|
|
39
|
+
url = props.url;
|
|
40
|
+
var details = cardState === null || cardState === void 0 ? void 0 : cardState.details;
|
|
41
|
+
var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
42
|
+
var provider = extractProvider(details === null || details === void 0 ? void 0 : details.data);
|
|
43
|
+
var providerName = (provider === null || provider === void 0 ? void 0 : provider.text) || '';
|
|
44
|
+
var messageContext = useMemo(function () {
|
|
45
|
+
var hostname = /*#__PURE__*/React.createElement("b", null, extractHostname(url));
|
|
46
|
+
return {
|
|
47
|
+
product: providerName,
|
|
48
|
+
hostname: hostname
|
|
49
|
+
};
|
|
50
|
+
}, [providerName, url]);
|
|
51
|
+
var requestAccessContext = useMemo(function () {
|
|
52
|
+
return extractRequestAccessContextImproved({
|
|
53
|
+
jsonLd: cardMetadata,
|
|
54
|
+
url: url,
|
|
55
|
+
product: providerName,
|
|
56
|
+
createAnalyticsEvent: createAnalyticsEvent
|
|
57
|
+
});
|
|
58
|
+
}, [cardMetadata, providerName, url, createAnalyticsEvent]);
|
|
59
|
+
var title = useMemo(function () {
|
|
60
|
+
var descriptor = toMessage(messages.invalid_permissions, requestAccessContext === null || requestAccessContext === void 0 ? void 0 : requestAccessContext.titleMessageKey);
|
|
61
|
+
return intl.formatMessage(descriptor, {
|
|
62
|
+
product: providerName
|
|
63
|
+
});
|
|
64
|
+
}, [intl, providerName, requestAccessContext === null || requestAccessContext === void 0 ? void 0 : requestAccessContext.titleMessageKey]);
|
|
65
|
+
var actions = useMemo(function () {
|
|
66
|
+
var actionFromAccessContext = [];
|
|
67
|
+
var tryAnotherAccountAction = onAuthorize ? [ForbiddenAction(onAuthorize, 'try_another_account')] : [];
|
|
68
|
+
if (requestAccessContext) {
|
|
69
|
+
var action = requestAccessContext.action,
|
|
70
|
+
callToActionMessageKey = requestAccessContext.callToActionMessageKey;
|
|
71
|
+
actionFromAccessContext = action && callToActionMessageKey ? [ForbiddenAction(action.promise, callToActionMessageKey, messageContext, requestAccessContext === null || requestAccessContext === void 0 ? void 0 : requestAccessContext.buttonDisabled)] : [];
|
|
72
|
+
}
|
|
73
|
+
return [].concat(tryAnotherAccountAction, _toConsumableArray(actionFromAccessContext));
|
|
74
|
+
}, [onAuthorize, requestAccessContext, messageContext]);
|
|
75
|
+
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
76
|
+
actions: actions,
|
|
77
|
+
showPreview: true,
|
|
78
|
+
testId: testId,
|
|
79
|
+
title: title
|
|
80
|
+
}), fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(LockLockedIcon, {
|
|
81
|
+
label: "forbidden-lock-icon",
|
|
82
|
+
color: "var(--ds-icon-danger, #C9372C)",
|
|
83
|
+
LEGACY_fallbackIcon: LegacyLockIcon,
|
|
84
|
+
LEGACY_size: "small",
|
|
85
|
+
testId: "".concat(testId, "-lock-icon")
|
|
86
|
+
}) :
|
|
87
|
+
/*#__PURE__*/
|
|
88
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19497
|
|
89
|
+
React.createElement(LegacyLockIcon, {
|
|
90
|
+
label: "forbidden-lock-icon",
|
|
91
|
+
size: "small",
|
|
92
|
+
primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
|
|
93
|
+
testId: "".concat(testId, "-lock-icon")
|
|
94
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
95
|
+
maxLines: 3,
|
|
96
|
+
message: {
|
|
97
|
+
descriptor: toMessage(messages.invalid_permissions_description, requestAccessContext === null || requestAccessContext === void 0 ? void 0 : requestAccessContext.descriptiveMessageKey),
|
|
98
|
+
values: messageContext
|
|
99
|
+
}
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/* NotFoundView.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
4
|
var _excluded = ["testId"];
|
|
4
|
-
import
|
|
5
|
+
import "./NotFoundView.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
+
import { useMemo } from 'react';
|
|
5
9
|
import { useIntl } from 'react-intl-next';
|
|
6
10
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
7
11
|
import LegacyLockIcon from '@atlaskit/icon/glyph/lock';
|
|
@@ -10,8 +14,10 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
10
14
|
import { R300 } from '@atlaskit/theme/colors';
|
|
11
15
|
import { messages } from '../../../messages';
|
|
12
16
|
import Text from '../../FlexibleCard/components/elements/text';
|
|
17
|
+
import { NotFoundViewOld } from './NotFoundViewOld';
|
|
13
18
|
import UnresolvedView from './unresolved-view';
|
|
14
19
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
20
|
+
var textStyles = null;
|
|
15
21
|
|
|
16
22
|
/**
|
|
17
23
|
* This view represents a Block Card with a 'Not_Found' status.
|
|
@@ -19,7 +25,7 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
|
|
|
19
25
|
* @see SmartLinkStatus
|
|
20
26
|
* @see FlexibleCardProps
|
|
21
27
|
*/
|
|
22
|
-
var
|
|
28
|
+
var NotFoundViewNew = function NotFoundViewNew(_ref) {
|
|
23
29
|
var _cardState$details2;
|
|
24
30
|
var _ref$testId = _ref.testId,
|
|
25
31
|
testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
|
|
@@ -61,7 +67,15 @@ var NotFoundView = function NotFoundView(_ref) {
|
|
|
61
67
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
62
68
|
message: description,
|
|
63
69
|
testId: "".concat(testId, "-message"),
|
|
64
|
-
maxLines: 3
|
|
70
|
+
maxLines: 3,
|
|
71
|
+
className: ax([fg('platform-linking-visual-refresh-v1') && "_syaz1fxt"])
|
|
65
72
|
}));
|
|
66
73
|
};
|
|
74
|
+
var NotFoundView = function NotFoundView(props) {
|
|
75
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
76
|
+
return /*#__PURE__*/React.createElement(NotFoundViewNew, props);
|
|
77
|
+
} else {
|
|
78
|
+
return /*#__PURE__*/React.createElement(NotFoundViewOld, props);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
67
81
|
export default withFlexibleUIBlockCardStyle(NotFoundView);
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["testId"];
|
|
4
|
+
import React, { useMemo } from 'react';
|
|
5
|
+
import { useIntl } from 'react-intl-next';
|
|
6
|
+
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
7
|
+
import LegacyLockIcon from '@atlaskit/icon/glyph/lock';
|
|
8
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
11
|
+
import { messages } from '../../../messages';
|
|
12
|
+
import Text from '../../FlexibleCard/components/elements/text';
|
|
13
|
+
import UnresolvedView from './unresolved-view';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* This view represents a Block Card with a 'Not_Found' status.
|
|
17
|
+
*
|
|
18
|
+
* @see SmartLinkStatus
|
|
19
|
+
* @see FlexibleCardProps
|
|
20
|
+
*/
|
|
21
|
+
export var NotFoundViewOld = function NotFoundViewOld(_ref) {
|
|
22
|
+
var _cardState$details2;
|
|
23
|
+
var _ref$testId = _ref.testId,
|
|
24
|
+
testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
|
|
25
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
var intl = useIntl();
|
|
27
|
+
var cardState = props.cardState;
|
|
28
|
+
var product = useMemo(function () {
|
|
29
|
+
var _cardState$details, _provider$text;
|
|
30
|
+
var provider = extractProvider(cardState === null || cardState === void 0 || (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data);
|
|
31
|
+
return (_provider$text = provider === null || provider === void 0 ? void 0 : provider.text) !== null && _provider$text !== void 0 ? _provider$text : '';
|
|
32
|
+
}, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
|
|
33
|
+
var title = useMemo(function () {
|
|
34
|
+
return intl.formatMessage(messages.not_found_title, {
|
|
35
|
+
product: product
|
|
36
|
+
});
|
|
37
|
+
}, [intl, product]);
|
|
38
|
+
var description = useMemo(function () {
|
|
39
|
+
return {
|
|
40
|
+
descriptor: messages.not_found_description
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
44
|
+
testId: testId,
|
|
45
|
+
title: title
|
|
46
|
+
}), fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(LockLockedIcon, {
|
|
47
|
+
label: "not-found-lock-icon",
|
|
48
|
+
color: "var(--ds-icon-danger, #C9372C)",
|
|
49
|
+
LEGACY_fallbackIcon: LegacyLockIcon,
|
|
50
|
+
LEGACY_size: "small",
|
|
51
|
+
testId: "".concat(testId, "-lock-icon")
|
|
52
|
+
}) :
|
|
53
|
+
/*#__PURE__*/
|
|
54
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19497
|
|
55
|
+
React.createElement(LegacyLockIcon, {
|
|
56
|
+
label: "not-found-lock-icon",
|
|
57
|
+
size: "small",
|
|
58
|
+
primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
|
|
59
|
+
testId: "".concat(testId, "-lock-icon")
|
|
60
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
61
|
+
message: description,
|
|
62
|
+
testId: "".concat(testId, "-message"),
|
|
63
|
+
maxLines: 3
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
|
|
2
|
-
._zulpcxkx{gap:var(--ds-space-100,.5rem)}
|
|
2
|
+
._zulpcxkx{gap:var(--ds-space-100,.5rem)}
|
|
3
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}._13mh1pd9 [data-smart-element=Title]{font-weight:var(--ds-font-weight-semibold,600)}
|
|
4
|
+
._1bah1yb4{justify-content:space-between}
|
|
5
|
+
._1e0c1txw{display:flex}
|
|
3
6
|
._1sxbcxkx span[data-smart-element-avatar-group]>ul{margin-right:var(--ds-space-100,.5rem)}
|
|
7
|
+
._1wpz1fhb{align-self:stretch}
|
|
8
|
+
._2yhz14q2 [data-smart-element=Title]{color:var(--ds-link,#0c66e4)}
|
|
9
|
+
._4cvresu3{align-items:flex-end}
|
|
4
10
|
._4t3i1k8s{height:1.5rem}
|
|
5
11
|
._g0eioxwj .actions-button-group button, ._1qryoxwj .actions-button-group button:active, ._sxbroxwj .actions-button-group button:focus, ._1gyioxwj .actions-button-group button:hover{font-size:.875rem}
|
|
6
12
|
._i8d01j6v [data-smart-element-group]{line-height:1rem}
|