@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
|
@@ -7,7 +7,7 @@ var _templateObject;
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { useCallback, useMemo } from 'react';
|
|
9
9
|
import { FormattedMessage } from 'react-intl-next';
|
|
10
|
-
import { getExtensionKey } from '../../../../state/helpers';
|
|
10
|
+
import { getExtensionKey, hasAuthScopeOverrides } from '../../../../state/helpers';
|
|
11
11
|
import { AuthorizeAction } from '../../actions/flexible/AuthorizeAction';
|
|
12
12
|
import { extractProvider } from '@atlaskit/link-extractors';
|
|
13
13
|
import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
|
|
@@ -34,6 +34,7 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
|
34
34
|
var extensionKey = (_getExtensionKey = getExtensionKey(cardState === null || cardState === void 0 ? void 0 : cardState.details)) !== null && _getExtensionKey !== void 0 ? _getExtensionKey : '';
|
|
35
35
|
var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
36
36
|
var providerName = (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
|
|
37
|
+
var isProductIntegrationSupported = hasAuthScopeOverrides(cardState === null || cardState === void 0 ? void 0 : cardState.details);
|
|
37
38
|
var handleAuthorize = useCallback(function () {
|
|
38
39
|
if (onAuthorize) {
|
|
39
40
|
analytics === null || analytics === void 0 || analytics.track.appAccountAuthStarted({
|
|
@@ -45,6 +46,7 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
|
45
46
|
var content = useMemo(function () {
|
|
46
47
|
return onAuthorize ? jsx(UnauthorisedViewContent, {
|
|
47
48
|
providerName: providerName,
|
|
49
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
48
50
|
analytics: analytics,
|
|
49
51
|
testId: testId
|
|
50
52
|
}) : jsx(FormattedMessage, _extends({}, messages[providerName ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider'], {
|
|
@@ -52,7 +54,7 @@ var FlexibleUnauthorisedView = function FlexibleUnauthorisedView(_ref) {
|
|
|
52
54
|
context: providerName
|
|
53
55
|
}
|
|
54
56
|
}));
|
|
55
|
-
}, [analytics, onAuthorize, providerName, testId]);
|
|
57
|
+
}, [analytics, isProductIntegrationSupported, onAuthorize, providerName, testId]);
|
|
56
58
|
var actions = useMemo(function () {
|
|
57
59
|
return onAuthorize ? [AuthorizeAction(handleAuthorize, providerName)] : [];
|
|
58
60
|
}, [handleAuthorize, onAuthorize, providerName]);
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4
|
|
3
|
-
import { tokens } from '../../../../utils/token';
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
3
|
import { css } from '@emotion/react';
|
|
5
4
|
import { N40 } from '@atlaskit/theme/colors';
|
|
6
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
5
|
|
|
8
6
|
// in editor prosemirror adds padding-left so we need to overwrite it
|
|
9
7
|
// renderer overwrites the margin-right so we need to add it here
|
|
10
8
|
export var metadataBlockCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* primary element group */\n span[data-smart-element-avatar-group] {\n > ul {\n padding-left: 0px;\n margin-right: 0.5rem;\n }\n }\n [data-smart-element-group] {\n line-height: 1rem;\n }\n"])));
|
|
11
|
-
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n gap: 0.5em;\n
|
|
9
|
+
export var titleBlockCss = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n gap: 0.5em;\n\n [data-smart-element='Title'] {\n font-weight: 600;\n }\n"])));
|
|
12
10
|
export var footerBlockCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 1.5rem;\n\n .actions-button-group {\n button,\n button:hover,\n button:focus,\n button:active {\n font-size: 0.875rem;\n }\n }\n"])));
|
|
13
|
-
var
|
|
14
|
-
var refreshedFlexibleBlockCardStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n & > div {\n border-radius: ", ";\n border: 1px solid ", ";\n }\n"])), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(N40, ")"));
|
|
15
|
-
export var flexibleBlockCardStyle = getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') ? refreshedFlexibleBlockCardStyle : flexibleBlockCardElevationStyle;
|
|
11
|
+
export var flexibleBlockCardStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n & > div {\n border-radius: ", ";\n border: 1px solid ", ";\n }\n"])), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(N40, ")"));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
// TODO: Replace overrides with proper AtlasKit solution.
|
|
5
|
+
export var LozengeBlockWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & > span {\n margin-left: ", ";\n }\n"])), "var(--ds-space-050, 4px)");
|
|
@@ -10,7 +10,7 @@ import React from 'react';
|
|
|
10
10
|
import { getEmptyJsonLd } from '../../utils/jsonld';
|
|
11
11
|
import { extractInlineProps } from '../../extractors/inline';
|
|
12
12
|
import { extractBlockProps } from '../../extractors/block';
|
|
13
|
-
import { InlineCardResolvedView } from '../
|
|
13
|
+
import { InlineCardResolvedView } from '../RedesignedInlineCard/ResolvedView';
|
|
14
14
|
import { BlockCardResolvedView } from '../BlockCard';
|
|
15
15
|
export var CardWithDataContent = /*#__PURE__*/function (_React$Component) {
|
|
16
16
|
_inherits(CardWithDataContent, _React$Component);
|
|
@@ -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';
|
|
@@ -216,7 +214,7 @@ function Component(_ref) {
|
|
|
216
214
|
showAuthTooltip: showAuthTooltip,
|
|
217
215
|
showServerActions: showServerActions
|
|
218
216
|
};
|
|
219
|
-
return
|
|
217
|
+
return /*#__PURE__*/React.createElement(RedesignedInlineCard, inlineProps);
|
|
220
218
|
case 'block':
|
|
221
219
|
return /*#__PURE__*/React.createElement(BlockCard, {
|
|
222
220
|
id: id,
|
|
@@ -6,7 +6,6 @@ import * as colors from '@atlaskit/theme/colors';
|
|
|
6
6
|
import { gs as gridSize } from '../../common/utils';
|
|
7
7
|
import { N40 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
export var className = 'media-card-frame';
|
|
11
10
|
export var borderRadius = "\n border-radius: ".concat(akBorderRadius(), "px;\n");
|
|
12
11
|
var BACKGROUND_COLOR_DARK = '#262B31';
|
|
@@ -46,19 +45,19 @@ function getInteractiveStyles(_ref3) {
|
|
|
46
45
|
function selected(_ref4) {
|
|
47
46
|
var isSelected = _ref4.isSelected,
|
|
48
47
|
frameStyle = _ref4.frameStyle;
|
|
49
|
-
return isSelected && frameStyle !== 'hide' ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ", "var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n content: '';\n border: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(
|
|
48
|
+
return isSelected && frameStyle !== 'hide' ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ", "var(--ds-border-selected, ".concat(colors.B100, ")"), ";\n content: '';\n border: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(wrapperBorderRadius, "\n }\n ") : isSelected && frameStyle === 'hide' ? contentBorderRadius : '';
|
|
50
49
|
}
|
|
51
50
|
var height = function height(_ref5) {
|
|
52
51
|
var inheritDimensions = _ref5.inheritDimensions;
|
|
53
52
|
return inheritDimensions ? 'height: 100%;' : "height: ".concat(gridSize(54));
|
|
54
53
|
};
|
|
55
54
|
var wrapperStyles = function wrapperStyles(props) {
|
|
56
|
-
return "\n ".concat(
|
|
55
|
+
return "\n ".concat(wrapperBorderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat(fontFamily(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ", "var(--ds-space-200, 16px)", ");\n height: calc(100% + ", "var(--ds-space-100, 8px)", ");\n left: ", "var(--ds-space-negative-100, -8px)", ";\n ").concat(wrapperBorderRadius, "\n }\n");
|
|
57
56
|
};
|
|
58
|
-
var visibleStyles = "\n
|
|
57
|
+
var visibleStyles = "\n &:after {\n border: 1px solid ".concat("var(--ds-border, ".concat(N40, ")"), ";\n background-color: ", themed({
|
|
59
58
|
light: "var(--ds-surface-raised, white)",
|
|
60
59
|
dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
61
|
-
})(), "
|
|
60
|
+
})(), ";\n }\n .embed-header {\n opacity: 1;\n }");
|
|
62
61
|
function visible(_ref6) {
|
|
63
62
|
var frameStyle = _ref6.frameStyle;
|
|
64
63
|
return frameStyle === 'show' ? visibleStyles : '';
|
|
@@ -92,22 +91,15 @@ export var TextWrapper = styled.div(_templateObject5 || (_templateObject5 = _tag
|
|
|
92
91
|
// NB: `overflow` is kept as `hidden` since
|
|
93
92
|
// the internal contents of the `iframe` should
|
|
94
93
|
// manage scrolling behaviour.
|
|
95
|
-
export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "
|
|
96
|
-
var
|
|
97
|
-
if (isInteractive && !getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design')) {
|
|
98
|
-
return "\n .".concat(className, ":hover & {\n 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))", ";\n }\n ");
|
|
99
|
-
} else {
|
|
100
|
-
return '';
|
|
101
|
-
}
|
|
102
|
-
}, function (_ref10) {
|
|
103
|
-
var allowScrollBar = _ref10.allowScrollBar;
|
|
94
|
+
export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", ";\n border: 1px solid ", ";\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", "\n\n ", "\n"])), contentBorderRadius, "var(--ds-border, ".concat(N40, ")"), "var(--ds-surface-raised, white)", function (_ref9) {
|
|
95
|
+
var allowScrollBar = _ref9.allowScrollBar;
|
|
104
96
|
return allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;';
|
|
105
|
-
}, function (
|
|
106
|
-
var frameStyle =
|
|
97
|
+
}, function (_ref10) {
|
|
98
|
+
var frameStyle = _ref10.frameStyle;
|
|
107
99
|
return frameStyle === 'hide' ? 'height: 100%;' : "\n height: calc(100% - ".concat("var(--ds-space-400, 32px)", ");\n top: ", "var(--ds-space-400, 32px)", ";\n ");
|
|
108
100
|
});
|
|
109
|
-
export var Image = styled.img(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (
|
|
110
|
-
var size =
|
|
101
|
+
export var Image = styled.img(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (_ref11) {
|
|
102
|
+
var size = _ref11.size;
|
|
111
103
|
return csssize(size);
|
|
112
104
|
}, borderRadius);
|
|
113
105
|
export var maxAvatarCount = 6;
|
|
@@ -118,8 +110,8 @@ export var Byline = styled.div(_templateObject10 || (_templateObject10 = _tagged
|
|
|
118
110
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
119
111
|
export var Description = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N800, ")"), 18 / 12, 18 * 3);
|
|
120
112
|
export var ResolvedViewIconWrapper = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
121
|
-
export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: ", " 0 ", "\n ", ";\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-skeleton, ".concat(colors.N30, ")"), function (
|
|
122
|
-
var src =
|
|
113
|
+
export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: ", " 0 ", "\n ", ";\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-skeleton, ".concat(colors.N30, ")"), function (_ref12) {
|
|
114
|
+
var src = _ref12.src;
|
|
123
115
|
return src;
|
|
124
116
|
});
|
|
125
117
|
export var UsersWrapper = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
@@ -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';
|
|
@@ -47,6 +47,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
|
|
|
47
47
|
var data = details && details.data || getEmptyJsonLd();
|
|
48
48
|
var meta = details && details.meta;
|
|
49
49
|
var extensionKey = getExtensionKey(details);
|
|
50
|
+
var isProductIntegrationSupported = hasAuthScopeOverrides(details);
|
|
50
51
|
switch (status) {
|
|
51
52
|
case 'pending':
|
|
52
53
|
case 'resolving':
|
|
@@ -112,6 +113,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
|
|
|
112
113
|
analytics: analytics,
|
|
113
114
|
context: unauthorisedViewProps.context,
|
|
114
115
|
extensionKey: extensionKey,
|
|
116
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
115
117
|
inheritDimensions: inheritDimensions,
|
|
116
118
|
isSelected: isSelected,
|
|
117
119
|
onAuthorize: handleAuthorize,
|
|
@@ -127,6 +129,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
|
|
|
127
129
|
onClick: handleFrameClick,
|
|
128
130
|
analytics: analytics,
|
|
129
131
|
extensionKey: extensionKey,
|
|
132
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
130
133
|
testId: testId
|
|
131
134
|
}));
|
|
132
135
|
case 'forbidden':
|
|
@@ -19,7 +19,8 @@ export var EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref)
|
|
|
19
19
|
onAuthorise = _ref.onAuthorise,
|
|
20
20
|
inheritDimensions = _ref.inheritDimensions,
|
|
21
21
|
onClick = _ref.onClick,
|
|
22
|
-
extensionKey = _ref.extensionKey
|
|
22
|
+
extensionKey = _ref.extensionKey,
|
|
23
|
+
isProductIntegrationSupported = _ref.isProductIntegrationSupported;
|
|
23
24
|
var icon = context && context.icon && /*#__PURE__*/React.createElement(ImageIcon, {
|
|
24
25
|
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
25
26
|
});
|
|
@@ -50,6 +51,7 @@ export var EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref)
|
|
|
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 var EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref)
|
|
|
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,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["analytics", "context", "extensionKey", "onAuthorize", "testId"];
|
|
3
|
+
var _excluded = ["analytics", "context", "extensionKey", "isProductIntegrationSupported", "onAuthorize", "testId"];
|
|
4
4
|
import Button from '@atlaskit/button';
|
|
5
5
|
import React, { useCallback, useMemo } from 'react';
|
|
6
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -14,6 +14,7 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
|
14
14
|
var analytics = _ref.analytics,
|
|
15
15
|
context = _ref.context,
|
|
16
16
|
extensionKey = _ref.extensionKey,
|
|
17
|
+
isProductIntegrationSupported = _ref.isProductIntegrationSupported,
|
|
17
18
|
onAuthorize = _ref.onAuthorize,
|
|
18
19
|
_ref$testId = _ref.testId,
|
|
19
20
|
testId = _ref$testId === void 0 ? 'embed-card-unauthorized-view' : _ref$testId,
|
|
@@ -45,6 +46,7 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
|
45
46
|
description: /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
46
47
|
analytics: analytics,
|
|
47
48
|
providerName: context === null || context === void 0 ? void 0 : context.text,
|
|
49
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
48
50
|
testId: testId
|
|
49
51
|
}),
|
|
50
52
|
button: /*#__PURE__*/React.createElement(Button, {
|
|
@@ -79,7 +81,7 @@ var UnauthorizedView = function UnauthorizedView(_ref) {
|
|
|
79
81
|
title: /*#__PURE__*/React.createElement(FormattedMessage, messages.unauthorised_account_name_no_provider),
|
|
80
82
|
description: /*#__PURE__*/React.createElement(FormattedMessage, messages.unauthorised_account_description_no_provider)
|
|
81
83
|
};
|
|
82
|
-
}, [analytics, context === null || context === void 0 ? void 0 : context.text, handleOnAuthorizeClick, onAuthorize, testId]);
|
|
84
|
+
}, [analytics, context === null || context === void 0 ? void 0 : context.text, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorize, testId]);
|
|
83
85
|
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, unresolvedViewProps, content, {
|
|
84
86
|
icon: context === null || context === void 0 ? void 0 : context.icon,
|
|
85
87
|
image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : getUnresolvedEmbedCardImage('unauthorized'),
|
|
@@ -5,12 +5,10 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
8
|
-
import DropdownMenu
|
|
9
|
-
import LozengeActionItem from './lozenge-action-item';
|
|
8
|
+
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
10
9
|
import LozengeActionTrigger from './lozenge-action-trigger';
|
|
11
10
|
import LozengeActionError from './lozenge-action-error';
|
|
12
11
|
import withErrorBoundary from './error-boundary';
|
|
13
|
-
import { dropdownItemGroupStyles } from './styled';
|
|
14
12
|
import useInvoke from '../../../../../../state/hooks/use-invoke';
|
|
15
13
|
import extractLozengeActionItems from '../../../../../../extractors/action/extract-lozenge-action-items';
|
|
16
14
|
import createStatusUpdateRequest from '../../../../../../utils/actions/create-status-update-request';
|
|
@@ -20,6 +18,7 @@ import { isInvokeCustomError } from '../../../../../../state/hooks/use-invoke/ut
|
|
|
20
18
|
import { useFlexibleUiAnalyticsContext } from '../../../../../../state/flexible-ui-context';
|
|
21
19
|
import { TrackQuickActionType } from '../../../../../../utils/analytics/analytics';
|
|
22
20
|
import { permissionLoadErrorAnalyticsPayload, unknownLoadErrorAnalyticsPayload, unknownUpdateErrorAnalyticsPayload, validationUpdateErrorAnalyticsPayload } from './lozenge-action-analytics';
|
|
21
|
+
import LozengeActionItemsGroup from './lozenge-action-items-group';
|
|
23
22
|
var validateItems = function validateItems() {
|
|
24
23
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
25
24
|
var text = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -213,16 +212,11 @@ var LozengeAction = function LozengeAction(_ref) {
|
|
|
213
212
|
});
|
|
214
213
|
}
|
|
215
214
|
if (items && items.length > 0) {
|
|
216
|
-
return jsx(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
key: idx,
|
|
222
|
-
onClick: handleItemClick,
|
|
223
|
-
testId: "".concat(testId, "-item-").concat(idx)
|
|
224
|
-
}));
|
|
225
|
-
})));
|
|
215
|
+
return jsx(LozengeActionItemsGroup, {
|
|
216
|
+
testId: testId,
|
|
217
|
+
items: items,
|
|
218
|
+
onClick: handleItemClick
|
|
219
|
+
});
|
|
226
220
|
}
|
|
227
221
|
}, [errorMessage, handleItemClick, items, previewData, testId, url]);
|
|
228
222
|
return jsx(DropdownMenu, {
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
var LozengeActionItemsGroup = function LozengeActionItemsGroup(_ref) {
|
|
8
|
+
var items = _ref.items,
|
|
9
|
+
testId = _ref.testId,
|
|
10
|
+
onClick = _ref.onClick;
|
|
11
|
+
return (
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
13
|
+
jsx("span", {
|
|
14
|
+
css: dropdownItemGroupStyles,
|
|
15
|
+
"data-testid": "".concat(testId, "-item-group")
|
|
16
|
+
}, jsx(DropdownItemGroup, null, items.map(function (item, idx) {
|
|
17
|
+
return jsx(LozengeActionItem, _extends({}, item, {
|
|
18
|
+
key: idx,
|
|
19
|
+
onClick: onClick,
|
|
20
|
+
testId: "".concat(testId, "-item-").concat(idx)
|
|
21
|
+
}));
|
|
22
|
+
})))
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
export default LozengeActionItemsGroup;
|
|
@@ -15,7 +15,6 @@ import { SmartLinkAnalyticsContext } from '../../../utils/analytics/SmartLinkAna
|
|
|
15
15
|
import { useSmartCardActions } from '../../../state/actions';
|
|
16
16
|
import { useSmartLinkAnalytics } from '../../../state/analytics';
|
|
17
17
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
18
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
19
18
|
var HOVER_CARD_SOURCE = 'smartLinkPreviewHoverCard';
|
|
20
19
|
var FADE_IN_DELAY = 500;
|
|
21
20
|
var FADE_OUT_DELAY = 300;
|
|
@@ -221,7 +220,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
221
220
|
"data-testid": "hover-card-trigger-wrapper"
|
|
222
221
|
}), children));
|
|
223
222
|
}, [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition]);
|
|
224
|
-
return jsx(Popup,
|
|
223
|
+
return jsx(Popup, {
|
|
225
224
|
testId: "hover-card",
|
|
226
225
|
isOpen: isOpen && canOpen,
|
|
227
226
|
onClose: hideCard,
|
|
@@ -230,8 +229,7 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
230
229
|
autoFocus: false,
|
|
231
230
|
content: content,
|
|
232
231
|
trigger: trigger,
|
|
233
|
-
zIndex: zIndex
|
|
234
|
-
}, getBooleanFF('platform.linking-platform.smart-card.show-smart-links-refreshed-design') && {
|
|
232
|
+
zIndex: zIndex,
|
|
235
233
|
popupComponent: CustomPopupContainer
|
|
236
|
-
})
|
|
234
|
+
});
|
|
237
235
|
};
|
|
@@ -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
|
var HoverCardUnauthorisedView = function HoverCardUnauthorisedView(_ref) {
|
|
15
16
|
var _cardState$details, _extractProvider;
|
|
16
17
|
var analytics = _ref.analytics,
|
|
@@ -24,6 +25,7 @@ var HoverCardUnauthorisedView = function HoverCardUnauthorisedView(_ref) {
|
|
|
24
25
|
var cardState = flexibleCardProps.cardState;
|
|
25
26
|
var data = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data;
|
|
26
27
|
var providerName = (_extractProvider = extractProvider(data)) === null || _extractProvider === void 0 ? void 0 : _extractProvider.text;
|
|
28
|
+
var isProductIntegrationSupported = hasAuthScopeOverrides(cardState.details);
|
|
27
29
|
var _useSmartCardActions = useSmartCardActions(id, url, analytics),
|
|
28
30
|
authorize = _useSmartCardActions.authorize;
|
|
29
31
|
var handleAuthorize = useCallback(function () {
|
|
@@ -59,6 +61,7 @@ var HoverCardUnauthorisedView = function HoverCardUnauthorisedView(_ref) {
|
|
|
59
61
|
testId: "".concat(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,
|
|
@@ -5,7 +5,6 @@ import { loadingPlaceholderClassName } from '../../index';
|
|
|
5
5
|
import { SmartLinkSize } from '../../constants';
|
|
6
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
7
7
|
import { themed } from '@atlaskit/theme/components';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
|
|
10
9
|
// Temporary fix for Confluence inline comment on editor mod has z-index of 500, Jira issue view has z-index of 510
|
|
11
10
|
export var HOVER_CARD_Z_INDEX = layers.modal();
|
|
@@ -23,7 +22,7 @@ var blockGap = '0.5rem';
|
|
|
23
22
|
var elementGap = '0.5rem';
|
|
24
23
|
export var separatorCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n [data-separator] + [data-separator]:before {\n margin-right: ", ";\n }\n"])), elementGap);
|
|
25
24
|
export var HoverCardContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: none;\n border-width: 0;\n box-sizing: border-box;\n width: ", "rem;\n\n .", " {\n display: none;\n }\n"])), CARD_WIDTH_REM, loadingPlaceholderClassName);
|
|
26
|
-
export var titleBlockCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n gap: ", ";\n\n ", "\n\n // title and subtitle element group\n [data-smart-element-group] {\n // gap between title and subtitle\n gap: 0.06rem;\n display: flex;\n /* subtitle element group */\n > [data-smart-element-group] {\n > span {\n margin-right: ", ";\n }\n }\n }\n\n
|
|
25
|
+
export var titleBlockCss = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n gap: ", ";\n\n ", "\n\n // title and subtitle element group\n [data-smart-element-group] {\n // gap between title and subtitle\n gap: 0.06rem;\n display: flex;\n /* subtitle element group */\n > [data-smart-element-group] {\n > span {\n margin-right: ", ";\n }\n }\n }\n\n [data-smart-element='Title'] {\n font-weight: 600;\n }\n"])), blockGap, separatorCss, elementGap);
|
|
27
26
|
export var getTransitionStyles = function getTransitionStyles(snippetHeight) {
|
|
28
27
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transition: height 300ms ease-in-out;\n height: ", "px;\n"])), snippetHeight);
|
|
29
28
|
};
|
|
@@ -35,5 +34,5 @@ export var popupContainerStyles = css(_templateObject5 || (_templateObject5 = _t
|
|
|
35
34
|
dark: "var(--ds-shadow-overlay, 0px 0px 0px rgba(188, 214, 240, 0.12),0px 8px 12px rgba(3, 4, 4, 0.36),0px 0px 1px rgba(3, 4, 4, 0.5))"
|
|
36
35
|
})());
|
|
37
36
|
export var getPreviewBlockStyles = function getPreviewBlockStyles(previewHeight) {
|
|
38
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n
|
|
37
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n border-top-left-radius: ", ";\n border-top-right-radius: ", ";\n margin-bottom: ", ";\n"])), previewHeight ? "height: ".concat(previewHeight, "px;") : '', "var(--ds-border-radius-200, 8px)", "var(--ds-border-radius-200, 8px)", blockGap);
|
|
39
38
|
};
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "26.42.
|
|
13
|
+
packageVersion: "26.42.10",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -7,7 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
8
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { Frame } from '../
|
|
10
|
+
import { Frame } from '../RedesignedInlineCard/Frame';
|
|
11
11
|
export var CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
|
|
12
12
|
_inherits(CardLinkView, _React$PureComponent);
|
|
13
13
|
var _super = _createSuper(CardLinkView);
|
|
@@ -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
|
var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
11
11
|
var providerName = _ref.providerName,
|
|
12
|
+
isProductIntegrationSupported = _ref.isProductIntegrationSupported,
|
|
12
13
|
_ref$testId = _ref.testId,
|
|
13
14
|
testId = _ref$testId === void 0 ? 'unauthorised-view-content' : _ref$testId,
|
|
14
15
|
analytics = _ref.analytics;
|
|
15
16
|
var handleLearnMoreClick = useCallback(function () {
|
|
16
17
|
analytics === null || analytics === void 0 || analytics.ui.learnMoreClickedEvent();
|
|
17
18
|
}, [analytics === null || analytics === void 0 ? void 0 : analytics.ui]);
|
|
19
|
+
var 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": "".concat(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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const CONTENT_URL_SECURITY_AND_PERMISSIONS = "https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links";
|
|
2
|
+
export declare 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
|
* The alignment of Flexible UI component.
|
|
4
5
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { JsonLd } from 'json-ld-types';
|
|
3
3
|
import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
4
|
-
import { InlineCardResolvedViewProps } from '../../view/
|
|
4
|
+
import { InlineCardResolvedViewProps } from '../../view/RedesignedInlineCard/ResolvedView';
|
|
5
5
|
export declare const extractInlineIcon: (jsonLd: JsonLd.Data.BaseData) => import("react").ReactNode;
|
|
6
6
|
export declare const extractInlineProps: (jsonLd: JsonLd.Data.BaseData, renderers?: CardProviderRenderers) => InlineCardResolvedViewProps;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessageDescriptor } from 'react-intl-next';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title_crossjoin' | 'direct_access_title_crossjoin' | 'direct_access_description_crossjoin' | 'direct_access_crossjoin' | 'request_access_description_crossjoin' | 'request_access_crossjoin' | 'request_access_pending_title_crossjoin' | 'request_access_pending_description_crossjoin' | 'request_access_pending_crossjoin' | 'request_denied_description_crossjoin' | 'access_exists_description_crossjoin' | 'not_found_description_crossjoin' | 'not_found_title_crossjoin';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'could_not_load_link' | 'download' | 'follow' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'could_not_load_link' | 'download' | 'follow' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -17,3 +17,4 @@ export declare const getStatusDetails: (details?: JsonLd.Response) => string | u
|
|
|
17
17
|
export declare const isFinalState: (status: CardType) => boolean;
|
|
18
18
|
export declare const getDatasources: (details?: JsonLdDatasourceResponse) => DatasourceResolveResponse[] | undefined;
|
|
19
19
|
export declare const getCanBeDatasource: (details?: JsonLdDatasourceResponse) => boolean;
|
|
20
|
+
export declare const hasAuthScopeOverrides: (details?: JsonLd.Response) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const LozengeBlockWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -11,6 +11,7 @@ export interface EmbedCardUnauthorisedViewProps {
|
|
|
11
11
|
inheritDimensions?: boolean;
|
|
12
12
|
onClick?: (evt: React.MouseEvent) => void;
|
|
13
13
|
extensionKey?: string;
|
|
14
|
+
isProductIntegrationSupported?: boolean;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LozengeItem } from '../types';
|
|
2
|
+
import { ThemeAppearance } from '@atlaskit/lozenge';
|
|
3
|
+
export type LozengeActionItemsGroupProps = {
|
|
4
|
+
items: LozengeItem[];
|
|
5
|
+
testId?: string;
|
|
6
|
+
onClick?: (id: string, text: string, appearance?: ThemeAppearance) => Promise<void>;
|
|
7
|
+
};
|
|
@@ -6,6 +6,11 @@ type UnauthorisedViewContentProps = {
|
|
|
6
6
|
* Eg. Google, Microsoft etc
|
|
7
7
|
*/
|
|
8
8
|
providerName?: string;
|
|
9
|
+
/**
|
|
10
|
+
* If `true`, display an alternative message which prompts user to connect all
|
|
11
|
+
* Atlassian products (vs. smart links only) to the 3rd party account.
|
|
12
|
+
*/
|
|
13
|
+
isProductIntegrationSupported?: boolean;
|
|
9
14
|
/**
|
|
10
15
|
* A `testId` prop is provided for specified elements, which is a unique
|
|
11
16
|
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
@@ -22,5 +27,5 @@ type UnauthorisedViewContentProps = {
|
|
|
22
27
|
* This component is used in unauthorized views of a smart link.
|
|
23
28
|
* It represents the main text that provides a user with information on how to connect their account
|
|
24
29
|
*/
|
|
25
|
-
declare const UnauthorisedViewContent: ({ providerName, testId, analytics, }: UnauthorisedViewContentProps) => JSX.Element;
|
|
30
|
+
declare const UnauthorisedViewContent: ({ providerName, isProductIntegrationSupported, testId, analytics, }: UnauthorisedViewContentProps) => JSX.Element;
|
|
26
31
|
export default UnauthorisedViewContent;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const CONTENT_URL_SECURITY_AND_PERMISSIONS = "https://support.atlassian.com/confluence-cloud/docs/insert-links-and-anchors/#Smart-links";
|
|
2
|
+
export declare 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
|
* The alignment of Flexible UI component.
|
|
4
5
|
*/
|