@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
|
@@ -76,13 +76,10 @@ var _ErroredView = require("./views/ErroredView");
|
|
|
76
76
|
var _FlexibleResolvedView = _interopRequireDefault(require("./views/flexible/FlexibleResolvedView"));
|
|
77
77
|
var _FlexibleUnauthorisedView = _interopRequireDefault(require("./views/flexible/FlexibleUnauthorisedView"));
|
|
78
78
|
var _FlexibleNotFoundView = _interopRequireDefault(require("./views/flexible/FlexibleNotFoundView"));
|
|
79
|
-
var _FlexibleNotFoundViewOld = _interopRequireDefault(require("./views/flexible/FlexibleNotFoundViewOld"));
|
|
80
79
|
var _FlexibleForbiddenView = _interopRequireDefault(require("./views/flexible/FlexibleForbiddenView"));
|
|
81
|
-
var _FlexibleForbiddenViewOld = _interopRequireDefault(require("./views/flexible/FlexibleForbiddenViewOld"));
|
|
82
80
|
var _FlexibleErroredView = _interopRequireDefault(require("./views/flexible/FlexibleErroredView"));
|
|
83
81
|
var _react = require("@emotion/react");
|
|
84
82
|
var _handlers = require("./utils/handlers");
|
|
85
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
86
83
|
var _PreviewAction = _interopRequireDefault(require("./actions/PreviewAction"));
|
|
87
84
|
/** @jsx jsx */
|
|
88
85
|
|
|
@@ -145,15 +142,11 @@ var BlockCard = exports.BlockCard = function BlockCard(_ref) {
|
|
|
145
142
|
onAuthorize: handleAuthorize
|
|
146
143
|
}));
|
|
147
144
|
case 'forbidden':
|
|
148
|
-
return (0,
|
|
149
|
-
onAuthorize: handleAuthorize
|
|
150
|
-
})) : (0, _react.jsx)(_FlexibleForbiddenViewOld.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
|
|
145
|
+
return (0, _react.jsx)(_FlexibleForbiddenView.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
|
|
151
146
|
onAuthorize: handleAuthorize
|
|
152
147
|
}));
|
|
153
148
|
case 'not_found':
|
|
154
|
-
return (0,
|
|
155
|
-
onAuthorize: handleAuthorize
|
|
156
|
-
})) : (0, _react.jsx)(_FlexibleNotFoundViewOld.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
|
|
149
|
+
return (0, _react.jsx)(_FlexibleNotFoundView.default, (0, _extends2.default)({}, flexibleBlockCardProps, {
|
|
157
150
|
onAuthorize: handleAuthorize
|
|
158
151
|
}));
|
|
159
152
|
case 'fallback':
|
|
@@ -41,7 +41,8 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
41
41
|
}, [frameStyle, isFrameVisible]);
|
|
42
42
|
var renderHeader = function renderHeader() {
|
|
43
43
|
return /*#__PURE__*/_react.default.createElement(_styled.Header, {
|
|
44
|
-
className: "embed-header"
|
|
44
|
+
className: "embed-header",
|
|
45
|
+
frameStyle: frameStyle
|
|
45
46
|
}, /*#__PURE__*/_react.default.createElement(_styled.IconWrapper, {
|
|
46
47
|
isPlaceholder: isPlaceholder
|
|
47
48
|
}, !isPlaceholder && icon), /*#__PURE__*/_react.default.createElement(_styled.TextWrapper, {
|
|
@@ -12,6 +12,7 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
12
12
|
var _colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
13
13
|
var colors = _colors;
|
|
14
14
|
var _utils = require("../../common/utils");
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
16
17
|
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
18
|
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; }
|
|
@@ -60,11 +61,19 @@ var height = function height(_ref5) {
|
|
|
60
61
|
return inheritDimensions ? 'height: 100%;' : "height: ".concat((0, _utils.gs)(54));
|
|
61
62
|
};
|
|
62
63
|
var wrapperStyles = function wrapperStyles(props) {
|
|
63
|
-
return "\n ".concat(wrapperBorderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat((0, _constants.fontFamily)(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n
|
|
64
|
+
return "\n ".concat(wrapperBorderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getInteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat((0, _constants.fontFamily)(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n height: calc(100% + ", "var(--ds-space-100, 8px)", ");\n ").concat(wrapperBorderRadius, "\n\n ").concat(wrapperSizing(props), "\n }\n");
|
|
64
65
|
};
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
// if frameStyle !== 'show' then set the width of the frame to be
|
|
68
|
+
// 100% of the content +16px and position it left -8px to make it appear
|
|
69
|
+
// outside the container
|
|
70
|
+
var wrapperSizing = function wrapperSizing(_ref6) {
|
|
67
71
|
var frameStyle = _ref6.frameStyle;
|
|
72
|
+
return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.show-embed-card-frame-renderer') && frameStyle === 'show' ? "\n box-sizing: border-box;\n width: 100%;" : "\n width: calc(100% + ".concat("var(--ds-space-200, 16px)", ");\n left: ", "var(--ds-space-negative-100, -8px)", ";");
|
|
73
|
+
};
|
|
74
|
+
var visibleStyles = "\n &:after {\n border: 1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"), ";\n background-color: ", "var(--ds-surface-raised, white)", ";\n }\n .embed-header {\n opacity: 1;\n }");
|
|
75
|
+
function visible(_ref7) {
|
|
76
|
+
var frameStyle = _ref7.frameStyle;
|
|
68
77
|
return frameStyle === 'show' ? visibleStyles : '';
|
|
69
78
|
}
|
|
70
79
|
var LinkWrapper = exports.LinkWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", " &:hover {\n text-decoration: none;\n }\n"])), function (props) {
|
|
@@ -76,17 +85,20 @@ var Wrapper = exports.Wrapper = _styled.default.div(_templateObject2 || (_templa
|
|
|
76
85
|
return wrapperStyles(props);
|
|
77
86
|
});
|
|
78
87
|
var embedHeaderHeight = exports.embedHeaderHeight = 32;
|
|
79
|
-
var Header = exports.Header = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n position: absolute;\n z-index: 1;\n width: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n opacity: 0;\n transition: 300ms opacity cubic-bezier(0.15, 1, 0.3, 1);\n"])), embedHeaderHeight, "var(--ds-icon, ".concat(colors.N300, ")"))
|
|
80
|
-
var
|
|
81
|
-
var
|
|
88
|
+
var Header = exports.Header = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n position: absolute;\n z-index: 1;\n width: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n opacity: 0;\n transition: 300ms opacity cubic-bezier(0.15, 1, 0.3, 1);\n\n ", "\n"])), embedHeaderHeight, "var(--ds-icon, ".concat(colors.N300, ")"), function (_ref8) {
|
|
89
|
+
var frameStyle = _ref8.frameStyle;
|
|
90
|
+
return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.show-embed-card-frame-renderer') && frameStyle === 'show' ? "\n box-sizing: border-box;\n padding: 0 ".concat("var(--ds-space-100, 8px)", ";\n ") : '';
|
|
91
|
+
});
|
|
92
|
+
var IconWrapper = exports.IconWrapper = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n ", " margin-right: 4px;\n"])), borderRadius, csssize(16), function (_ref9) {
|
|
93
|
+
var isPlaceholder = _ref9.isPlaceholder;
|
|
82
94
|
if (isPlaceholder) {
|
|
83
95
|
return "\n background-color: ".concat("var(--ds-skeleton, ".concat(colors.N30, ")"), ";\n ");
|
|
84
96
|
} else {
|
|
85
97
|
return '';
|
|
86
98
|
}
|
|
87
99
|
});
|
|
88
|
-
var TextWrapper = exports.TextWrapper = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n ", " color: ", ";\n font-size: 12px;\n line-height: 16px;\n ", ";\n"])), function (
|
|
89
|
-
var isPlaceholder =
|
|
100
|
+
var TextWrapper = exports.TextWrapper = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n ", " color: ", ";\n font-size: 12px;\n line-height: 16px;\n ", ";\n"])), function (_ref10) {
|
|
101
|
+
var isPlaceholder = _ref10.isPlaceholder;
|
|
90
102
|
if (isPlaceholder) {
|
|
91
103
|
return "\n ".concat(borderRadius, "\n width: 125px;\n height: 12px;\n background-color: ", "var(--ds-skeleton, ".concat(colors.N30, ")"), ";\n ");
|
|
92
104
|
} else {
|
|
@@ -96,15 +108,18 @@ var TextWrapper = exports.TextWrapper = _styled.default.div(_templateObject5 ||
|
|
|
96
108
|
// NB: `overflow` is kept as `hidden` since
|
|
97
109
|
// the internal contents of the `iframe` should
|
|
98
110
|
// manage scrolling behaviour.
|
|
99
|
-
var Content = exports.Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border: 1px solid ", ";\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", "\n\n ", "\n"])), contentBorderRadius, "var(--ds-border, ".concat(_colors.N40, ")"), "var(--ds-surface-raised, white)", function (
|
|
100
|
-
var allowScrollBar =
|
|
111
|
+
var Content = exports.Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border: 1px solid ", ";\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", "\n\n ", "\n\n ", "\n"])), contentBorderRadius, "var(--ds-border, ".concat(_colors.N40, ")"), "var(--ds-surface-raised, white)", function (_ref11) {
|
|
112
|
+
var allowScrollBar = _ref11.allowScrollBar;
|
|
101
113
|
return allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;';
|
|
102
|
-
}, function (
|
|
103
|
-
var frameStyle =
|
|
114
|
+
}, function (_ref12) {
|
|
115
|
+
var frameStyle = _ref12.frameStyle;
|
|
116
|
+
return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.show-embed-card-frame-renderer') && frameStyle === 'show' ? "\n width: calc(100% - ".concat("var(--ds-space-200, 16px)", ");\n margin: 0 ", "var(--ds-space-100, 8px)", " ", "var(--ds-space-100, 8px)", ";\n ") : '';
|
|
117
|
+
}, function (_ref13) {
|
|
118
|
+
var frameStyle = _ref13.frameStyle;
|
|
104
119
|
return frameStyle === 'hide' ? 'height: 100%;' : "\n height: calc(100% - ".concat("var(--ds-space-400, 32px)", ");\n top: ", "var(--ds-space-400, 32px)", ";\n ");
|
|
105
120
|
});
|
|
106
|
-
var Image = exports.Image = _styled.default.img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (
|
|
107
|
-
var size =
|
|
121
|
+
var Image = exports.Image = _styled.default.img(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (_ref14) {
|
|
122
|
+
var size = _ref14.size;
|
|
108
123
|
return csssize(size);
|
|
109
124
|
}, borderRadius);
|
|
110
125
|
var maxAvatarCount = exports.maxAvatarCount = 6;
|
|
@@ -115,8 +130,8 @@ var Byline = exports.Byline = _styled.default.div(_templateObject10 || (_templat
|
|
|
115
130
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
116
131
|
var Description = exports.Description = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), "var(--ds-text, ".concat(colors.N800, ")"), 18 / 12, 18 * 3);
|
|
117
132
|
var ResolvedViewIconWrapper = exports.ResolvedViewIconWrapper = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
118
|
-
var Thumbnail = exports.Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: ", " 0 ", "\n ", ";\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-skeleton, ".concat(colors.N30, ")"), function (
|
|
119
|
-
var src =
|
|
133
|
+
var Thumbnail = exports.Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: ", " 0 ", "\n ", ";\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), "var(--ds-space-050, 4px)", "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", "var(--ds-skeleton, ".concat(colors.N30, ")"), function (_ref15) {
|
|
134
|
+
var src = _ref15.src;
|
|
120
135
|
return src;
|
|
121
136
|
});
|
|
122
137
|
var UsersWrapper = exports.UsersWrapper = _styled.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
@@ -7,27 +7,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.EmbedCard = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var _extractAccessContext = require("../../extractors/common/context/extractAccessContext");
|
|
12
11
|
var _embed = require("../../extractors/embed");
|
|
13
12
|
var _jsonld = require("../../utils/jsonld");
|
|
14
13
|
var _inline = require("../../extractors/inline");
|
|
15
14
|
var _block = require("../../extractors/block");
|
|
16
15
|
var _helpers = require("../../state/helpers");
|
|
17
|
-
var _context = require("../../extractors/common/context");
|
|
18
16
|
var _BlockCard = require("../BlockCard");
|
|
19
17
|
var _ResolvedView = require("../InlineCard/ResolvedView");
|
|
20
|
-
var _ForbiddenView = require("./views/ForbiddenView");
|
|
21
|
-
var _NotFoundView = require("./views/NotFoundView");
|
|
22
18
|
var _ResolvedView2 = require("./views/ResolvedView");
|
|
23
|
-
var _UnauthorisedView = require("./views/UnauthorisedView");
|
|
24
19
|
var _ErroredView = require("./views/ErroredView");
|
|
25
20
|
var _forbiddenView = _interopRequireDefault(require("./views/forbidden-view"));
|
|
26
21
|
var _notFoundView = _interopRequireDefault(require("./views/not-found-view"));
|
|
27
22
|
var _unauthorizedView = _interopRequireDefault(require("./views/unauthorized-view"));
|
|
28
23
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
29
24
|
var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(function (_ref, iframeRef) {
|
|
30
|
-
var _details$meta, _forbiddenViewProps$
|
|
25
|
+
var _details$meta, _forbiddenViewProps$c, _forbiddenViewProps$c2, _notFoundViewProps$co, _notFoundViewProps$co2;
|
|
31
26
|
var url = _ref.url,
|
|
32
27
|
_ref$cardState = _ref.cardState,
|
|
33
28
|
status = _ref$cardState.status,
|
|
@@ -115,30 +110,18 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
115
110
|
});
|
|
116
111
|
}
|
|
117
112
|
var unauthorisedViewProps = (0, _embed.extractEmbedProps)(data, meta, platform);
|
|
118
|
-
|
|
119
|
-
return /*#__PURE__*/_react.default.createElement(_unauthorizedView.default, {
|
|
120
|
-
analytics: analytics,
|
|
121
|
-
context: unauthorisedViewProps.context,
|
|
122
|
-
extensionKey: extensionKey,
|
|
123
|
-
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
124
|
-
inheritDimensions: inheritDimensions,
|
|
125
|
-
isSelected: isSelected,
|
|
126
|
-
onAuthorize: handleAuthorize,
|
|
127
|
-
onClick: handleFrameClick,
|
|
128
|
-
testId: testId,
|
|
129
|
-
url: unauthorisedViewProps.link
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
return /*#__PURE__*/_react.default.createElement(_UnauthorisedView.EmbedCardUnauthorisedView, (0, _extends2.default)({}, unauthorisedViewProps, {
|
|
133
|
-
isSelected: isSelected,
|
|
134
|
-
onAuthorise: handleAuthorize,
|
|
135
|
-
inheritDimensions: inheritDimensions,
|
|
136
|
-
onClick: handleFrameClick,
|
|
113
|
+
return /*#__PURE__*/_react.default.createElement(_unauthorizedView.default, {
|
|
137
114
|
analytics: analytics,
|
|
115
|
+
context: unauthorisedViewProps.context,
|
|
138
116
|
extensionKey: extensionKey,
|
|
139
117
|
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
140
|
-
|
|
141
|
-
|
|
118
|
+
inheritDimensions: inheritDimensions,
|
|
119
|
+
isSelected: isSelected,
|
|
120
|
+
onAuthorize: handleAuthorize,
|
|
121
|
+
onClick: handleFrameClick,
|
|
122
|
+
testId: testId,
|
|
123
|
+
url: unauthorisedViewProps.link
|
|
124
|
+
});
|
|
142
125
|
case 'forbidden':
|
|
143
126
|
if (onError) {
|
|
144
127
|
onError({
|
|
@@ -158,36 +141,21 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
158
141
|
ref: iframeRef
|
|
159
142
|
}));
|
|
160
143
|
}
|
|
161
|
-
|
|
162
|
-
var _forbiddenViewProps$c, _forbiddenViewProps$c2;
|
|
163
|
-
var accessContext = (0, _extractAccessContext.extractRequestAccessContextImproved)({
|
|
164
|
-
jsonLd: cardMetadata,
|
|
165
|
-
url: url,
|
|
166
|
-
product: (_forbiddenViewProps$c = (_forbiddenViewProps$c2 = forbiddenViewProps.context) === null || _forbiddenViewProps$c2 === void 0 ? void 0 : _forbiddenViewProps$c2.text) !== null && _forbiddenViewProps$c !== void 0 ? _forbiddenViewProps$c : '',
|
|
167
|
-
createAnalyticsEvent: createAnalyticsEvent
|
|
168
|
-
});
|
|
169
|
-
return /*#__PURE__*/_react.default.createElement(_forbiddenView.default, {
|
|
170
|
-
context: forbiddenViewProps.context,
|
|
171
|
-
inheritDimensions: inheritDimensions,
|
|
172
|
-
isSelected: isSelected,
|
|
173
|
-
onAuthorize: handleAuthorize,
|
|
174
|
-
onClick: handleFrameClick,
|
|
175
|
-
accessContext: accessContext,
|
|
176
|
-
url: forbiddenViewProps.link
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
var requestAccessContext = (0, _context.extractRequestAccessContext)({
|
|
144
|
+
var forbiddenAccessContext = (0, _extractAccessContext.extractRequestAccessContextImproved)({
|
|
180
145
|
jsonLd: cardMetadata,
|
|
181
146
|
url: url,
|
|
182
|
-
|
|
147
|
+
product: (_forbiddenViewProps$c = (_forbiddenViewProps$c2 = forbiddenViewProps.context) === null || _forbiddenViewProps$c2 === void 0 ? void 0 : _forbiddenViewProps$c2.text) !== null && _forbiddenViewProps$c !== void 0 ? _forbiddenViewProps$c : '',
|
|
148
|
+
createAnalyticsEvent: createAnalyticsEvent
|
|
183
149
|
});
|
|
184
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
185
|
-
|
|
186
|
-
onAuthorise: handleAuthorize,
|
|
150
|
+
return /*#__PURE__*/_react.default.createElement(_forbiddenView.default, {
|
|
151
|
+
context: forbiddenViewProps.context,
|
|
187
152
|
inheritDimensions: inheritDimensions,
|
|
153
|
+
isSelected: isSelected,
|
|
154
|
+
onAuthorize: handleAuthorize,
|
|
188
155
|
onClick: handleFrameClick,
|
|
189
|
-
|
|
190
|
-
|
|
156
|
+
accessContext: forbiddenAccessContext,
|
|
157
|
+
url: forbiddenViewProps.link
|
|
158
|
+
});
|
|
191
159
|
case 'not_found':
|
|
192
160
|
if (onError) {
|
|
193
161
|
onError({
|
|
@@ -196,28 +164,20 @@ var EmbedCard = exports.EmbedCard = /*#__PURE__*/_react.default.forwardRef(funct
|
|
|
196
164
|
});
|
|
197
165
|
}
|
|
198
166
|
var notFoundViewProps = (0, _embed.extractEmbedProps)(data, meta, platform);
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
return /*#__PURE__*/_react.default.createElement(_notFoundView.default, {
|
|
208
|
-
context: notFoundViewProps.context,
|
|
209
|
-
inheritDimensions: inheritDimensions,
|
|
210
|
-
isSelected: isSelected,
|
|
211
|
-
onClick: handleFrameClick,
|
|
212
|
-
accessContext: _accessContext,
|
|
213
|
-
url: notFoundViewProps.link
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
return /*#__PURE__*/_react.default.createElement(_NotFoundView.EmbedCardNotFoundView, (0, _extends2.default)({}, notFoundViewProps, {
|
|
217
|
-
isSelected: isSelected,
|
|
167
|
+
var notFoundAccessContext = details !== null && details !== void 0 && details.meta ? (0, _extractAccessContext.extractRequestAccessContextImproved)({
|
|
168
|
+
jsonLd: details === null || details === void 0 ? void 0 : details.meta,
|
|
169
|
+
url: url,
|
|
170
|
+
product: (_notFoundViewProps$co = (_notFoundViewProps$co2 = notFoundViewProps.context) === null || _notFoundViewProps$co2 === void 0 ? void 0 : _notFoundViewProps$co2.text) !== null && _notFoundViewProps$co !== void 0 ? _notFoundViewProps$co : '',
|
|
171
|
+
createAnalyticsEvent: createAnalyticsEvent
|
|
172
|
+
}) : undefined;
|
|
173
|
+
return /*#__PURE__*/_react.default.createElement(_notFoundView.default, {
|
|
174
|
+
context: notFoundViewProps.context,
|
|
218
175
|
inheritDimensions: inheritDimensions,
|
|
219
|
-
|
|
220
|
-
|
|
176
|
+
isSelected: isSelected,
|
|
177
|
+
onClick: handleFrameClick,
|
|
178
|
+
accessContext: notFoundAccessContext,
|
|
179
|
+
url: notFoundViewProps.link
|
|
180
|
+
});
|
|
221
181
|
case 'fallback':
|
|
222
182
|
case 'errored':
|
|
223
183
|
default:
|
|
@@ -27,7 +27,6 @@ var _messages = require("../../../messages");
|
|
|
27
27
|
var _click = require("../../../utils/analytics/click");
|
|
28
28
|
var _store = require("../../../state/store");
|
|
29
29
|
var _forbidden = _interopRequireDefault(require("./views/forbidden"));
|
|
30
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
31
30
|
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); }
|
|
32
31
|
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; }
|
|
33
32
|
/** @jsx jsx */
|
|
@@ -182,12 +181,10 @@ var HoverCardContent = function HoverCardContent(_ref) {
|
|
|
182
181
|
url: url
|
|
183
182
|
});
|
|
184
183
|
}
|
|
185
|
-
if (
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
});
|
|
190
|
-
}
|
|
184
|
+
if (cardState.status === 'forbidden' || cardState.status === 'not_found') {
|
|
185
|
+
return (0, _react.jsx)(_forbidden.default, {
|
|
186
|
+
flexibleCardProps: flexibleCardProps
|
|
187
|
+
});
|
|
191
188
|
}
|
|
192
189
|
if (cardState.status === 'resolved') {
|
|
193
190
|
return (0, _react.jsx)(_resolved.default, {
|
|
@@ -24,7 +24,6 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
24
24
|
var _styled = require("../styled");
|
|
25
25
|
var _withFrameStyleControl = _interopRequireDefault(require("../utils/withFrameStyleControl"));
|
|
26
26
|
var _HoverCard = require("../../HoverCard");
|
|
27
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
28
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
29
28
|
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; } }
|
|
30
29
|
var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
@@ -85,7 +84,7 @@ var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/functio
|
|
|
85
84
|
onClick: onClick,
|
|
86
85
|
rightSide: message
|
|
87
86
|
}), this.renderActionButton());
|
|
88
|
-
if (this.props.showHoverPreview
|
|
87
|
+
if (this.props.showHoverPreview) {
|
|
89
88
|
return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
|
|
90
89
|
url: url
|
|
91
90
|
}, content);
|
|
@@ -27,7 +27,6 @@ var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
|
27
27
|
var _styled2 = require("../IconAndTitleLayout/styled");
|
|
28
28
|
var _withFrameStyleControl = _interopRequireDefault(require("../utils/withFrameStyleControl"));
|
|
29
29
|
var _HoverCard = require("../../HoverCard");
|
|
30
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
31
30
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
32
31
|
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; } }
|
|
33
32
|
var FallbackForbiddenIcon = /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
|
|
@@ -66,13 +65,10 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
66
65
|
var _this$props3;
|
|
67
66
|
if ((_this$props3 = _this.props) !== null && _this$props3 !== void 0 && (_this$props3 = _this$props3.requestAccessContext) !== null && _this$props3 !== void 0 && _this$props3.callToActionMessageKey) {
|
|
68
67
|
var callToActionMessageKey = _this.props.requestAccessContext.callToActionMessageKey;
|
|
69
|
-
var values = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.cross-join') ? {
|
|
70
|
-
product: _this.props.context
|
|
71
|
-
} : {
|
|
72
|
-
context: _this.props.context
|
|
73
|
-
};
|
|
74
68
|
return /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[callToActionMessageKey], {
|
|
75
|
-
values:
|
|
69
|
+
values: {
|
|
70
|
+
product: _this.props.context
|
|
71
|
+
}
|
|
76
72
|
}));
|
|
77
73
|
}
|
|
78
74
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.invalid_permissions, function (formattedMessage) {
|
|
@@ -84,7 +80,6 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
84
80
|
var onAuthorise = _this.props.onAuthorise;
|
|
85
81
|
var ActionButton = (0, _withFrameStyleControl.default)(_customThemeButton.default, _this.frameRef);
|
|
86
82
|
var accessType = (_this$props$requestAc = _this.props.requestAccessContext) === null || _this$props$requestAc === void 0 ? void 0 : _this$props$requestAc.accessType;
|
|
87
|
-
var isButtonDisabled = (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.smart-card.cross-join') && accessType === 'PENDING_REQUEST_EXISTS';
|
|
88
83
|
if (_this.state.hasRequestAccessContextMessage) {
|
|
89
84
|
return /*#__PURE__*/_react.default.createElement(ActionButton, {
|
|
90
85
|
spacing: "none",
|
|
@@ -92,7 +87,7 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
92
87
|
component: _styled.IconStyledButton,
|
|
93
88
|
testId: "button-connect-other-account",
|
|
94
89
|
role: "button",
|
|
95
|
-
isDisabled:
|
|
90
|
+
isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
|
|
96
91
|
}, _this.renderForbiddenAccessMessage());
|
|
97
92
|
}
|
|
98
93
|
if (onAuthorise) {
|
|
@@ -131,7 +126,7 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
131
126
|
onClick: onClick,
|
|
132
127
|
titleColor: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
|
|
133
128
|
}), this.renderActionButton());
|
|
134
|
-
if (this.props.showHoverPreview
|
|
129
|
+
if (this.props.showHoverPreview) {
|
|
135
130
|
return /*#__PURE__*/_react.default.createElement(_HoverCard.HoverCard, {
|
|
136
131
|
url: url
|
|
137
132
|
}, content);
|
|
@@ -40,7 +40,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
40
40
|
var _react = _interopRequireWildcard(require("react"));
|
|
41
41
|
var _jsonld = require("../../utils/jsonld");
|
|
42
42
|
var _inline = require("../../extractors/inline");
|
|
43
|
-
var _context = require("../../extractors/common/context");
|
|
44
43
|
var _extractAccessContext = require("../../extractors/common/context/extractAccessContext");
|
|
45
44
|
var _LinkView = require("../LinkView");
|
|
46
45
|
var _ErroredView = require("./ErroredView");
|
|
@@ -51,7 +50,6 @@ var _UnauthorisedView = require("./UnauthorisedView");
|
|
|
51
50
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
52
51
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
53
52
|
var _helpers = require("../../state/helpers");
|
|
54
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
55
53
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
56
54
|
var _constants = require("../../constants");
|
|
57
55
|
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); }
|
|
@@ -147,15 +145,11 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref) {
|
|
|
147
145
|
case 'forbidden':
|
|
148
146
|
var providerForbidden = (0, _linkExtractors.extractProvider)(cardDetails);
|
|
149
147
|
var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getForbiddenJsonLd)().meta;
|
|
150
|
-
var requestAccessContext = (0,
|
|
148
|
+
var requestAccessContext = (0, _extractAccessContext.extractRequestAccessContextImproved)({
|
|
151
149
|
jsonLd: cardMetadata,
|
|
152
150
|
url: url,
|
|
153
151
|
product: (_providerForbidden$te = providerForbidden === null || providerForbidden === void 0 ? void 0 : providerForbidden.text) !== null && _providerForbidden$te !== void 0 ? _providerForbidden$te : '',
|
|
154
152
|
createAnalyticsEvent: createAnalyticsEvent
|
|
155
|
-
}) : (0, _context.extractRequestAccessContext)({
|
|
156
|
-
jsonLd: cardMetadata,
|
|
157
|
-
url: url,
|
|
158
|
-
context: providerForbidden === null || providerForbidden === void 0 ? void 0 : providerForbidden.text
|
|
159
153
|
});
|
|
160
154
|
return /*#__PURE__*/_react.default.createElement(_ForbiddenView.InlineCardForbiddenView, {
|
|
161
155
|
url: url,
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "26.43.
|
|
20
|
+
packageVersion: "26.43.7",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
package/dist/es2019/i18n/cs.js
CHANGED
|
@@ -25,8 +25,8 @@ export default {
|
|
|
25
25
|
'fabric.linking.connect_link_account_card_view_name': 'Připojte svůj účet {context}',
|
|
26
26
|
'fabric.linking.connect_to': 'Připojit k {name}',
|
|
27
27
|
'fabric.linking.connect_unauthorised_account_action': 'Připojit k: {context}',
|
|
28
|
-
'fabric.linking.connect_unauthorised_account_description': '
|
|
29
|
-
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Připojte
|
|
28
|
+
'fabric.linking.connect_unauthorised_account_description': 'Připojte svůj účet {context} a spolupracujte pomocí všech produktů Atlassian.',
|
|
29
|
+
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Připojte svůj účet a spolupracujte pomocí všech produktů Atlassian.',
|
|
30
30
|
'fabric.linking.continue': 'Pokračovat',
|
|
31
31
|
'fabric.linking.copy_url_to_clipboard': 'Kopírovat odkaz',
|
|
32
32
|
'fabric.linking.couldnt_load_link': 'Tento odkaz se z neznámého důvodu nepodařilo načíst.',
|
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
'fabric.linking.invalid_permissions_description': 'Pokud si chcete zobrazit tento náhled, požádejte o přístup nebo vyzkoušejte jiný účet.',
|
|
51
51
|
'fabric.linking.join_to_view': 'Chcete-li si zobrazit tento požadavek, připojte se ke službě {context}.',
|
|
52
52
|
'fabric.linking.last_mentioned_in': 'Naposledy zmíněno v:',
|
|
53
|
+
'fabric.linking.learn_more_about_connecting_account': 'Další informace o propojení účtu s produkty Atlassian.',
|
|
53
54
|
'fabric.linking.learn_more_about_smart_links': 'Další informace o chytrých odkazech',
|
|
54
55
|
'fabric.linking.link_safety_warning_message': 'Odkaz {unsafeLinkText} vás přesměruje na jiný web (<a>actual link here</a>)',
|
|
55
56
|
'fabric.linking.loading': 'Načítání…',
|
package/dist/es2019/i18n/da.js
CHANGED
|
@@ -25,8 +25,8 @@ export default {
|
|
|
25
25
|
'fabric.linking.connect_link_account_card_view_name': 'Forbind din {context}-konto',
|
|
26
26
|
'fabric.linking.connect_to': 'Forbind til {name}',
|
|
27
27
|
'fabric.linking.connect_unauthorised_account_action': 'Forbind til {context}',
|
|
28
|
-
'fabric.linking.connect_unauthorised_account_description': '
|
|
29
|
-
'fabric.linking.connect_unauthorised_account_description_no_provider': '
|
|
28
|
+
'fabric.linking.connect_unauthorised_account_description': 'Tilknyt din {context}-konto for at samarbejde om arbejde på tværs af Atlassian-produkter.',
|
|
29
|
+
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Tilknyt din konto for at samarbejde om arbejde på tværs af Atlassian-produkter.',
|
|
30
30
|
'fabric.linking.continue': 'Fortsæt',
|
|
31
31
|
'fabric.linking.copy_url_to_clipboard': 'Kopiér link',
|
|
32
32
|
'fabric.linking.couldnt_load_link': 'Af en ukendt årsag kunne vi ikke indlæse dette link.',
|
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
'fabric.linking.invalid_permissions_description': 'Anmod om adgang, eller prøv med en anden konto for at se denne forhåndsvisning.',
|
|
51
51
|
'fabric.linking.join_to_view': 'Deltag i {context} for at se denne sag',
|
|
52
52
|
'fabric.linking.last_mentioned_in': 'Sidst omtalt i',
|
|
53
|
+
'fabric.linking.learn_more_about_connecting_account': 'Få mere at vide om, hvordan du knytter din konto til Atlassian-produkter.',
|
|
53
54
|
'fabric.linking.learn_more_about_smart_links': 'Få mere at vide om intelligente links.',
|
|
54
55
|
'fabric.linking.link_safety_warning_message': 'Linket {unsafeLinkText} fører dig til et andet websted, <a>actual link here</a>',
|
|
55
56
|
'fabric.linking.loading': 'Indlæser ...',
|
package/dist/es2019/i18n/de.js
CHANGED
|
@@ -25,8 +25,8 @@ export default {
|
|
|
25
25
|
'fabric.linking.connect_link_account_card_view_name': 'Verbinden Sie Ihr {context}-Konto',
|
|
26
26
|
'fabric.linking.connect_to': 'Mit {name} verbinden',
|
|
27
27
|
'fabric.linking.connect_unauthorised_account_action': 'Mit {context} verbinden',
|
|
28
|
-
'fabric.linking.connect_unauthorised_account_description': 'Verbinden Sie {context}
|
|
29
|
-
'fabric.linking.connect_unauthorised_account_description_no_provider': '
|
|
28
|
+
'fabric.linking.connect_unauthorised_account_description': 'Verbinden Sie Ihr {context}-Konto, um an verschiedenen Atlassian-Produkten mitzuarbeiten.',
|
|
29
|
+
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Verbinden Sie Ihr Konto, um an verschiedenen Atlassian-Produkten mitzuarbeiten.',
|
|
30
30
|
'fabric.linking.continue': 'Weiter',
|
|
31
31
|
'fabric.linking.copy_url_to_clipboard': 'Link kopieren',
|
|
32
32
|
'fabric.linking.couldnt_load_link': 'Dieser Link konnte aus unbekannten Gründen nicht geladen werden.',
|
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
'fabric.linking.invalid_permissions_description': 'Bitte senden Sie eine Zugriffsanfrage oder versuchen Sie, die Vorschau über ein anderes Konto anzusehen.',
|
|
51
51
|
'fabric.linking.join_to_view': '{context} beitreten, um diesen Vorgang anzuzeigen',
|
|
52
52
|
'fabric.linking.last_mentioned_in': 'Zuletzt erwähnt in',
|
|
53
|
+
'fabric.linking.learn_more_about_connecting_account': 'Weitere Informationen zum Verbinden Ihres Kontos mit Atlassian-Produkten',
|
|
53
54
|
'fabric.linking.learn_more_about_smart_links': 'Mehr über intelligente Links erfahren',
|
|
54
55
|
'fabric.linking.link_safety_warning_message': 'Über den Link {unsafeLinkText} gelangen Sie zu einer anderen Site, <a>actual link here</a>',
|
|
55
56
|
'fabric.linking.loading': 'Lädt ...',
|
package/dist/es2019/i18n/en.js
CHANGED
|
@@ -25,8 +25,8 @@ export default {
|
|
|
25
25
|
'fabric.linking.connect_link_account_card_view_name': 'Connect your {context} account',
|
|
26
26
|
'fabric.linking.connect_to': 'Connect to {name}',
|
|
27
27
|
'fabric.linking.connect_unauthorised_account_action': 'Connect to {context}',
|
|
28
|
-
'fabric.linking.connect_unauthorised_account_description': 'Connect {context}
|
|
29
|
-
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect
|
|
28
|
+
'fabric.linking.connect_unauthorised_account_description': 'Connect your {context} account to collaborate on work across Atlassian products.',
|
|
29
|
+
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect your account to collaborate on work across Atlassian products.',
|
|
30
30
|
'fabric.linking.continue': 'Continue',
|
|
31
31
|
'fabric.linking.copy_url_to_clipboard': 'Copy link',
|
|
32
32
|
'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
|
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
'fabric.linking.invalid_permissions_description': "You'll need to request access or try a different account to view this preview.",
|
|
51
51
|
'fabric.linking.join_to_view': 'Join {context} to view this issue',
|
|
52
52
|
'fabric.linking.last_mentioned_in': 'Last mentioned in',
|
|
53
|
+
'fabric.linking.learn_more_about_connecting_account': 'Learn more about connecting your account to Atlassian products.',
|
|
53
54
|
'fabric.linking.learn_more_about_smart_links': 'Learn more about Smart Links.',
|
|
54
55
|
'fabric.linking.link_safety_warning_message': 'The link {unsafeLinkText} is taking you to a different site, <a>actual link here</a>',
|
|
55
56
|
'fabric.linking.loading': 'Loading...',
|
|
@@ -25,8 +25,8 @@ export default {
|
|
|
25
25
|
'fabric.linking.connect_link_account_card_view_name': 'Connect your {context} account',
|
|
26
26
|
'fabric.linking.connect_to': 'Connect to {name}',
|
|
27
27
|
'fabric.linking.connect_unauthorised_account_action': 'Connect to {context}',
|
|
28
|
-
'fabric.linking.connect_unauthorised_account_description': 'Connect {context}
|
|
29
|
-
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect
|
|
28
|
+
'fabric.linking.connect_unauthorised_account_description': 'Connect your {context} account to collaborate on work across Atlassian products.',
|
|
29
|
+
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect your account to collaborate on work across Atlassian products.',
|
|
30
30
|
'fabric.linking.continue': 'Continue',
|
|
31
31
|
'fabric.linking.copy_url_to_clipboard': 'Copy link',
|
|
32
32
|
'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
|
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
'fabric.linking.invalid_permissions_description': "You'll need to request access or try a different account to view this preview.",
|
|
51
51
|
'fabric.linking.join_to_view': 'Join {context} to view this issue',
|
|
52
52
|
'fabric.linking.last_mentioned_in': 'Last mentioned in',
|
|
53
|
+
'fabric.linking.learn_more_about_connecting_account': 'Learn more about connecting your account to Atlassian products.',
|
|
53
54
|
'fabric.linking.learn_more_about_smart_links': 'Learn more about Smart Links.',
|
|
54
55
|
'fabric.linking.link_safety_warning_message': 'The link {unsafeLinkText} is taking you to a different site, <a>actual link here</a>',
|
|
55
56
|
'fabric.linking.loading': 'Loading...',
|
|
@@ -25,8 +25,8 @@ export default {
|
|
|
25
25
|
'fabric.linking.connect_link_account_card_view_name': 'Connect your {context} account',
|
|
26
26
|
'fabric.linking.connect_to': 'Connect to {name}',
|
|
27
27
|
'fabric.linking.connect_unauthorised_account_action': 'Connect to {context}',
|
|
28
|
-
'fabric.linking.connect_unauthorised_account_description': 'Connect {context}
|
|
29
|
-
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect
|
|
28
|
+
'fabric.linking.connect_unauthorised_account_description': 'Connect your {context} account to collaborate on work across Atlassian products.',
|
|
29
|
+
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Connect your account to collaborate on work across Atlassian products.',
|
|
30
30
|
'fabric.linking.continue': 'Continue',
|
|
31
31
|
'fabric.linking.copy_url_to_clipboard': 'Copy link',
|
|
32
32
|
'fabric.linking.couldnt_load_link': "We couldn't load this link for an unknown reason.",
|
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
'fabric.linking.invalid_permissions_description': "You'll need to request access or try a different account to view this preview.",
|
|
51
51
|
'fabric.linking.join_to_view': 'Join {context} to view this issue',
|
|
52
52
|
'fabric.linking.last_mentioned_in': 'Last mentioned in',
|
|
53
|
+
'fabric.linking.learn_more_about_connecting_account': 'Learn more about connecting your account to Atlassian products.',
|
|
53
54
|
'fabric.linking.learn_more_about_smart_links': 'Learn more about Smart Links.',
|
|
54
55
|
'fabric.linking.link_safety_warning_message': 'The link {unsafeLinkText} is taking you to a different site, <a>actual link here</a>',
|
|
55
56
|
'fabric.linking.loading': 'Loading...',
|
package/dist/es2019/i18n/es.js
CHANGED
|
@@ -25,8 +25,8 @@ export default {
|
|
|
25
25
|
'fabric.linking.connect_link_account_card_view_name': 'Conecta tu cuenta de {context}',
|
|
26
26
|
'fabric.linking.connect_to': 'Conectarse a {name}',
|
|
27
27
|
'fabric.linking.connect_unauthorised_account_action': 'Conectarse a {context}',
|
|
28
|
-
'fabric.linking.connect_unauthorised_account_description': 'Conecta {context}
|
|
29
|
-
'fabric.linking.connect_unauthorised_account_description_no_provider': '
|
|
28
|
+
'fabric.linking.connect_unauthorised_account_description': 'Conecta tu cuenta de {context} para colaborar en el trabajo a través de los productos de Atlassian.',
|
|
29
|
+
'fabric.linking.connect_unauthorised_account_description_no_provider': 'Conecta tu cuenta para colaborar en el trabajo a través de los productos de Atlassian.',
|
|
30
30
|
'fabric.linking.continue': 'Continuar',
|
|
31
31
|
'fabric.linking.copy_url_to_clipboard': 'Copiar enlace',
|
|
32
32
|
'fabric.linking.couldnt_load_link': 'Por algún motivo que desconocemos, no hemos podido cargar este enlace.',
|
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
'fabric.linking.invalid_permissions_description': 'Deberás solicitar el acceso o probar con otra cuenta para obtener esta vista previa.',
|
|
51
51
|
'fabric.linking.join_to_view': 'Únete a {context} para ver esta incidencia',
|
|
52
52
|
'fabric.linking.last_mentioned_in': 'Última mención en',
|
|
53
|
+
'fabric.linking.learn_more_about_connecting_account': 'Obtén más información sobre cómo conectar tu cuenta a los productos de Atlassian.',
|
|
53
54
|
'fabric.linking.learn_more_about_smart_links': 'Más información sobre los enlaces inteligentes.',
|
|
54
55
|
'fabric.linking.link_safety_warning_message': 'El enlace {unsafeLinkText} te redirige a un sitio diferente, <a>actual link here</a>.',
|
|
55
56
|
'fabric.linking.loading': 'Cargando…',
|