@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.43.
|
|
3
|
+
"version": "26.43.7",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
26
26
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
27
27
|
"@atlaskit/avatar": "^21.4.0",
|
|
28
|
-
"@atlaskit/avatar-group": "^9.
|
|
28
|
+
"@atlaskit/avatar-group": "^9.5.0",
|
|
29
29
|
"@atlaskit/badge": "^15.2.0",
|
|
30
30
|
"@atlaskit/button": "^17.1.0",
|
|
31
31
|
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@atlaskit/primitives": "^1.15.0",
|
|
50
50
|
"@atlaskit/spinner": "^16.0.0",
|
|
51
51
|
"@atlaskit/theme": "^12.6.0",
|
|
52
|
-
"@atlaskit/tokens": "^1.
|
|
53
|
-
"@atlaskit/tooltip": "^18.
|
|
52
|
+
"@atlaskit/tokens": "^1.32.0",
|
|
53
|
+
"@atlaskit/tooltip": "^18.1.0",
|
|
54
54
|
"@atlaskit/ufo": "^0.2.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|
|
56
56
|
"@emotion/react": "^11.7.1",
|
|
@@ -144,10 +144,10 @@
|
|
|
144
144
|
"platform.linking-platform.smart-card.iframes-allow-storage-access-by-user-activation": {
|
|
145
145
|
"type": "boolean"
|
|
146
146
|
},
|
|
147
|
-
"platform.linking-platform.smart-card.
|
|
147
|
+
"platform.linking-platform.smart-card.enable-hover-card-related-urls": {
|
|
148
148
|
"type": "boolean"
|
|
149
149
|
},
|
|
150
|
-
"platform.
|
|
150
|
+
"platform.editor.show-embed-card-frame-renderer": {
|
|
151
151
|
"type": "boolean"
|
|
152
152
|
}
|
|
153
153
|
},
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
14
|
-
var _messages = require("../../../../messages");
|
|
15
|
-
var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
|
|
16
|
-
var _ForbiddenAction = require("../../actions/flexible/ForbiddenAction");
|
|
17
|
-
var _text = _interopRequireDefault(require("../../../FlexibleCard/components/elements/text"));
|
|
18
|
-
var _jsonld = require("../../../../utils/jsonld");
|
|
19
|
-
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
20
|
-
var _context = require("../../../../extractors/common/context");
|
|
21
|
-
var _unresolvedView = _interopRequireDefault(require("./unresolved-view"));
|
|
22
|
-
var _withFlexibleUIBlockCardStyle = require("./utils/withFlexibleUIBlockCardStyle");
|
|
23
|
-
var _excluded = ["testId"];
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
26
|
-
/**
|
|
27
|
-
* @private
|
|
28
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
29
|
-
* @deprecated Replaced by FlexibleForbiddenView
|
|
30
|
-
*/
|
|
31
|
-
var FlexibleForbiddenView = function FlexibleForbiddenView(_ref) {
|
|
32
|
-
var _details$meta;
|
|
33
|
-
var _ref$testId = _ref.testId,
|
|
34
|
-
testId = _ref$testId === void 0 ? 'smart-block-forbidden-view' : _ref$testId,
|
|
35
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
|
-
var cardState = props.cardState,
|
|
37
|
-
onAuthorize = props.onAuthorize,
|
|
38
|
-
url = props.url;
|
|
39
|
-
var details = cardState === null || cardState === void 0 ? void 0 : cardState.details;
|
|
40
|
-
var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getForbiddenJsonLd)().meta;
|
|
41
|
-
var provider = (0, _linkExtractors.extractProvider)(details === null || details === void 0 ? void 0 : details.data);
|
|
42
|
-
var providerName = (provider === null || provider === void 0 ? void 0 : provider.text) || '';
|
|
43
|
-
var requestAccessContext = (0, _context.extractRequestAccessContext)({
|
|
44
|
-
jsonLd: cardMetadata,
|
|
45
|
-
url: url,
|
|
46
|
-
context: providerName
|
|
47
|
-
});
|
|
48
|
-
var descriptiveMessageKey = requestAccessContext && requestAccessContext.descriptiveMessageKey ? requestAccessContext.descriptiveMessageKey : 'invalid_permissions_description';
|
|
49
|
-
var actions = (0, _react.useMemo)(function () {
|
|
50
|
-
var actionFromAccessContext = [];
|
|
51
|
-
var tryAnotherAccountAction = onAuthorize ? [(0, _ForbiddenAction.ForbiddenAction)(onAuthorize, 'try_another_account')] : [];
|
|
52
|
-
if (requestAccessContext) {
|
|
53
|
-
var action = requestAccessContext.action,
|
|
54
|
-
callToActionMessageKey = requestAccessContext.callToActionMessageKey;
|
|
55
|
-
actionFromAccessContext = action && callToActionMessageKey ? [(0, _ForbiddenAction.ForbiddenAction)(action.promise, callToActionMessageKey, {
|
|
56
|
-
context: providerName
|
|
57
|
-
})] : [];
|
|
58
|
-
}
|
|
59
|
-
return [].concat(tryAnotherAccountAction, (0, _toConsumableArray2.default)(actionFromAccessContext));
|
|
60
|
-
}, [onAuthorize, requestAccessContext, providerName]);
|
|
61
|
-
return /*#__PURE__*/_react.default.createElement(_unresolvedView.default, (0, _extends2.default)({}, props, {
|
|
62
|
-
actions: actions,
|
|
63
|
-
testId: testId
|
|
64
|
-
}), /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
|
|
65
|
-
label: "forbidden-lock-icon",
|
|
66
|
-
size: "small",
|
|
67
|
-
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
|
|
68
|
-
testId: "".concat(testId, "-lock-icon")
|
|
69
|
-
}), /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
70
|
-
message: {
|
|
71
|
-
descriptor: _messages.messages[descriptiveMessageKey],
|
|
72
|
-
values: {
|
|
73
|
-
context: providerName
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}));
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* @private
|
|
81
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
82
|
-
* @deprecated Replaced by FlexibleForbiddenView
|
|
83
|
-
*/
|
|
84
|
-
var _default = exports.default = (0, _withFlexibleUIBlockCardStyle.withFlexibleUIBlockCardStyle)(FlexibleForbiddenView);
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _messages = require("../../../../messages");
|
|
12
|
-
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/warning"));
|
|
13
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
14
|
-
var _text = _interopRequireDefault(require("../../../FlexibleCard/components/elements/text"));
|
|
15
|
-
var _unresolvedView = _interopRequireDefault(require("./unresolved-view"));
|
|
16
|
-
var _withFlexibleUIBlockCardStyle = require("./utils/withFlexibleUIBlockCardStyle");
|
|
17
|
-
var _excluded = ["testId"];
|
|
18
|
-
/**
|
|
19
|
-
* This view represents a Block Card with a 'Not_Found' status.
|
|
20
|
-
*
|
|
21
|
-
* @see SmartLinkStatus
|
|
22
|
-
* @see FlexibleCardProps
|
|
23
|
-
*/
|
|
24
|
-
var FlexibleNotFoundViewOld = function FlexibleNotFoundViewOld(_ref) {
|
|
25
|
-
var _ref$testId = _ref.testId,
|
|
26
|
-
testId = _ref$testId === void 0 ? 'smart-block-not-found-view' : _ref$testId,
|
|
27
|
-
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(_unresolvedView.default, (0, _extends2.default)({}, props, {
|
|
29
|
-
testId: testId
|
|
30
|
-
}), /*#__PURE__*/_react.default.createElement(_warning.default, {
|
|
31
|
-
label: "not-found-warning-icon",
|
|
32
|
-
size: "small",
|
|
33
|
-
primaryColor: "var(--ds-icon-warning, ".concat(_colors.R300, ")"),
|
|
34
|
-
testId: "".concat(testId, "-warning-icon")
|
|
35
|
-
}), /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
36
|
-
message: {
|
|
37
|
-
descriptor: _messages.messages.not_found_description
|
|
38
|
-
},
|
|
39
|
-
testId: "".concat(testId, "-message")
|
|
40
|
-
}));
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @private
|
|
45
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
46
|
-
* @deprecated Replaced by FlexibleNotFoundView
|
|
47
|
-
*/
|
|
48
|
-
var _default = exports.default = (0, _withFlexibleUIBlockCardStyle.withFlexibleUIBlockCardStyle)(FlexibleNotFoundViewOld);
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.EmbedCardForbiddenView = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _UnresolvedView = require("./UnresolvedView");
|
|
10
|
-
var _ExpandedFrame = require("../components/ExpandedFrame");
|
|
11
|
-
var _ImageIcon = require("../components/ImageIcon");
|
|
12
|
-
var _utils = require("../utils");
|
|
13
|
-
var _reactMagneticDi = require("react-magnetic-di");
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
16
|
-
* @deprecated Replaced by forbidden-view
|
|
17
|
-
*/
|
|
18
|
-
var EmbedCardForbiddenView = exports.EmbedCardForbiddenView = function EmbedCardForbiddenView(_ref) {
|
|
19
|
-
var _action$promise;
|
|
20
|
-
var link = _ref.link,
|
|
21
|
-
context = _ref.context,
|
|
22
|
-
isSelected = _ref.isSelected,
|
|
23
|
-
_ref$testId = _ref.testId,
|
|
24
|
-
testId = _ref$testId === void 0 ? 'embed-card-forbidden-view' : _ref$testId,
|
|
25
|
-
onAuthorise = _ref.onAuthorise,
|
|
26
|
-
inheritDimensions = _ref.inheritDimensions,
|
|
27
|
-
onClick = _ref.onClick,
|
|
28
|
-
_ref$requestAccessCon = _ref.requestAccessContext,
|
|
29
|
-
requestAccessContext = _ref$requestAccessCon === void 0 ? {} : _ref$requestAccessCon;
|
|
30
|
-
var icon = context && context.icon && /*#__PURE__*/_react.default.createElement(_ImageIcon.ImageIcon, {
|
|
31
|
-
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
32
|
-
});
|
|
33
|
-
var descriptiveMessageKey = requestAccessContext.descriptiveMessageKey,
|
|
34
|
-
callToActionMessageKey = requestAccessContext.callToActionMessageKey,
|
|
35
|
-
action = requestAccessContext.action;
|
|
36
|
-
var onEmbedCardClick = (_action$promise = action === null || action === void 0 ? void 0 : action.promise) !== null && _action$promise !== void 0 ? _action$promise : onAuthorise;
|
|
37
|
-
var showButton = true;
|
|
38
|
-
/**
|
|
39
|
-
* if there is a request access context, but no action to perform, do not show any button.
|
|
40
|
-
* By default, a "Try another account" button shows, but with request access context, we don't
|
|
41
|
-
* want to encourage users to try another account, if their request is already pending, etc.
|
|
42
|
-
*/
|
|
43
|
-
if (!callToActionMessageKey && descriptiveMessageKey) {
|
|
44
|
-
showButton = false;
|
|
45
|
-
}
|
|
46
|
-
var descriptionKey = descriptiveMessageKey !== null && descriptiveMessageKey !== void 0 ? descriptiveMessageKey : 'invalid_permissions_description';
|
|
47
|
-
var buttonTextKey = callToActionMessageKey !== null && callToActionMessageKey !== void 0 ? callToActionMessageKey : 'try_another_account';
|
|
48
|
-
var buttonProps;
|
|
49
|
-
if (showButton) {
|
|
50
|
-
buttonProps = {
|
|
51
|
-
appearance: 'default',
|
|
52
|
-
text: buttonTextKey,
|
|
53
|
-
testId: (action === null || action === void 0 ? void 0 : action.id) || 'connect-other-account'
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(_ExpandedFrame.ExpandedFrame, {
|
|
57
|
-
href: link,
|
|
58
|
-
icon: icon,
|
|
59
|
-
text: context && context.text,
|
|
60
|
-
frameStyle: "show",
|
|
61
|
-
isSelected: isSelected,
|
|
62
|
-
inheritDimensions: inheritDimensions,
|
|
63
|
-
onClick: onClick,
|
|
64
|
-
testId: testId,
|
|
65
|
-
allowScrollBar: true
|
|
66
|
-
}, /*#__PURE__*/_react.default.createElement(_UnresolvedView.EmbedCardUnresolvedView, {
|
|
67
|
-
image: (0, _utils.getUnresolvedEmbedCardImage)('forbidden'),
|
|
68
|
-
title: "invalid_permissions",
|
|
69
|
-
description: descriptionKey,
|
|
70
|
-
context: context && context.text,
|
|
71
|
-
button: buttonProps,
|
|
72
|
-
onClick: onEmbedCardClick,
|
|
73
|
-
testId: testId
|
|
74
|
-
}));
|
|
75
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.EmbedCardNotFoundView = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _UnresolvedView = require("./UnresolvedView");
|
|
10
|
-
var _ExpandedFrame = require("../components/ExpandedFrame");
|
|
11
|
-
var _ImageIcon = require("../components/ImageIcon");
|
|
12
|
-
var _utils = require("../utils");
|
|
13
|
-
var _reactMagneticDi = require("react-magnetic-di");
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
16
|
-
* @deprecated Replaced by not-found-view
|
|
17
|
-
*/
|
|
18
|
-
var EmbedCardNotFoundView = exports.EmbedCardNotFoundView = function EmbedCardNotFoundView(_ref) {
|
|
19
|
-
var link = _ref.link,
|
|
20
|
-
context = _ref.context,
|
|
21
|
-
isSelected = _ref.isSelected,
|
|
22
|
-
inheritDimensions = _ref.inheritDimensions,
|
|
23
|
-
_ref$testId = _ref.testId,
|
|
24
|
-
testId = _ref$testId === void 0 ? 'embed-card-not-found-view' : _ref$testId,
|
|
25
|
-
onClick = _ref.onClick;
|
|
26
|
-
var icon = context && context.icon && /*#__PURE__*/_react.default.createElement(_ImageIcon.ImageIcon, {
|
|
27
|
-
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
28
|
-
});
|
|
29
|
-
return /*#__PURE__*/_react.default.createElement(_ExpandedFrame.ExpandedFrame, {
|
|
30
|
-
href: link,
|
|
31
|
-
icon: icon,
|
|
32
|
-
text: context && context.text,
|
|
33
|
-
frameStyle: "show",
|
|
34
|
-
isSelected: isSelected,
|
|
35
|
-
inheritDimensions: inheritDimensions,
|
|
36
|
-
onClick: onClick,
|
|
37
|
-
testId: testId,
|
|
38
|
-
allowScrollBar: true
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement(_UnresolvedView.EmbedCardUnresolvedView, {
|
|
40
|
-
image: (0, _utils.getUnresolvedEmbedCardImage)('notFound'),
|
|
41
|
-
title: "not_found_title",
|
|
42
|
-
description: "not_found_description",
|
|
43
|
-
context: context && context.text,
|
|
44
|
-
testId: testId
|
|
45
|
-
}));
|
|
46
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.EmbedCardUnauthorisedView = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _reactMagneticDi = require("react-magnetic-di");
|
|
11
|
-
var _UnresolvedView = require("./UnresolvedView");
|
|
12
|
-
var _ExpandedFrame = require("../components/ExpandedFrame");
|
|
13
|
-
var _ImageIcon = require("../components/ImageIcon");
|
|
14
|
-
var _UnauthorisedViewContent = _interopRequireDefault(require("../../common/UnauthorisedViewContent"));
|
|
15
|
-
var _utils = require("../utils");
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
20
|
-
* @deprecated Replaced by unauthorized-view
|
|
21
|
-
*/
|
|
22
|
-
var EmbedCardUnauthorisedView = exports.EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref) {
|
|
23
|
-
var analytics = _ref.analytics,
|
|
24
|
-
link = _ref.link,
|
|
25
|
-
context = _ref.context,
|
|
26
|
-
isSelected = _ref.isSelected,
|
|
27
|
-
_ref$testId = _ref.testId,
|
|
28
|
-
testId = _ref$testId === void 0 ? 'embed-card-unauthorized-view' : _ref$testId,
|
|
29
|
-
onAuthorise = _ref.onAuthorise,
|
|
30
|
-
inheritDimensions = _ref.inheritDimensions,
|
|
31
|
-
onClick = _ref.onClick,
|
|
32
|
-
extensionKey = _ref.extensionKey,
|
|
33
|
-
isProductIntegrationSupported = _ref.isProductIntegrationSupported;
|
|
34
|
-
var icon = context && context.icon && /*#__PURE__*/_react.default.createElement(_ImageIcon.ImageIcon, {
|
|
35
|
-
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
36
|
-
});
|
|
37
|
-
var handleOnAuthorizeClick = (0, _react.useCallback)(function () {
|
|
38
|
-
if (onAuthorise) {
|
|
39
|
-
analytics.track.appAccountAuthStarted({
|
|
40
|
-
extensionKey: extensionKey
|
|
41
|
-
});
|
|
42
|
-
onAuthorise();
|
|
43
|
-
}
|
|
44
|
-
}, [onAuthorise, analytics.track, extensionKey]);
|
|
45
|
-
var view = (0, _react.useMemo)(function () {
|
|
46
|
-
var _context$image2;
|
|
47
|
-
if (onAuthorise) {
|
|
48
|
-
var _context$image;
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_UnresolvedView.EmbedCardUnresolvedView, {
|
|
50
|
-
button: {
|
|
51
|
-
appearance: 'primary',
|
|
52
|
-
text: 'connect_unauthorised_account_action',
|
|
53
|
-
testId: 'connect-account'
|
|
54
|
-
},
|
|
55
|
-
context: context && context.text,
|
|
56
|
-
description: "connect_unauthorised_account_description",
|
|
57
|
-
image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : (0, _utils.getUnresolvedEmbedCardImage)('unauthorized'),
|
|
58
|
-
onClick: handleOnAuthorizeClick,
|
|
59
|
-
testId: testId,
|
|
60
|
-
title: "connect_link_account_card_name"
|
|
61
|
-
}, /*#__PURE__*/_react.default.createElement(_UnauthorisedViewContent.default, {
|
|
62
|
-
analytics: analytics,
|
|
63
|
-
providerName: context === null || context === void 0 ? void 0 : context.text,
|
|
64
|
-
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
65
|
-
testId: testId
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
return /*#__PURE__*/_react.default.createElement(_UnresolvedView.EmbedCardUnresolvedView, {
|
|
69
|
-
description: context !== null && context !== void 0 && context.text ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider',
|
|
70
|
-
image: (_context$image2 = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image2 !== void 0 ? _context$image2 : (0, _utils.getUnresolvedEmbedCardImage)('forbidden'),
|
|
71
|
-
context: context === null || context === void 0 ? void 0 : context.text,
|
|
72
|
-
testId: testId,
|
|
73
|
-
title: context !== null && context !== void 0 && context.text ? 'unauthorised_account_name' : 'unauthorised_account_name_no_provider'
|
|
74
|
-
});
|
|
75
|
-
}, [analytics, context, handleOnAuthorizeClick, isProductIntegrationSupported, onAuthorise, testId]);
|
|
76
|
-
return /*#__PURE__*/_react.default.createElement(_ExpandedFrame.ExpandedFrame, {
|
|
77
|
-
href: link,
|
|
78
|
-
icon: icon,
|
|
79
|
-
text: context && context.text,
|
|
80
|
-
frameStyle: "show",
|
|
81
|
-
isSelected: isSelected,
|
|
82
|
-
inheritDimensions: inheritDimensions,
|
|
83
|
-
onClick: onClick,
|
|
84
|
-
testId: testId,
|
|
85
|
-
allowScrollBar: true
|
|
86
|
-
}, view);
|
|
87
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useMemo } from 'react';
|
|
3
|
-
import { R300 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { messages } from '../../../../messages';
|
|
5
|
-
import LockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
6
|
-
import { ForbiddenAction } from '../../actions/flexible/ForbiddenAction';
|
|
7
|
-
import Text from '../../../FlexibleCard/components/elements/text';
|
|
8
|
-
import { getForbiddenJsonLd } from '../../../../utils/jsonld';
|
|
9
|
-
import { extractProvider } from '@atlaskit/link-extractors';
|
|
10
|
-
import { extractRequestAccessContext } from '../../../../extractors/common/context';
|
|
11
|
-
import UnresolvedView from './unresolved-view';
|
|
12
|
-
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @private
|
|
16
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
17
|
-
* @deprecated Replaced by FlexibleForbiddenView
|
|
18
|
-
*/
|
|
19
|
-
const FlexibleForbiddenView = ({
|
|
20
|
-
testId = 'smart-block-forbidden-view',
|
|
21
|
-
...props
|
|
22
|
-
}) => {
|
|
23
|
-
var _details$meta;
|
|
24
|
-
const {
|
|
25
|
-
cardState,
|
|
26
|
-
onAuthorize,
|
|
27
|
-
url
|
|
28
|
-
} = props;
|
|
29
|
-
const details = cardState === null || cardState === void 0 ? void 0 : cardState.details;
|
|
30
|
-
const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
|
|
31
|
-
const provider = extractProvider(details === null || details === void 0 ? void 0 : details.data);
|
|
32
|
-
const providerName = (provider === null || provider === void 0 ? void 0 : provider.text) || '';
|
|
33
|
-
const requestAccessContext = extractRequestAccessContext({
|
|
34
|
-
jsonLd: cardMetadata,
|
|
35
|
-
url,
|
|
36
|
-
context: providerName
|
|
37
|
-
});
|
|
38
|
-
const descriptiveMessageKey = requestAccessContext && requestAccessContext.descriptiveMessageKey ? requestAccessContext.descriptiveMessageKey : 'invalid_permissions_description';
|
|
39
|
-
const actions = useMemo(() => {
|
|
40
|
-
let actionFromAccessContext = [];
|
|
41
|
-
const tryAnotherAccountAction = onAuthorize ? [ForbiddenAction(onAuthorize, 'try_another_account')] : [];
|
|
42
|
-
if (requestAccessContext) {
|
|
43
|
-
const {
|
|
44
|
-
action,
|
|
45
|
-
callToActionMessageKey
|
|
46
|
-
} = requestAccessContext;
|
|
47
|
-
actionFromAccessContext = action && callToActionMessageKey ? [ForbiddenAction(action.promise, callToActionMessageKey, {
|
|
48
|
-
context: providerName
|
|
49
|
-
})] : [];
|
|
50
|
-
}
|
|
51
|
-
return [...tryAnotherAccountAction, ...actionFromAccessContext];
|
|
52
|
-
}, [onAuthorize, requestAccessContext, providerName]);
|
|
53
|
-
return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
54
|
-
actions: actions,
|
|
55
|
-
testId: testId
|
|
56
|
-
}), /*#__PURE__*/React.createElement(LockIcon, {
|
|
57
|
-
label: "forbidden-lock-icon",
|
|
58
|
-
size: "small",
|
|
59
|
-
primaryColor: `var(--ds-icon-danger, ${R300})`,
|
|
60
|
-
testId: `${testId}-lock-icon`
|
|
61
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
62
|
-
message: {
|
|
63
|
-
descriptor: messages[descriptiveMessageKey],
|
|
64
|
-
values: {
|
|
65
|
-
context: providerName
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}));
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @private
|
|
73
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
74
|
-
* @deprecated Replaced by FlexibleForbiddenView
|
|
75
|
-
*/
|
|
76
|
-
export default withFlexibleUIBlockCardStyle(FlexibleForbiddenView);
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { messages } from '../../../../messages';
|
|
4
|
-
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
5
|
-
import { R300 } from '@atlaskit/theme/colors';
|
|
6
|
-
import Text from '../../../FlexibleCard/components/elements/text';
|
|
7
|
-
import UnresolvedView from './unresolved-view';
|
|
8
|
-
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* This view represents a Block Card with a 'Not_Found' status.
|
|
12
|
-
*
|
|
13
|
-
* @see SmartLinkStatus
|
|
14
|
-
* @see FlexibleCardProps
|
|
15
|
-
*/
|
|
16
|
-
const FlexibleNotFoundViewOld = ({
|
|
17
|
-
testId = 'smart-block-not-found-view',
|
|
18
|
-
...props
|
|
19
|
-
}) => /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
|
|
20
|
-
testId: testId
|
|
21
|
-
}), /*#__PURE__*/React.createElement(WarningIcon, {
|
|
22
|
-
label: "not-found-warning-icon",
|
|
23
|
-
size: "small",
|
|
24
|
-
primaryColor: `var(--ds-icon-warning, ${R300})`,
|
|
25
|
-
testId: `${testId}-warning-icon`
|
|
26
|
-
}), /*#__PURE__*/React.createElement(Text, {
|
|
27
|
-
message: {
|
|
28
|
-
descriptor: messages.not_found_description
|
|
29
|
-
},
|
|
30
|
-
testId: `${testId}-message`
|
|
31
|
-
}));
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @private
|
|
35
|
-
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}
|
|
36
|
-
* @deprecated Replaced by FlexibleNotFoundView
|
|
37
|
-
*/
|
|
38
|
-
export default withFlexibleUIBlockCardStyle(FlexibleNotFoundViewOld);
|
|
@@ -1,69 +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 const EmbedCardForbiddenView = ({
|
|
12
|
-
link,
|
|
13
|
-
context,
|
|
14
|
-
isSelected,
|
|
15
|
-
testId = 'embed-card-forbidden-view',
|
|
16
|
-
onAuthorise,
|
|
17
|
-
inheritDimensions,
|
|
18
|
-
onClick,
|
|
19
|
-
requestAccessContext = {}
|
|
20
|
-
}) => {
|
|
21
|
-
var _action$promise;
|
|
22
|
-
const icon = context && context.icon && /*#__PURE__*/React.createElement(ImageIcon, {
|
|
23
|
-
src: typeof context.icon === 'string' ? context.icon : undefined
|
|
24
|
-
});
|
|
25
|
-
const {
|
|
26
|
-
descriptiveMessageKey,
|
|
27
|
-
callToActionMessageKey,
|
|
28
|
-
action
|
|
29
|
-
} = requestAccessContext;
|
|
30
|
-
const onEmbedCardClick = (_action$promise = action === null || action === void 0 ? void 0 : action.promise) !== null && _action$promise !== void 0 ? _action$promise : onAuthorise;
|
|
31
|
-
let showButton = true;
|
|
32
|
-
/**
|
|
33
|
-
* if there is a request access context, but no action to perform, do not show any button.
|
|
34
|
-
* By default, a "Try another account" button shows, but with request access context, we don't
|
|
35
|
-
* want to encourage users to try another account, if their request is already pending, etc.
|
|
36
|
-
*/
|
|
37
|
-
if (!callToActionMessageKey && descriptiveMessageKey) {
|
|
38
|
-
showButton = false;
|
|
39
|
-
}
|
|
40
|
-
const descriptionKey = descriptiveMessageKey !== null && descriptiveMessageKey !== void 0 ? descriptiveMessageKey : 'invalid_permissions_description';
|
|
41
|
-
const buttonTextKey = callToActionMessageKey !== null && callToActionMessageKey !== void 0 ? callToActionMessageKey : 'try_another_account';
|
|
42
|
-
let buttonProps;
|
|
43
|
-
if (showButton) {
|
|
44
|
-
buttonProps = {
|
|
45
|
-
appearance: 'default',
|
|
46
|
-
text: buttonTextKey,
|
|
47
|
-
testId: (action === null || action === void 0 ? void 0 : action.id) || 'connect-other-account'
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
return /*#__PURE__*/React.createElement(ExpandedFrame, {
|
|
51
|
-
href: link,
|
|
52
|
-
icon: icon,
|
|
53
|
-
text: context && context.text,
|
|
54
|
-
frameStyle: "show",
|
|
55
|
-
isSelected: isSelected,
|
|
56
|
-
inheritDimensions: inheritDimensions,
|
|
57
|
-
onClick: onClick,
|
|
58
|
-
testId: testId,
|
|
59
|
-
allowScrollBar: true
|
|
60
|
-
}, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
|
|
61
|
-
image: getUnresolvedEmbedCardImage('forbidden'),
|
|
62
|
-
title: "invalid_permissions",
|
|
63
|
-
description: descriptionKey,
|
|
64
|
-
context: context && context.text,
|
|
65
|
-
button: buttonProps,
|
|
66
|
-
onClick: onEmbedCardClick,
|
|
67
|
-
testId: testId
|
|
68
|
-
}));
|
|
69
|
-
};
|
|
@@ -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 const EmbedCardNotFoundView = ({
|
|
12
|
-
link,
|
|
13
|
-
context,
|
|
14
|
-
isSelected,
|
|
15
|
-
inheritDimensions,
|
|
16
|
-
testId = 'embed-card-not-found-view',
|
|
17
|
-
onClick
|
|
18
|
-
}) => {
|
|
19
|
-
const 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
|
-
};
|