@atlaskit/smart-card 26.42.8 → 26.42.10
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 +14 -0
- package/dist/cjs/constants.js +2 -1
- package/dist/cjs/messages.js +7 -2
- package/dist/cjs/state/helpers.js +4 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +3 -1
- package/dist/cjs/view/BlockCard/views/flexible/styled.js +3 -7
- package/dist/cjs/view/{InlineCard/ResolvingView → BlockCard/views}/styled.js +3 -3
- package/dist/cjs/view/CardWithData/component.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +1 -3
- package/dist/cjs/view/EmbedCard/components/styled.js +12 -20
- package/dist/cjs/view/EmbedCard/index.js +4 -1
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +4 -2
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +7 -16
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +33 -0
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +3 -0
- package/dist/cjs/view/HoverCard/styled.js +2 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/LinkView/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +4 -2
- package/dist/es2019/constants.js +1 -0
- package/dist/es2019/messages.js +7 -2
- package/dist/es2019/state/helpers.js +2 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -2
- package/dist/es2019/view/BlockCard/views/flexible/styled.js +6 -13
- package/dist/es2019/view/BlockCard/views/styled.js +7 -0
- package/dist/es2019/view/CardWithData/component.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +1 -3
- package/dist/es2019/view/EmbedCard/components/styled.js +9 -30
- package/dist/es2019/view/EmbedCard/index.js +5 -2
- package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +4 -2
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +7 -11
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +21 -0
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +3 -0
- package/dist/es2019/view/HoverCard/styled.js +6 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/LinkView/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +5 -3
- package/dist/esm/constants.js +1 -0
- package/dist/esm/messages.js +7 -2
- package/dist/esm/state/helpers.js +3 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -2
- package/dist/esm/view/BlockCard/views/flexible/styled.js +3 -7
- package/dist/esm/view/BlockCard/views/styled.js +5 -0
- package/dist/esm/view/CardWithData/component.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +1 -3
- package/dist/esm/view/EmbedCard/components/styled.js +12 -20
- package/dist/esm/view/EmbedCard/index.js +5 -2
- package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +4 -2
- package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +7 -13
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +25 -0
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -0
- package/dist/esm/view/HoverCard/styled.js +2 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/LinkView/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +5 -3
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/extractors/inline/index.d.ts +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/helpers.d.ts +1 -0
- package/dist/types/view/BlockCard/views/styled.d.ts +5 -0
- package/dist/types/view/EmbedCard/views/UnauthorisedView.d.ts +1 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/types.d.ts +7 -0
- package/dist/types/view/LinkView/index.d.ts +1 -1
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +6 -1
- package/dist/types-ts4.5/constants.d.ts +1 -0
- package/dist/types-ts4.5/extractors/inline/index.d.ts +1 -1
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/helpers.d.ts +1 -0
- package/dist/types-ts4.5/view/BlockCard/views/styled.d.ts +5 -0
- package/dist/types-ts4.5/view/EmbedCard/views/UnauthorisedView.d.ts +1 -0
- package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/types.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/types.d.ts +7 -0
- package/dist/types-ts4.5/view/LinkView/index.d.ts +1 -1
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +6 -1
- package/package.json +5 -8
- package/dist/cjs/view/InlineCard/ErroredView/index.js +0 -89
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +0 -128
- package/dist/cjs/view/InlineCard/Frame/index.js +0 -61
- package/dist/cjs/view/InlineCard/Frame/styled.js +0 -66
- package/dist/cjs/view/InlineCard/Icon.js +0 -40
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +0 -150
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +0 -47
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +0 -82
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +0 -68
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +0 -110
- package/dist/cjs/view/InlineCard/index.js +0 -182
- package/dist/cjs/view/InlineCard/styled.js +0 -26
- package/dist/es2019/view/InlineCard/ErroredView/index.js +0 -65
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +0 -107
- package/dist/es2019/view/InlineCard/Frame/index.js +0 -54
- package/dist/es2019/view/InlineCard/Frame/styled.js +0 -93
- package/dist/es2019/view/InlineCard/Icon.js +0 -45
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +0 -124
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +0 -101
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +0 -55
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +0 -44
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +0 -6
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +0 -84
- package/dist/es2019/view/InlineCard/index.js +0 -149
- package/dist/es2019/view/InlineCard/styled.js +0 -35
- package/dist/esm/view/InlineCard/ErroredView/index.js +0 -82
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +0 -121
- package/dist/esm/view/InlineCard/Frame/index.js +0 -52
- package/dist/esm/view/InlineCard/Frame/styled.js +0 -59
- package/dist/esm/view/InlineCard/Icon.js +0 -34
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +0 -143
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +0 -40
- package/dist/esm/view/InlineCard/ResolvedView/index.js +0 -75
- package/dist/esm/view/InlineCard/ResolvingView/index.js +0 -61
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +0 -5
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +0 -103
- package/dist/esm/view/InlineCard/index.js +0 -146
- package/dist/esm/view/InlineCard/styled.js +0 -19
- package/dist/types/view/InlineCard/ErroredView/index.d.ts +0 -21
- package/dist/types/view/InlineCard/ForbiddenView/index.d.ts +0 -28
- package/dist/types/view/InlineCard/Frame/index.d.ts +0 -15
- package/dist/types/view/InlineCard/Frame/styled.d.ts +0 -15
- package/dist/types/view/InlineCard/Icon.d.ts +0 -12
- package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +0 -28
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +0 -40
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +0 -32
- package/dist/types/view/InlineCard/ResolvingView/index.d.ts +0 -17
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +0 -9
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +0 -31
- package/dist/types/view/InlineCard/index.d.ts +0 -9
- package/dist/types/view/InlineCard/styled.d.ts +0 -17
- package/dist/types/view/InlineCard/types.d.ts +0 -25
- package/dist/types-ts4.5/view/InlineCard/ErroredView/index.d.ts +0 -21
- package/dist/types-ts4.5/view/InlineCard/ForbiddenView/index.d.ts +0 -28
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +0 -15
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +0 -15
- package/dist/types-ts4.5/view/InlineCard/Icon.d.ts +0 -12
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/index.d.ts +0 -28
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled.d.ts +0 -40
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +0 -32
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/index.d.ts +0 -17
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled.d.ts +0 -9
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +0 -31
- package/dist/types-ts4.5/view/InlineCard/index.d.ts +0 -9
- package/dist/types-ts4.5/view/InlineCard/styled.d.ts +0 -17
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -25
- package/tmp/api-report-tmp.d.ts +0 -1007
- /package/dist/cjs/view/{InlineCard → FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group}/types.js +0 -0
- /package/dist/es2019/view/{InlineCard → FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group}/types.js +0 -0
- /package/dist/esm/view/{InlineCard → FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group}/types.js +0 -0
package/dist/es2019/constants.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export const CONTENT_URL_SECURITY_AND_PERMISSIONS = 'https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links';
|
|
2
|
+
export const CONTENT_URL_3P_ACCOUNT_AUTH = 'https://support.atlassian.com/confluence-cloud/docs/what-data-is-sent-and-received-when-pasting-a-smart-link/';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* The alignment of Flexible UI component.
|
package/dist/es2019/messages.js
CHANGED
|
@@ -90,12 +90,12 @@ export const messages = defineMessages({
|
|
|
90
90
|
},
|
|
91
91
|
connect_unauthorised_account_description: {
|
|
92
92
|
id: 'fabric.linking.connect_unauthorised_account_description',
|
|
93
|
-
defaultMessage: 'Connect {context}
|
|
93
|
+
defaultMessage: 'Connect your {context} account to collaborate on work across Atlassian products.',
|
|
94
94
|
description: 'Shown when a user does not have access to a link, but can connect their external account to view the link on card view.'
|
|
95
95
|
},
|
|
96
96
|
connect_unauthorised_account_description_no_provider: {
|
|
97
97
|
id: 'fabric.linking.connect_unauthorised_account_description_no_provider',
|
|
98
|
-
defaultMessage: 'Connect
|
|
98
|
+
defaultMessage: 'Connect your account to collaborate on work across Atlassian products.',
|
|
99
99
|
description: 'Shown when a user does not have access to a link, but can connect their external account to view the link on card view and we do not have the providers name.'
|
|
100
100
|
},
|
|
101
101
|
continue: {
|
|
@@ -178,6 +178,11 @@ export const messages = defineMessages({
|
|
|
178
178
|
defaultMessage: 'Learn more about Smart Links.',
|
|
179
179
|
description: 'An anchor link to redirect user to a page about Smart Links.'
|
|
180
180
|
},
|
|
181
|
+
learn_more_about_connecting_account: {
|
|
182
|
+
id: 'fabric.linking.learn_more_about_connecting_account',
|
|
183
|
+
defaultMessage: 'Learn more about connecting your account to Atlassian products.',
|
|
184
|
+
description: 'An anchor link to redirect user to a page about authorization with 3rd party accounts.'
|
|
185
|
+
},
|
|
181
186
|
loading: {
|
|
182
187
|
id: 'fabric.linking.loading',
|
|
183
188
|
defaultMessage: 'Loading...',
|
|
@@ -60,4 +60,5 @@ export const getDatasources = details => details === null || details === void 0
|
|
|
60
60
|
export const getCanBeDatasource = details => {
|
|
61
61
|
const datasources = getDatasources(details);
|
|
62
62
|
return !!datasources && datasources.length > 0;
|
|
63
|
-
};
|
|
63
|
+
};
|
|
64
|
+
export const hasAuthScopeOverrides = details => !!(details !== null && details !== void 0 && details.meta.hasScopeOverrides);
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.42.
|
|
7
|
+
packageVersion: "26.42.10"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,7 +12,7 @@ import { Emoji } from '../components/Emoji';
|
|
|
12
12
|
import { Icon } from '../../common/Icon';
|
|
13
13
|
import { Content } from '../components/Content';
|
|
14
14
|
import { MetadataList } from '../../common/MetadataList';
|
|
15
|
-
import { LozengeBlockWrapper } from '
|
|
15
|
+
import { LozengeBlockWrapper } from './styled';
|
|
16
16
|
import { ContentHeader } from '../components/ContentHeader';
|
|
17
17
|
import { ContentFooter } from '../components/ContentFooter';
|
|
18
18
|
import { gs } from '../../common/utils';
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { useCallback, useMemo } from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
|
-
import { getExtensionKey } from '../../../../state/helpers';
|
|
6
|
+
import { getExtensionKey, hasAuthScopeOverrides } from '../../../../state/helpers';
|
|
7
7
|
import { AuthorizeAction } from '../../actions/flexible/AuthorizeAction';
|
|
8
8
|
import { extractProvider } from '@atlaskit/link-extractors';
|
|
9
9
|
import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
|
|
@@ -36,6 +36,7 @@ const FlexibleUnauthorisedView = ({
|
|
|
36
36
|
const extensionKey = (_getExtensionKey = getExtensionKey(cardState === null || cardState === void 0 ? void 0 : cardState.details)) !== null && _getExtensionKey !== void 0 ? _getExtensionKey : '';
|
|
37
37
|
const data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
38
38
|
const providerName = (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
|
|
39
|
+
const isProductIntegrationSupported = hasAuthScopeOverrides(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
39
40
|
const handleAuthorize = useCallback(() => {
|
|
40
41
|
if (onAuthorize) {
|
|
41
42
|
analytics === null || analytics === void 0 ? void 0 : analytics.track.appAccountAuthStarted({
|
|
@@ -46,13 +47,14 @@ const FlexibleUnauthorisedView = ({
|
|
|
46
47
|
}, [onAuthorize, extensionKey, analytics === null || analytics === void 0 ? void 0 : analytics.track]);
|
|
47
48
|
const content = useMemo(() => onAuthorize ? jsx(UnauthorisedViewContent, {
|
|
48
49
|
providerName: providerName,
|
|
50
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
49
51
|
analytics: analytics,
|
|
50
52
|
testId: testId
|
|
51
53
|
}) : jsx(FormattedMessage, _extends({}, messages[providerName ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider'], {
|
|
52
54
|
values: {
|
|
53
55
|
context: providerName
|
|
54
56
|
}
|
|
55
|
-
})), [analytics, onAuthorize, providerName, testId]);
|
|
57
|
+
})), [analytics, isProductIntegrationSupported, onAuthorize, providerName, testId]);
|
|
56
58
|
const actions = useMemo(() => onAuthorize ? [AuthorizeAction(handleAuthorize, providerName)] : [], [handleAuthorize, onAuthorize, providerName]);
|
|
57
59
|
return jsx(UnresolvedView, _extends({}, props, {
|
|
58
60
|
actions: actions,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { tokens } from '../../../../utils/token';
|
|
2
1
|
import { css } from '@emotion/react';
|
|
3
2
|
import { N40 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
3
|
|
|
6
4
|
// in editor prosemirror adds padding-left so we need to overwrite it
|
|
7
5
|
// renderer overwrites the margin-right so we need to add it here
|
|
@@ -19,9 +17,10 @@ export const metadataBlockCss = css`
|
|
|
19
17
|
`;
|
|
20
18
|
export const titleBlockCss = css`
|
|
21
19
|
gap: 0.5em;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
|
|
21
|
+
[data-smart-element='Title'] {
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
}
|
|
25
24
|
`;
|
|
26
25
|
export const footerBlockCss = css`
|
|
27
26
|
height: 1.5rem;
|
|
@@ -35,15 +34,9 @@ export const footerBlockCss = css`
|
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
`;
|
|
38
|
-
const
|
|
39
|
-
border-radius: 1.5px;
|
|
40
|
-
box-shadow: ${tokens.elevation};
|
|
41
|
-
margin: ${"var(--ds-space-025, 2px)"};
|
|
42
|
-
`;
|
|
43
|
-
const refreshedFlexibleBlockCardStyle = css`
|
|
37
|
+
export const flexibleBlockCardStyle = css`
|
|
44
38
|
& > div {
|
|
45
39
|
border-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
46
40
|
border: 1px solid ${`var(--ds-border, ${N40})`};
|
|
47
41
|
}
|
|
48
|
-
`;
|
|
49
|
-
export const flexibleBlockCardStyle = getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? refreshedFlexibleBlockCardStyle : flexibleBlockCardElevationStyle;
|
|
42
|
+
`;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { getEmptyJsonLd } from '../../utils/jsonld';
|
|
4
4
|
import { extractInlineProps } from '../../extractors/inline';
|
|
5
5
|
import { extractBlockProps } from '../../extractors/block';
|
|
6
|
-
import { InlineCardResolvedView } from '../
|
|
6
|
+
import { InlineCardResolvedView } from '../RedesignedInlineCard/ResolvedView';
|
|
7
7
|
import { BlockCardResolvedView } from '../BlockCard';
|
|
8
8
|
export class CardWithDataContent extends React.Component {
|
|
9
9
|
render() {
|
|
@@ -6,9 +6,7 @@ import * as measure from '../../utils/performance';
|
|
|
6
6
|
import { getDefinitionId, getServices, isFinalState, getClickUrl, getResourceType, getExtensionKey, getSubproduct, getProduct, getCanBeDatasource } from '../../state/helpers';
|
|
7
7
|
import { useSmartLink } from '../../state';
|
|
8
8
|
import { BlockCard } from '../BlockCard';
|
|
9
|
-
import { InlineCard } from '../InlineCard';
|
|
10
9
|
import { InlineCard as RedesignedInlineCard } from '../RedesignedInlineCard';
|
|
11
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
10
|
import { EmbedCard } from '../EmbedCard';
|
|
13
11
|
import { isFlexibleUiCard } from '../../utils/flexible';
|
|
14
12
|
import FlexibleCard from '../FlexibleCard';
|
|
@@ -213,7 +211,7 @@ function Component({
|
|
|
213
211
|
showAuthTooltip: showAuthTooltip,
|
|
214
212
|
showServerActions: showServerActions
|
|
215
213
|
};
|
|
216
|
-
return
|
|
214
|
+
return /*#__PURE__*/React.createElement(RedesignedInlineCard, inlineProps);
|
|
217
215
|
case 'block':
|
|
218
216
|
return /*#__PURE__*/React.createElement(BlockCard, {
|
|
219
217
|
id: id,
|
|
@@ -4,7 +4,6 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
4
4
|
import { gs as gridSize } from '../../common/utils';
|
|
5
5
|
import { N40 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { themed } from '@atlaskit/theme/components';
|
|
7
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
export const className = 'media-card-frame';
|
|
9
8
|
export const borderRadius = `
|
|
10
9
|
border-radius: ${akBorderRadius()}px;
|
|
@@ -79,18 +78,15 @@ function selected({
|
|
|
79
78
|
height: 100%;
|
|
80
79
|
width: 100%;
|
|
81
80
|
left: 0;
|
|
82
|
-
${
|
|
81
|
+
${wrapperBorderRadius}
|
|
83
82
|
}
|
|
84
|
-
` : isSelected && frameStyle === 'hide' ?
|
|
85
|
-
${getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? contentBorderRadius : `box-shadow: 0 0 0 3px ${`var(--ds-border-selected, ${colors.B100})`};
|
|
86
|
-
${borderRadius}`}
|
|
87
|
-
` : '';
|
|
83
|
+
` : isSelected && frameStyle === 'hide' ? contentBorderRadius : '';
|
|
88
84
|
}
|
|
89
85
|
const height = ({
|
|
90
86
|
inheritDimensions
|
|
91
87
|
}) => inheritDimensions ? 'height: 100%;' : `height: ${gridSize(54)}`;
|
|
92
88
|
const wrapperStyles = props => `
|
|
93
|
-
${
|
|
89
|
+
${wrapperBorderRadius}
|
|
94
90
|
${minWidth(props)}
|
|
95
91
|
${maxWidth(props)}
|
|
96
92
|
${getInteractiveStyles(props)}
|
|
@@ -114,19 +110,16 @@ const wrapperStyles = props => `
|
|
|
114
110
|
width: calc(100% + ${"var(--ds-space-200, 16px)"});
|
|
115
111
|
height: calc(100% + ${"var(--ds-space-100, 8px)"});
|
|
116
112
|
left: ${"var(--ds-space-negative-100, -8px)"};
|
|
117
|
-
${
|
|
118
|
-
${borderRadius}`}
|
|
113
|
+
${wrapperBorderRadius}
|
|
119
114
|
}
|
|
120
115
|
`;
|
|
121
116
|
const visibleStyles = `
|
|
122
|
-
${getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? `` : `background-color: ${`var(--ds-background-neutral-subtle, ${colors.N30})`};`}
|
|
123
|
-
|
|
124
117
|
&:after {
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
border: 1px solid ${`var(--ds-border, ${N40})`};
|
|
119
|
+
background-color: ${themed({
|
|
127
120
|
light: "var(--ds-surface-raised, white)",
|
|
128
121
|
dark: `var(--ds-surface-raised, ${BACKGROUND_COLOR_DARK})`
|
|
129
|
-
})()}
|
|
122
|
+
})()};
|
|
130
123
|
}
|
|
131
124
|
.embed-header {
|
|
132
125
|
opacity: 1;
|
|
@@ -197,8 +190,8 @@ export const TextWrapper = styled.div`
|
|
|
197
190
|
// the internal contents of the `iframe` should
|
|
198
191
|
// manage scrolling behaviour.
|
|
199
192
|
export const Content = styled.div`
|
|
200
|
-
${
|
|
201
|
-
|
|
193
|
+
${contentBorderRadius};
|
|
194
|
+
border: 1px solid ${`var(--ds-border, ${N40})`};
|
|
202
195
|
background-color: ${"var(--ds-surface-raised, white)"};
|
|
203
196
|
position: absolute;
|
|
204
197
|
z-index: 1;
|
|
@@ -216,20 +209,6 @@ export const Content = styled.div`
|
|
|
216
209
|
margin: 0 auto;
|
|
217
210
|
}
|
|
218
211
|
|
|
219
|
-
${({
|
|
220
|
-
isInteractive
|
|
221
|
-
}) => {
|
|
222
|
-
if (isInteractive && !getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design')) {
|
|
223
|
-
return `
|
|
224
|
-
.${className}:hover & {
|
|
225
|
-
box-shadow: ${"var(--ds-shadow-overlay, 0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25))"};
|
|
226
|
-
}
|
|
227
|
-
`;
|
|
228
|
-
} else {
|
|
229
|
-
return '';
|
|
230
|
-
}
|
|
231
|
-
}};
|
|
232
|
-
|
|
233
212
|
${({
|
|
234
213
|
allowScrollBar
|
|
235
214
|
}) => allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;'}
|
|
@@ -6,10 +6,10 @@ import { extractEmbedProps } from '../../extractors/embed';
|
|
|
6
6
|
import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
|
|
7
7
|
import { extractInlineProps } from '../../extractors/inline';
|
|
8
8
|
import { extractBlockProps } from '../../extractors/block';
|
|
9
|
-
import { getExtensionKey } from '../../state/helpers';
|
|
9
|
+
import { getExtensionKey, hasAuthScopeOverrides } from '../../state/helpers';
|
|
10
10
|
import { extractRequestAccessContext } from '../../extractors/common/context';
|
|
11
11
|
import { BlockCardResolvedView, BlockCardResolvingView } from '../BlockCard';
|
|
12
|
-
import { InlineCardResolvedView } from '../
|
|
12
|
+
import { InlineCardResolvedView } from '../RedesignedInlineCard/ResolvedView';
|
|
13
13
|
import { EmbedCardForbiddenView } from './views/ForbiddenView';
|
|
14
14
|
import { EmbedCardNotFoundView } from './views/NotFoundView';
|
|
15
15
|
import { EmbedCardResolvedView } from './views/ResolvedView';
|
|
@@ -50,6 +50,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
50
50
|
const data = details && details.data || getEmptyJsonLd();
|
|
51
51
|
const meta = details && details.meta;
|
|
52
52
|
const extensionKey = getExtensionKey(details);
|
|
53
|
+
const isProductIntegrationSupported = hasAuthScopeOverrides(details);
|
|
53
54
|
switch (status) {
|
|
54
55
|
case 'pending':
|
|
55
56
|
case 'resolving':
|
|
@@ -115,6 +116,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
115
116
|
analytics: analytics,
|
|
116
117
|
context: unauthorisedViewProps.context,
|
|
117
118
|
extensionKey: extensionKey,
|
|
119
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
118
120
|
inheritDimensions: inheritDimensions,
|
|
119
121
|
isSelected: isSelected,
|
|
120
122
|
onAuthorize: handleAuthorize,
|
|
@@ -130,6 +132,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
|
|
|
130
132
|
onClick: handleFrameClick,
|
|
131
133
|
analytics: analytics,
|
|
132
134
|
extensionKey: extensionKey,
|
|
135
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
133
136
|
testId: testId
|
|
134
137
|
}));
|
|
135
138
|
case 'forbidden':
|
|
@@ -18,7 +18,8 @@ export const EmbedCardUnauthorisedView = ({
|
|
|
18
18
|
onAuthorise,
|
|
19
19
|
inheritDimensions,
|
|
20
20
|
onClick,
|
|
21
|
-
extensionKey
|
|
21
|
+
extensionKey,
|
|
22
|
+
isProductIntegrationSupported
|
|
22
23
|
}) => {
|
|
23
24
|
const icon = context && context.icon && /*#__PURE__*/React.createElement(ImageIcon, {
|
|
24
25
|
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
@@ -50,6 +51,7 @@ export const EmbedCardUnauthorisedView = ({
|
|
|
50
51
|
}, /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
51
52
|
analytics: analytics,
|
|
52
53
|
providerName: context === null || context === void 0 ? void 0 : context.text,
|
|
54
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
53
55
|
testId: testId
|
|
54
56
|
}));
|
|
55
57
|
}
|
|
@@ -60,7 +62,7 @@ export const EmbedCardUnauthorisedView = ({
|
|
|
60
62
|
testId: testId,
|
|
61
63
|
title: context !== null && context !== void 0 && context.text ? 'unauthorised_account_name' : 'unauthorised_account_name_no_provider'
|
|
62
64
|
});
|
|
63
|
-
}, [analytics, context, handleOnAuthorizeClick, onAuthorise, testId]);
|
|
65
|
+
}, [analytics, context, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorise, testId]);
|
|
64
66
|
return /*#__PURE__*/React.createElement(ExpandedFrame, {
|
|
65
67
|
href: link,
|
|
66
68
|
icon: icon,
|
|
@@ -11,6 +11,7 @@ const UnauthorizedView = ({
|
|
|
11
11
|
analytics,
|
|
12
12
|
context,
|
|
13
13
|
extensionKey,
|
|
14
|
+
isProductIntegrationSupported,
|
|
14
15
|
onAuthorize,
|
|
15
16
|
testId = 'embed-card-unauthorized-view',
|
|
16
17
|
...unresolvedViewProps
|
|
@@ -43,6 +44,7 @@ const UnauthorizedView = ({
|
|
|
43
44
|
description: /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
44
45
|
analytics: analytics,
|
|
45
46
|
providerName: context === null || context === void 0 ? void 0 : context.text,
|
|
47
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
46
48
|
testId: testId
|
|
47
49
|
}),
|
|
48
50
|
button: /*#__PURE__*/React.createElement(Button, {
|
|
@@ -77,7 +79,7 @@ const UnauthorizedView = ({
|
|
|
77
79
|
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.unauthorised_account_name_no_provider),
|
|
78
80
|
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.unauthorised_account_description_no_provider)
|
|
79
81
|
};
|
|
80
|
-
}, [analytics, context === null || context === void 0 ? void 0 : context.text, handleOnAuthorizeClick, onAuthorize, testId]);
|
|
82
|
+
}, [analytics, context === null || context === void 0 ? void 0 : context.text, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorize, testId]);
|
|
81
83
|
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, unresolvedViewProps, content, {
|
|
82
84
|
icon: context === null || context === void 0 ? void 0 : context.icon,
|
|
83
85
|
image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : getUnresolvedEmbedCardImage('unauthorized'),
|
|
@@ -2,12 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
4
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
5
|
-
import DropdownMenu
|
|
6
|
-
import LozengeActionItem from './lozenge-action-item';
|
|
5
|
+
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
7
6
|
import LozengeActionTrigger from './lozenge-action-trigger';
|
|
8
7
|
import LozengeActionError from './lozenge-action-error';
|
|
9
8
|
import withErrorBoundary from './error-boundary';
|
|
10
|
-
import { dropdownItemGroupStyles } from './styled';
|
|
11
9
|
import useInvoke from '../../../../../../state/hooks/use-invoke';
|
|
12
10
|
import extractLozengeActionItems from '../../../../../../extractors/action/extract-lozenge-action-items';
|
|
13
11
|
import createStatusUpdateRequest from '../../../../../../utils/actions/create-status-update-request';
|
|
@@ -17,6 +15,7 @@ import { isInvokeCustomError } from '../../../../../../state/hooks/use-invoke/ut
|
|
|
17
15
|
import { useFlexibleUiAnalyticsContext } from '../../../../../../state/flexible-ui-context';
|
|
18
16
|
import { TrackQuickActionType } from '../../../../../../utils/analytics/analytics';
|
|
19
17
|
import { permissionLoadErrorAnalyticsPayload, unknownLoadErrorAnalyticsPayload, unknownUpdateErrorAnalyticsPayload, validationUpdateErrorAnalyticsPayload } from './lozenge-action-analytics';
|
|
18
|
+
import LozengeActionItemsGroup from './lozenge-action-items-group';
|
|
20
19
|
const validateItems = (items = [], text) => {
|
|
21
20
|
return items.filter(item => item.text !== text);
|
|
22
21
|
};
|
|
@@ -135,14 +134,11 @@ const LozengeAction = ({
|
|
|
135
134
|
});
|
|
136
135
|
}
|
|
137
136
|
if (items && items.length > 0) {
|
|
138
|
-
return jsx(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
onClick: handleItemClick,
|
|
144
|
-
testId: `${testId}-item-${idx}`
|
|
145
|
-
})))));
|
|
137
|
+
return jsx(LozengeActionItemsGroup, {
|
|
138
|
+
testId: testId,
|
|
139
|
+
items: items,
|
|
140
|
+
onClick: handleItemClick
|
|
141
|
+
});
|
|
146
142
|
}
|
|
147
143
|
}, [errorMessage, handleItemClick, items, previewData, testId, url]);
|
|
148
144
|
return jsx(DropdownMenu, {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import LozengeActionItem from '../lozenge-action-item';
|
|
5
|
+
import { dropdownItemGroupStyles } from '../styled';
|
|
6
|
+
import { DropdownItemGroup } from '@atlaskit/dropdown-menu';
|
|
7
|
+
const LozengeActionItemsGroup = ({
|
|
8
|
+
items,
|
|
9
|
+
testId,
|
|
10
|
+
onClick
|
|
11
|
+
}) =>
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
13
|
+
jsx("span", {
|
|
14
|
+
css: dropdownItemGroupStyles,
|
|
15
|
+
"data-testid": `${testId}-item-group`
|
|
16
|
+
}, jsx(DropdownItemGroup, null, items.map((item, idx) => jsx(LozengeActionItem, _extends({}, item, {
|
|
17
|
+
key: idx,
|
|
18
|
+
onClick: onClick,
|
|
19
|
+
testId: `${testId}-item-${idx}`
|
|
20
|
+
})))));
|
|
21
|
+
export default LozengeActionItemsGroup;
|
|
@@ -14,7 +14,6 @@ import { SmartLinkAnalyticsContext } from '../../../utils/analytics/SmartLinkAna
|
|
|
14
14
|
import { useSmartCardActions } from '../../../state/actions';
|
|
15
15
|
import { useSmartLinkAnalytics } from '../../../state/analytics';
|
|
16
16
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
17
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
18
17
|
const HOVER_CARD_SOURCE = 'smartLinkPreviewHoverCard';
|
|
19
18
|
const FADE_IN_DELAY = 500;
|
|
20
19
|
const FADE_OUT_DELAY = 300;
|
|
@@ -203,7 +202,7 @@ export const HoverCardComponent = ({
|
|
|
203
202
|
onContextMenu: onContextMenuClick,
|
|
204
203
|
"data-testid": "hover-card-trigger-wrapper"
|
|
205
204
|
}), children)), [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
|
|
206
|
-
return jsx(Popup,
|
|
205
|
+
return jsx(Popup, {
|
|
207
206
|
testId: "hover-card",
|
|
208
207
|
isOpen: isOpen && canOpen,
|
|
209
208
|
onClose: hideCard,
|
|
@@ -212,8 +211,7 @@ export const HoverCardComponent = ({
|
|
|
212
211
|
autoFocus: false,
|
|
213
212
|
content: content,
|
|
214
213
|
trigger: trigger,
|
|
215
|
-
zIndex: zIndex
|
|
216
|
-
}, getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') && {
|
|
214
|
+
zIndex: zIndex,
|
|
217
215
|
popupComponent: CustomPopupContainer
|
|
218
|
-
})
|
|
216
|
+
});
|
|
219
217
|
};
|
|
@@ -11,6 +11,7 @@ import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group
|
|
|
11
11
|
import { LinkIcon } from '../../../../FlexibleCard/components/elements';
|
|
12
12
|
import { ActionName, CardDisplay } from '../../../../../constants';
|
|
13
13
|
import { useSmartCardActions } from '../../../../../state/actions';
|
|
14
|
+
import { hasAuthScopeOverrides } from '../../../../../state/helpers';
|
|
14
15
|
const HoverCardUnauthorisedView = ({
|
|
15
16
|
analytics,
|
|
16
17
|
extensionKey,
|
|
@@ -25,6 +26,7 @@ const HoverCardUnauthorisedView = ({
|
|
|
25
26
|
} = flexibleCardProps;
|
|
26
27
|
const data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
27
28
|
const providerName = (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
|
|
29
|
+
const isProductIntegrationSupported = hasAuthScopeOverrides(cardState.details);
|
|
28
30
|
const {
|
|
29
31
|
authorize
|
|
30
32
|
} = useSmartCardActions(id, url, analytics);
|
|
@@ -59,6 +61,7 @@ const HoverCardUnauthorisedView = ({
|
|
|
59
61
|
testId: `${testId}-content`
|
|
60
62
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
61
63
|
providerName: providerName,
|
|
64
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
62
65
|
analytics: analytics
|
|
63
66
|
}))), /*#__PURE__*/React.createElement(CustomBlock, {
|
|
64
67
|
overrideCss: connectButtonStyles,
|
|
@@ -3,7 +3,6 @@ import { loadingPlaceholderClassName } from '../../index';
|
|
|
3
3
|
import { SmartLinkSize } from '../../constants';
|
|
4
4
|
import { layers } from '@atlaskit/theme/constants';
|
|
5
5
|
import { themed } from '@atlaskit/theme/components';
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
|
|
8
7
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
9
8
|
export const HOVER_CARD_Z_INDEX = layers.modal();
|
|
@@ -52,9 +51,9 @@ export const titleBlockCss = css`
|
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
[data-smart-element='Title'] {
|
|
55
|
+
font-weight: 600;
|
|
56
|
+
}
|
|
58
57
|
`;
|
|
59
58
|
export const getTransitionStyles = snippetHeight => css`
|
|
60
59
|
transition: height 300ms ease-in-out;
|
|
@@ -73,9 +72,7 @@ export const popupContainerStyles = css`
|
|
|
73
72
|
`;
|
|
74
73
|
export const getPreviewBlockStyles = previewHeight => css`
|
|
75
74
|
${previewHeight ? `height: ${previewHeight}px;` : ''}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
margin-bottom: ${blockGap};
|
|
80
|
-
}` : ``}
|
|
75
|
+
border-top-left-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
76
|
+
border-top-right-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
77
|
+
margin-bottom: ${blockGap};
|
|
81
78
|
`;
|
|
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "26.42.
|
|
10
|
+
packageVersion: "26.42.10",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Frame } from '../
|
|
3
|
+
import { Frame } from '../RedesignedInlineCard/Frame';
|
|
4
4
|
export class CardLinkView extends React.PureComponent {
|
|
5
5
|
render() {
|
|
6
6
|
return /*#__PURE__*/React.createElement(Frame, _extends({
|
|
@@ -2,28 +2,30 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import { messages } from '../../messages';
|
|
5
|
-
import { CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
5
|
+
import { CONTENT_URL_3P_ACCOUNT_AUTH, CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
6
6
|
/**
|
|
7
7
|
* This component is used in unauthorized views of a smart link.
|
|
8
8
|
* It represents the main text that provides a user with information on how to connect their account
|
|
9
9
|
*/
|
|
10
10
|
const UnauthorisedViewContent = ({
|
|
11
11
|
providerName,
|
|
12
|
+
isProductIntegrationSupported,
|
|
12
13
|
testId = 'unauthorised-view-content',
|
|
13
14
|
analytics
|
|
14
15
|
}) => {
|
|
15
16
|
const handleLearnMoreClick = useCallback(() => {
|
|
16
17
|
analytics === null || analytics === void 0 ? void 0 : analytics.ui.learnMoreClickedEvent();
|
|
17
18
|
}, [analytics === null || analytics === void 0 ? void 0 : analytics.ui]);
|
|
19
|
+
const learnMoreMessage = isProductIntegrationSupported ? messages.learn_more_about_connecting_account : messages.learn_more_about_smart_links;
|
|
18
20
|
return /*#__PURE__*/React.createElement(React.Fragment, null, providerName ? /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_unauthorised_account_description, {
|
|
19
21
|
values: {
|
|
20
22
|
context: providerName
|
|
21
23
|
}
|
|
22
24
|
})) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/React.createElement("a", {
|
|
23
|
-
href: CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
25
|
+
href: isProductIntegrationSupported ? CONTENT_URL_3P_ACCOUNT_AUTH : CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
24
26
|
target: "_blank",
|
|
25
27
|
"data-testid": `${testId}-learn-more`,
|
|
26
28
|
onClick: handleLearnMoreClick
|
|
27
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage,
|
|
29
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, learnMoreMessage)));
|
|
28
30
|
};
|
|
29
31
|
export default UnauthorisedViewContent;
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export var CONTENT_URL_SECURITY_AND_PERMISSIONS = 'https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links';
|
|
2
|
+
export var CONTENT_URL_3P_ACCOUNT_AUTH = 'https://support.atlassian.com/confluence-cloud/docs/what-data-is-sent-and-received-when-pasting-a-smart-link/';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* The alignment of Flexible UI component.
|
package/dist/esm/messages.js
CHANGED
|
@@ -90,12 +90,12 @@ export var messages = defineMessages({
|
|
|
90
90
|
},
|
|
91
91
|
connect_unauthorised_account_description: {
|
|
92
92
|
id: 'fabric.linking.connect_unauthorised_account_description',
|
|
93
|
-
defaultMessage: 'Connect {context}
|
|
93
|
+
defaultMessage: 'Connect your {context} account to collaborate on work across Atlassian products.',
|
|
94
94
|
description: 'Shown when a user does not have access to a link, but can connect their external account to view the link on card view.'
|
|
95
95
|
},
|
|
96
96
|
connect_unauthorised_account_description_no_provider: {
|
|
97
97
|
id: 'fabric.linking.connect_unauthorised_account_description_no_provider',
|
|
98
|
-
defaultMessage: 'Connect
|
|
98
|
+
defaultMessage: 'Connect your account to collaborate on work across Atlassian products.',
|
|
99
99
|
description: 'Shown when a user does not have access to a link, but can connect their external account to view the link on card view and we do not have the providers name.'
|
|
100
100
|
},
|
|
101
101
|
continue: {
|
|
@@ -178,6 +178,11 @@ export var messages = defineMessages({
|
|
|
178
178
|
defaultMessage: 'Learn more about Smart Links.',
|
|
179
179
|
description: 'An anchor link to redirect user to a page about Smart Links.'
|
|
180
180
|
},
|
|
181
|
+
learn_more_about_connecting_account: {
|
|
182
|
+
id: 'fabric.linking.learn_more_about_connecting_account',
|
|
183
|
+
defaultMessage: 'Learn more about connecting your account to Atlassian products.',
|
|
184
|
+
description: 'An anchor link to redirect user to a page about authorization with 3rd party accounts.'
|
|
185
|
+
},
|
|
181
186
|
loading: {
|
|
182
187
|
id: 'fabric.linking.loading',
|
|
183
188
|
defaultMessage: 'Loading...',
|
|
@@ -62,4 +62,7 @@ export var getDatasources = function getDatasources(details) {
|
|
|
62
62
|
export var getCanBeDatasource = function getCanBeDatasource(details) {
|
|
63
63
|
var datasources = getDatasources(details);
|
|
64
64
|
return !!datasources && datasources.length > 0;
|
|
65
|
+
};
|
|
66
|
+
export var hasAuthScopeOverrides = function hasAuthScopeOverrides(details) {
|
|
67
|
+
return !!(details !== null && details !== void 0 && details.meta.hasScopeOverrides);
|
|
65
68
|
};
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.42.
|
|
18
|
+
packageVersion: "26.42.10"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,7 +12,7 @@ import { Emoji } from '../components/Emoji';
|
|
|
12
12
|
import { Icon } from '../../common/Icon';
|
|
13
13
|
import { Content } from '../components/Content';
|
|
14
14
|
import { MetadataList } from '../../common/MetadataList';
|
|
15
|
-
import { LozengeBlockWrapper } from '
|
|
15
|
+
import { LozengeBlockWrapper } from './styled';
|
|
16
16
|
import { ContentHeader } from '../components/ContentHeader';
|
|
17
17
|
import { ContentFooter } from '../components/ContentFooter';
|
|
18
18
|
import { gs } from '../../common/utils';
|