@atlaskit/smart-card 23.4.2 → 23.4.4

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/utils/jsonld.js +35 -18
  3. package/dist/cjs/version.json +1 -1
  4. package/dist/cjs/view/BlockCard/index.js +1 -1
  5. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +5 -1
  6. package/dist/cjs/view/EmbedCard/components/styled.js +8 -5
  7. package/dist/cjs/view/EmbedCard/index.js +1 -1
  8. package/dist/cjs/view/EmbedCard/views/ForbiddenView.js +2 -1
  9. package/dist/cjs/view/EmbedCard/views/NotFoundView.js +2 -1
  10. package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +2 -1
  11. package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +2 -2
  12. package/dist/cjs/view/FlexibleCard/utils.js +11 -9
  13. package/dist/cjs/view/InlineCard/index.js +1 -1
  14. package/dist/es2019/utils/jsonld.js +14 -9
  15. package/dist/es2019/version.json +1 -1
  16. package/dist/es2019/view/BlockCard/index.js +2 -2
  17. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +4 -1
  18. package/dist/es2019/view/EmbedCard/components/styled.js +4 -1
  19. package/dist/es2019/view/EmbedCard/index.js +2 -2
  20. package/dist/es2019/view/EmbedCard/views/ForbiddenView.js +2 -1
  21. package/dist/es2019/view/EmbedCard/views/NotFoundView.js +2 -1
  22. package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +2 -1
  23. package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +2 -2
  24. package/dist/es2019/view/FlexibleCard/utils.js +12 -10
  25. package/dist/es2019/view/InlineCard/index.js +2 -2
  26. package/dist/esm/utils/jsonld.js +26 -15
  27. package/dist/esm/version.json +1 -1
  28. package/dist/esm/view/BlockCard/index.js +2 -2
  29. package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +5 -1
  30. package/dist/esm/view/EmbedCard/components/styled.js +8 -5
  31. package/dist/esm/view/EmbedCard/index.js +2 -2
  32. package/dist/esm/view/EmbedCard/views/ForbiddenView.js +2 -1
  33. package/dist/esm/view/EmbedCard/views/NotFoundView.js +2 -1
  34. package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +2 -1
  35. package/dist/esm/view/EmbedCard/views/UnresolvedView.js +2 -2
  36. package/dist/esm/view/FlexibleCard/utils.js +12 -10
  37. package/dist/esm/view/InlineCard/index.js +2 -2
  38. package/dist/types/utils/jsonld.d.ts +1 -0
  39. package/dist/types/view/EmbedCard/components/ExpandedFrame.d.ts +2 -0
  40. package/dist/types/view/EmbedCard/components/styled.d.ts +1 -0
  41. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 23.4.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`655a52b4c06`](https://bitbucket.org/atlassian/atlassian-frontend/commits/655a52b4c06) - [ux] Update Flex-UI unauthorised views to include provider name
8
+
9
+ ## 23.4.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`85de18a2d79`](https://bitbucket.org/atlassian/atlassian-frontend/commits/85de18a2d79) - [ux] Enable text wrapping in contents of unresolved views and allow scrolling in when embed size is small.
14
+
3
15
  ## 23.4.2
4
16
 
5
17
  ### Patch Changes
@@ -1,19 +1,29 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
- exports.getUnauthorizedJsonLd = exports.getEmptyJsonLd = void 0;
8
+ exports.getUnauthorizedJsonLd = exports.getForbiddenJsonLd = exports.getEmptyJsonLd = void 0;
9
+
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+
12
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
+
14
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
15
+
16
+ var emptyData = {
17
+ '@context': {
18
+ '@vocab': 'https://www.w3.org/ns/activitystreams#',
19
+ atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
20
+ schema: 'http://schema.org/'
21
+ },
22
+ '@type': 'Object'
23
+ };
7
24
 
8
25
  var getEmptyJsonLd = function getEmptyJsonLd() {
9
- return {
10
- '@context': {
11
- '@vocab': 'https://www.w3.org/ns/activitystreams#',
12
- atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
13
- schema: 'http://schema.org/'
14
- },
15
- '@type': 'Object'
16
- };
26
+ return emptyData;
17
27
  };
18
28
 
19
29
  exports.getEmptyJsonLd = getEmptyJsonLd;
@@ -26,15 +36,22 @@ var getUnauthorizedJsonLd = function getUnauthorizedJsonLd() {
26
36
  auth: [],
27
37
  definitionId: 'provider-not-found'
28
38
  },
29
- data: {
30
- '@context': {
31
- '@vocab': 'https://www.w3.org/ns/activitystreams#',
32
- atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
33
- schema: 'http://schema.org/'
34
- },
35
- '@type': 'Object'
36
- }
39
+ data: _objectSpread({}, emptyData)
40
+ };
41
+ };
42
+
43
+ exports.getUnauthorizedJsonLd = getUnauthorizedJsonLd;
44
+
45
+ var getForbiddenJsonLd = function getForbiddenJsonLd() {
46
+ return {
47
+ meta: {
48
+ visibility: 'restricted',
49
+ access: 'forbidden',
50
+ auth: [],
51
+ definitionId: 'provider-not-found'
52
+ },
53
+ data: _objectSpread({}, emptyData)
37
54
  };
38
55
  };
39
56
 
40
- exports.getUnauthorizedJsonLd = getUnauthorizedJsonLd;
57
+ exports.getForbiddenJsonLd = getForbiddenJsonLd;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.4.2",
3
+ "version": "23.4.4",
4
4
  "sideEffects": false
5
5
  }
@@ -173,7 +173,7 @@ var BlockCard = function BlockCard(_ref) {
173
173
  }
174
174
 
175
175
  var forbiddenViewProps = (0, _block.extractBlockProps)(data, meta, extractorOpts);
176
- var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getUnauthorizedJsonLd)().meta;
176
+ var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getForbiddenJsonLd)().meta;
177
177
  var requestAccessContext = (0, _context.extractRequestAccessContext)({
178
178
  jsonLd: cardMetadata,
179
179
  url: url,
@@ -28,7 +28,9 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
28
28
  maxWidth = _ref.maxWidth,
29
29
  _ref$testId = _ref.testId,
30
30
  testId = _ref$testId === void 0 ? 'expanded-frame' : _ref$testId,
31
- inheritDimensions = _ref.inheritDimensions;
31
+ inheritDimensions = _ref.inheritDimensions,
32
+ _ref$allowScrollBar = _ref.allowScrollBar,
33
+ allowScrollBar = _ref$allowScrollBar === void 0 ? false : _ref$allowScrollBar;
32
34
 
33
35
  var isInteractive = function isInteractive() {
34
36
  return !isPlaceholder && (Boolean(href) || Boolean(onClick));
@@ -53,6 +55,8 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
53
55
 
54
56
  var renderContent = function renderContent() {
55
57
  return /*#__PURE__*/_react.default.createElement(_styled.Content, {
58
+ "data-testid": "embed-content-wrapper",
59
+ allowScrollBar: allowScrollBar,
56
60
  isInteractive: isInteractive()
57
61
  }, children);
58
62
  };
@@ -144,7 +144,7 @@ exports.TextWrapper = TextWrapper;
144
144
  // NB: `overflow` is kept as `hidden` since
145
145
  // the internal contents of the `iframe` should
146
146
  // manage scrolling behaviour.
147
- var Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n top: ", ";\n overflow: hidden;\n height: calc(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"])), borderRadius, cardShadow, (0, _tokens.token)('elevation.surface.raised', 'white'), (0, _utils.gs)(4), (0, _utils.gs)(4), function (_ref9) {
147
+ var Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n top: ", ";\n height: calc(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"])), borderRadius, cardShadow, (0, _tokens.token)('elevation.surface.raised', 'white'), (0, _utils.gs)(4), (0, _utils.gs)(4), function (_ref9) {
148
148
  var isInteractive = _ref9.isInteractive;
149
149
 
150
150
  if (isInteractive) {
@@ -152,12 +152,15 @@ var Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _t
152
152
  } else {
153
153
  return '';
154
154
  }
155
+ }, function (_ref10) {
156
+ var allowScrollBar = _ref10.allowScrollBar;
157
+ return allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;';
155
158
  });
156
159
 
157
160
  exports.Content = Content;
158
161
 
159
- var 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 (_ref10) {
160
- var size = _ref10.size;
162
+ var 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 (_ref11) {
163
+ var size = _ref11.size;
161
164
  return csssize(size);
162
165
  }, borderRadius);
163
166
 
@@ -185,8 +188,8 @@ var ResolvedViewIconWrapper = _styled.default.div(_templateObject12 || (_templat
185
188
 
186
189
  exports.ResolvedViewIconWrapper = ResolvedViewIconWrapper;
187
190
 
188
- var Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), (0, _tokens.token)('color.skeleton', colors.N30), function (_ref11) {
189
- var src = _ref11.src;
191
+ var Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), (0, _tokens.token)('color.skeleton', colors.N30), function (_ref12) {
192
+ var src = _ref12.src;
190
193
  return src;
191
194
  });
192
195
 
@@ -139,7 +139,7 @@ var EmbedCard = /*#__PURE__*/_react.default.forwardRef(function (_ref, iframeRef
139
139
  }
140
140
 
141
141
  var forbiddenViewProps = (0, _embed.extractEmbedProps)(data, meta, platform);
142
- var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getUnauthorizedJsonLd)().meta;
142
+ var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getForbiddenJsonLd)().meta;
143
143
  var requestAccessContext = (0, _context.extractRequestAccessContext)({
144
144
  jsonLd: cardMetadata,
145
145
  url: url,
@@ -70,7 +70,8 @@ var EmbedCardForbiddenView = function EmbedCardForbiddenView(_ref) {
70
70
  isSelected: isSelected,
71
71
  inheritDimensions: inheritDimensions,
72
72
  onClick: onClick,
73
- testId: testId
73
+ testId: testId,
74
+ allowScrollBar: true
74
75
  }, /*#__PURE__*/_react.default.createElement(_UnresolvedView.EmbedCardUnresolvedView, {
75
76
  image: _constants.LockImage,
76
77
  title: "invalid_permissions",
@@ -38,7 +38,8 @@ var EmbedCardNotFoundView = function EmbedCardNotFoundView(_ref) {
38
38
  isSelected: isSelected,
39
39
  inheritDimensions: inheritDimensions,
40
40
  onClick: onClick,
41
- testId: testId
41
+ testId: testId,
42
+ allowScrollBar: true
42
43
  }, /*#__PURE__*/_react.default.createElement(_UnresolvedView.EmbedCardUnresolvedView, {
43
44
  image: _constants.NotFoundImage,
44
45
  title: "not_found_title",
@@ -49,7 +49,8 @@ var EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref) {
49
49
  isSelected: isSelected,
50
50
  inheritDimensions: inheritDimensions,
51
51
  onClick: onClick,
52
- testId: testId
52
+ testId: testId,
53
+ allowScrollBar: true
53
54
  }, /*#__PURE__*/_react.default.createElement(_UnresolvedView.EmbedCardUnresolvedView, {
54
55
  image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : _constants.UnauthorisedImage,
55
56
  title: "connect_link_account_card_name",
@@ -52,7 +52,7 @@ var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
52
52
  css: {
53
53
  fontSize: (0, _utils.gs)(2.5),
54
54
  marginBottom: (0, _utils.gs)(1.5),
55
- width: (0, _utils.gs)(50),
55
+ maxWidth: (0, _utils.gs)(50),
56
56
  textAlign: 'center'
57
57
  },
58
58
  "data-testid": "".concat(testId, "-unresolved-title")
@@ -65,7 +65,7 @@ var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
65
65
  fontSize: (0, _constants.fontSize)(),
66
66
  marginBottom: (0, _utils.gs)(2.5),
67
67
  textAlign: 'center',
68
- width: (0, _utils.gs)(50),
68
+ maxWidth: (0, _utils.gs)(50),
69
69
  lineHeight: (0, _utils.gs)(3)
70
70
  },
71
71
  "data-testid": "".concat(testId, "-unresolved-description")
@@ -85,12 +85,16 @@ var getForbiddenMessageKey = function getForbiddenMessageKey(meta) {
85
85
  var getRetryOptions = function getRetryOptions(url, status, details, onAuthorize) {
86
86
  var _details$meta, _access$action;
87
87
 
88
+ var data = details && details.data || (0, _jsonld.getEmptyJsonLd)();
89
+ var provider = (0, _extractors.extractProvider)(data);
90
+ var context = provider === null || provider === void 0 ? void 0 : provider.text;
91
+ var values = context ? {
92
+ context: context
93
+ } : undefined;
94
+
88
95
  switch (status) {
89
96
  case _constants.SmartLinkStatus.Forbidden:
90
- var data = details && details.data || (0, _jsonld.getEmptyJsonLd)();
91
- var meta = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getUnauthorizedJsonLd)().meta;
92
- var provider = (0, _extractors.extractProvider)(data);
93
- var context = provider === null || provider === void 0 ? void 0 : provider.text;
97
+ var meta = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getForbiddenJsonLd)().meta;
94
98
  var access = (0, _context.extractRequestAccessContext)({
95
99
  jsonLd: meta,
96
100
  url: url,
@@ -98,9 +102,6 @@ var getRetryOptions = function getRetryOptions(url, status, details, onAuthorize
98
102
  });
99
103
  var messageKey = getForbiddenMessageKey(meta);
100
104
  var descriptor = _messages.messages[messageKey];
101
- var values = context ? {
102
- context: context
103
- } : undefined;
104
105
  var retry = onAuthorize || (access === null || access === void 0 ? void 0 : (_access$action = access.action) === null || _access$action === void 0 ? void 0 : _access$action.promise);
105
106
  var onClick = retry ? (0, _utils.handleOnClick)(retry) : undefined;
106
107
  return {
@@ -111,8 +112,9 @@ var getRetryOptions = function getRetryOptions(url, status, details, onAuthorize
111
112
 
112
113
  case _constants.SmartLinkStatus.Unauthorized:
113
114
  return {
114
- descriptor: _messages.messages.connect_link_account,
115
- onClick: onAuthorize ? (0, _utils.handleOnClick)(onAuthorize) : undefined
115
+ descriptor: _messages.messages.connect_link_account_card_name,
116
+ onClick: onAuthorize ? (0, _utils.handleOnClick)(onAuthorize) : undefined,
117
+ values: values
116
118
  };
117
119
 
118
120
  case _constants.SmartLinkStatus.NotFound:
@@ -139,7 +139,7 @@ var InlineCard = function InlineCard(_ref) {
139
139
  }
140
140
 
141
141
  var providerForbidden = (0, _extractors.extractProvider)(cardDetails);
142
- var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getUnauthorizedJsonLd)().meta;
142
+ var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : (0, _jsonld.getForbiddenJsonLd)().meta;
143
143
  var requestAccessContext = (0, _context.extractRequestAccessContext)({
144
144
  jsonLd: cardMetadata,
145
145
  url: url,
@@ -1,11 +1,12 @@
1
- export const getEmptyJsonLd = () => ({
1
+ const emptyData = {
2
2
  '@context': {
3
3
  '@vocab': 'https://www.w3.org/ns/activitystreams#',
4
4
  atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
5
5
  schema: 'http://schema.org/'
6
6
  },
7
7
  '@type': 'Object'
8
- });
8
+ };
9
+ export const getEmptyJsonLd = () => emptyData;
9
10
  export const getUnauthorizedJsonLd = () => ({
10
11
  meta: {
11
12
  visibility: 'restricted',
@@ -13,12 +14,16 @@ export const getUnauthorizedJsonLd = () => ({
13
14
  auth: [],
14
15
  definitionId: 'provider-not-found'
15
16
  },
16
- data: {
17
- '@context': {
18
- '@vocab': 'https://www.w3.org/ns/activitystreams#',
19
- atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
20
- schema: 'http://schema.org/'
21
- },
22
- '@type': 'Object'
17
+ data: { ...emptyData
18
+ }
19
+ });
20
+ export const getForbiddenJsonLd = () => ({
21
+ meta: {
22
+ visibility: 'restricted',
23
+ access: 'forbidden',
24
+ auth: [],
25
+ definitionId: 'provider-not-found'
26
+ },
27
+ data: { ...emptyData
23
28
  }
24
29
  });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.4.2",
3
+ "version": "23.4.4",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { getExtensionKey } from '../../state/helpers';
4
4
  import { extractBlockProps } from '../../extractors/block';
5
- import { getEmptyJsonLd, getUnauthorizedJsonLd } from '../../utils/jsonld';
5
+ import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
6
6
  import { extractRequestAccessContext } from '../../extractors/common/context';
7
7
  import { CardLinkView } from '../LinkView';
8
8
  import { AuthorizeAction } from './actions/AuthorizeAction';
@@ -97,7 +97,7 @@ export const BlockCard = ({
97
97
  }
98
98
 
99
99
  const forbiddenViewProps = extractBlockProps(data, meta, extractorOpts);
100
- const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getUnauthorizedJsonLd().meta;
100
+ const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
101
101
  const requestAccessContext = extractRequestAccessContext({
102
102
  jsonLd: cardMetadata,
103
103
  url,
@@ -14,7 +14,8 @@ export const ExpandedFrame = ({
14
14
  minWidth,
15
15
  maxWidth,
16
16
  testId = 'expanded-frame',
17
- inheritDimensions
17
+ inheritDimensions,
18
+ allowScrollBar = false
18
19
  }) => {
19
20
  const isInteractive = () => !isPlaceholder && (Boolean(href) || Boolean(onClick));
20
21
 
@@ -32,6 +33,8 @@ export const ExpandedFrame = ({
32
33
  }, text)));
33
34
 
34
35
  const renderContent = () => /*#__PURE__*/React.createElement(Content, {
36
+ "data-testid": "embed-content-wrapper",
37
+ allowScrollBar: allowScrollBar,
35
38
  isInteractive: isInteractive()
36
39
  }, children);
37
40
 
@@ -196,7 +196,6 @@ export const Content = styled.div`
196
196
  z-index: 1;
197
197
  width: 100%;
198
198
  top: ${gridSize(4)};
199
- overflow: hidden;
200
199
  height: calc(100% - ${gridSize(4)});
201
200
  transition: box-shadow 0.3s;
202
201
 
@@ -224,6 +223,10 @@ export const Content = styled.div`
224
223
  return '';
225
224
  }
226
225
  }};
226
+
227
+ ${({
228
+ allowScrollBar
229
+ }) => allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;'}
227
230
  `;
228
231
  export const Image = styled.img`
229
232
  ${({
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { extractEmbedProps } from '../../extractors/embed';
4
- import { getEmptyJsonLd, getUnauthorizedJsonLd } from '../../utils/jsonld';
4
+ import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
5
5
  import { extractInlineProps } from '../../extractors/inline';
6
6
  import { extractBlockProps } from '../../extractors/block';
7
7
  import { getExtensionKey } from '../../state/helpers';
@@ -117,7 +117,7 @@ export const EmbedCard = /*#__PURE__*/React.forwardRef(({
117
117
  }
118
118
 
119
119
  const forbiddenViewProps = extractEmbedProps(data, meta, platform);
120
- const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getUnauthorizedJsonLd().meta;
120
+ const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
121
121
  const requestAccessContext = extractRequestAccessContext({
122
122
  jsonLd: cardMetadata,
123
123
  url,
@@ -55,7 +55,8 @@ export const EmbedCardForbiddenView = ({
55
55
  isSelected: isSelected,
56
56
  inheritDimensions: inheritDimensions,
57
57
  onClick: onClick,
58
- testId: testId
58
+ testId: testId,
59
+ allowScrollBar: true
59
60
  }, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
60
61
  image: LockImage,
61
62
  title: "invalid_permissions",
@@ -22,7 +22,8 @@ export const EmbedCardNotFoundView = ({
22
22
  isSelected: isSelected,
23
23
  inheritDimensions: inheritDimensions,
24
24
  onClick: onClick,
25
- testId: testId
25
+ testId: testId,
26
+ allowScrollBar: true
26
27
  }, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
27
28
  image: NotFoundImage,
28
29
  title: "not_found_title",
@@ -29,7 +29,8 @@ export const EmbedCardUnauthorisedView = ({
29
29
  isSelected: isSelected,
30
30
  inheritDimensions: inheritDimensions,
31
31
  onClick: onClick,
32
- testId: testId
32
+ testId: testId,
33
+ allowScrollBar: true
33
34
  }, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
34
35
  image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : UnauthorisedImage,
35
36
  title: "connect_link_account_card_name",
@@ -38,7 +38,7 @@ export const EmbedCardUnresolvedView = ({
38
38
  css: {
39
39
  fontSize: gridSize(2.5),
40
40
  marginBottom: gridSize(1.5),
41
- width: gridSize(50),
41
+ maxWidth: gridSize(50),
42
42
  textAlign: 'center'
43
43
  },
44
44
  "data-testid": `${testId}-unresolved-title`
@@ -51,7 +51,7 @@ export const EmbedCardUnresolvedView = ({
51
51
  fontSize: fontSize(),
52
52
  marginBottom: gridSize(2.5),
53
53
  textAlign: 'center',
54
- width: gridSize(50),
54
+ maxWidth: gridSize(50),
55
55
  lineHeight: gridSize(3)
56
56
  },
57
57
  "data-testid": `${testId}-unresolved-description`
@@ -1,5 +1,5 @@
1
1
  import { SmartLinkStatus } from '../../constants';
2
- import { getEmptyJsonLd, getUnauthorizedJsonLd } from '../../utils/jsonld';
2
+ import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
3
3
  import { extractRequestAccessContext } from '../../extractors/common/context';
4
4
  import { messages } from '../../messages';
5
5
  import extractFlexibleLinkContext from '../../extractors/flexible';
@@ -65,12 +65,16 @@ const getForbiddenMessageKey = meta => {
65
65
  export const getRetryOptions = (url, status, details, onAuthorize) => {
66
66
  var _details$meta, _access$action;
67
67
 
68
+ const data = details && details.data || getEmptyJsonLd();
69
+ const provider = extractProvider(data);
70
+ const context = provider === null || provider === void 0 ? void 0 : provider.text;
71
+ const values = context ? {
72
+ context
73
+ } : undefined;
74
+
68
75
  switch (status) {
69
76
  case SmartLinkStatus.Forbidden:
70
- const data = details && details.data || getEmptyJsonLd();
71
- const meta = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getUnauthorizedJsonLd().meta;
72
- const provider = extractProvider(data);
73
- const context = provider === null || provider === void 0 ? void 0 : provider.text;
77
+ const meta = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
74
78
  const access = extractRequestAccessContext({
75
79
  jsonLd: meta,
76
80
  url,
@@ -78,9 +82,6 @@ export const getRetryOptions = (url, status, details, onAuthorize) => {
78
82
  });
79
83
  const messageKey = getForbiddenMessageKey(meta);
80
84
  const descriptor = messages[messageKey];
81
- const values = context ? {
82
- context
83
- } : undefined;
84
85
  const retry = onAuthorize || (access === null || access === void 0 ? void 0 : (_access$action = access.action) === null || _access$action === void 0 ? void 0 : _access$action.promise);
85
86
  const onClick = retry ? handleOnClick(retry) : undefined;
86
87
  return {
@@ -91,8 +92,9 @@ export const getRetryOptions = (url, status, details, onAuthorize) => {
91
92
 
92
93
  case SmartLinkStatus.Unauthorized:
93
94
  return {
94
- descriptor: messages.connect_link_account,
95
- onClick: onAuthorize ? handleOnClick(onAuthorize) : undefined
95
+ descriptor: messages.connect_link_account_card_name,
96
+ onClick: onAuthorize ? handleOnClick(onAuthorize) : undefined,
97
+ values
96
98
  };
97
99
 
98
100
  case SmartLinkStatus.NotFound:
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { getEmptyJsonLd, getUnauthorizedJsonLd } from '../../utils/jsonld';
3
+ import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
4
4
  import { extractInlineProps } from '../../extractors/inline';
5
5
  import { extractRequestAccessContext } from '../../extractors/common/context';
6
6
  import { CardLinkView } from '../LinkView';
@@ -92,7 +92,7 @@ export const InlineCard = ({
92
92
  }
93
93
 
94
94
  const providerForbidden = extractProvider(cardDetails);
95
- const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getUnauthorizedJsonLd().meta;
95
+ const cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
96
96
  const requestAccessContext = extractRequestAccessContext({
97
97
  jsonLd: cardMetadata,
98
98
  url,
@@ -1,28 +1,39 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+
7
+ var emptyData = {
8
+ '@context': {
9
+ '@vocab': 'https://www.w3.org/ns/activitystreams#',
10
+ atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
11
+ schema: 'http://schema.org/'
12
+ },
13
+ '@type': 'Object'
14
+ };
1
15
  export var getEmptyJsonLd = function getEmptyJsonLd() {
16
+ return emptyData;
17
+ };
18
+ export var getUnauthorizedJsonLd = function getUnauthorizedJsonLd() {
2
19
  return {
3
- '@context': {
4
- '@vocab': 'https://www.w3.org/ns/activitystreams#',
5
- atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
6
- schema: 'http://schema.org/'
20
+ meta: {
21
+ visibility: 'restricted',
22
+ access: 'unauthorized',
23
+ auth: [],
24
+ definitionId: 'provider-not-found'
7
25
  },
8
- '@type': 'Object'
26
+ data: _objectSpread({}, emptyData)
9
27
  };
10
28
  };
11
- export var getUnauthorizedJsonLd = function getUnauthorizedJsonLd() {
29
+ export var getForbiddenJsonLd = function getForbiddenJsonLd() {
12
30
  return {
13
31
  meta: {
14
32
  visibility: 'restricted',
15
- access: 'unauthorized',
33
+ access: 'forbidden',
16
34
  auth: [],
17
35
  definitionId: 'provider-not-found'
18
36
  },
19
- data: {
20
- '@context': {
21
- '@vocab': 'https://www.w3.org/ns/activitystreams#',
22
- atlassian: 'https://schema.atlassian.com/ns/vocabulary#',
23
- schema: 'http://schema.org/'
24
- },
25
- '@type': 'Object'
26
- }
37
+ data: _objectSpread({}, emptyData)
27
38
  };
28
39
  };
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.4.2",
3
+ "version": "23.4.4",
4
4
  "sideEffects": false
5
5
  }
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { getExtensionKey } from '../../state/helpers';
4
4
  import { extractBlockProps } from '../../extractors/block';
5
- import { getEmptyJsonLd, getUnauthorizedJsonLd } from '../../utils/jsonld';
5
+ import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
6
6
  import { extractRequestAccessContext } from '../../extractors/common/context';
7
7
  import { CardLinkView } from '../LinkView';
8
8
  import { AuthorizeAction } from './actions/AuthorizeAction';
@@ -95,7 +95,7 @@ export var BlockCard = function BlockCard(_ref) {
95
95
  }
96
96
 
97
97
  var forbiddenViewProps = extractBlockProps(data, meta, extractorOpts);
98
- var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getUnauthorizedJsonLd().meta;
98
+ var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
99
99
  var requestAccessContext = extractRequestAccessContext({
100
100
  jsonLd: cardMetadata,
101
101
  url: url,
@@ -16,7 +16,9 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
16
16
  maxWidth = _ref.maxWidth,
17
17
  _ref$testId = _ref.testId,
18
18
  testId = _ref$testId === void 0 ? 'expanded-frame' : _ref$testId,
19
- inheritDimensions = _ref.inheritDimensions;
19
+ inheritDimensions = _ref.inheritDimensions,
20
+ _ref$allowScrollBar = _ref.allowScrollBar,
21
+ allowScrollBar = _ref$allowScrollBar === void 0 ? false : _ref$allowScrollBar;
20
22
 
21
23
  var isInteractive = function isInteractive() {
22
24
  return !isPlaceholder && (Boolean(href) || Boolean(onClick));
@@ -41,6 +43,8 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
41
43
 
42
44
  var renderContent = function renderContent() {
43
45
  return /*#__PURE__*/React.createElement(Content, {
46
+ "data-testid": "embed-content-wrapper",
47
+ allowScrollBar: allowScrollBar,
44
48
  isInteractive: isInteractive()
45
49
  }, children);
46
50
  };
@@ -99,7 +99,7 @@ export var TextWrapper = styled.div(_templateObject5 || (_templateObject5 = _tag
99
99
  // NB: `overflow` is kept as `hidden` since
100
100
  // the internal contents of the `iframe` should
101
101
  // manage scrolling behaviour.
102
- export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n top: ", ";\n overflow: hidden;\n height: calc(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"])), borderRadius, cardShadow, token('elevation.surface.raised', 'white'), gridSize(4), gridSize(4), function (_ref9) {
102
+ export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n top: ", ";\n height: calc(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"])), borderRadius, cardShadow, token('elevation.surface.raised', 'white'), gridSize(4), gridSize(4), function (_ref9) {
103
103
  var isInteractive = _ref9.isInteractive;
104
104
 
105
105
  if (isInteractive) {
@@ -107,9 +107,12 @@ export var Content = styled.div(_templateObject6 || (_templateObject6 = _taggedT
107
107
  } else {
108
108
  return '';
109
109
  }
110
+ }, function (_ref10) {
111
+ var allowScrollBar = _ref10.allowScrollBar;
112
+ return allowScrollBar ? 'overflow: auto;' : 'overflow: hidden;';
110
113
  });
111
- export var Image = styled.img(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (_ref10) {
112
- var size = _ref10.size;
114
+ export var Image = styled.img(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n ", "\n\n /* hide the alt text when the image cannot be found */\n overflow: hidden;\n"])), function (_ref11) {
115
+ var size = _ref11.size;
113
116
  return csssize(size);
114
117
  }, borderRadius);
115
118
  export var maxAvatarCount = 6;
@@ -118,8 +121,8 @@ export var Title = styled.div(_templateObject9 || (_templateObject9 = _taggedTem
118
121
  export var Byline = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: 4px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n ", ";\n"])), token('color.text.subtlest', colors.N300), 16 / 12, ellipsis('100%'));
119
122
  export var Description = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), token('color.text', colors.N800), 18 / 12, 18 * 3);
120
123
  export var ResolvedViewIconWrapper = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-top: 4px;\n"])));
121
- export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), token('color.skeleton', colors.N30), function (_ref11) {
122
- var src = _ref11.src;
124
+ export var Thumbnail = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), borderRadius, csssize(48), token('color.skeleton', colors.N30), function (_ref12) {
125
+ var src = _ref12.src;
123
126
  return src;
124
127
  });
125
128
  export var UsersWrapper = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-top: 8px;\n"])));
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import { extractEmbedProps } from '../../extractors/embed';
4
- import { getEmptyJsonLd, getUnauthorizedJsonLd } from '../../utils/jsonld';
4
+ import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
5
5
  import { extractInlineProps } from '../../extractors/inline';
6
6
  import { extractBlockProps } from '../../extractors/block';
7
7
  import { getExtensionKey } from '../../state/helpers';
@@ -115,7 +115,7 @@ export var EmbedCard = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef)
115
115
  }
116
116
 
117
117
  var forbiddenViewProps = extractEmbedProps(data, meta, platform);
118
- var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getUnauthorizedJsonLd().meta;
118
+ var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
119
119
  var requestAccessContext = extractRequestAccessContext({
120
120
  jsonLd: cardMetadata,
121
121
  url: url,
@@ -54,7 +54,8 @@ export var EmbedCardForbiddenView = function EmbedCardForbiddenView(_ref) {
54
54
  isSelected: isSelected,
55
55
  inheritDimensions: inheritDimensions,
56
56
  onClick: onClick,
57
- testId: testId
57
+ testId: testId,
58
+ allowScrollBar: true
58
59
  }, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
59
60
  image: LockImage,
60
61
  title: "invalid_permissions",
@@ -22,7 +22,8 @@ export var EmbedCardNotFoundView = function EmbedCardNotFoundView(_ref) {
22
22
  isSelected: isSelected,
23
23
  inheritDimensions: inheritDimensions,
24
24
  onClick: onClick,
25
- testId: testId
25
+ testId: testId,
26
+ allowScrollBar: true
26
27
  }, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
27
28
  image: NotFoundImage,
28
29
  title: "not_found_title",
@@ -29,7 +29,8 @@ export var EmbedCardUnauthorisedView = function EmbedCardUnauthorisedView(_ref)
29
29
  isSelected: isSelected,
30
30
  inheritDimensions: inheritDimensions,
31
31
  onClick: onClick,
32
- testId: testId
32
+ testId: testId,
33
+ allowScrollBar: true
33
34
  }, /*#__PURE__*/React.createElement(EmbedCardUnresolvedView, {
34
35
  image: (_context$image = context === null || context === void 0 ? void 0 : context.image) !== null && _context$image !== void 0 ? _context$image : UnauthorisedImage,
35
36
  title: "connect_link_account_card_name",
@@ -37,7 +37,7 @@ export var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
37
37
  css: {
38
38
  fontSize: gridSize(2.5),
39
39
  marginBottom: gridSize(1.5),
40
- width: gridSize(50),
40
+ maxWidth: gridSize(50),
41
41
  textAlign: 'center'
42
42
  },
43
43
  "data-testid": "".concat(testId, "-unresolved-title")
@@ -50,7 +50,7 @@ export var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
50
50
  fontSize: fontSize(),
51
51
  marginBottom: gridSize(2.5),
52
52
  textAlign: 'center',
53
- width: gridSize(50),
53
+ maxWidth: gridSize(50),
54
54
  lineHeight: gridSize(3)
55
55
  },
56
56
  "data-testid": "".concat(testId, "-unresolved-description")
@@ -1,5 +1,5 @@
1
1
  import { SmartLinkStatus } from '../../constants';
2
- import { getEmptyJsonLd, getUnauthorizedJsonLd } from '../../utils/jsonld';
2
+ import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
3
3
  import { extractRequestAccessContext } from '../../extractors/common/context';
4
4
  import { messages } from '../../messages';
5
5
  import extractFlexibleLinkContext from '../../extractors/flexible';
@@ -65,12 +65,16 @@ var getForbiddenMessageKey = function getForbiddenMessageKey(meta) {
65
65
  export var getRetryOptions = function getRetryOptions(url, status, details, onAuthorize) {
66
66
  var _details$meta, _access$action;
67
67
 
68
+ var data = details && details.data || getEmptyJsonLd();
69
+ var provider = extractProvider(data);
70
+ var context = provider === null || provider === void 0 ? void 0 : provider.text;
71
+ var values = context ? {
72
+ context: context
73
+ } : undefined;
74
+
68
75
  switch (status) {
69
76
  case SmartLinkStatus.Forbidden:
70
- var data = details && details.data || getEmptyJsonLd();
71
- var meta = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getUnauthorizedJsonLd().meta;
72
- var provider = extractProvider(data);
73
- var context = provider === null || provider === void 0 ? void 0 : provider.text;
77
+ var meta = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
74
78
  var access = extractRequestAccessContext({
75
79
  jsonLd: meta,
76
80
  url: url,
@@ -78,9 +82,6 @@ export var getRetryOptions = function getRetryOptions(url, status, details, onAu
78
82
  });
79
83
  var messageKey = getForbiddenMessageKey(meta);
80
84
  var descriptor = messages[messageKey];
81
- var values = context ? {
82
- context: context
83
- } : undefined;
84
85
  var retry = onAuthorize || (access === null || access === void 0 ? void 0 : (_access$action = access.action) === null || _access$action === void 0 ? void 0 : _access$action.promise);
85
86
  var onClick = retry ? handleOnClick(retry) : undefined;
86
87
  return {
@@ -91,8 +92,9 @@ export var getRetryOptions = function getRetryOptions(url, status, details, onAu
91
92
 
92
93
  case SmartLinkStatus.Unauthorized:
93
94
  return {
94
- descriptor: messages.connect_link_account,
95
- onClick: onAuthorize ? handleOnClick(onAuthorize) : undefined
95
+ descriptor: messages.connect_link_account_card_name,
96
+ onClick: onAuthorize ? handleOnClick(onAuthorize) : undefined,
97
+ values: values
96
98
  };
97
99
 
98
100
  case SmartLinkStatus.NotFound:
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { getEmptyJsonLd, getUnauthorizedJsonLd } from '../../utils/jsonld';
3
+ import { getEmptyJsonLd, getForbiddenJsonLd } from '../../utils/jsonld';
4
4
  import { extractInlineProps } from '../../extractors/inline';
5
5
  import { extractRequestAccessContext } from '../../extractors/common/context';
6
6
  import { CardLinkView } from '../LinkView';
@@ -89,7 +89,7 @@ export var InlineCard = function InlineCard(_ref) {
89
89
  }
90
90
 
91
91
  var providerForbidden = extractProvider(cardDetails);
92
- var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getUnauthorizedJsonLd().meta;
92
+ var cardMetadata = (_details$meta = details === null || details === void 0 ? void 0 : details.meta) !== null && _details$meta !== void 0 ? _details$meta : getForbiddenJsonLd().meta;
93
93
  var requestAccessContext = extractRequestAccessContext({
94
94
  jsonLd: cardMetadata,
95
95
  url: url,
@@ -1,3 +1,4 @@
1
1
  import { JsonLd } from 'json-ld-types';
2
2
  export declare const getEmptyJsonLd: () => JsonLd.Data.BaseData;
3
3
  export declare const getUnauthorizedJsonLd: () => JsonLd.Response;
4
+ export declare const getForbiddenJsonLd: () => JsonLd.Response;
@@ -19,5 +19,7 @@ export interface ExpandedFrameProps {
19
19
  testId?: string;
20
20
  /** If dimensions of the card are to be inherited from the parent */
21
21
  inheritDimensions?: boolean;
22
+ /** To enable scrolling in use cases where the content will not have it's own scrollbar */
23
+ allowScrollBar?: boolean;
22
24
  }
23
25
  export declare const ExpandedFrame: FC<ExpandedFrameProps>;
@@ -24,6 +24,7 @@ export declare const IconWrapper: import("@emotion/styled-base").StyledComponent
24
24
  export declare const TextWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, PlaceholderProps, object>;
25
25
  export interface ContentProps {
26
26
  isInteractive: boolean;
27
+ allowScrollBar: boolean;
27
28
  }
28
29
  export declare const Content: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ContentProps, object>;
29
30
  export interface ImageProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "23.4.2",
3
+ "version": "23.4.4",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"