@atlaskit/smart-card 35.1.1 → 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 +14 -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 +2 -2
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "35.1.
|
|
5
|
+
packageVersion: "35.1.3"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -39,7 +39,7 @@ export const BlockCard = ({
|
|
|
39
39
|
case 'pending':
|
|
40
40
|
case 'resolving':
|
|
41
41
|
return /*#__PURE__*/React.createElement(ResolvedView, _extends({}, blockCardProps, {
|
|
42
|
-
testId:
|
|
42
|
+
testId: "smart-block-resolving-view"
|
|
43
43
|
}));
|
|
44
44
|
case 'resolved':
|
|
45
45
|
return /*#__PURE__*/React.createElement(ResolvedView, blockCardProps);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/* ForbiddenView.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
3
|
+
import "./ForbiddenView.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useMemo } from 'react';
|
|
3
7
|
import { useIntl } from 'react-intl-next';
|
|
4
8
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
9
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
@@ -14,8 +18,10 @@ import { toMessage } from '../../../utils/intl-utils';
|
|
|
14
18
|
import { getForbiddenJsonLd } from '../../../utils/jsonld';
|
|
15
19
|
import Text from '../../FlexibleCard/components/elements/text';
|
|
16
20
|
import { ForbiddenAction } from '../actions/ForbiddenAction';
|
|
21
|
+
import { ForbiddenViewOld } from './ForbiddenViewOld';
|
|
17
22
|
import UnresolvedView from './unresolved-view';
|
|
18
23
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
24
|
+
const textStyles = null;
|
|
19
25
|
|
|
20
26
|
/**
|
|
21
27
|
* This view represent a Block Card with the 'Forbidden' status.
|
|
@@ -24,7 +30,7 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
|
|
|
24
30
|
* @see SmartLinkStatus
|
|
25
31
|
* @see FlexibleCardProps
|
|
26
32
|
*/
|
|
27
|
-
const
|
|
33
|
+
const ForbiddenViewNew = ({
|
|
28
34
|
testId = 'smart-block-forbidden-view',
|
|
29
35
|
...props
|
|
30
36
|
}) => {
|
|
@@ -99,7 +105,15 @@ const ForbiddenView = ({
|
|
|
99
105
|
message: {
|
|
100
106
|
descriptor: toMessage(messages.invalid_permissions_description, requestAccessContext === null || requestAccessContext === void 0 ? void 0 : requestAccessContext.descriptiveMessageKey),
|
|
101
107
|
values: messageContext
|
|
102
|
-
}
|
|
108
|
+
},
|
|
109
|
+
className: ax([fg('platform-linking-visual-refresh-v1') && "_syaz1fxt"])
|
|
103
110
|
}));
|
|
104
111
|
};
|
|
112
|
+
const ForbiddenView = props => {
|
|
113
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
114
|
+
return /*#__PURE__*/React.createElement(ForbiddenViewNew, props);
|
|
115
|
+
} else {
|
|
116
|
+
return /*#__PURE__*/React.createElement(ForbiddenViewOld, props);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
105
119
|
export default withFlexibleUIBlockCardStyle(ForbiddenView);
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
5
|
+
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
6
|
+
import LegacyLockIcon from '@atlaskit/icon/glyph/lock';
|
|
7
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
10
|
+
import { extractRequestAccessContextImproved } from '../../../extractors/common/context/extractAccessContext';
|
|
11
|
+
import extractHostname from '../../../extractors/common/hostname/extractHostname';
|
|
12
|
+
import { messages } from '../../../messages';
|
|
13
|
+
import { toMessage } from '../../../utils/intl-utils';
|
|
14
|
+
import { getForbiddenJsonLd } from '../../../utils/jsonld';
|
|
15
|
+
import Text from '../../FlexibleCard/components/elements/text';
|
|
16
|
+
import { ForbiddenAction } from '../actions/ForbiddenAction';
|
|
17
|
+
import UnresolvedView from './unresolved-view';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* This view represent a Block Card with the 'Forbidden' status.
|
|
21
|
+
* It should have a "Try another account" button that will allow a user to connect another account and view the block card.
|
|
22
|
+
*
|
|
23
|
+
* @see SmartLinkStatus
|
|
24
|
+
* @see FlexibleCardProps
|
|
25
|
+
*/
|
|
26
|
+
export const ForbiddenViewOld = ({
|
|
27
|
+
testId = 'smart-block-forbidden-view',
|
|
28
|
+
...props
|
|
29
|
+
}) => {
|
|
30
|
+
var _details$meta;
|
|
31
|
+
const {
|
|
32
|
+
createAnalyticsEvent
|
|
33
|
+
} = useAnalyticsEvents();
|
|
34
|
+
const intl = useIntl();
|
|
35
|
+
const {
|
|
36
|
+
cardState,
|
|
37
|
+
onAuthorize,
|
|
38
|
+
url
|
|
39
|
+
} = props;
|
|
40
|
+
const details = cardState === null || cardState === void 0 ? void 0 : cardState.details;
|
|
41
|
+
const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
42
|
+
const provider = extractProvider(details === null || details === void 0 ? void 0 : details.data);
|
|
43
|
+
const providerName = (provider === null || provider === void 0 ? void 0 : provider.text) || '';
|
|
44
|
+
const messageContext = useMemo(() => {
|
|
45
|
+
const hostname = /*#__PURE__*/React.createElement("b", null, extractHostname(url));
|
|
46
|
+
return {
|
|
47
|
+
product: providerName,
|
|
48
|
+
hostname
|
|
49
|
+
};
|
|
50
|
+
}, [providerName, url]);
|
|
51
|
+
const requestAccessContext = useMemo(() => {
|
|
52
|
+
return extractRequestAccessContextImproved({
|
|
53
|
+
jsonLd: cardMetadata,
|
|
54
|
+
url,
|
|
55
|
+
product: providerName,
|
|
56
|
+
createAnalyticsEvent
|
|
57
|
+
});
|
|
58
|
+
}, [cardMetadata, providerName, url, createAnalyticsEvent]);
|
|
59
|
+
const title = useMemo(() => {
|
|
60
|
+
const 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
|
+
const actions = useMemo(() => {
|
|
66
|
+
let actionFromAccessContext = [];
|
|
67
|
+
const tryAnotherAccountAction = onAuthorize ? [ForbiddenAction(onAuthorize, 'try_another_account')] : [];
|
|
68
|
+
if (requestAccessContext) {
|
|
69
|
+
const {
|
|
70
|
+
action,
|
|
71
|
+
callToActionMessageKey
|
|
72
|
+
} = requestAccessContext;
|
|
73
|
+
actionFromAccessContext = action && callToActionMessageKey ? [ForbiddenAction(action.promise, callToActionMessageKey, messageContext, requestAccessContext === null || requestAccessContext === void 0 ? void 0 : requestAccessContext.buttonDisabled)] : [];
|
|
74
|
+
}
|
|
75
|
+
return [...tryAnotherAccountAction, ...actionFromAccessContext];
|
|
76
|
+
}, [onAuthorize, requestAccessContext, messageContext]);
|
|
77
|
+
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
78
|
+
actions: actions,
|
|
79
|
+
showPreview: true,
|
|
80
|
+
testId: testId,
|
|
81
|
+
title: title
|
|
82
|
+
}), fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(LockLockedIcon, {
|
|
83
|
+
label: "forbidden-lock-icon",
|
|
84
|
+
color: "var(--ds-icon-danger, #C9372C)",
|
|
85
|
+
LEGACY_fallbackIcon: LegacyLockIcon,
|
|
86
|
+
LEGACY_size: "small",
|
|
87
|
+
testId: `${testId}-lock-icon`
|
|
88
|
+
}) :
|
|
89
|
+
/*#__PURE__*/
|
|
90
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19497
|
|
91
|
+
React.createElement(LegacyLockIcon, {
|
|
92
|
+
label: "forbidden-lock-icon",
|
|
93
|
+
size: "small",
|
|
94
|
+
primaryColor: `var(--ds-icon-danger, ${R300})`,
|
|
95
|
+
testId: `${testId}-lock-icon`
|
|
96
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
97
|
+
maxLines: 3,
|
|
98
|
+
message: {
|
|
99
|
+
descriptor: toMessage(messages.invalid_permissions_description, requestAccessContext === null || requestAccessContext === void 0 ? void 0 : requestAccessContext.descriptiveMessageKey),
|
|
100
|
+
values: messageContext
|
|
101
|
+
}
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/* NotFoundView.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
3
|
+
import "./NotFoundView.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useMemo } from 'react';
|
|
3
7
|
import { useIntl } from 'react-intl-next';
|
|
4
8
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
5
9
|
import LegacyLockIcon from '@atlaskit/icon/glyph/lock';
|
|
@@ -8,8 +12,10 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
8
12
|
import { R300 } from '@atlaskit/theme/colors';
|
|
9
13
|
import { messages } from '../../../messages';
|
|
10
14
|
import Text from '../../FlexibleCard/components/elements/text';
|
|
15
|
+
import { NotFoundViewOld } from './NotFoundViewOld';
|
|
11
16
|
import UnresolvedView from './unresolved-view';
|
|
12
17
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
18
|
+
const textStyles = null;
|
|
13
19
|
|
|
14
20
|
/**
|
|
15
21
|
* This view represents a Block Card with a 'Not_Found' status.
|
|
@@ -17,7 +23,7 @@ import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardSty
|
|
|
17
23
|
* @see SmartLinkStatus
|
|
18
24
|
* @see FlexibleCardProps
|
|
19
25
|
*/
|
|
20
|
-
const
|
|
26
|
+
const NotFoundViewNew = ({
|
|
21
27
|
testId = 'smart-block-not-found-view',
|
|
22
28
|
...props
|
|
23
29
|
}) => {
|
|
@@ -57,7 +63,15 @@ const NotFoundView = ({
|
|
|
57
63
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
58
64
|
message: description,
|
|
59
65
|
testId: `${testId}-message`,
|
|
60
|
-
maxLines: 3
|
|
66
|
+
maxLines: 3,
|
|
67
|
+
className: ax([fg('platform-linking-visual-refresh-v1') && "_syaz1fxt"])
|
|
61
68
|
}));
|
|
62
69
|
};
|
|
70
|
+
const NotFoundView = props => {
|
|
71
|
+
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
72
|
+
return /*#__PURE__*/React.createElement(NotFoundViewNew, props);
|
|
73
|
+
} else {
|
|
74
|
+
return /*#__PURE__*/React.createElement(NotFoundViewOld, props);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
63
77
|
export default withFlexibleUIBlockCardStyle(NotFoundView);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
5
|
+
import LegacyLockIcon from '@atlaskit/icon/glyph/lock';
|
|
6
|
+
import { extractProvider } from '@atlaskit/link-extractors';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { messages } from '../../../messages';
|
|
10
|
+
import Text from '../../FlexibleCard/components/elements/text';
|
|
11
|
+
import UnresolvedView from './unresolved-view';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This view represents a Block Card with a 'Not_Found' status.
|
|
15
|
+
*
|
|
16
|
+
* @see SmartLinkStatus
|
|
17
|
+
* @see FlexibleCardProps
|
|
18
|
+
*/
|
|
19
|
+
export const NotFoundViewOld = ({
|
|
20
|
+
testId = 'smart-block-not-found-view',
|
|
21
|
+
...props
|
|
22
|
+
}) => {
|
|
23
|
+
var _cardState$details2;
|
|
24
|
+
const intl = useIntl();
|
|
25
|
+
const {
|
|
26
|
+
cardState
|
|
27
|
+
} = props;
|
|
28
|
+
const product = useMemo(() => {
|
|
29
|
+
var _cardState$details, _provider$text;
|
|
30
|
+
const provider = extractProvider(cardState === null || cardState === void 0 ? 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 ? void 0 : (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
|
|
33
|
+
const title = useMemo(() => intl.formatMessage(messages.not_found_title, {
|
|
34
|
+
product
|
|
35
|
+
}), [intl, product]);
|
|
36
|
+
const description = useMemo(() => ({
|
|
37
|
+
descriptor: messages.not_found_description
|
|
38
|
+
}), []);
|
|
39
|
+
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
40
|
+
testId: testId,
|
|
41
|
+
title: title
|
|
42
|
+
}), fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(LockLockedIcon, {
|
|
43
|
+
label: "not-found-lock-icon",
|
|
44
|
+
color: "var(--ds-icon-danger, #C9372C)",
|
|
45
|
+
LEGACY_fallbackIcon: LegacyLockIcon,
|
|
46
|
+
LEGACY_size: "small",
|
|
47
|
+
testId: `${testId}-lock-icon`
|
|
48
|
+
}) :
|
|
49
|
+
/*#__PURE__*/
|
|
50
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons -- TODO - https://product-fabric.atlassian.net/browse/DSP-19497
|
|
51
|
+
React.createElement(LegacyLockIcon, {
|
|
52
|
+
label: "not-found-lock-icon",
|
|
53
|
+
size: "small",
|
|
54
|
+
primaryColor: `var(--ds-icon-danger, ${R300})`,
|
|
55
|
+
testId: `${testId}-lock-icon`
|
|
56
|
+
}), /*#__PURE__*/React.createElement(Text, {
|
|
57
|
+
message: description,
|
|
58
|
+
testId: `${testId}-message`,
|
|
59
|
+
maxLines: 3
|
|
60
|
+
}));
|
|
61
|
+
};
|
|
@@ -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}
|
|
@@ -11,9 +11,11 @@ import { FooterBlock, MetadataBlock, PreviewBlock, SnippetBlock, TitleBlock } fr
|
|
|
11
11
|
import ResolvedViewOld from './ResolvedViewOld';
|
|
12
12
|
import { FlexibleCardUiOptions, getSimulatedBetterMetadata, PreviewBlockOptions, titleBlockOptions } from './utils';
|
|
13
13
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
14
|
+
const titleBlockCssOld = null;
|
|
14
15
|
const titleBlockCss = null;
|
|
16
|
+
const footerBlockCssOld = null;
|
|
15
17
|
const footerBlockCss = null;
|
|
16
|
-
const
|
|
18
|
+
const metadataBlockCssOld = null;
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* This view represents a Block card that has an 'Resolved' status.
|
|
@@ -67,17 +69,17 @@ const ResolvedView = ({
|
|
|
67
69
|
}],
|
|
68
70
|
metadataPosition: SmartLinkPosition.Top,
|
|
69
71
|
status: status,
|
|
70
|
-
className: ax(["_zulpcxkx _13mh1pd9"])
|
|
72
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_zulpu2gc _13mh1pd9 _2yhz14q2" : "_zulpcxkx _13mh1pd9"])
|
|
71
73
|
})), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
72
74
|
primary: topMetadata,
|
|
73
75
|
maxLines: 1,
|
|
74
76
|
status: SmartLinkStatus.Resolved,
|
|
75
|
-
className: ax(["_wwyvidpf _1sxbcxkx _i8d01j6v"])
|
|
77
|
+
className: ax([!fg('platform-linking-visual-refresh-v1') && "_wwyvidpf _1sxbcxkx _i8d01j6v"])
|
|
76
78
|
}), /*#__PURE__*/React.createElement(SnippetBlock, null), /*#__PURE__*/React.createElement(MetadataBlock, {
|
|
77
79
|
primary: bottomMetadata,
|
|
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
|
}), !isPreviewBlockErrored ? /*#__PURE__*/React.createElement(PreviewBlock, _extends({}, PreviewBlockOptions, {
|
|
82
84
|
onError: () => {
|
|
83
85
|
setIsPreviewBlockErrored(true);
|
|
@@ -86,7 +88,7 @@ const ResolvedView = ({
|
|
|
86
88
|
})) : null, /*#__PURE__*/React.createElement(FooterBlock, {
|
|
87
89
|
actions: footerActions,
|
|
88
90
|
status: SmartLinkStatus.Resolved,
|
|
89
|
-
className: ax(["_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
91
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb" : "_4t3i1k8s _g0eioxwj _1qryoxwj _sxbroxwj _1gyioxwj"])
|
|
90
92
|
}));
|
|
91
93
|
};
|
|
92
94
|
const 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)}
|
|
@@ -6,6 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { useCallback, useMemo } from 'react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import { extractProvider } from '@atlaskit/link-extractors';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
10
11
|
import { messages } from '../../../messages';
|
|
11
12
|
import { hasAuthScopeOverrides } from '../../../state/helpers';
|
|
@@ -13,6 +14,7 @@ import UnauthorisedViewContent from '../../common/UnauthorisedViewContent';
|
|
|
13
14
|
import { AuthorizeAction } from '../actions/AuthorizeAction';
|
|
14
15
|
import UnresolvedView from './unresolved-view';
|
|
15
16
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
17
|
+
const contentStylesOld = null;
|
|
16
18
|
const contentStyles = null;
|
|
17
19
|
|
|
18
20
|
/**
|
|
@@ -58,7 +60,7 @@ const UnauthorisedView = ({
|
|
|
58
60
|
testId: testId
|
|
59
61
|
}), /*#__PURE__*/React.createElement("div", {
|
|
60
62
|
"data-testid": `${testId}-content`,
|
|
61
|
-
className: ax(["_11c8qk37 _syaz131l _19pkcxkx"])
|
|
63
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_11c8qk37 _syaz1fxt _19pku2gc" : "_11c8qk37 _syaz131l _19pkcxkx"])
|
|
62
64
|
}, content));
|
|
63
65
|
};
|
|
64
66
|
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
|
+
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')) {
|
|
@@ -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
|
/**
|
|
@@ -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.3",
|
|
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.3"
|
|
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);
|