@atlaskit/smart-card 26.43.5 → 26.43.7
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 +12 -0
- package/dist/cjs/i18n/cs.js +3 -2
- package/dist/cjs/i18n/da.js +3 -2
- package/dist/cjs/i18n/de.js +3 -2
- package/dist/cjs/i18n/en.js +3 -2
- package/dist/cjs/i18n/en_GB.js +3 -2
- package/dist/cjs/i18n/en_ZZ.js +3 -2
- package/dist/cjs/i18n/es.js +3 -2
- package/dist/cjs/i18n/fi.js +3 -2
- package/dist/cjs/i18n/fr.js +3 -2
- package/dist/cjs/i18n/hu.js +3 -2
- package/dist/cjs/i18n/it.js +3 -2
- package/dist/cjs/i18n/ja.js +3 -2
- package/dist/cjs/i18n/ko.js +3 -2
- package/dist/cjs/i18n/nb.js +3 -2
- package/dist/cjs/i18n/nl.js +3 -2
- package/dist/cjs/i18n/pl.js +3 -2
- package/dist/cjs/i18n/pt_BR.js +3 -2
- package/dist/cjs/i18n/ru.js +3 -2
- package/dist/cjs/i18n/sv.js +3 -2
- package/dist/cjs/i18n/th.js +3 -2
- package/dist/cjs/i18n/tr.js +3 -2
- package/dist/cjs/i18n/uk.js +3 -2
- package/dist/cjs/i18n/vi.js +3 -2
- package/dist/cjs/i18n/zh.js +3 -2
- package/dist/cjs/i18n/zh_TW.js +3 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/index.js +2 -9
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +2 -1
- package/dist/cjs/view/EmbedCard/components/styled.js +31 -16
- package/dist/cjs/view/EmbedCard/index.js +33 -73
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +4 -7
- package/dist/cjs/view/InlineCard/ErroredView/index.js +1 -2
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +5 -10
- package/dist/cjs/view/InlineCard/index.js +1 -7
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/i18n/cs.js +3 -2
- package/dist/es2019/i18n/da.js +3 -2
- package/dist/es2019/i18n/de.js +3 -2
- package/dist/es2019/i18n/en.js +3 -2
- package/dist/es2019/i18n/en_GB.js +3 -2
- package/dist/es2019/i18n/en_ZZ.js +3 -2
- package/dist/es2019/i18n/es.js +3 -2
- package/dist/es2019/i18n/fi.js +3 -2
- package/dist/es2019/i18n/fr.js +3 -2
- package/dist/es2019/i18n/hu.js +3 -2
- package/dist/es2019/i18n/it.js +3 -2
- package/dist/es2019/i18n/ja.js +3 -2
- package/dist/es2019/i18n/ko.js +3 -2
- package/dist/es2019/i18n/nb.js +3 -2
- package/dist/es2019/i18n/nl.js +3 -2
- package/dist/es2019/i18n/pl.js +3 -2
- package/dist/es2019/i18n/pt_BR.js +3 -2
- package/dist/es2019/i18n/ru.js +3 -2
- package/dist/es2019/i18n/sv.js +3 -2
- package/dist/es2019/i18n/th.js +3 -2
- package/dist/es2019/i18n/tr.js +3 -2
- package/dist/es2019/i18n/uk.js +3 -2
- package/dist/es2019/i18n/vi.js +3 -2
- package/dist/es2019/i18n/zh.js +3 -2
- package/dist/es2019/i18n/zh_TW.js +3 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/index.js +2 -9
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +2 -1
- package/dist/es2019/view/EmbedCard/components/styled.js +28 -2
- package/dist/es2019/view/EmbedCard/index.js +33 -73
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +4 -7
- package/dist/es2019/view/InlineCard/ErroredView/index.js +1 -2
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +5 -10
- package/dist/es2019/view/InlineCard/index.js +1 -7
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/i18n/cs.js +3 -2
- package/dist/esm/i18n/da.js +3 -2
- package/dist/esm/i18n/de.js +3 -2
- package/dist/esm/i18n/en.js +3 -2
- package/dist/esm/i18n/en_GB.js +3 -2
- package/dist/esm/i18n/en_ZZ.js +3 -2
- package/dist/esm/i18n/es.js +3 -2
- package/dist/esm/i18n/fi.js +3 -2
- package/dist/esm/i18n/fr.js +3 -2
- package/dist/esm/i18n/hu.js +3 -2
- package/dist/esm/i18n/it.js +3 -2
- package/dist/esm/i18n/ja.js +3 -2
- package/dist/esm/i18n/ko.js +3 -2
- package/dist/esm/i18n/nb.js +3 -2
- package/dist/esm/i18n/nl.js +3 -2
- package/dist/esm/i18n/pl.js +3 -2
- package/dist/esm/i18n/pt_BR.js +3 -2
- package/dist/esm/i18n/ru.js +3 -2
- package/dist/esm/i18n/sv.js +3 -2
- package/dist/esm/i18n/th.js +3 -2
- package/dist/esm/i18n/tr.js +3 -2
- package/dist/esm/i18n/uk.js +3 -2
- package/dist/esm/i18n/vi.js +3 -2
- package/dist/esm/i18n/zh.js +3 -2
- package/dist/esm/i18n/zh_TW.js +3 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/index.js +2 -9
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +2 -1
- package/dist/esm/view/EmbedCard/components/styled.js +31 -16
- package/dist/esm/view/EmbedCard/index.js +33 -73
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +4 -7
- package/dist/esm/view/InlineCard/ErroredView/index.js +1 -2
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +5 -10
- package/dist/esm/view/InlineCard/index.js +1 -7
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/i18n/cs.d.ts +1 -0
- package/dist/types/i18n/da.d.ts +1 -0
- package/dist/types/i18n/de.d.ts +1 -0
- package/dist/types/i18n/en.d.ts +1 -0
- package/dist/types/i18n/en_GB.d.ts +1 -0
- package/dist/types/i18n/en_ZZ.d.ts +1 -0
- package/dist/types/i18n/es.d.ts +1 -0
- package/dist/types/i18n/fi.d.ts +1 -0
- package/dist/types/i18n/fr.d.ts +1 -0
- package/dist/types/i18n/hu.d.ts +1 -0
- package/dist/types/i18n/it.d.ts +1 -0
- package/dist/types/i18n/ja.d.ts +1 -0
- package/dist/types/i18n/ko.d.ts +1 -0
- package/dist/types/i18n/nb.d.ts +1 -0
- package/dist/types/i18n/nl.d.ts +1 -0
- package/dist/types/i18n/pl.d.ts +1 -0
- package/dist/types/i18n/pt_BR.d.ts +1 -0
- package/dist/types/i18n/ru.d.ts +1 -0
- package/dist/types/i18n/sv.d.ts +1 -0
- package/dist/types/i18n/th.d.ts +1 -0
- package/dist/types/i18n/tr.d.ts +1 -0
- package/dist/types/i18n/uk.d.ts +1 -0
- package/dist/types/i18n/vi.d.ts +1 -0
- package/dist/types/i18n/zh.d.ts +1 -0
- package/dist/types/i18n/zh_TW.d.ts +1 -0
- package/dist/types/view/EmbedCard/components/styled.d.ts +4 -1
- package/dist/types-ts4.5/i18n/cs.d.ts +1 -0
- package/dist/types-ts4.5/i18n/da.d.ts +1 -0
- package/dist/types-ts4.5/i18n/de.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +1 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +1 -0
- package/dist/types-ts4.5/i18n/es.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +1 -0
- package/dist/types-ts4.5/i18n/it.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +1 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +1 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +1 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +1 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +1 -0
- package/dist/types-ts4.5/i18n/th.d.ts +1 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +1 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +1 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +1 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +1 -0
- package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +4 -1
- package/package.json +6 -6
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenViewOld.js +0 -84
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.js +0 -48
- package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +0 -75
- package/dist/cjs/view/EmbedCard/views/NotFoundView.js +0 -46
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +0 -87
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenViewOld.js +0 -76
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.js +0 -38
- package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +0 -69
- package/dist/es2019/view/EmbedCard/views/NotFoundView.js +0 -39
- package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +0 -77
- package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenViewOld.js +0 -75
- package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.js +0 -42
- package/dist/esm/view/EmbedCard/views/ForbiddenView.js +0 -68
- package/dist/esm/view/EmbedCard/views/NotFoundView.js +0 -39
- package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +0 -77
- package/dist/types/view/BlockCard/views/flexible/FlexibleForbiddenViewOld.d.ts +0 -8
- package/dist/types/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.d.ts +0 -8
- package/dist/types/view/EmbedCard/views/ForbiddenView.d.ts +0 -17
- package/dist/types/view/EmbedCard/views/NotFoundView.d.ts +0 -15
- package/dist/types/view/EmbedCard/views/UnauthorisedView.d.ts +0 -20
- package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleForbiddenViewOld.d.ts +0 -8
- package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleNotFoundViewOld.d.ts +0 -8
- package/dist/types-ts4.5/view/EmbedCard/views/ForbiddenView.d.ts +0 -17
- package/dist/types-ts4.5/view/EmbedCard/views/NotFoundView.d.ts +0 -15
- package/dist/types-ts4.5/view/EmbedCard/views/UnauthorisedView.d.ts +0 -20
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useMemo } from 'react';
|
|
2
|
-
import { di } from 'react-magnetic-di';
|
|
3
|
-
import { EmbedCardUnresolvedView } from './UnresolvedView';
|
|
4
|
-
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
5
|
-
import { ImageIcon } from '../components/ImageIcon';
|
|
6
|
-
import UnauthorisedViewContent from '../../common/UnauthorisedViewContent';
|
|
7
|
-
import { getUnresolvedEmbedCardImage } from '../utils';
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
10
|
-
* @deprecated Replaced by unauthorized-view
|
|
11
|
-
*/
|
|
12
|
-
export const EmbedCardUnauthorisedView = ({
|
|
13
|
-
analytics,
|
|
14
|
-
link,
|
|
15
|
-
context,
|
|
16
|
-
isSelected,
|
|
17
|
-
testId = 'embed-card-unauthorized-view',
|
|
18
|
-
onAuthorise,
|
|
19
|
-
inheritDimensions,
|
|
20
|
-
onClick,
|
|
21
|
-
extensionKey,
|
|
22
|
-
isProductIntegrationSupported
|
|
23
|
-
}) => {
|
|
24
|
-
const icon = context && context.icon && /*#__PURE__*/React.createElement(ImageIcon, {
|
|
25
|
-
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
26
|
-
});
|
|
27
|
-
const handleOnAuthorizeClick = useCallback(() => {
|
|
28
|
-
if (onAuthorise) {
|
|
29
|
-
analytics.track.appAccountAuthStarted({
|
|
30
|
-
extensionKey: extensionKey
|
|
31
|
-
});
|
|
32
|
-
onAuthorise();
|
|
33
|
-
}
|
|
34
|
-
}, [onAuthorise, analytics.track, extensionKey]);
|
|
35
|
-
const view = useMemo(() => {
|
|
36
|
-
var _context$image2;
|
|
37
|
-
if (onAuthorise) {
|
|
38
|
-
var _context$image;
|
|
39
|
-
return /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
|
|
40
|
-
button: {
|
|
41
|
-
appearance: 'primary',
|
|
42
|
-
text: 'connect_unauthorised_account_action',
|
|
43
|
-
testId: 'connect-account'
|
|
44
|
-
},
|
|
45
|
-
context: context && context.text,
|
|
46
|
-
description: "connect_unauthorised_account_description",
|
|
47
|
-
image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : getUnresolvedEmbedCardImage('unauthorized'),
|
|
48
|
-
onClick: handleOnAuthorizeClick,
|
|
49
|
-
testId: testId,
|
|
50
|
-
title: "connect_link_account_card_name"
|
|
51
|
-
}, /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
52
|
-
analytics: analytics,
|
|
53
|
-
providerName: context === null || context === void 0 ? void 0 : context.text,
|
|
54
|
-
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
55
|
-
testId: testId
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
|
|
59
|
-
description: context !== null && context !== void 0 && context.text ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider',
|
|
60
|
-
image: (_context$image2 = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image2 !== void 0 ? _context$image2 : getUnresolvedEmbedCardImage('forbidden'),
|
|
61
|
-
context: context === null || context === void 0 ? void 0 : context.text,
|
|
62
|
-
testId: testId,
|
|
63
|
-
title: context !== null && context !== void 0 && context.text ? 'unauthorised_account_name' : 'unauthorised_account_name_no_provider'
|
|
64
|
-
});
|
|
65
|
-
}, [analytics, context, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorise, testId]);
|
|
66
|
-
return /*#__PURE__*/React.createElement(ExpandedFrame, {
|
|
67
|
-
href: link,
|
|
68
|
-
icon: icon,
|
|
69
|
-
text: context && context.text,
|
|
70
|
-
frameStyle: "show",
|
|
71
|
-
isSelected: isSelected,
|
|
72
|
-
inheritDimensions: inheritDimensions,
|
|
73
|
-
onClick: onClick,
|
|
74
|
-
testId: testId,
|
|
75
|
-
allowScrollBar: true
|
|
76
|
-
}, view);
|
|
77
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["testId"];
|
|
5
|
-
import React, { useMemo } from 'react';
|
|
6
|
-
import { R300 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { messages } from '../../../../messages';
|
|
8
|
-
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
9
|
-
import { ForbiddenAction } from '../../actions/flexible/ForbiddenAction';
|
|
10
|
-
import Text from '../../../FlexibleCard/components/elements/text';
|
|
11
|
-
import { getForbiddenJsonLd } from '../../../../utils/jsonld';
|
|
12
|
-
import { extractProvider } from '@atlaskit/link-extractors';
|
|
13
|
-
import { extractRequestAccessContext } from '../../../../extractors/common/context';
|
|
14
|
-
import UnresolvedView from './unresolved-view';
|
|
15
|
-
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @private
|
|
19
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
20
|
-
* @deprecated Replaced by FlexibleForbiddenView
|
|
21
|
-
*/
|
|
22
|
-
var FlexibleForbiddenView = function FlexibleForbiddenView(_ref) {
|
|
23
|
-
var _details$meta;
|
|
24
|
-
var _ref$testId = _ref.testId,
|
|
25
|
-
testId = _ref$testId === void 0 ? 'smart-block-forbidden-view' : _ref$testId,
|
|
26
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
var cardState = props.cardState,
|
|
28
|
-
onAuthorize = props.onAuthorize,
|
|
29
|
-
url = props.url;
|
|
30
|
-
var details = cardState === null || cardState === void 0 ? void 0 : cardState.details;
|
|
31
|
-
var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
32
|
-
var provider = extractProvider(details === null || details === void 0 ? void 0 : details.data);
|
|
33
|
-
var providerName = (provider === null || provider === void 0 ? void 0 : provider.text) || '';
|
|
34
|
-
var requestAccessContext = extractRequestAccessContext({
|
|
35
|
-
jsonLd: cardMetadata,
|
|
36
|
-
url: url,
|
|
37
|
-
context: providerName
|
|
38
|
-
});
|
|
39
|
-
var descriptiveMessageKey = requestAccessContext && requestAccessContext.descriptiveMessageKey ? requestAccessContext.descriptiveMessageKey : 'invalid_permissions_description';
|
|
40
|
-
var actions = useMemo(function () {
|
|
41
|
-
var actionFromAccessContext = [];
|
|
42
|
-
var tryAnotherAccountAction = onAuthorize ? [ForbiddenAction(onAuthorize, 'try_another_account')] : [];
|
|
43
|
-
if (requestAccessContext) {
|
|
44
|
-
var action = requestAccessContext.action,
|
|
45
|
-
callToActionMessageKey = requestAccessContext.callToActionMessageKey;
|
|
46
|
-
actionFromAccessContext = action && callToActionMessageKey ? [ForbiddenAction(action.promise, callToActionMessageKey, {
|
|
47
|
-
context: providerName
|
|
48
|
-
})] : [];
|
|
49
|
-
}
|
|
50
|
-
return [].concat(tryAnotherAccountAction, _toConsumableArray(actionFromAccessContext));
|
|
51
|
-
}, [onAuthorize, requestAccessContext, providerName]);
|
|
52
|
-
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
53
|
-
actions: actions,
|
|
54
|
-
testId: testId
|
|
55
|
-
}), /*#__PURE__*/React.createElement(LockIcon, {
|
|
56
|
-
label: "forbidden-lock-icon",
|
|
57
|
-
size: "small",
|
|
58
|
-
primaryColor: "var(--ds-icon-danger, ".concat(R300, ")"),
|
|
59
|
-
testId: "".concat(testId, "-lock-icon")
|
|
60
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
61
|
-
message: {
|
|
62
|
-
descriptor: messages[descriptiveMessageKey],
|
|
63
|
-
values: {
|
|
64
|
-
context: providerName
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}));
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* @private
|
|
72
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
73
|
-
* @deprecated Replaced by FlexibleForbiddenView
|
|
74
|
-
*/
|
|
75
|
-
export default withFlexibleUIBlockCardStyle(FlexibleForbiddenView);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["testId"];
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { messages } from '../../../../messages';
|
|
6
|
-
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
7
|
-
import { R300 } from '@atlaskit/theme/colors';
|
|
8
|
-
import Text from '../../../FlexibleCard/components/elements/text';
|
|
9
|
-
import UnresolvedView from './unresolved-view';
|
|
10
|
-
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* This view represents a Block Card with a 'Not_Found' status.
|
|
14
|
-
*
|
|
15
|
-
* @see SmartLinkStatus
|
|
16
|
-
* @see FlexibleCardProps
|
|
17
|
-
*/
|
|
18
|
-
var FlexibleNotFoundViewOld = function FlexibleNotFoundViewOld(_ref) {
|
|
19
|
-
var _ref$testId = _ref.testId,
|
|
20
|
-
testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
|
|
21
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
-
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
23
|
-
testId: testId
|
|
24
|
-
}), /*#__PURE__*/React.createElement(WarningIcon, {
|
|
25
|
-
label: "not-found-warning-icon",
|
|
26
|
-
size: "small",
|
|
27
|
-
primaryColor: "var(--ds-icon-warning, ".concat(R300, ")"),
|
|
28
|
-
testId: "".concat(testId, "-warning-icon")
|
|
29
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
30
|
-
message: {
|
|
31
|
-
descriptor: messages.not_found_description
|
|
32
|
-
},
|
|
33
|
-
testId: "".concat(testId, "-message")
|
|
34
|
-
}));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @private
|
|
39
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
40
|
-
* @deprecated Replaced by FlexibleNotFoundView
|
|
41
|
-
*/
|
|
42
|
-
export default withFlexibleUIBlockCardStyle(FlexibleNotFoundViewOld);
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EmbedCardUnresolvedView } from './UnresolvedView';
|
|
3
|
-
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
4
|
-
import { ImageIcon } from '../components/ImageIcon';
|
|
5
|
-
import { getUnresolvedEmbedCardImage } from '../utils';
|
|
6
|
-
import { di } from 'react-magnetic-di';
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
9
|
-
* @deprecated Replaced by forbidden-view
|
|
10
|
-
*/
|
|
11
|
-
export var EmbedCardForbiddenView = function EmbedCardForbiddenView(_ref) {
|
|
12
|
-
var _action$promise;
|
|
13
|
-
var link = _ref.link,
|
|
14
|
-
context = _ref.context,
|
|
15
|
-
isSelected = _ref.isSelected,
|
|
16
|
-
_ref$testId = _ref.testId,
|
|
17
|
-
testId = _ref$testId === void 0 ? 'embed-card-forbidden-view' : _ref$testId,
|
|
18
|
-
onAuthorise = _ref.onAuthorise,
|
|
19
|
-
inheritDimensions = _ref.inheritDimensions,
|
|
20
|
-
onClick = _ref.onClick,
|
|
21
|
-
_ref$requestAccessCon = _ref.requestAccessContext,
|
|
22
|
-
requestAccessContext = _ref$requestAccessCon === void 0 ? {} : _ref$requestAccessCon;
|
|
23
|
-
var icon = context && context.icon && /*#__PURE__*/React.createElement(ImageIcon, {
|
|
24
|
-
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
25
|
-
});
|
|
26
|
-
var descriptiveMessageKey = requestAccessContext.descriptiveMessageKey,
|
|
27
|
-
callToActionMessageKey = requestAccessContext.callToActionMessageKey,
|
|
28
|
-
action = requestAccessContext.action;
|
|
29
|
-
var onEmbedCardClick = (_action$promise = action === null || action === void 0 ? void 0 : action.promise) !== null && _action$promise !== void 0 ? _action$promise : onAuthorise;
|
|
30
|
-
var showButton = true;
|
|
31
|
-
/**
|
|
32
|
-
* if there is a request access context, but no action to perform, do not show any button.
|
|
33
|
-
* By default, a "Try another account" button shows, but with request access context, we don't
|
|
34
|
-
* want to encourage users to try another account, if their request is already pending, etc.
|
|
35
|
-
*/
|
|
36
|
-
if (!callToActionMessageKey && descriptiveMessageKey) {
|
|
37
|
-
showButton = false;
|
|
38
|
-
}
|
|
39
|
-
var descriptionKey = descriptiveMessageKey !== null && descriptiveMessageKey !== void 0 ? descriptiveMessageKey : 'invalid_permissions_description';
|
|
40
|
-
var buttonTextKey = callToActionMessageKey !== null && callToActionMessageKey !== void 0 ? callToActionMessageKey : 'try_another_account';
|
|
41
|
-
var buttonProps;
|
|
42
|
-
if (showButton) {
|
|
43
|
-
buttonProps = {
|
|
44
|
-
appearance: 'default',
|
|
45
|
-
text: buttonTextKey,
|
|
46
|
-
testId: (action === null || action === void 0 ? void 0 : action.id) || 'connect-other-account'
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
return /*#__PURE__*/React.createElement(ExpandedFrame, {
|
|
50
|
-
href: link,
|
|
51
|
-
icon: icon,
|
|
52
|
-
text: context && context.text,
|
|
53
|
-
frameStyle: "show",
|
|
54
|
-
isSelected: isSelected,
|
|
55
|
-
inheritDimensions: inheritDimensions,
|
|
56
|
-
onClick: onClick,
|
|
57
|
-
testId: testId,
|
|
58
|
-
allowScrollBar: true
|
|
59
|
-
}, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
|
|
60
|
-
image: getUnresolvedEmbedCardImage('forbidden'),
|
|
61
|
-
title: "invalid_permissions",
|
|
62
|
-
description: descriptionKey,
|
|
63
|
-
context: context && context.text,
|
|
64
|
-
button: buttonProps,
|
|
65
|
-
onClick: onEmbedCardClick,
|
|
66
|
-
testId: testId
|
|
67
|
-
}));
|
|
68
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EmbedCardUnresolvedView } from './UnresolvedView';
|
|
3
|
-
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
4
|
-
import { ImageIcon } from '../components/ImageIcon';
|
|
5
|
-
import { getUnresolvedEmbedCardImage } from '../utils';
|
|
6
|
-
import { di } from 'react-magnetic-di';
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
9
|
-
* @deprecated Replaced by not-found-view
|
|
10
|
-
*/
|
|
11
|
-
export var EmbedCardNotFoundView = function EmbedCardNotFoundView(_ref) {
|
|
12
|
-
var link = _ref.link,
|
|
13
|
-
context = _ref.context,
|
|
14
|
-
isSelected = _ref.isSelected,
|
|
15
|
-
inheritDimensions = _ref.inheritDimensions,
|
|
16
|
-
_ref$testId = _ref.testId,
|
|
17
|
-
testId = _ref$testId === void 0 ? 'embed-card-not-found-view' : _ref$testId,
|
|
18
|
-
onClick = _ref.onClick;
|
|
19
|
-
var icon = context && context.icon && /*#__PURE__*/React.createElement(ImageIcon, {
|
|
20
|
-
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
21
|
-
});
|
|
22
|
-
return /*#__PURE__*/React.createElement(ExpandedFrame, {
|
|
23
|
-
href: link,
|
|
24
|
-
icon: icon,
|
|
25
|
-
text: context && context.text,
|
|
26
|
-
frameStyle: "show",
|
|
27
|
-
isSelected: isSelected,
|
|
28
|
-
inheritDimensions: inheritDimensions,
|
|
29
|
-
onClick: onClick,
|
|
30
|
-
testId: testId,
|
|
31
|
-
allowScrollBar: true
|
|
32
|
-
}, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
|
|
33
|
-
image: getUnresolvedEmbedCardImage('notFound'),
|
|
34
|
-
title: "not_found_title",
|
|
35
|
-
description: "not_found_description",
|
|
36
|
-
context: context && context.text,
|
|
37
|
-
testId: testId
|
|
38
|
-
}));
|
|
39
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useMemo } from 'react';
|
|
2
|
-
import { di } from 'react-magnetic-di';
|
|
3
|
-
import { EmbedCardUnresolvedView } from './UnresolvedView';
|
|
4
|
-
import { ExpandedFrame } from '../components/ExpandedFrame';
|
|
5
|
-
import { ImageIcon } from '../components/ImageIcon';
|
|
6
|
-
import UnauthorisedViewContent from '../../common/UnauthorisedViewContent';
|
|
7
|
-
import { getUnresolvedEmbedCardImage } from '../utils';
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
10
|
-
* @deprecated Replaced by unauthorized-view
|
|
11
|
-
*/
|
|
12
|
-
export var EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref) {
|
|
13
|
-
var analytics = _ref.analytics,
|
|
14
|
-
link = _ref.link,
|
|
15
|
-
context = _ref.context,
|
|
16
|
-
isSelected = _ref.isSelected,
|
|
17
|
-
_ref$testId = _ref.testId,
|
|
18
|
-
testId = _ref$testId === void 0 ? 'embed-card-unauthorized-view' : _ref$testId,
|
|
19
|
-
onAuthorise = _ref.onAuthorise,
|
|
20
|
-
inheritDimensions = _ref.inheritDimensions,
|
|
21
|
-
onClick = _ref.onClick,
|
|
22
|
-
extensionKey = _ref.extensionKey,
|
|
23
|
-
isProductIntegrationSupported = _ref.isProductIntegrationSupported;
|
|
24
|
-
var icon = context && context.icon && /*#__PURE__*/React.createElement(ImageIcon, {
|
|
25
|
-
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
26
|
-
});
|
|
27
|
-
var handleOnAuthorizeClick = useCallback(function () {
|
|
28
|
-
if (onAuthorise) {
|
|
29
|
-
analytics.track.appAccountAuthStarted({
|
|
30
|
-
extensionKey: extensionKey
|
|
31
|
-
});
|
|
32
|
-
onAuthorise();
|
|
33
|
-
}
|
|
34
|
-
}, [onAuthorise, analytics.track, extensionKey]);
|
|
35
|
-
var view = useMemo(function () {
|
|
36
|
-
var _context$image2;
|
|
37
|
-
if (onAuthorise) {
|
|
38
|
-
var _context$image;
|
|
39
|
-
return /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
|
|
40
|
-
button: {
|
|
41
|
-
appearance: 'primary',
|
|
42
|
-
text: 'connect_unauthorised_account_action',
|
|
43
|
-
testId: 'connect-account'
|
|
44
|
-
},
|
|
45
|
-
context: context && context.text,
|
|
46
|
-
description: "connect_unauthorised_account_description",
|
|
47
|
-
image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : getUnresolvedEmbedCardImage('unauthorized'),
|
|
48
|
-
onClick: handleOnAuthorizeClick,
|
|
49
|
-
testId: testId,
|
|
50
|
-
title: "connect_link_account_card_name"
|
|
51
|
-
}, /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
52
|
-
analytics: analytics,
|
|
53
|
-
providerName: context === null || context === void 0 ? void 0 : context.text,
|
|
54
|
-
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
55
|
-
testId: testId
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
|
|
59
|
-
description: context !== null && context !== void 0 && context.text ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider',
|
|
60
|
-
image: (_context$image2 = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image2 !== void 0 ? _context$image2 : getUnresolvedEmbedCardImage('forbidden'),
|
|
61
|
-
context: context === null || context === void 0 ? void 0 : context.text,
|
|
62
|
-
testId: testId,
|
|
63
|
-
title: context !== null && context !== void 0 && context.text ? 'unauthorised_account_name' : 'unauthorised_account_name_no_provider'
|
|
64
|
-
});
|
|
65
|
-
}, [analytics, context, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorise, testId]);
|
|
66
|
-
return /*#__PURE__*/React.createElement(ExpandedFrame, {
|
|
67
|
-
href: link,
|
|
68
|
-
icon: icon,
|
|
69
|
-
text: context && context.text,
|
|
70
|
-
frameStyle: "show",
|
|
71
|
-
isSelected: isSelected,
|
|
72
|
-
inheritDimensions: inheritDimensions,
|
|
73
|
-
onClick: onClick,
|
|
74
|
-
testId: testId,
|
|
75
|
-
allowScrollBar: true
|
|
76
|
-
}, view);
|
|
77
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FlexibleBlockCardProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
5
|
-
* @deprecated Replaced by FlexibleForbiddenView
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: (props: FlexibleBlockCardProps) => import("@emotion/react").jsx.JSX.Element;
|
|
8
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FlexibleBlockCardProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
5
|
-
* @deprecated Replaced by FlexibleNotFoundView
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: (props: FlexibleBlockCardProps) => import("@emotion/react").jsx.JSX.Element;
|
|
8
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { ContextViewModel, RequestAccessContextProps } from '../types';
|
|
3
|
-
export interface EmbedCardForbiddenViewProps {
|
|
4
|
-
context?: ContextViewModel;
|
|
5
|
-
link: string;
|
|
6
|
-
isSelected?: boolean;
|
|
7
|
-
testId?: string;
|
|
8
|
-
onAuthorise?: () => void;
|
|
9
|
-
inheritDimensions?: boolean;
|
|
10
|
-
onClick?: (evt: React.MouseEvent) => void;
|
|
11
|
-
requestAccessContext?: RequestAccessContextProps;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
15
|
-
* @deprecated Replaced by forbidden-view
|
|
16
|
-
*/
|
|
17
|
-
export declare const EmbedCardForbiddenView: FC<EmbedCardForbiddenViewProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { ContextViewModel } from '../types';
|
|
3
|
-
export interface EmbedCardNotFoundViewProps {
|
|
4
|
-
context?: ContextViewModel;
|
|
5
|
-
link: string;
|
|
6
|
-
isSelected?: boolean;
|
|
7
|
-
testId?: string;
|
|
8
|
-
inheritDimensions?: boolean;
|
|
9
|
-
onClick?: (evt: React.MouseEvent) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
13
|
-
* @deprecated Replaced by not-found-view
|
|
14
|
-
*/
|
|
15
|
-
export declare const EmbedCardNotFoundView: FC<EmbedCardNotFoundViewProps>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { ContextViewModel } from '../types';
|
|
3
|
-
import { AnalyticsFacade } from '../../../state/analytics';
|
|
4
|
-
export interface EmbedCardUnauthorisedViewProps {
|
|
5
|
-
analytics: AnalyticsFacade;
|
|
6
|
-
context?: ContextViewModel;
|
|
7
|
-
link: string;
|
|
8
|
-
isSelected?: boolean;
|
|
9
|
-
testId?: string;
|
|
10
|
-
onAuthorise?: () => void;
|
|
11
|
-
inheritDimensions?: boolean;
|
|
12
|
-
onClick?: (evt: React.MouseEvent) => void;
|
|
13
|
-
extensionKey?: string;
|
|
14
|
-
isProductIntegrationSupported?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
18
|
-
* @deprecated Replaced by unauthorized-view
|
|
19
|
-
*/
|
|
20
|
-
export declare const EmbedCardUnauthorisedView: FC<EmbedCardUnauthorisedViewProps>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FlexibleBlockCardProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
5
|
-
* @deprecated Replaced by FlexibleForbiddenView
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: (props: FlexibleBlockCardProps) => import("@emotion/react").jsx.JSX.Element;
|
|
8
|
-
export default _default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FlexibleBlockCardProps } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* @private
|
|
4
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
5
|
-
* @deprecated Replaced by FlexibleNotFoundView
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: (props: FlexibleBlockCardProps) => import("@emotion/react").jsx.JSX.Element;
|
|
8
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { ContextViewModel, RequestAccessContextProps } from '../types';
|
|
3
|
-
export interface EmbedCardForbiddenViewProps {
|
|
4
|
-
context?: ContextViewModel;
|
|
5
|
-
link: string;
|
|
6
|
-
isSelected?: boolean;
|
|
7
|
-
testId?: string;
|
|
8
|
-
onAuthorise?: () => void;
|
|
9
|
-
inheritDimensions?: boolean;
|
|
10
|
-
onClick?: (evt: React.MouseEvent) => void;
|
|
11
|
-
requestAccessContext?: RequestAccessContextProps;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
15
|
-
* @deprecated Replaced by forbidden-view
|
|
16
|
-
*/
|
|
17
|
-
export declare const EmbedCardForbiddenView: FC<EmbedCardForbiddenViewProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { ContextViewModel } from '../types';
|
|
3
|
-
export interface EmbedCardNotFoundViewProps {
|
|
4
|
-
context?: ContextViewModel;
|
|
5
|
-
link: string;
|
|
6
|
-
isSelected?: boolean;
|
|
7
|
-
testId?: string;
|
|
8
|
-
inheritDimensions?: boolean;
|
|
9
|
-
onClick?: (evt: React.MouseEvent) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
13
|
-
* @deprecated Replaced by not-found-view
|
|
14
|
-
*/
|
|
15
|
-
export declare const EmbedCardNotFoundView: FC<EmbedCardNotFoundViewProps>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { ContextViewModel } from '../types';
|
|
3
|
-
import { AnalyticsFacade } from '../../../state/analytics';
|
|
4
|
-
export interface EmbedCardUnauthorisedViewProps {
|
|
5
|
-
analytics: AnalyticsFacade;
|
|
6
|
-
context?: ContextViewModel;
|
|
7
|
-
link: string;
|
|
8
|
-
isSelected?: boolean;
|
|
9
|
-
testId?: string;
|
|
10
|
-
onAuthorise?: () => void;
|
|
11
|
-
inheritDimensions?: boolean;
|
|
12
|
-
onClick?: (evt: React.MouseEvent) => void;
|
|
13
|
-
extensionKey?: string;
|
|
14
|
-
isProductIntegrationSupported?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
18
|
-
* @deprecated Replaced by unauthorized-view
|
|
19
|
-
*/
|
|
20
|
-
export declare const EmbedCardUnauthorisedView: FC<EmbedCardUnauthorisedViewProps>;
|