@atlaskit/smart-card 26.42.7 → 26.42.9
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 +13 -0
- 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/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 +1 -1
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +3 -5
- 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/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -1
- 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 +1 -1
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +3 -5
- 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/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -1
- 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 +1 -1
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +3 -5
- 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/types/extractors/inline/index.d.ts +1 -1
- package/dist/types/view/BlockCard/views/styled.d.ts +5 -0
- package/dist/types/view/LinkView/index.d.ts +1 -1
- package/dist/types-ts4.5/extractors/inline/index.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/views/styled.d.ts +5 -0
- package/dist/types-ts4.5/view/LinkView/index.d.ts +1 -1
- package/package.json +6 -9
- 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/cjs/view/InlineCard/types.js +0 -5
- 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/es2019/view/InlineCard/types.js +0 -1
- 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/esm/view/InlineCard/types.js +0 -1
- 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
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
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); }; }
|
|
10
|
-
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; } }
|
|
11
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
12
|
-
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
13
|
-
import { N500, R400 } from '@atlaskit/theme/colors';
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
16
|
-
import { messages } from '../../../messages';
|
|
17
|
-
import { Frame } from '../Frame';
|
|
18
|
-
import { AKIconWrapper } from '../Icon';
|
|
19
|
-
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
20
|
-
import { IconStyledButton } from '../styled';
|
|
21
|
-
import { HoverCard } from '../../HoverCard';
|
|
22
|
-
var FallbackUnauthorizedIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
|
|
23
|
-
label: "error",
|
|
24
|
-
size: "small",
|
|
25
|
-
primaryColor: "var(--ds-icon-danger, ".concat(R400, ")")
|
|
26
|
-
}));
|
|
27
|
-
export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component) {
|
|
28
|
-
_inherits(InlineCardUnauthorizedView, _React$Component);
|
|
29
|
-
var _super = _createSuper(InlineCardUnauthorizedView);
|
|
30
|
-
function InlineCardUnauthorizedView() {
|
|
31
|
-
var _this;
|
|
32
|
-
_classCallCheck(this, InlineCardUnauthorizedView);
|
|
33
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
|
-
args[_key] = arguments[_key];
|
|
35
|
-
}
|
|
36
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
37
|
-
_defineProperty(_assertThisInitialized(_this), "handleConnectAccount", function (event) {
|
|
38
|
-
var _this$props = _this.props,
|
|
39
|
-
analytics = _this$props.analytics,
|
|
40
|
-
extensionKey = _this$props.extensionKey,
|
|
41
|
-
onAuthorise = _this$props.onAuthorise;
|
|
42
|
-
event.preventDefault();
|
|
43
|
-
event.stopPropagation();
|
|
44
|
-
if (onAuthorise) {
|
|
45
|
-
analytics === null || analytics === void 0 || analytics.track.appAccountAuthStarted({
|
|
46
|
-
extensionKey: extensionKey
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
return onAuthorise();
|
|
50
|
-
});
|
|
51
|
-
_defineProperty(_assertThisInitialized(_this), "renderRightSide", function () {
|
|
52
|
-
var _this$props2 = _this.props,
|
|
53
|
-
onAuthorise = _this$props2.onAuthorise,
|
|
54
|
-
context = _this$props2.context;
|
|
55
|
-
return onAuthorise ? /*#__PURE__*/React.createElement(Button, {
|
|
56
|
-
spacing: "none",
|
|
57
|
-
appearance: "subtle-link",
|
|
58
|
-
component: IconStyledButton,
|
|
59
|
-
onClick: _this.handleConnectAccount,
|
|
60
|
-
testId: "button-connect-account"
|
|
61
|
-
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
|
|
62
|
-
values: {
|
|
63
|
-
context: context
|
|
64
|
-
}
|
|
65
|
-
}))) : undefined;
|
|
66
|
-
});
|
|
67
|
-
return _this;
|
|
68
|
-
}
|
|
69
|
-
_createClass(InlineCardUnauthorizedView, [{
|
|
70
|
-
key: "render",
|
|
71
|
-
value: function render() {
|
|
72
|
-
var _this$props3 = this.props,
|
|
73
|
-
url = _this$props3.url,
|
|
74
|
-
icon = _this$props3.icon,
|
|
75
|
-
onAuthorise = _this$props3.onAuthorise,
|
|
76
|
-
onClick = _this$props3.onClick,
|
|
77
|
-
isSelected = _this$props3.isSelected,
|
|
78
|
-
_this$props3$testId = _this$props3.testId,
|
|
79
|
-
testId = _this$props3$testId === void 0 ? 'inline-card-unauthorized-view' : _this$props3$testId,
|
|
80
|
-
_this$props3$showAuth = _this$props3.showAuthTooltip,
|
|
81
|
-
showAuthTooltip = _this$props3$showAuth === void 0 ? false : _this$props3$showAuth;
|
|
82
|
-
var inlineCardUnauthenticatedView = /*#__PURE__*/React.createElement(Frame, {
|
|
83
|
-
testId: testId,
|
|
84
|
-
isSelected: isSelected
|
|
85
|
-
}, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
|
|
86
|
-
icon: icon ? icon : FallbackUnauthorizedIcon,
|
|
87
|
-
title: url,
|
|
88
|
-
link: url,
|
|
89
|
-
rightSide: this.renderRightSide(),
|
|
90
|
-
onClick: onClick,
|
|
91
|
-
titleColor: "var(--ds-text-subtle, ".concat(N500, ")")
|
|
92
|
-
}));
|
|
93
|
-
if (onAuthorise && showAuthTooltip) {
|
|
94
|
-
return /*#__PURE__*/React.createElement(HoverCard, {
|
|
95
|
-
url: url,
|
|
96
|
-
id: this.props.id
|
|
97
|
-
}, inlineCardUnauthenticatedView);
|
|
98
|
-
}
|
|
99
|
-
return inlineCardUnauthenticatedView;
|
|
100
|
-
}
|
|
101
|
-
}]);
|
|
102
|
-
return InlineCardUnauthorizedView;
|
|
103
|
-
}(React.Component);
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
|
|
4
|
-
import { extractInlineProps } from '../../extractors/inline';
|
|
5
|
-
import { extractRequestAccessContext } from '../../extractors/common/context';
|
|
6
|
-
import { CardLinkView } from '../LinkView';
|
|
7
|
-
import { InlineCardErroredView } from './ErroredView';
|
|
8
|
-
import { InlineCardForbiddenView } from './ForbiddenView';
|
|
9
|
-
import { InlineCardResolvedView } from './ResolvedView';
|
|
10
|
-
import { InlineCardResolvingView } from './ResolvingView';
|
|
11
|
-
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
12
|
-
import { extractProvider } from '@atlaskit/link-extractors';
|
|
13
|
-
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
14
|
-
import { getExtensionKey } from '../../state/helpers';
|
|
15
|
-
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView };
|
|
16
|
-
export var InlineCard = function InlineCard(_ref) {
|
|
17
|
-
var _details$meta;
|
|
18
|
-
var analytics = _ref.analytics,
|
|
19
|
-
id = _ref.id,
|
|
20
|
-
url = _ref.url,
|
|
21
|
-
cardState = _ref.cardState,
|
|
22
|
-
handleAuthorize = _ref.handleAuthorize,
|
|
23
|
-
handleFrameClick = _ref.handleFrameClick,
|
|
24
|
-
isSelected = _ref.isSelected,
|
|
25
|
-
renderers = _ref.renderers,
|
|
26
|
-
onResolve = _ref.onResolve,
|
|
27
|
-
onError = _ref.onError,
|
|
28
|
-
testId = _ref.testId,
|
|
29
|
-
inlinePreloaderStyle = _ref.inlinePreloaderStyle,
|
|
30
|
-
showHoverPreview = _ref.showHoverPreview,
|
|
31
|
-
showAuthTooltip = _ref.showAuthTooltip,
|
|
32
|
-
showServerActions = _ref.showServerActions;
|
|
33
|
-
var status = cardState.status,
|
|
34
|
-
details = cardState.details;
|
|
35
|
-
var cardDetails = details && details.data || getEmptyJsonLd();
|
|
36
|
-
var extensionKey = getExtensionKey(details);
|
|
37
|
-
var testIdWithStatus = testId ? "".concat(testId, "-").concat(status, "-view") : undefined;
|
|
38
|
-
var showHoverPreviewFlag = useFeatureFlag('showHoverPreview');
|
|
39
|
-
if (showHoverPreview === undefined && showHoverPreviewFlag !== undefined) {
|
|
40
|
-
showHoverPreview = Boolean(showHoverPreviewFlag);
|
|
41
|
-
}
|
|
42
|
-
switch (status) {
|
|
43
|
-
case 'pending':
|
|
44
|
-
case 'resolving':
|
|
45
|
-
return /*#__PURE__*/React.createElement(InlineCardResolvingView, {
|
|
46
|
-
url: url,
|
|
47
|
-
isSelected: isSelected,
|
|
48
|
-
onClick: handleFrameClick,
|
|
49
|
-
testId: testIdWithStatus,
|
|
50
|
-
inlinePreloaderStyle: inlinePreloaderStyle
|
|
51
|
-
});
|
|
52
|
-
case 'resolved':
|
|
53
|
-
var resolvedProps = extractInlineProps(cardDetails, renderers);
|
|
54
|
-
if (onResolve) {
|
|
55
|
-
onResolve({
|
|
56
|
-
url: url,
|
|
57
|
-
title: resolvedProps.title
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
return /*#__PURE__*/React.createElement(InlineCardResolvedView, _extends({}, resolvedProps, {
|
|
61
|
-
id: id,
|
|
62
|
-
showHoverPreview: showHoverPreview,
|
|
63
|
-
showServerActions: showServerActions,
|
|
64
|
-
link: url,
|
|
65
|
-
isSelected: isSelected,
|
|
66
|
-
onClick: handleFrameClick,
|
|
67
|
-
testId: testIdWithStatus
|
|
68
|
-
}));
|
|
69
|
-
case 'unauthorized':
|
|
70
|
-
if (onError) {
|
|
71
|
-
onError({
|
|
72
|
-
url: url,
|
|
73
|
-
status: status
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
var provider = extractProvider(cardDetails);
|
|
77
|
-
return /*#__PURE__*/React.createElement(InlineCardUnauthorizedView, {
|
|
78
|
-
icon: provider && provider.icon,
|
|
79
|
-
context: provider && provider.text,
|
|
80
|
-
url: url,
|
|
81
|
-
isSelected: isSelected,
|
|
82
|
-
onClick: handleFrameClick,
|
|
83
|
-
onAuthorise: handleAuthorize,
|
|
84
|
-
testId: testIdWithStatus,
|
|
85
|
-
showAuthTooltip: showAuthTooltip,
|
|
86
|
-
id: id,
|
|
87
|
-
analytics: analytics,
|
|
88
|
-
extensionKey: extensionKey
|
|
89
|
-
});
|
|
90
|
-
case 'forbidden':
|
|
91
|
-
if (onError) {
|
|
92
|
-
onError({
|
|
93
|
-
url: url,
|
|
94
|
-
status: status
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
var providerForbidden = extractProvider(cardDetails);
|
|
98
|
-
var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
99
|
-
var requestAccessContext = extractRequestAccessContext({
|
|
100
|
-
jsonLd: cardMetadata,
|
|
101
|
-
url: url,
|
|
102
|
-
context: providerForbidden === null || providerForbidden === void 0 ? void 0 : providerForbidden.text
|
|
103
|
-
});
|
|
104
|
-
return /*#__PURE__*/React.createElement(InlineCardForbiddenView, {
|
|
105
|
-
url: url,
|
|
106
|
-
icon: providerForbidden && providerForbidden.icon,
|
|
107
|
-
context: providerForbidden === null || providerForbidden === void 0 ? void 0 : providerForbidden.text,
|
|
108
|
-
isSelected: isSelected,
|
|
109
|
-
onClick: handleFrameClick,
|
|
110
|
-
onAuthorise: handleAuthorize,
|
|
111
|
-
testId: testIdWithStatus,
|
|
112
|
-
requestAccessContext: requestAccessContext
|
|
113
|
-
});
|
|
114
|
-
case 'not_found':
|
|
115
|
-
if (onError) {
|
|
116
|
-
onError({
|
|
117
|
-
url: url,
|
|
118
|
-
status: status
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
var providerNotFound = extractProvider(cardDetails);
|
|
122
|
-
return /*#__PURE__*/React.createElement(InlineCardErroredView, {
|
|
123
|
-
url: url,
|
|
124
|
-
icon: providerNotFound && providerNotFound.icon,
|
|
125
|
-
isSelected: isSelected,
|
|
126
|
-
message: "Can't find link",
|
|
127
|
-
onClick: handleFrameClick,
|
|
128
|
-
testId: testIdWithStatus || 'inline-card-not-found-view'
|
|
129
|
-
});
|
|
130
|
-
case 'fallback':
|
|
131
|
-
case 'errored':
|
|
132
|
-
default:
|
|
133
|
-
if (onError) {
|
|
134
|
-
onError({
|
|
135
|
-
url: url,
|
|
136
|
-
status: status
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
return /*#__PURE__*/React.createElement(CardLinkView, {
|
|
140
|
-
link: url,
|
|
141
|
-
isSelected: isSelected,
|
|
142
|
-
onClick: handleFrameClick,
|
|
143
|
-
testId: testIdWithStatus || 'inline-card-errored-view'
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
-
import styled from '@emotion/styled';
|
|
4
|
-
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { themed } from '@atlaskit/theme/components';
|
|
6
|
-
var LINK_COLOR_DARK = '#4794FF';
|
|
7
|
-
|
|
8
|
-
// By default buttons will hide overflow and ellipsis content instead of wrapping.
|
|
9
|
-
// This basically turns the button back into inline content
|
|
10
|
-
export var IconStyledButton = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: initial !important;\n display: inline !important;\n\n > span {\n display: inline;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])));
|
|
11
|
-
export var NoLinkAppearance = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
|
|
12
|
-
light: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
13
|
-
dark: "var(--ds-text-subtlest, ".concat(LINK_COLOR_DARK, ")")
|
|
14
|
-
}));
|
|
15
|
-
export var LowercaseAppearance = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-transform: lowercase;\n"])));
|
|
16
|
-
export var LinkAppearance = styled.a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
|
|
17
|
-
light: "var(--ds-link, ".concat(B400, ")"),
|
|
18
|
-
dark: "var(--ds-link, ".concat(LINK_COLOR_DARK, ")")
|
|
19
|
-
}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface InlineCardErroredViewProps {
|
|
3
|
-
/** The url to display */
|
|
4
|
-
url: string;
|
|
5
|
-
/** The error message to display */
|
|
6
|
-
message: string;
|
|
7
|
-
/** The optional click handler */
|
|
8
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
9
|
-
/** What to do when a user clicks "Try again" button */
|
|
10
|
-
onRetry?: () => void;
|
|
11
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
14
|
-
testId?: string;
|
|
15
|
-
icon?: React.ReactNode;
|
|
16
|
-
}
|
|
17
|
-
export declare class InlineCardErroredView extends React.Component<InlineCardErroredViewProps> {
|
|
18
|
-
handleRetry: (event: React.MouseEvent<HTMLElement>) => void;
|
|
19
|
-
renderRightSide: () => string | JSX.Element;
|
|
20
|
-
render(): JSX.Element;
|
|
21
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RequestAccessContextProps } from '../../types';
|
|
3
|
-
export interface InlineCardForbiddenViewProps {
|
|
4
|
-
/** The url to display */
|
|
5
|
-
url: string;
|
|
6
|
-
/** The icon of the service (e.g. Dropbox/Asana/Google/etc) to display */
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
/** The name of the service (e.g. Jira/Confluence/Asana/etc) to display */
|
|
9
|
-
context?: string;
|
|
10
|
-
/** The optional click handler */
|
|
11
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
12
|
-
/** The optional handler for "Connect" button */
|
|
13
|
-
onAuthorise?: () => void;
|
|
14
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
15
|
-
isSelected?: boolean;
|
|
16
|
-
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
17
|
-
testId?: string;
|
|
18
|
-
requestAccessContext?: RequestAccessContextProps;
|
|
19
|
-
}
|
|
20
|
-
export declare class InlineCardForbiddenView extends React.Component<InlineCardForbiddenViewProps> {
|
|
21
|
-
state: {
|
|
22
|
-
hasRequestAccessContextMessage: boolean;
|
|
23
|
-
};
|
|
24
|
-
handleRetry: (event: React.MouseEvent<HTMLElement>) => void;
|
|
25
|
-
renderForbiddenAccessMessage: () => JSX.Element;
|
|
26
|
-
renderRightSide: () => JSX.Element | null;
|
|
27
|
-
render(): JSX.Element;
|
|
28
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface FrameViewProps {
|
|
3
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
4
|
-
isSelected?: boolean;
|
|
5
|
-
/** A flag that determines whether the card needs a backgorund or not */
|
|
6
|
-
withoutBackground?: boolean;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
link?: string;
|
|
9
|
-
/** The optional click handler */
|
|
10
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
11
|
-
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
12
|
-
testId?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const Frame: React.FC<FrameViewProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface WrapperProps {
|
|
3
|
-
href?: string;
|
|
4
|
-
isSelected?: boolean;
|
|
5
|
-
isInteractive?: boolean;
|
|
6
|
-
withoutBackground?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const WrapperAnchor: import("@emotion/styled").StyledComponent<{
|
|
9
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
as?: import("react").ElementType<any> | undefined;
|
|
11
|
-
} & WrapperProps, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
12
|
-
export declare const WrapperSpan: import("@emotion/styled").StyledComponent<{
|
|
13
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
-
as?: import("react").ElementType<any> | undefined;
|
|
15
|
-
} & WrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const Icon: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: React.ElementType<any> | undefined;
|
|
5
|
-
}, React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
6
|
-
export declare const AKIconWrapper: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: React.ElementType<any> | undefined;
|
|
9
|
-
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
10
|
-
export declare const Shimmer: ({ testId }: {
|
|
11
|
-
testId: string;
|
|
12
|
-
}) => JSX.Element;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface IconAndTitleLayoutProps {
|
|
3
|
-
emoji?: React.ReactNode;
|
|
4
|
-
icon?: React.ReactNode;
|
|
5
|
-
title: React.ReactNode;
|
|
6
|
-
right?: React.ReactNode;
|
|
7
|
-
titleColor?: string;
|
|
8
|
-
titleTextColor?: string;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
defaultIcon?: React.ReactNode;
|
|
11
|
-
testId?: string;
|
|
12
|
-
link?: string;
|
|
13
|
-
rightSide?: React.ReactNode;
|
|
14
|
-
rightSideSpacer: boolean;
|
|
15
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
16
|
-
}
|
|
17
|
-
export declare class IconAndTitleLayout extends React.Component<IconAndTitleLayoutProps> {
|
|
18
|
-
static defaultProps: {
|
|
19
|
-
rightSideSpacer: boolean;
|
|
20
|
-
};
|
|
21
|
-
private renderAtlaskitIcon;
|
|
22
|
-
private renderImageIcon;
|
|
23
|
-
private renderIconPlaceholder;
|
|
24
|
-
renderIcon(testId: string): JSX.Element;
|
|
25
|
-
handleClick: (event: React.MouseEvent) => void;
|
|
26
|
-
handleKeyPress: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
27
|
-
render(): JSX.Element;
|
|
28
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n line-height: 14px;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
|
|
3
|
-
export declare const IconOverrides = "\n & > * > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
|
|
4
|
-
export declare const IconWrapper: import("@emotion/styled").StyledComponent<{
|
|
5
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
-
as?: import("react").ElementType<any> | undefined;
|
|
7
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
8
|
-
export declare const EmojiWrapper: import("@emotion/styled").StyledComponent<{
|
|
9
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
as?: import("react").ElementType<any> | undefined;
|
|
11
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
12
|
-
export declare const IconTitleWrapper: import("@emotion/styled").StyledComponent<{
|
|
13
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
-
as?: import("react").ElementType<any> | undefined;
|
|
15
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
16
|
-
export declare const LozengeWrapper: import("@emotion/styled").StyledComponent<{
|
|
17
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
-
as?: import("react").ElementType<any> | undefined;
|
|
19
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
20
|
-
export declare const LozengeBlockWrapper: import("@emotion/styled").StyledComponent<{
|
|
21
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
-
as?: import("react").ElementType<any> | undefined;
|
|
23
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
24
|
-
export declare const RightIconPositionWrapper: import("@emotion/styled").StyledComponent<{
|
|
25
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
-
as?: import("react").ElementType<any> | undefined;
|
|
27
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
28
|
-
export declare const IconPositionWrapper: import("@emotion/styled").StyledComponent<{
|
|
29
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
30
|
-
as?: import("react").ElementType<any> | undefined;
|
|
31
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
32
|
-
export declare const IconEmptyWrapper: import("@emotion/styled").StyledComponent<{
|
|
33
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
34
|
-
as?: import("react").ElementType<any> | undefined;
|
|
35
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
36
|
-
export declare const TitleWrapperClassName = "smart-link-title-wrapper";
|
|
37
|
-
export declare const TitleWrapper: import("@emotion/styled").StyledComponent<{
|
|
38
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
39
|
-
as?: import("react").ElementType<any> | undefined;
|
|
40
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { LozengeProps } from '../../../types';
|
|
3
|
-
export interface InlineCardResolvedViewProps {
|
|
4
|
-
/** A unique ID for a Smart Link. */
|
|
5
|
-
id?: string;
|
|
6
|
-
/** The optional con of the service (e.g. Dropbox/Asana/Google/etc) to display */
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
/** The name of the resource */
|
|
9
|
-
title?: string;
|
|
10
|
-
/** The the optional lozenge that might represent the statux of the resource */
|
|
11
|
-
lozenge?: LozengeProps;
|
|
12
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
13
|
-
isSelected?: boolean;
|
|
14
|
-
/** The optional url */
|
|
15
|
-
link?: string;
|
|
16
|
-
/** The optional click handler */
|
|
17
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
18
|
-
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
19
|
-
testId?: string;
|
|
20
|
-
/** The color of the title text only (not including the icon) */
|
|
21
|
-
titleTextColor?: string;
|
|
22
|
-
/** The Emoji icon prefix that was added to the title text via Add emoji button */
|
|
23
|
-
titlePrefix?: React.ReactNode;
|
|
24
|
-
/** Enables showing a custom preview on hover of link */
|
|
25
|
-
showHoverPreview?: boolean;
|
|
26
|
-
/** Show server actions that change the link resource, e.g. update status. */
|
|
27
|
-
showServerActions?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export declare class InlineCardResolvedView extends React.Component<InlineCardResolvedViewProps> {
|
|
30
|
-
renderLozenge(): JSX.Element | null;
|
|
31
|
-
render(): JSX.Element;
|
|
32
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { InlinePreloaderStyle } from '../../types';
|
|
3
|
-
export interface InlineCardResolvingViewProps {
|
|
4
|
-
/** The url to display */
|
|
5
|
-
url: string;
|
|
6
|
-
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
7
|
-
/** The optional click handler */
|
|
8
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
9
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
10
|
-
isSelected?: boolean;
|
|
11
|
-
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
12
|
-
testId?: string;
|
|
13
|
-
titleTextColor?: string;
|
|
14
|
-
}
|
|
15
|
-
export declare class InlineCardResolvingView extends React.Component<InlineCardResolvingViewProps> {
|
|
16
|
-
render(): JSX.Element;
|
|
17
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const SpinnerWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
} & import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
|
|
6
|
-
children?: import("react").ReactNode;
|
|
7
|
-
} & {
|
|
8
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
-
}, {}, {}>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnalyticsFacade } from '../../../state/analytics';
|
|
3
|
-
export interface InlineCardUnauthorizedViewProps {
|
|
4
|
-
/** The url to display */
|
|
5
|
-
url: string;
|
|
6
|
-
/** The icon of the service (e.g. Dropbox/Asana/Google/etc) to display */
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
/** The name of the service (e.g. Dropbox/Asana/Google/etc) to display */
|
|
9
|
-
context?: string;
|
|
10
|
-
/** The optional click handler */
|
|
11
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
12
|
-
/** What to do when a user hit "Try another account" button */
|
|
13
|
-
onAuthorise?: () => void;
|
|
14
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
15
|
-
isSelected?: boolean;
|
|
16
|
-
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
17
|
-
testId?: string;
|
|
18
|
-
/** A flag that determines is a tooltip should show up on hover over the unauthorised link */
|
|
19
|
-
showAuthTooltip?: boolean;
|
|
20
|
-
/** A smart link id that may be used in analytics */
|
|
21
|
-
id?: string;
|
|
22
|
-
/** An AnalyticsFacade object used for calling analytics. */
|
|
23
|
-
analytics: AnalyticsFacade;
|
|
24
|
-
/** An identifier of the provider which will be executing the action. */
|
|
25
|
-
extensionKey?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare class InlineCardUnauthorizedView extends React.Component<InlineCardUnauthorizedViewProps> {
|
|
28
|
-
handleConnectAccount: (event: React.MouseEvent<HTMLElement>) => void;
|
|
29
|
-
renderRightSide: () => JSX.Element | undefined;
|
|
30
|
-
render(): JSX.Element;
|
|
31
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { InlineCardProps } from './types';
|
|
3
|
-
import { InlineCardErroredView } from './ErroredView';
|
|
4
|
-
import { InlineCardForbiddenView } from './ForbiddenView';
|
|
5
|
-
import { InlineCardResolvedView } from './ResolvedView';
|
|
6
|
-
import { InlineCardResolvingView } from './ResolvingView';
|
|
7
|
-
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
8
|
-
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView, };
|
|
9
|
-
export declare const InlineCard: FC<InlineCardProps>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const IconStyledButton: 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>, {}>;
|
|
6
|
-
export declare const NoLinkAppearance: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: import("react").ElementType<any> | undefined;
|
|
9
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
10
|
-
export declare const LowercaseAppearance: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
14
|
-
export declare const LinkAppearance: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
}, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { EventHandler, MouseEvent, KeyboardEvent } from 'react';
|
|
2
|
-
import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
|
-
import { CardState } from '../../state/types';
|
|
4
|
-
import { InlinePreloaderStyle, OnErrorCallback } from '../types';
|
|
5
|
-
import { AnalyticsFacade } from '../../state/analytics';
|
|
6
|
-
export type InlineCardProps = {
|
|
7
|
-
id: string;
|
|
8
|
-
url: string;
|
|
9
|
-
cardState: CardState;
|
|
10
|
-
handleAuthorize: (() => void) | undefined;
|
|
11
|
-
handleFrameClick: EventHandler<MouseEvent | KeyboardEvent>;
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
testId?: string;
|
|
14
|
-
onResolve?: (data: {
|
|
15
|
-
url?: string;
|
|
16
|
-
title?: string;
|
|
17
|
-
}) => void;
|
|
18
|
-
onError?: OnErrorCallback;
|
|
19
|
-
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
20
|
-
renderers?: CardProviderRenderers;
|
|
21
|
-
showHoverPreview?: boolean;
|
|
22
|
-
showAuthTooltip?: boolean;
|
|
23
|
-
showServerActions?: boolean;
|
|
24
|
-
analytics: AnalyticsFacade;
|
|
25
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface InlineCardErroredViewProps {
|
|
3
|
-
/** The url to display */
|
|
4
|
-
url: string;
|
|
5
|
-
/** The error message to display */
|
|
6
|
-
message: string;
|
|
7
|
-
/** The optional click handler */
|
|
8
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
9
|
-
/** What to do when a user clicks "Try again" button */
|
|
10
|
-
onRetry?: () => void;
|
|
11
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
14
|
-
testId?: string;
|
|
15
|
-
icon?: React.ReactNode;
|
|
16
|
-
}
|
|
17
|
-
export declare class InlineCardErroredView extends React.Component<InlineCardErroredViewProps> {
|
|
18
|
-
handleRetry: (event: React.MouseEvent<HTMLElement>) => void;
|
|
19
|
-
renderRightSide: () => string | JSX.Element;
|
|
20
|
-
render(): JSX.Element;
|
|
21
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { RequestAccessContextProps } from '../../types';
|
|
3
|
-
export interface InlineCardForbiddenViewProps {
|
|
4
|
-
/** The url to display */
|
|
5
|
-
url: string;
|
|
6
|
-
/** The icon of the service (e.g. Dropbox/Asana/Google/etc) to display */
|
|
7
|
-
icon?: React.ReactNode;
|
|
8
|
-
/** The name of the service (e.g. Jira/Confluence/Asana/etc) to display */
|
|
9
|
-
context?: string;
|
|
10
|
-
/** The optional click handler */
|
|
11
|
-
onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
12
|
-
/** The optional handler for "Connect" button */
|
|
13
|
-
onAuthorise?: () => void;
|
|
14
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
15
|
-
isSelected?: boolean;
|
|
16
|
-
/** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
|
|
17
|
-
testId?: string;
|
|
18
|
-
requestAccessContext?: RequestAccessContextProps;
|
|
19
|
-
}
|
|
20
|
-
export declare class InlineCardForbiddenView extends React.Component<InlineCardForbiddenViewProps> {
|
|
21
|
-
state: {
|
|
22
|
-
hasRequestAccessContextMessage: boolean;
|
|
23
|
-
};
|
|
24
|
-
handleRetry: (event: React.MouseEvent<HTMLElement>) => void;
|
|
25
|
-
renderForbiddenAccessMessage: () => JSX.Element;
|
|
26
|
-
renderRightSide: () => JSX.Element | null;
|
|
27
|
-
render(): JSX.Element;
|
|
28
|
-
}
|