@atlaskit/smart-card 26.46.3 → 26.46.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 (30) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/extractors/common/context/extractAccessContext.js +34 -31
  3. package/dist/cjs/messages.js +29 -76
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/view/BlockCard/index.js +1 -1
  6. package/dist/cjs/view/BlockCard/views/ForbiddenView.js +6 -2
  7. package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +2 -2
  8. package/dist/cjs/view/FlexibleCard/utils.js +1 -1
  9. package/dist/cjs/view/LinkUrl/index.js +1 -1
  10. package/dist/es2019/extractors/common/context/extractAccessContext.js +35 -31
  11. package/dist/es2019/messages.js +29 -76
  12. package/dist/es2019/utils/analytics/analytics.js +1 -1
  13. package/dist/es2019/view/BlockCard/index.js +1 -1
  14. package/dist/es2019/view/BlockCard/views/ForbiddenView.js +5 -2
  15. package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +2 -2
  16. package/dist/es2019/view/FlexibleCard/utils.js +1 -1
  17. package/dist/es2019/view/LinkUrl/index.js +1 -1
  18. package/dist/esm/extractors/common/context/extractAccessContext.js +34 -31
  19. package/dist/esm/messages.js +29 -76
  20. package/dist/esm/utils/analytics/analytics.js +1 -1
  21. package/dist/esm/view/BlockCard/index.js +1 -1
  22. package/dist/esm/view/BlockCard/views/ForbiddenView.js +6 -2
  23. package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +2 -2
  24. package/dist/esm/view/FlexibleCard/utils.js +1 -1
  25. package/dist/esm/view/LinkUrl/index.js +1 -1
  26. package/dist/types/extractors/common/context/extractAccessContext.d.ts +2 -2
  27. package/dist/types/messages.d.ts +1 -1
  28. package/dist/types-ts4.5/extractors/common/context/extractAccessContext.d.ts +2 -2
  29. package/dist/types-ts4.5/messages.d.ts +1 -1
  30. package/package.json +1 -1
@@ -1,7 +1,4 @@
1
1
  import { defineMessages } from 'react-intl-next';
2
-
3
- // | 'forbidden_access_crossjoin'
4
- // | 'forbidden_description_crossjoin';
5
2
  export const messages = defineMessages({
6
3
  actions: {
7
4
  id: 'fabric.linking.actions',
@@ -168,11 +165,6 @@ export const messages = defineMessages({
168
165
  defaultMessage: 'Follow',
169
166
  description: 'Click to follow a project.'
170
167
  },
171
- forbidden_description: {
172
- id: 'fabric.linking.forbidden_description',
173
- defaultMessage: 'You don’t have access to this preview. Contact the site admin if you need access.',
174
- description: 'Informs the user that they cannot view this content.'
175
- },
176
168
  go_back: {
177
169
  id: 'fabric.linking.go_back',
178
170
  defaultMessage: 'Go back',
@@ -228,16 +220,6 @@ export const messages = defineMessages({
228
220
  defaultMessage: 'More actions',
229
221
  description: 'Allows the users to see more link actions'
230
222
  },
231
- not_found_description: {
232
- id: 'fabric.linking.not_found_description',
233
- defaultMessage: "We couldn't find the link. Check the url and try editing or paste again.",
234
- description: 'Error case for when a provided item is not found within the list of items'
235
- },
236
- not_found_title: {
237
- id: 'fabric.linking.not_found_title',
238
- defaultMessage: "Uh oh. We can't find this link!",
239
- description: 'Error case for when a provided link is not found'
240
- },
241
223
  open_issue_in_jira: {
242
224
  id: 'fabric.linking.open_issue_in_jira',
243
225
  defaultMessage: 'Open issue in Jira',
@@ -348,26 +330,6 @@ export const messages = defineMessages({
348
330
  defaultMessage: 'Restricted link, try another account',
349
331
  description: 'Message shown when a user does not have permissions to view an item'
350
332
  },
351
- request_access: {
352
- id: 'fabric.linking.request_access',
353
- defaultMessage: 'Request access',
354
- description: 'Allows the user to request access to a product or service'
355
- },
356
- request_access_description: {
357
- id: 'fabric.linking.request_access_description',
358
- defaultMessage: 'Request access to {context} view this preview.',
359
- description: 'Allows the user to request access to a product'
360
- },
361
- request_access_pending: {
362
- id: 'fabric.linking.request_access_pending',
363
- defaultMessage: 'Access pending',
364
- description: 'Allows the user to try an action again with their current account'
365
- },
366
- request_access_pending_description: {
367
- id: 'fabric.linking.request_access_pending_description',
368
- defaultMessage: 'Your access request is pending.',
369
- description: 'Informs the user that their request to view this content is pending'
370
- },
371
333
  request_access_to_view: {
372
334
  id: 'fabric.linking.request_access_to_view',
373
335
  defaultMessage: 'Request access to {context} to view this issue',
@@ -378,11 +340,6 @@ export const messages = defineMessages({
378
340
  defaultMessage: 'Your access request was denied',
379
341
  description: 'The user had request access but the request was denied by a product or service'
380
342
  },
381
- request_denied_description: {
382
- id: 'fabric.linking.request_denied_description',
383
- defaultMessage: 'Your access request was denied. Contact the site admin if you still need access.',
384
- description: 'Informs the user that their request to view this content was denied'
385
- },
386
343
  retry: {
387
344
  id: 'fabric.linking.retry',
388
345
  defaultMessage: 'Retry',
@@ -483,82 +440,78 @@ export const messages = defineMessages({
483
440
  defaultMessage: 'View Original',
484
441
  description: "We have a link in our preview modals to the original document. This is for when we don't know the provider name"
485
442
  },
486
- /**
487
- * Temp messages to put behind a feature flag for the cross join stream, replace the messages with the message of the same
488
- * title (without _crossjoin) during cleanup in EDM-7977 [https://product-fabric.atlassian.net/browse/EDM-7977].
489
- */
490
- default_no_access_title_crossjoin: {
491
- id: 'fabric.linking.no_access_title_crossjoin',
443
+ default_no_access_title: {
444
+ id: 'fabric.linking.no_access_title',
492
445
  defaultMessage: 'Join {product} to view this content',
493
446
  description: 'Informs the user that they dont have access to certain content'
494
447
  },
495
- direct_access_title_crossjoin: {
496
- id: 'fabric.linking.direct_access_title_crossjoin',
448
+ direct_access_title: {
449
+ id: 'fabric.linking.direct_access_title',
497
450
  defaultMessage: 'Join {product} to view this content',
498
451
  description: 'Informs the user that they have access to this product, and can sign up or join right away.'
499
452
  },
500
- direct_access_description_crossjoin: {
501
- id: 'fabric.linking.direct_access_description_crossjoin',
453
+ direct_access_description: {
454
+ id: 'fabric.linking.direct_access_description',
502
455
  defaultMessage: 'Your team uses {product} to collaborate and you can start using it right away!',
503
456
  description: 'Informs the user that they have access to this product, and can sign up or join right away.'
504
457
  },
505
- direct_access_crossjoin: {
506
- id: 'fabric.linking.direct_access_crossjoin',
458
+ direct_access: {
459
+ id: 'fabric.linking.direct_access',
507
460
  defaultMessage: 'Join now',
508
461
  description: 'Allows the user join the product or service immediately'
509
462
  },
510
- request_access_description_crossjoin: {
511
- id: 'fabric.linking.request_access_description_crossjoin',
463
+ request_access_description: {
464
+ id: 'fabric.linking.request_access_description',
512
465
  defaultMessage: 'Your team uses {product} to collaborate. Send your admin a request for access.',
513
466
  description: 'Informs the user to request access to a product by talking to the website administrator'
514
467
  },
515
- request_access_crossjoin: {
516
- id: 'fabric.linking.request_access_crossjoin',
468
+ request_access: {
469
+ id: 'fabric.linking.request_access',
517
470
  defaultMessage: 'Request access',
518
471
  description: 'Allows the user to request access to a product or service'
519
472
  },
520
- request_access_pending_title_crossjoin: {
521
- id: 'fabric.linking.request_access_pending_title_crossjoin',
473
+ request_access_pending_title: {
474
+ id: 'fabric.linking.request_access_pending_title',
522
475
  defaultMessage: 'Access to {product} is pending',
523
476
  description: 'Informs the user that their request to view this content is pending'
524
477
  },
525
- request_access_pending_description_crossjoin: {
526
- id: 'fabric.linking.request_access_pending_description_crossjoin',
478
+ request_access_pending_description: {
479
+ id: 'fabric.linking.request_access_pending_description',
527
480
  defaultMessage: 'Your request to access {hostname} is awaiting admin approval.',
528
481
  description: 'Informs the user that their request to view this content is pending website administrator approval'
529
482
  },
530
- request_access_pending_crossjoin: {
531
- id: 'fabric.linking.request_access_pending_crossjoin',
483
+ request_access_pending: {
484
+ id: 'fabric.linking.request_access_pending',
532
485
  defaultMessage: 'Pending approval',
533
486
  description: 'Informs the user that their request to view this content is pending'
534
487
  },
535
- request_denied_description_crossjoin: {
536
- id: 'fabric.linking.request_denied_description_crossjoin',
488
+ request_denied_description: {
489
+ id: 'fabric.linking.request_denied_description',
537
490
  defaultMessage: "Your admin didn't approve your request to view {product} pages from {hostname}.",
538
491
  description: 'Informs the user that their request to view this content was denied'
539
492
  },
540
- access_exists_description_crossjoin: {
493
+ access_exists_description: {
541
494
  id: 'fabric.linking.access_exists_description',
542
495
  defaultMessage: 'Request access to view this content from {hostname}.',
543
496
  description: 'Informs the user to contact the website administrator to request access to a product'
544
497
  },
545
- not_found_description_crossjoin: {
546
- id: 'fabric.linking.not_found_description_crossjoin',
498
+ not_found_description: {
499
+ id: 'fabric.linking.not_found_description',
547
500
  defaultMessage: "The page doesn't exist or it may have changed after this link was added.",
548
501
  description: 'Error case for when a provided item is not found within the list of items'
549
502
  },
550
- not_found_title_crossjoin: {
551
- id: 'fabric.linking.not_found_title_crossjoin',
503
+ not_found_title: {
504
+ id: 'fabric.linking.not_found_title',
552
505
  defaultMessage: "We can't show you this {product} page",
553
506
  description: 'Error case for when a provided link is not found'
554
507
  },
555
- forbidden_title_crossjoin: {
556
- id: 'fabric.linking.forbidden_title_crossjoin',
508
+ forbidden_title: {
509
+ id: 'fabric.linking.forbidden_title',
557
510
  defaultMessage: "You don't have access to this content",
558
511
  description: 'Informs the user that they do not have access to the linked content.'
559
512
  },
560
- forbidden_description_crossjoin: {
561
- id: 'fabric.linking.forbidden_description_crossjoin',
513
+ forbidden_description: {
514
+ id: 'fabric.linking.forbidden_description',
562
515
  defaultMessage: 'Contact your admin to request access to {hostname}.',
563
516
  description: 'Informs the user that they must contact the site administrator for access.'
564
517
  },
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "26.46.3"
7
+ packageVersion: "26.46.4"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -159,7 +159,7 @@ export const BlockCard = ({
159
159
  const requestAccessContext = extractRequestAccessContext({
160
160
  jsonLd: cardMetadata,
161
161
  url,
162
- context: (_forbiddenViewProps$c = forbiddenViewProps.context) === null || _forbiddenViewProps$c === void 0 ? void 0 : _forbiddenViewProps$c.text
162
+ product: (_forbiddenViewProps$c = forbiddenViewProps.context) === null || _forbiddenViewProps$c === void 0 ? void 0 : _forbiddenViewProps$c.text
163
163
  });
164
164
  return jsx(BlockCardForbiddenView, _extends({}, forbiddenViewProps, {
165
165
  isSelected: isSelected,
@@ -32,7 +32,8 @@ export const ForbiddenView = ({
32
32
  const handleClick = event => handleClickCommon(event, onClick);
33
33
  const {
34
34
  action,
35
- descriptiveMessageKey = 'invalid_permissions_description'
35
+ descriptiveMessageKey = 'invalid_permissions_description',
36
+ hostname = ''
36
37
  } = requestAccessContext;
37
38
  const items = action ? [...actions, action] : actions;
38
39
  return jsx(Frame, {
@@ -58,7 +59,9 @@ export const ForbiddenView = ({
58
59
  }),
59
60
  text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
60
61
  values: {
61
- context: context.text
62
+ product: context.text,
63
+ context: context.text,
64
+ hostname
62
65
  }
63
66
  }))
64
67
  }))), jsx(ContentFooter, null, jsx(Provider, {
@@ -29,11 +29,11 @@ const FlexibleNotFoundView = ({
29
29
  const provider = extractProvider(cardState === null || cardState === void 0 ? void 0 : (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : _cardState$details.data);
30
30
  return (_provider$text = provider === null || provider === void 0 ? void 0 : provider.text) !== null && _provider$text !== void 0 ? _provider$text : '';
31
31
  }, [cardState === null || cardState === void 0 ? void 0 : (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data]);
32
- const title = useMemo(() => intl.formatMessage(messages.not_found_title_crossjoin, {
32
+ const title = useMemo(() => intl.formatMessage(messages.not_found_title, {
33
33
  product
34
34
  }), [intl, product]);
35
35
  const description = useMemo(() => ({
36
- descriptor: messages.not_found_description_crossjoin
36
+ descriptor: messages.not_found_description
37
37
  }), []);
38
38
  return /*#__PURE__*/React.createElement(UnresolvedView, _extends({}, props, {
39
39
  showPreview: true,
@@ -73,7 +73,7 @@ export const getRetryOptions = (url, status, response, onAuthorize) => {
73
73
  const access = extractRequestAccessContext({
74
74
  jsonLd: meta,
75
75
  url,
76
- context
76
+ product: context
77
77
  });
78
78
  const messageKey = getForbiddenMessageKey(meta);
79
79
  const descriptor = messages[messageKey];
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "26.46.3",
10
+ packageVersion: "26.46.4",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -9,42 +9,45 @@ export var extractRequestAccessContext = function extractRequestAccessContext(_r
9
9
  var _jsonLd$requestAccess;
10
10
  var jsonLd = _ref.jsonLd,
11
11
  url = _ref.url,
12
- context = _ref.context;
12
+ product = _ref.product;
13
+ var requestAccess = jsonLd !== null && jsonLd !== void 0 && jsonLd.requestAccess ? _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
14
+ hostname: extractHostname(url)
15
+ }) : undefined;
13
16
  switch (jsonLd === null || jsonLd === void 0 || (_jsonLd$requestAccess = jsonLd.requestAccess) === null || _jsonLd$requestAccess === void 0 ? void 0 : _jsonLd$requestAccess.accessType) {
14
17
  case 'DIRECT_ACCESS':
15
- return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
18
+ return _objectSpread(_objectSpread({}, requestAccess), {}, {
16
19
  callToActionMessageKey: 'click_to_join',
17
20
  descriptiveMessageKey: 'click_to_join_description',
18
21
  action: ForbiddenAction(function () {
19
22
  return window.open(url);
20
23
  }, 'click_to_join', messages.click_to_join, {
21
- context: context
24
+ context: product
22
25
  })
23
26
  });
24
27
  case 'REQUEST_ACCESS':
25
- return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
28
+ return _objectSpread(_objectSpread({}, requestAccess), {}, {
26
29
  callToActionMessageKey: 'request_access',
27
30
  descriptiveMessageKey: 'request_access_description',
28
31
  action: ForbiddenAction(function () {
29
32
  return window.open(url);
30
33
  }, 'request_access', messages.request_access, {
31
- context: context
34
+ product: product
32
35
  })
33
36
  });
34
37
  case 'PENDING_REQUEST_EXISTS':
35
- return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
38
+ return _objectSpread(_objectSpread({}, requestAccess), {}, {
36
39
  descriptiveMessageKey: 'request_access_pending_description'
37
40
  });
38
41
  case 'FORBIDDEN':
39
- return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
42
+ return _objectSpread(_objectSpread({}, requestAccess), {}, {
40
43
  descriptiveMessageKey: 'forbidden_description'
41
44
  });
42
45
  case 'DENIED_REQUEST_EXISTS':
43
- return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
46
+ return _objectSpread(_objectSpread({}, requestAccess), {}, {
44
47
  descriptiveMessageKey: 'request_denied_description'
45
48
  });
46
49
  default:
47
- return jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess;
50
+ return requestAccess;
48
51
  }
49
52
  };
50
53
  export var extractRequestAccessContextImproved = function extractRequestAccessContextImproved(_ref2) {
@@ -59,9 +62,9 @@ export var extractRequestAccessContextImproved = function extractRequestAccessCo
59
62
  switch (jsonLd === null || jsonLd === void 0 || (_jsonLd$requestAccess2 = jsonLd.requestAccess) === null || _jsonLd$requestAccess2 === void 0 ? void 0 : _jsonLd$requestAccess2.accessType) {
60
63
  case 'DIRECT_ACCESS':
61
64
  return _objectSpread(_objectSpread({}, requestAccess), {}, {
62
- titleMessageKey: 'direct_access_title_crossjoin',
63
- descriptiveMessageKey: 'direct_access_description_crossjoin',
64
- callToActionMessageKey: 'direct_access_crossjoin',
65
+ titleMessageKey: 'direct_access_title',
66
+ descriptiveMessageKey: 'direct_access_description',
67
+ callToActionMessageKey: 'direct_access',
65
68
  action: ForbiddenAction(function () {
66
69
  createAnalyticsEvent({
67
70
  action: 'clicked',
@@ -70,15 +73,15 @@ export var extractRequestAccessContextImproved = function extractRequestAccessCo
70
73
  eventType: 'ui'
71
74
  }).fire(ANALYTICS_CHANNEL);
72
75
  window.open(url);
73
- }, 'direct_access', messages.direct_access_crossjoin, {
76
+ }, 'direct_access', messages.direct_access, {
74
77
  product: product
75
78
  })
76
79
  });
77
80
  case 'REQUEST_ACCESS':
78
81
  return _objectSpread(_objectSpread({}, requestAccess), {}, {
79
- titleMessageKey: 'default_no_access_title_crossjoin',
80
- descriptiveMessageKey: 'request_access_description_crossjoin',
81
- callToActionMessageKey: 'request_access_crossjoin',
82
+ titleMessageKey: 'default_no_access_title',
83
+ descriptiveMessageKey: 'request_access_description',
84
+ callToActionMessageKey: 'request_access',
82
85
  action: ForbiddenAction(function () {
83
86
  createAnalyticsEvent({
84
87
  action: 'clicked',
@@ -87,34 +90,34 @@ export var extractRequestAccessContextImproved = function extractRequestAccessCo
87
90
  eventType: 'ui'
88
91
  }).fire(ANALYTICS_CHANNEL);
89
92
  window.open(url);
90
- }, 'request_access', messages.request_access_crossjoin)
93
+ }, 'request_access', messages.request_access)
91
94
  });
92
95
  case 'PENDING_REQUEST_EXISTS':
93
96
  return _objectSpread(_objectSpread({}, requestAccess), {}, {
94
- titleMessageKey: 'request_access_pending_title_crossjoin',
95
- descriptiveMessageKey: 'request_access_pending_description_crossjoin',
96
- callToActionMessageKey: 'request_access_pending_crossjoin',
97
+ titleMessageKey: 'request_access_pending_title',
98
+ descriptiveMessageKey: 'request_access_pending_description',
99
+ callToActionMessageKey: 'request_access_pending',
97
100
  action: ForbiddenAction(function () {
98
101
  return window.open(url);
99
- }, 'request_access_pending', messages.request_access_pending_crossjoin),
102
+ }, 'request_access_pending', messages.request_access_pending),
100
103
  buttonDisabled: true
101
104
  });
102
105
  case 'DENIED_REQUEST_EXISTS':
103
106
  return _objectSpread(_objectSpread({}, requestAccess), {}, {
104
- titleMessageKey: 'forbidden_title_crossjoin',
105
- descriptiveMessageKey: 'request_denied_description_crossjoin'
107
+ titleMessageKey: 'forbidden_title',
108
+ descriptiveMessageKey: 'request_denied_description'
106
109
  });
107
110
  case 'ACCESS_EXISTS':
108
111
  if ((jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.visibility) === 'not_found') {
109
112
  return _objectSpread(_objectSpread({}, requestAccess), {}, {
110
- titleMessageKey: 'not_found_title_crossjoin',
111
- descriptiveMessageKey: 'not_found_description_crossjoin'
113
+ titleMessageKey: 'not_found_title',
114
+ descriptiveMessageKey: 'not_found_description'
112
115
  });
113
116
  }
114
117
  return _objectSpread(_objectSpread({}, requestAccess), {}, {
115
- titleMessageKey: 'forbidden_title_crossjoin',
116
- descriptiveMessageKey: 'access_exists_description_crossjoin',
117
- callToActionMessageKey: 'request_access_crossjoin',
118
+ titleMessageKey: 'forbidden_title',
119
+ descriptiveMessageKey: 'access_exists_description',
120
+ callToActionMessageKey: 'request_access',
118
121
  action: ForbiddenAction(function () {
119
122
  createAnalyticsEvent({
120
123
  action: 'clicked',
@@ -123,12 +126,12 @@ export var extractRequestAccessContextImproved = function extractRequestAccessCo
123
126
  eventType: 'ui'
124
127
  }).fire(ANALYTICS_CHANNEL);
125
128
  window.open(url);
126
- }, 'access_exists', messages.request_access_crossjoin)
129
+ }, 'access_exists', messages.request_access)
127
130
  });
128
131
  case 'FORBIDDEN':
129
132
  return _objectSpread(_objectSpread({}, requestAccess), {}, {
130
- titleMessageKey: 'forbidden_title_crossjoin',
131
- descriptiveMessageKey: 'forbidden_description_crossjoin'
133
+ titleMessageKey: 'forbidden_title',
134
+ descriptiveMessageKey: 'forbidden_description'
132
135
  });
133
136
  default:
134
137
  return requestAccess;
@@ -1,7 +1,4 @@
1
1
  import { defineMessages } from 'react-intl-next';
2
-
3
- // | 'forbidden_access_crossjoin'
4
- // | 'forbidden_description_crossjoin';
5
2
  export var messages = defineMessages({
6
3
  actions: {
7
4
  id: 'fabric.linking.actions',
@@ -168,11 +165,6 @@ export var messages = defineMessages({
168
165
  defaultMessage: 'Follow',
169
166
  description: 'Click to follow a project.'
170
167
  },
171
- forbidden_description: {
172
- id: 'fabric.linking.forbidden_description',
173
- defaultMessage: 'You don’t have access to this preview. Contact the site admin if you need access.',
174
- description: 'Informs the user that they cannot view this content.'
175
- },
176
168
  go_back: {
177
169
  id: 'fabric.linking.go_back',
178
170
  defaultMessage: 'Go back',
@@ -228,16 +220,6 @@ export var messages = defineMessages({
228
220
  defaultMessage: 'More actions',
229
221
  description: 'Allows the users to see more link actions'
230
222
  },
231
- not_found_description: {
232
- id: 'fabric.linking.not_found_description',
233
- defaultMessage: "We couldn't find the link. Check the url and try editing or paste again.",
234
- description: 'Error case for when a provided item is not found within the list of items'
235
- },
236
- not_found_title: {
237
- id: 'fabric.linking.not_found_title',
238
- defaultMessage: "Uh oh. We can't find this link!",
239
- description: 'Error case for when a provided link is not found'
240
- },
241
223
  open_issue_in_jira: {
242
224
  id: 'fabric.linking.open_issue_in_jira',
243
225
  defaultMessage: 'Open issue in Jira',
@@ -348,26 +330,6 @@ export var messages = defineMessages({
348
330
  defaultMessage: 'Restricted link, try another account',
349
331
  description: 'Message shown when a user does not have permissions to view an item'
350
332
  },
351
- request_access: {
352
- id: 'fabric.linking.request_access',
353
- defaultMessage: 'Request access',
354
- description: 'Allows the user to request access to a product or service'
355
- },
356
- request_access_description: {
357
- id: 'fabric.linking.request_access_description',
358
- defaultMessage: 'Request access to {context} view this preview.',
359
- description: 'Allows the user to request access to a product'
360
- },
361
- request_access_pending: {
362
- id: 'fabric.linking.request_access_pending',
363
- defaultMessage: 'Access pending',
364
- description: 'Allows the user to try an action again with their current account'
365
- },
366
- request_access_pending_description: {
367
- id: 'fabric.linking.request_access_pending_description',
368
- defaultMessage: 'Your access request is pending.',
369
- description: 'Informs the user that their request to view this content is pending'
370
- },
371
333
  request_access_to_view: {
372
334
  id: 'fabric.linking.request_access_to_view',
373
335
  defaultMessage: 'Request access to {context} to view this issue',
@@ -378,11 +340,6 @@ export var messages = defineMessages({
378
340
  defaultMessage: 'Your access request was denied',
379
341
  description: 'The user had request access but the request was denied by a product or service'
380
342
  },
381
- request_denied_description: {
382
- id: 'fabric.linking.request_denied_description',
383
- defaultMessage: 'Your access request was denied. Contact the site admin if you still need access.',
384
- description: 'Informs the user that their request to view this content was denied'
385
- },
386
343
  retry: {
387
344
  id: 'fabric.linking.retry',
388
345
  defaultMessage: 'Retry',
@@ -483,82 +440,78 @@ export var messages = defineMessages({
483
440
  defaultMessage: 'View Original',
484
441
  description: "We have a link in our preview modals to the original document. This is for when we don't know the provider name"
485
442
  },
486
- /**
487
- * Temp messages to put behind a feature flag for the cross join stream, replace the messages with the message of the same
488
- * title (without _crossjoin) during cleanup in EDM-7977 [https://product-fabric.atlassian.net/browse/EDM-7977].
489
- */
490
- default_no_access_title_crossjoin: {
491
- id: 'fabric.linking.no_access_title_crossjoin',
443
+ default_no_access_title: {
444
+ id: 'fabric.linking.no_access_title',
492
445
  defaultMessage: 'Join {product} to view this content',
493
446
  description: 'Informs the user that they dont have access to certain content'
494
447
  },
495
- direct_access_title_crossjoin: {
496
- id: 'fabric.linking.direct_access_title_crossjoin',
448
+ direct_access_title: {
449
+ id: 'fabric.linking.direct_access_title',
497
450
  defaultMessage: 'Join {product} to view this content',
498
451
  description: 'Informs the user that they have access to this product, and can sign up or join right away.'
499
452
  },
500
- direct_access_description_crossjoin: {
501
- id: 'fabric.linking.direct_access_description_crossjoin',
453
+ direct_access_description: {
454
+ id: 'fabric.linking.direct_access_description',
502
455
  defaultMessage: 'Your team uses {product} to collaborate and you can start using it right away!',
503
456
  description: 'Informs the user that they have access to this product, and can sign up or join right away.'
504
457
  },
505
- direct_access_crossjoin: {
506
- id: 'fabric.linking.direct_access_crossjoin',
458
+ direct_access: {
459
+ id: 'fabric.linking.direct_access',
507
460
  defaultMessage: 'Join now',
508
461
  description: 'Allows the user join the product or service immediately'
509
462
  },
510
- request_access_description_crossjoin: {
511
- id: 'fabric.linking.request_access_description_crossjoin',
463
+ request_access_description: {
464
+ id: 'fabric.linking.request_access_description',
512
465
  defaultMessage: 'Your team uses {product} to collaborate. Send your admin a request for access.',
513
466
  description: 'Informs the user to request access to a product by talking to the website administrator'
514
467
  },
515
- request_access_crossjoin: {
516
- id: 'fabric.linking.request_access_crossjoin',
468
+ request_access: {
469
+ id: 'fabric.linking.request_access',
517
470
  defaultMessage: 'Request access',
518
471
  description: 'Allows the user to request access to a product or service'
519
472
  },
520
- request_access_pending_title_crossjoin: {
521
- id: 'fabric.linking.request_access_pending_title_crossjoin',
473
+ request_access_pending_title: {
474
+ id: 'fabric.linking.request_access_pending_title',
522
475
  defaultMessage: 'Access to {product} is pending',
523
476
  description: 'Informs the user that their request to view this content is pending'
524
477
  },
525
- request_access_pending_description_crossjoin: {
526
- id: 'fabric.linking.request_access_pending_description_crossjoin',
478
+ request_access_pending_description: {
479
+ id: 'fabric.linking.request_access_pending_description',
527
480
  defaultMessage: 'Your request to access {hostname} is awaiting admin approval.',
528
481
  description: 'Informs the user that their request to view this content is pending website administrator approval'
529
482
  },
530
- request_access_pending_crossjoin: {
531
- id: 'fabric.linking.request_access_pending_crossjoin',
483
+ request_access_pending: {
484
+ id: 'fabric.linking.request_access_pending',
532
485
  defaultMessage: 'Pending approval',
533
486
  description: 'Informs the user that their request to view this content is pending'
534
487
  },
535
- request_denied_description_crossjoin: {
536
- id: 'fabric.linking.request_denied_description_crossjoin',
488
+ request_denied_description: {
489
+ id: 'fabric.linking.request_denied_description',
537
490
  defaultMessage: "Your admin didn't approve your request to view {product} pages from {hostname}.",
538
491
  description: 'Informs the user that their request to view this content was denied'
539
492
  },
540
- access_exists_description_crossjoin: {
493
+ access_exists_description: {
541
494
  id: 'fabric.linking.access_exists_description',
542
495
  defaultMessage: 'Request access to view this content from {hostname}.',
543
496
  description: 'Informs the user to contact the website administrator to request access to a product'
544
497
  },
545
- not_found_description_crossjoin: {
546
- id: 'fabric.linking.not_found_description_crossjoin',
498
+ not_found_description: {
499
+ id: 'fabric.linking.not_found_description',
547
500
  defaultMessage: "The page doesn't exist or it may have changed after this link was added.",
548
501
  description: 'Error case for when a provided item is not found within the list of items'
549
502
  },
550
- not_found_title_crossjoin: {
551
- id: 'fabric.linking.not_found_title_crossjoin',
503
+ not_found_title: {
504
+ id: 'fabric.linking.not_found_title',
552
505
  defaultMessage: "We can't show you this {product} page",
553
506
  description: 'Error case for when a provided link is not found'
554
507
  },
555
- forbidden_title_crossjoin: {
556
- id: 'fabric.linking.forbidden_title_crossjoin',
508
+ forbidden_title: {
509
+ id: 'fabric.linking.forbidden_title',
557
510
  defaultMessage: "You don't have access to this content",
558
511
  description: 'Informs the user that they do not have access to the linked content.'
559
512
  },
560
- forbidden_description_crossjoin: {
561
- id: 'fabric.linking.forbidden_description_crossjoin',
513
+ forbidden_description: {
514
+ id: 'fabric.linking.forbidden_description',
562
515
  defaultMessage: 'Contact your admin to request access to {hostname}.',
563
516
  description: 'Informs the user that they must contact the site administrator for access.'
564
517
  },
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "26.46.3"
18
+ packageVersion: "26.46.4"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -158,7 +158,7 @@ export var BlockCard = function BlockCard(_ref) {
158
158
  var requestAccessContext = extractRequestAccessContext({
159
159
  jsonLd: cardMetadata,
160
160
  url: url,
161
- context: (_forbiddenViewProps$c = forbiddenViewProps.context) === null || _forbiddenViewProps$c === void 0 ? void 0 : _forbiddenViewProps$c.text
161
+ product: (_forbiddenViewProps$c = forbiddenViewProps.context) === null || _forbiddenViewProps$c === void 0 ? void 0 : _forbiddenViewProps$c.text
162
162
  });
163
163
  return jsx(BlockCardForbiddenView, _extends({}, forbiddenViewProps, {
164
164
  isSelected: isSelected,
@@ -41,7 +41,9 @@ export var ForbiddenView = function ForbiddenView(_ref) {
41
41
  };
42
42
  var action = requestAccessContext.action,
43
43
  _requestAccessContext = requestAccessContext.descriptiveMessageKey,
44
- descriptiveMessageKey = _requestAccessContext === void 0 ? 'invalid_permissions_description' : _requestAccessContext;
44
+ descriptiveMessageKey = _requestAccessContext === void 0 ? 'invalid_permissions_description' : _requestAccessContext,
45
+ _requestAccessContext2 = requestAccessContext.hostname,
46
+ hostname = _requestAccessContext2 === void 0 ? '' : _requestAccessContext2;
45
47
  var items = action ? [].concat(_toConsumableArray(actions), [action]) : actions;
46
48
  return jsx(Frame, {
47
49
  isSelected: isSelected,
@@ -66,7 +68,9 @@ export var ForbiddenView = function ForbiddenView(_ref) {
66
68
  }),
67
69
  text: jsx(FormattedMessage, _extends({}, messages[descriptiveMessageKey], {
68
70
  values: {
69
- context: context.text
71
+ product: context.text,
72
+ context: context.text,
73
+ hostname: hostname
70
74
  }
71
75
  }))
72
76
  }))), jsx(ContentFooter, null, jsx(Provider, {