@atlaskit/smart-card 35.1.2 → 35.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -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/container/index.compiled.css +4 -4
- package/dist/cjs/view/FlexibleCard/components/container/index.js +8 -8
- 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/container/index.compiled.css +4 -4
- package/dist/es2019/view/FlexibleCard/components/container/index.js +8 -8
- 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/container/index.compiled.css +4 -4
- package/dist/esm/view/FlexibleCard/components/container/index.js +8 -8
- 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 +1 -1
|
@@ -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}
|
|
@@ -12,9 +12,11 @@ import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock } fr
|
|
|
12
12
|
import ResolvedViewOld from './ResolvedViewOld';
|
|
13
13
|
import { FlexibleCardUiOptions, getSimulatedBetterMetadata, PreviewBlockOptions, titleBlockOptions } from './utils';
|
|
14
14
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
15
|
+
var titleBlockCssOld = null;
|
|
15
16
|
var titleBlockCss = null;
|
|
17
|
+
var footerBlockCssOld = null;
|
|
16
18
|
var footerBlockCss = null;
|
|
17
|
-
var
|
|
19
|
+
var metadataBlockCssOld = null;
|
|
18
20
|
|
|
19
21
|
/**
|
|
20
22
|
* This view represents a Block card that has an 'Resolved' status.
|
|
@@ -72,17 +74,17 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
72
74
|
}],
|
|
73
75
|
metadataPosition: SmartLinkPosition.Top,
|
|
74
76
|
status: status,
|
|
75
|
-
className: ax(["_zulpcxkx _13mh1pd9"])
|
|
77
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9 _2yhz14q2" : "_zulpcxkx _13mh1pd9"])
|
|
76
78
|
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
77
79
|
primary: topMetadata,
|
|
78
80
|
maxLines: 1,
|
|
79
81
|
status: SmartLinkStatus.Resolved,
|
|
80
|
-
className: ax(["_wwyvidpf _1sxbcxkx _i8d01j6v"])
|
|
82
|
+
className: ax([!fg('platform-linking-visual-refresh-v1') && "_wwyvidpf _1sxbcxkx _i8d01j6v"])
|
|
81
83
|
}), /*#__PURE__*/React.createElement(SnippetBlock, null), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
82
84
|
primary: bottomMetadata,
|
|
83
85
|
maxLines: 1,
|
|
84
86
|
status: SmartLinkStatus.Resolved,
|
|
85
|
-
className: ax(["_wwyvidpf _1sxbcxkx _i8d01j6v"])
|
|
87
|
+
className: ax([!fg('platform-linking-visual-refresh-v1') && "_wwyvidpf _1sxbcxkx _i8d01j6v"])
|
|
86
88
|
}), !isPreviewBlockErrored ? /*#__PURE__*/React.createElement(PreviewBlock, _extends({}, PreviewBlockOptions, {
|
|
87
89
|
onError: function onError() {
|
|
88
90
|
setIsPreviewBlockErrored(true);
|
|
@@ -91,7 +93,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
91
93
|
})) : null, /*#__PURE__*/React.createElement(FooterBlock, {
|
|
92
94
|
actions: footerActions,
|
|
93
95
|
status: SmartLinkStatus.Resolved,
|
|
94
|
-
className: ax(["_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
96
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
95
97
|
}));
|
|
96
98
|
};
|
|
97
99
|
var ResolvedViewExported = function ResolvedViewExported(props) {
|
|
@@ -1,3 +1,5 @@
|
|
|
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
|
._19pkcxkx{margin-top:var(--ds-space-100,.5rem)}
|
|
3
|
-
.
|
|
3
|
+
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
4
|
+
._syaz131l{color:var(--ds-text-subtlest,#626f86)}
|
|
5
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
@@ -8,6 +8,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
8
8
|
import { useCallback, useMemo } from 'react';
|
|
9
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import { extractProvider } from '@atlaskit/link-extractors';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
12
13
|
import { messages } from '../../../messages';
|
|
13
14
|
import { hasAuthScopeOverrides } from '../../../state/helpers';
|
|
@@ -15,6 +16,7 @@ import UnauthorisedViewContent from '../../common/UnauthorisedViewContent';
|
|
|
15
16
|
import { AuthorizeAction } from '../actions/AuthorizeAction';
|
|
16
17
|
import UnresolvedView from './unresolved-view';
|
|
17
18
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
19
|
+
var contentStylesOld = null;
|
|
18
20
|
var contentStyles = null;
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -61,7 +63,7 @@ var UnauthorisedView = function UnauthorisedView(_ref) {
|
|
|
61
63
|
testId: testId
|
|
62
64
|
}), /*#__PURE__*/React.createElement("div", {
|
|
63
65
|
"data-testid": "".concat(testId, "-content"),
|
|
64
|
-
className: ax(["_11c8qk37 _syaz131l _19pkcxkx"])
|
|
66
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_11c8qk37 _syaz1fxt _19pku2gc" : "_11c8qk37 _syaz131l _19pkcxkx"])
|
|
65
67
|
}, content));
|
|
66
68
|
};
|
|
67
69
|
export default withFlexibleUIBlockCardStyle(UnauthorisedView);
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
2
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
+
._zulp1f3t{gap:var(--ds-space-100,.5em)}
|
|
4
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}._13mh1pd9 [data-smart-element=Title]{font-weight:var(--ds-font-weight-semibold,600)}
|
|
5
|
+
._1bah1yb4{justify-content:space-between}
|
|
6
|
+
._1e0c1txw{display:flex}
|
|
7
|
+
._1wpz1fhb{align-self:stretch}
|
|
8
|
+
._2yhz14q2 [data-smart-element=Title]{color:var(--ds-link,#0c66e4)}
|
|
3
9
|
._4cvr1y6m{align-items:flex-start}
|
|
10
|
+
._4cvresu3{align-items:flex-end}
|
|
4
11
|
._4t3i1k8s{height:1.5rem}
|
|
5
|
-
.
|
|
12
|
+
._7yjtidpf >div{margin-top:0}
|
|
13
|
+
._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}
|
|
14
|
+
._ngc01fxt >div{color:var(--ds-text,#172b4d)}
|
|
@@ -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
|
+
var customBlockStylesOld = null;
|
|
11
12
|
var customBlockStyles = null;
|
|
13
|
+
var titleBlockCssOld = null;
|
|
12
14
|
var titleBlockCss = null;
|
|
15
|
+
var footerBlockCssOld = null;
|
|
13
16
|
var footerBlockCss = null;
|
|
14
17
|
var UnresolvedView = function UnresolvedView(_ref) {
|
|
15
18
|
var actions = _ref.actions,
|
|
@@ -37,17 +40,17 @@ var UnresolvedView = function UnresolvedView(_ref) {
|
|
|
37
40
|
hideIcon: !!title,
|
|
38
41
|
text: title,
|
|
39
42
|
status: cardState.status,
|
|
40
|
-
className: ax(["_zulp1f3t _13mh1pd9"])
|
|
43
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9 _2yhz14q2" : "_zulp1f3t _13mh1pd9"])
|
|
41
44
|
})), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
42
45
|
status: cardState.status,
|
|
43
|
-
className: ax(["_4cvr1y6m"])
|
|
46
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulp1b66 _1e0c1txw _4cvr1y6m _1wpz1fhb _7yjtidpf _ngc01fxt" : "_4cvr1y6m"])
|
|
44
47
|
}, children), showPreview && /*#__PURE__*/React.createElement(PreviewBlock, _extends({}, PreviewBlockOptions, {
|
|
45
48
|
status: cardState.status
|
|
46
49
|
})), /*#__PURE__*/React.createElement(InternalFooterBlock, {
|
|
47
50
|
actions: actions,
|
|
48
51
|
testId: "smart-block-card-footer",
|
|
49
52
|
status: cardState.status,
|
|
50
|
-
className: ax(["_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
53
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
51
54
|
}));
|
|
52
55
|
};
|
|
53
56
|
export var UnresolvedViewExported = function UnresolvedViewExported(props) {
|
|
@@ -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}
|
|
@@ -213,10 +213,10 @@ var previewOnLeftStyleMapOld = {
|
|
|
213
213
|
small: "_19bv1ltm _y5vk6mu8"
|
|
214
214
|
};
|
|
215
215
|
var previewOnLeftStyleMap = {
|
|
216
|
-
xlarge: "
|
|
217
|
-
large: "
|
|
218
|
-
medium: "
|
|
219
|
-
small: "
|
|
216
|
+
xlarge: "_19bver0k _y5vk1ejb",
|
|
217
|
+
large: "_19bv16ru _y5vkv47k",
|
|
218
|
+
medium: "_19bv1g7w _y5vk1eak",
|
|
219
|
+
small: "_19bvlbes _y5vku2gc"
|
|
220
220
|
};
|
|
221
221
|
|
|
222
222
|
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
@@ -227,10 +227,10 @@ var previewOnRightStyleMapOld = {
|
|
|
227
227
|
small: "_u5f31ltm _1yob6mu8"
|
|
228
228
|
};
|
|
229
229
|
var previewOnRightStyleMap = {
|
|
230
|
-
xlarge: "
|
|
231
|
-
large: "
|
|
232
|
-
medium: "
|
|
233
|
-
small: "
|
|
230
|
+
xlarge: "_u5f3er0k _1yob1ejb",
|
|
231
|
+
large: "_u5f316ru _1yobv47k",
|
|
232
|
+
medium: "_u5f31g7w _1yob1eak",
|
|
233
|
+
small: "_u5f3lbes _1yobu2gc"
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
/**
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "35.1.
|
|
16
|
+
packageVersion: "35.1.3",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FlexibleBlockCardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* This view represent a Block Card with the 'Forbidden' status.
|
|
5
|
+
* It should have a "Try another account" button that will allow a user to connect another account and view the block card.
|
|
6
|
+
*
|
|
7
|
+
* @see SmartLinkStatus
|
|
8
|
+
* @see FlexibleCardProps
|
|
9
|
+
*/
|
|
10
|
+
export declare const ForbiddenViewOld: ({ testId, ...props }: FlexibleBlockCardProps) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FlexibleBlockCardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* This view represents a Block Card with a 'Not_Found' status.
|
|
5
|
+
*
|
|
6
|
+
* @see SmartLinkStatus
|
|
7
|
+
* @see FlexibleCardProps
|
|
8
|
+
*/
|
|
9
|
+
export declare const NotFoundViewOld: ({ testId, ...props }: FlexibleBlockCardProps) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FlexibleBlockCardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* This view represent a Block Card with the 'Forbidden' status.
|
|
5
|
+
* It should have a "Try another account" button that will allow a user to connect another account and view the block card.
|
|
6
|
+
*
|
|
7
|
+
* @see SmartLinkStatus
|
|
8
|
+
* @see FlexibleCardProps
|
|
9
|
+
*/
|
|
10
|
+
export declare const ForbiddenViewOld: ({ testId, ...props }: FlexibleBlockCardProps) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FlexibleBlockCardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* This view represents a Block Card with a 'Not_Found' status.
|
|
5
|
+
*
|
|
6
|
+
* @see SmartLinkStatus
|
|
7
|
+
* @see FlexibleCardProps
|
|
8
|
+
*/
|
|
9
|
+
export declare const NotFoundViewOld: ({ testId, ...props }: FlexibleBlockCardProps) => React.JSX.Element;
|