@atlaskit/smart-card 26.28.1 → 26.28.2
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 +6 -0
- package/dist/cjs/extractors/common/context/extractAccessContext.js +66 -4
- package/dist/cjs/messages.js +86 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/actions/ForbiddenAction.js +2 -4
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/common/context/extractAccessContext.js +62 -2
- package/dist/es2019/messages.js +86 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/actions/ForbiddenAction.js +2 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/common/context/extractAccessContext.js +63 -2
- package/dist/esm/messages.js +86 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/actions/ForbiddenAction.js +2 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/common/context/extractAccessContext.d.ts +5 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/BlockCard/actions/ForbiddenAction.d.ts +1 -1
- package/dist/types/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types/view/types.d.ts +1 -0
- package/dist/types-ts4.5/extractors/common/context/extractAccessContext.d.ts +5 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/view/BlockCard/actions/ForbiddenAction.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/CustomPopupContainer.d.ts +1 -1
- package/dist/types-ts4.5/view/types.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.28.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c46305662f7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c46305662f7) - create new messages for smart link forbidden and not found views
|
|
8
|
+
|
|
3
9
|
## 26.28.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.extractRequestAccessContext = void 0;
|
|
7
|
+
exports.extractRequestAccessContextImproved = exports.extractRequestAccessContext = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _messages = require("../../../messages");
|
|
10
10
|
var _ForbiddenAction = require("../../../view/BlockCard/actions/ForbiddenAction");
|
|
@@ -22,7 +22,9 @@ var extractRequestAccessContext = function extractRequestAccessContext(_ref) {
|
|
|
22
22
|
descriptiveMessageKey: 'click_to_join_description',
|
|
23
23
|
action: (0, _ForbiddenAction.ForbiddenAction)(function () {
|
|
24
24
|
return window.open(url);
|
|
25
|
-
}, 'click_to_join', _messages.messages.click_to_join,
|
|
25
|
+
}, 'click_to_join', _messages.messages.click_to_join, {
|
|
26
|
+
context: context
|
|
27
|
+
})
|
|
26
28
|
});
|
|
27
29
|
case 'REQUEST_ACCESS':
|
|
28
30
|
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
@@ -30,7 +32,9 @@ var extractRequestAccessContext = function extractRequestAccessContext(_ref) {
|
|
|
30
32
|
descriptiveMessageKey: 'request_access_description',
|
|
31
33
|
action: (0, _ForbiddenAction.ForbiddenAction)(function () {
|
|
32
34
|
return window.open(url);
|
|
33
|
-
}, 'request_access', _messages.messages.request_access,
|
|
35
|
+
}, 'request_access', _messages.messages.request_access, {
|
|
36
|
+
context: context
|
|
37
|
+
})
|
|
34
38
|
});
|
|
35
39
|
case 'PENDING_REQUEST_EXISTS':
|
|
36
40
|
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
@@ -48,4 +52,62 @@ var extractRequestAccessContext = function extractRequestAccessContext(_ref) {
|
|
|
48
52
|
return jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess;
|
|
49
53
|
}
|
|
50
54
|
};
|
|
51
|
-
exports.extractRequestAccessContext = extractRequestAccessContext;
|
|
55
|
+
exports.extractRequestAccessContext = extractRequestAccessContext;
|
|
56
|
+
var extractRequestAccessContextImproved = function extractRequestAccessContextImproved(_ref2) {
|
|
57
|
+
var _jsonLd$requestAccess2;
|
|
58
|
+
var jsonLd = _ref2.jsonLd,
|
|
59
|
+
url = _ref2.url,
|
|
60
|
+
product = _ref2.product;
|
|
61
|
+
switch (jsonLd === null || jsonLd === void 0 ? void 0 : (_jsonLd$requestAccess2 = jsonLd.requestAccess) === null || _jsonLd$requestAccess2 === void 0 ? void 0 : _jsonLd$requestAccess2.accessType) {
|
|
62
|
+
case 'DIRECT_ACCESS':
|
|
63
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
64
|
+
titleMessageKey: 'direct_access_title_crossjoin',
|
|
65
|
+
descriptiveMessageKey: 'direct_access_description_crossjoin',
|
|
66
|
+
callToActionMessageKey: 'direct_access_crossjoin',
|
|
67
|
+
action: (0, _ForbiddenAction.ForbiddenAction)(function () {
|
|
68
|
+
return window.open(url);
|
|
69
|
+
}, 'direct_access', _messages.messages.direct_access_crossjoin, {
|
|
70
|
+
product: product
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
case 'REQUEST_ACCESS':
|
|
74
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
75
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
76
|
+
descriptiveMessageKey: 'request_access_description_crossjoin',
|
|
77
|
+
callToActionMessageKey: 'request_access_crossjoin',
|
|
78
|
+
action: (0, _ForbiddenAction.ForbiddenAction)(function () {
|
|
79
|
+
return window.open(url);
|
|
80
|
+
}, 'request_access', _messages.messages.request_access_crossjoin)
|
|
81
|
+
});
|
|
82
|
+
case 'PENDING_REQUEST_EXISTS':
|
|
83
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
84
|
+
titleMessageKey: 'request_access_pending_title_crossjoin',
|
|
85
|
+
descriptiveMessageKey: 'request_access_pending_description_crossjoin',
|
|
86
|
+
callToActionMessageKey: 'request_access_pending_crossjoin',
|
|
87
|
+
action: (0, _ForbiddenAction.ForbiddenAction)(function () {
|
|
88
|
+
return window.open(url);
|
|
89
|
+
}, 'request_access_pending', _messages.messages.request_access_pending_crossjoin)
|
|
90
|
+
});
|
|
91
|
+
case 'DENIED_REQUEST_EXISTS':
|
|
92
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
93
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
94
|
+
descriptiveMessageKey: 'request_denied_description_crossjoin'
|
|
95
|
+
});
|
|
96
|
+
case 'ACCESS_EXISTS':
|
|
97
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
98
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
99
|
+
descriptiveMessageKey: 'access_exists_description_crossjoin',
|
|
100
|
+
callToActionMessageKey: 'request_access_crossjoin',
|
|
101
|
+
action: (0, _ForbiddenAction.ForbiddenAction)(function () {
|
|
102
|
+
return window.open(url);
|
|
103
|
+
}, 'access_exists', _messages.messages.request_access_crossjoin)
|
|
104
|
+
});
|
|
105
|
+
case 'FORBIDDEN':
|
|
106
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
107
|
+
descriptiveMessageKey: 'forbidden_description'
|
|
108
|
+
});
|
|
109
|
+
default:
|
|
110
|
+
return jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess;
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
exports.extractRequestAccessContextImproved = extractRequestAccessContextImproved;
|
package/dist/cjs/messages.js
CHANGED
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.messages = void 0;
|
|
7
7
|
var _reactIntlNext = require("react-intl-next");
|
|
8
|
+
// | 'forbidden_access_crossjoin'
|
|
9
|
+
// | 'forbidden_description_crossjoin';
|
|
10
|
+
|
|
8
11
|
var messages = (0, _reactIntlNext.defineMessages)({
|
|
9
12
|
actions: {
|
|
10
13
|
id: 'fabric.linking.actions',
|
|
@@ -460,6 +463,89 @@ var messages = (0, _reactIntlNext.defineMessages)({
|
|
|
460
463
|
id: 'fabric.linking.srclinkunknown',
|
|
461
464
|
defaultMessage: 'View Original',
|
|
462
465
|
description: "We have a link in our preview modals to the original document. This is for when we don't know the provider name"
|
|
466
|
+
},
|
|
467
|
+
/**
|
|
468
|
+
* Temp messages to put behind a feature flag for the cross join stream, replace the messages with the message of the same
|
|
469
|
+
* title (without _crossjoin) during cleanup in EDM-7977 [https://product-fabric.atlassian.net/browse/EDM-7977].
|
|
470
|
+
*/
|
|
471
|
+
default_no_access_title_crossjoin: {
|
|
472
|
+
id: 'fabric.linking.no_access_title_crossjoin',
|
|
473
|
+
defaultMessage: "You don't have access to this content",
|
|
474
|
+
description: 'Informs the user that they dont have access to certain content'
|
|
475
|
+
},
|
|
476
|
+
direct_access_title_crossjoin: {
|
|
477
|
+
id: 'fabric.linking.direct_access_title_crossjoin',
|
|
478
|
+
defaultMessage: 'Join your team in {product}',
|
|
479
|
+
description: 'Informs the user that they have access to this product, and can sign up or join right away.'
|
|
480
|
+
},
|
|
481
|
+
direct_access_description_crossjoin: {
|
|
482
|
+
id: 'fabric.linking.direct_access_description_crossjoin',
|
|
483
|
+
defaultMessage: 'All {emailDomain} emails are approved to access {hostname} in {product}.',
|
|
484
|
+
description: 'Informs the user that they have access to this product, and can sign up or join right away.'
|
|
485
|
+
},
|
|
486
|
+
direct_access_crossjoin: {
|
|
487
|
+
id: 'fabric.linking.direct_access_crossjoin',
|
|
488
|
+
defaultMessage: 'Go to {product}',
|
|
489
|
+
description: 'Allows the user join the product or service immediately'
|
|
490
|
+
},
|
|
491
|
+
request_access_description_crossjoin: {
|
|
492
|
+
id: 'fabric.linking.request_access_description_crossjoin',
|
|
493
|
+
defaultMessage: 'Contact your admin to request access.',
|
|
494
|
+
description: 'Informs the user to request access to a product by talking to the website administrator'
|
|
495
|
+
},
|
|
496
|
+
request_access_crossjoin: {
|
|
497
|
+
id: 'fabric.linking.request_access_crossjoin',
|
|
498
|
+
defaultMessage: 'Request access',
|
|
499
|
+
description: 'Allows the user to request access to a product or service'
|
|
500
|
+
},
|
|
501
|
+
request_access_pending_title_crossjoin: {
|
|
502
|
+
id: 'fabric.linking.request_access_pending_title_crossjoin',
|
|
503
|
+
defaultMessage: 'Access to {product} pending',
|
|
504
|
+
description: 'Informs the user that their request to view this content is pending'
|
|
505
|
+
},
|
|
506
|
+
request_access_pending_description_crossjoin: {
|
|
507
|
+
id: 'fabric.linking.request_access_pending_description_crossjoin',
|
|
508
|
+
defaultMessage: 'Your request to access {hostname} is awaiting admin approval.',
|
|
509
|
+
description: 'Informs the user that their request to view this content is pending website administrator approval'
|
|
510
|
+
},
|
|
511
|
+
request_access_pending_crossjoin: {
|
|
512
|
+
id: 'fabric.linking.request_access_pending_crossjoin',
|
|
513
|
+
defaultMessage: 'Pending approval',
|
|
514
|
+
description: 'Informs the user that their request to view this content is pending'
|
|
515
|
+
},
|
|
516
|
+
request_denied_description_crossjoin: {
|
|
517
|
+
id: 'fabric.linking.request_denied_description_crossjoin',
|
|
518
|
+
defaultMessage: "Your admin didn't approve your request to view {product} pages from {hostname}.",
|
|
519
|
+
description: 'Informs the user that their request to view this content was denied'
|
|
520
|
+
},
|
|
521
|
+
access_exists_description_crossjoin: {
|
|
522
|
+
id: 'fabric.linking.access_exists_description',
|
|
523
|
+
defaultMessage: 'Contact your admin and request access to view this content from {hostname}.',
|
|
524
|
+
description: 'Informs the user to contact the website administrator to request access to a product'
|
|
525
|
+
},
|
|
526
|
+
not_found_description_crossjoin: {
|
|
527
|
+
id: 'fabric.linking.not_found_description_crossjoin',
|
|
528
|
+
defaultMessage: "The page doesn't exist or it may have changed after this link was added.",
|
|
529
|
+
description: 'Error case for when a provided item is not found within the list of items'
|
|
530
|
+
},
|
|
531
|
+
not_found_title_crossjoin: {
|
|
532
|
+
id: 'fabric.linking.not_found_title_crossjoin',
|
|
533
|
+
defaultMessage: "We can't show you this {product} page",
|
|
534
|
+
description: 'Error case for when a provided link is not found'
|
|
463
535
|
}
|
|
536
|
+
|
|
537
|
+
// Pending designs:
|
|
538
|
+
// forbidden_access_crossjoin: {
|
|
539
|
+
// id: 'fabric.linking.forbidden_access_crossjoin',
|
|
540
|
+
// defaultMessage: 'Your access is forbidden',
|
|
541
|
+
// description:
|
|
542
|
+
// 'Shown when a user does not have access to a resource behind the link.',
|
|
543
|
+
// },
|
|
544
|
+
// forbidden_description_crossjoin: {
|
|
545
|
+
// id: 'fabric.linking.forbidden_description_crossjoin',
|
|
546
|
+
// defaultMessage:
|
|
547
|
+
// "You don't have access to this preview. Contact the site admin if you need access.",
|
|
548
|
+
// description: 'Informs the user that they cannot view this content.',
|
|
549
|
+
// },
|
|
464
550
|
});
|
|
465
551
|
exports.messages = messages;
|
|
@@ -23,7 +23,7 @@ exports.ANALYTICS_CHANNEL = ANALYTICS_CHANNEL;
|
|
|
23
23
|
var context = {
|
|
24
24
|
componentName: 'smart-cards',
|
|
25
25
|
packageName: "@atlaskit/smart-card",
|
|
26
|
-
packageVersion: "26.28.
|
|
26
|
+
packageVersion: "26.28.2"
|
|
27
27
|
};
|
|
28
28
|
exports.context = context;
|
|
29
29
|
var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
@@ -12,13 +12,11 @@ var _messages = require("../../../messages");
|
|
|
12
12
|
var ForbiddenAction = function ForbiddenAction(handler) {
|
|
13
13
|
var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'connect-other-account';
|
|
14
14
|
var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _messages.messages.try_another_account;
|
|
15
|
-
var
|
|
15
|
+
var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
16
16
|
return {
|
|
17
17
|
id: id,
|
|
18
18
|
text: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, message, {
|
|
19
|
-
values:
|
|
20
|
-
context: context
|
|
21
|
-
}
|
|
19
|
+
values: values
|
|
22
20
|
})),
|
|
23
21
|
promise: function promise() {
|
|
24
22
|
return new Promise(function (resolve) {
|
|
@@ -18,7 +18,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
18
18
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
19
19
|
var PACKAGE_DATA = {
|
|
20
20
|
packageName: "@atlaskit/smart-card",
|
|
21
|
-
packageVersion: "26.28.
|
|
21
|
+
packageVersion: "26.28.2",
|
|
22
22
|
componentName: 'linkUrl'
|
|
23
23
|
};
|
|
24
24
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -12,14 +12,18 @@ export const extractRequestAccessContext = ({
|
|
|
12
12
|
...(jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess),
|
|
13
13
|
callToActionMessageKey: 'click_to_join',
|
|
14
14
|
descriptiveMessageKey: 'click_to_join_description',
|
|
15
|
-
action: ForbiddenAction(() => window.open(url), 'click_to_join', messages.click_to_join,
|
|
15
|
+
action: ForbiddenAction(() => window.open(url), 'click_to_join', messages.click_to_join, {
|
|
16
|
+
context
|
|
17
|
+
})
|
|
16
18
|
};
|
|
17
19
|
case 'REQUEST_ACCESS':
|
|
18
20
|
return {
|
|
19
21
|
...(jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess),
|
|
20
22
|
callToActionMessageKey: 'request_access',
|
|
21
23
|
descriptiveMessageKey: 'request_access_description',
|
|
22
|
-
action: ForbiddenAction(() => window.open(url), 'request_access', messages.request_access,
|
|
24
|
+
action: ForbiddenAction(() => window.open(url), 'request_access', messages.request_access, {
|
|
25
|
+
context
|
|
26
|
+
})
|
|
23
27
|
};
|
|
24
28
|
case 'PENDING_REQUEST_EXISTS':
|
|
25
29
|
return {
|
|
@@ -39,4 +43,60 @@ export const extractRequestAccessContext = ({
|
|
|
39
43
|
default:
|
|
40
44
|
return jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess;
|
|
41
45
|
}
|
|
46
|
+
};
|
|
47
|
+
export const extractRequestAccessContextImproved = ({
|
|
48
|
+
jsonLd,
|
|
49
|
+
url,
|
|
50
|
+
product
|
|
51
|
+
}) => {
|
|
52
|
+
var _jsonLd$requestAccess2;
|
|
53
|
+
switch (jsonLd === null || jsonLd === void 0 ? void 0 : (_jsonLd$requestAccess2 = jsonLd.requestAccess) === null || _jsonLd$requestAccess2 === void 0 ? void 0 : _jsonLd$requestAccess2.accessType) {
|
|
54
|
+
case 'DIRECT_ACCESS':
|
|
55
|
+
return {
|
|
56
|
+
...(jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess),
|
|
57
|
+
titleMessageKey: 'direct_access_title_crossjoin',
|
|
58
|
+
descriptiveMessageKey: 'direct_access_description_crossjoin',
|
|
59
|
+
callToActionMessageKey: 'direct_access_crossjoin',
|
|
60
|
+
action: ForbiddenAction(() => window.open(url), 'direct_access', messages.direct_access_crossjoin, {
|
|
61
|
+
product
|
|
62
|
+
})
|
|
63
|
+
};
|
|
64
|
+
case 'REQUEST_ACCESS':
|
|
65
|
+
return {
|
|
66
|
+
...(jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess),
|
|
67
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
68
|
+
descriptiveMessageKey: 'request_access_description_crossjoin',
|
|
69
|
+
callToActionMessageKey: 'request_access_crossjoin',
|
|
70
|
+
action: ForbiddenAction(() => window.open(url), 'request_access', messages.request_access_crossjoin)
|
|
71
|
+
};
|
|
72
|
+
case 'PENDING_REQUEST_EXISTS':
|
|
73
|
+
return {
|
|
74
|
+
...(jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess),
|
|
75
|
+
titleMessageKey: 'request_access_pending_title_crossjoin',
|
|
76
|
+
descriptiveMessageKey: 'request_access_pending_description_crossjoin',
|
|
77
|
+
callToActionMessageKey: 'request_access_pending_crossjoin',
|
|
78
|
+
action: ForbiddenAction(() => window.open(url), 'request_access_pending', messages.request_access_pending_crossjoin)
|
|
79
|
+
};
|
|
80
|
+
case 'DENIED_REQUEST_EXISTS':
|
|
81
|
+
return {
|
|
82
|
+
...(jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess),
|
|
83
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
84
|
+
descriptiveMessageKey: 'request_denied_description_crossjoin'
|
|
85
|
+
};
|
|
86
|
+
case 'ACCESS_EXISTS':
|
|
87
|
+
return {
|
|
88
|
+
...(jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess),
|
|
89
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
90
|
+
descriptiveMessageKey: 'access_exists_description_crossjoin',
|
|
91
|
+
callToActionMessageKey: 'request_access_crossjoin',
|
|
92
|
+
action: ForbiddenAction(() => window.open(url), 'access_exists', messages.request_access_crossjoin)
|
|
93
|
+
};
|
|
94
|
+
case 'FORBIDDEN':
|
|
95
|
+
return {
|
|
96
|
+
...(jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess),
|
|
97
|
+
descriptiveMessageKey: 'forbidden_description'
|
|
98
|
+
};
|
|
99
|
+
default:
|
|
100
|
+
return jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess;
|
|
101
|
+
}
|
|
42
102
|
};
|
package/dist/es2019/messages.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
|
|
3
|
+
// | 'forbidden_access_crossjoin'
|
|
4
|
+
// | 'forbidden_description_crossjoin';
|
|
2
5
|
export const messages = defineMessages({
|
|
3
6
|
actions: {
|
|
4
7
|
id: 'fabric.linking.actions',
|
|
@@ -454,5 +457,88 @@ export const messages = defineMessages({
|
|
|
454
457
|
id: 'fabric.linking.srclinkunknown',
|
|
455
458
|
defaultMessage: 'View Original',
|
|
456
459
|
description: "We have a link in our preview modals to the original document. This is for when we don't know the provider name"
|
|
460
|
+
},
|
|
461
|
+
/**
|
|
462
|
+
* Temp messages to put behind a feature flag for the cross join stream, replace the messages with the message of the same
|
|
463
|
+
* title (without _crossjoin) during cleanup in EDM-7977 [https://product-fabric.atlassian.net/browse/EDM-7977].
|
|
464
|
+
*/
|
|
465
|
+
default_no_access_title_crossjoin: {
|
|
466
|
+
id: 'fabric.linking.no_access_title_crossjoin',
|
|
467
|
+
defaultMessage: "You don't have access to this content",
|
|
468
|
+
description: 'Informs the user that they dont have access to certain content'
|
|
469
|
+
},
|
|
470
|
+
direct_access_title_crossjoin: {
|
|
471
|
+
id: 'fabric.linking.direct_access_title_crossjoin',
|
|
472
|
+
defaultMessage: 'Join your team in {product}',
|
|
473
|
+
description: 'Informs the user that they have access to this product, and can sign up or join right away.'
|
|
474
|
+
},
|
|
475
|
+
direct_access_description_crossjoin: {
|
|
476
|
+
id: 'fabric.linking.direct_access_description_crossjoin',
|
|
477
|
+
defaultMessage: 'All {emailDomain} emails are approved to access {hostname} in {product}.',
|
|
478
|
+
description: 'Informs the user that they have access to this product, and can sign up or join right away.'
|
|
479
|
+
},
|
|
480
|
+
direct_access_crossjoin: {
|
|
481
|
+
id: 'fabric.linking.direct_access_crossjoin',
|
|
482
|
+
defaultMessage: 'Go to {product}',
|
|
483
|
+
description: 'Allows the user join the product or service immediately'
|
|
484
|
+
},
|
|
485
|
+
request_access_description_crossjoin: {
|
|
486
|
+
id: 'fabric.linking.request_access_description_crossjoin',
|
|
487
|
+
defaultMessage: 'Contact your admin to request access.',
|
|
488
|
+
description: 'Informs the user to request access to a product by talking to the website administrator'
|
|
489
|
+
},
|
|
490
|
+
request_access_crossjoin: {
|
|
491
|
+
id: 'fabric.linking.request_access_crossjoin',
|
|
492
|
+
defaultMessage: 'Request access',
|
|
493
|
+
description: 'Allows the user to request access to a product or service'
|
|
494
|
+
},
|
|
495
|
+
request_access_pending_title_crossjoin: {
|
|
496
|
+
id: 'fabric.linking.request_access_pending_title_crossjoin',
|
|
497
|
+
defaultMessage: 'Access to {product} pending',
|
|
498
|
+
description: 'Informs the user that their request to view this content is pending'
|
|
499
|
+
},
|
|
500
|
+
request_access_pending_description_crossjoin: {
|
|
501
|
+
id: 'fabric.linking.request_access_pending_description_crossjoin',
|
|
502
|
+
defaultMessage: 'Your request to access {hostname} is awaiting admin approval.',
|
|
503
|
+
description: 'Informs the user that their request to view this content is pending website administrator approval'
|
|
504
|
+
},
|
|
505
|
+
request_access_pending_crossjoin: {
|
|
506
|
+
id: 'fabric.linking.request_access_pending_crossjoin',
|
|
507
|
+
defaultMessage: 'Pending approval',
|
|
508
|
+
description: 'Informs the user that their request to view this content is pending'
|
|
509
|
+
},
|
|
510
|
+
request_denied_description_crossjoin: {
|
|
511
|
+
id: 'fabric.linking.request_denied_description_crossjoin',
|
|
512
|
+
defaultMessage: "Your admin didn't approve your request to view {product} pages from {hostname}.",
|
|
513
|
+
description: 'Informs the user that their request to view this content was denied'
|
|
514
|
+
},
|
|
515
|
+
access_exists_description_crossjoin: {
|
|
516
|
+
id: 'fabric.linking.access_exists_description',
|
|
517
|
+
defaultMessage: 'Contact your admin and request access to view this content from {hostname}.',
|
|
518
|
+
description: 'Informs the user to contact the website administrator to request access to a product'
|
|
519
|
+
},
|
|
520
|
+
not_found_description_crossjoin: {
|
|
521
|
+
id: 'fabric.linking.not_found_description_crossjoin',
|
|
522
|
+
defaultMessage: "The page doesn't exist or it may have changed after this link was added.",
|
|
523
|
+
description: 'Error case for when a provided item is not found within the list of items'
|
|
524
|
+
},
|
|
525
|
+
not_found_title_crossjoin: {
|
|
526
|
+
id: 'fabric.linking.not_found_title_crossjoin',
|
|
527
|
+
defaultMessage: "We can't show you this {product} page",
|
|
528
|
+
description: 'Error case for when a provided link is not found'
|
|
457
529
|
}
|
|
530
|
+
|
|
531
|
+
// Pending designs:
|
|
532
|
+
// forbidden_access_crossjoin: {
|
|
533
|
+
// id: 'fabric.linking.forbidden_access_crossjoin',
|
|
534
|
+
// defaultMessage: 'Your access is forbidden',
|
|
535
|
+
// description:
|
|
536
|
+
// 'Shown when a user does not have access to a resource behind the link.',
|
|
537
|
+
// },
|
|
538
|
+
// forbidden_description_crossjoin: {
|
|
539
|
+
// id: 'fabric.linking.forbidden_description_crossjoin',
|
|
540
|
+
// defaultMessage:
|
|
541
|
+
// "You don't have access to this preview. Contact the site admin if you need access.",
|
|
542
|
+
// description: 'Informs the user that they cannot view this content.',
|
|
543
|
+
// },
|
|
458
544
|
});
|
|
@@ -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.28.
|
|
7
|
+
packageVersion: "26.28.2"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,12 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
4
|
import { messages } from '../../../messages';
|
|
5
|
-
export const ForbiddenAction = (handler, id = 'connect-other-account', message = messages.try_another_account,
|
|
5
|
+
export const ForbiddenAction = (handler, id = 'connect-other-account', message = messages.try_another_account, values = {}) => ({
|
|
6
6
|
id,
|
|
7
7
|
text: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, message, {
|
|
8
|
-
values:
|
|
9
|
-
context
|
|
10
|
-
}
|
|
8
|
+
values: values
|
|
11
9
|
})),
|
|
12
10
|
promise: () => new Promise(resolve => resolve(handler())),
|
|
13
11
|
buttonAppearance: 'default'
|
|
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
8
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
const PACKAGE_DATA = {
|
|
10
10
|
packageName: "@atlaskit/smart-card",
|
|
11
|
-
packageVersion: "26.28.
|
|
11
|
+
packageVersion: "26.28.2",
|
|
12
12
|
componentName: 'linkUrl'
|
|
13
13
|
};
|
|
14
14
|
const Link = withLinkClickedEvent('a');
|
|
@@ -15,7 +15,9 @@ export var extractRequestAccessContext = function extractRequestAccessContext(_r
|
|
|
15
15
|
descriptiveMessageKey: 'click_to_join_description',
|
|
16
16
|
action: ForbiddenAction(function () {
|
|
17
17
|
return window.open(url);
|
|
18
|
-
}, 'click_to_join', messages.click_to_join,
|
|
18
|
+
}, 'click_to_join', messages.click_to_join, {
|
|
19
|
+
context: context
|
|
20
|
+
})
|
|
19
21
|
});
|
|
20
22
|
case 'REQUEST_ACCESS':
|
|
21
23
|
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
@@ -23,7 +25,9 @@ export var extractRequestAccessContext = function extractRequestAccessContext(_r
|
|
|
23
25
|
descriptiveMessageKey: 'request_access_description',
|
|
24
26
|
action: ForbiddenAction(function () {
|
|
25
27
|
return window.open(url);
|
|
26
|
-
}, 'request_access', messages.request_access,
|
|
28
|
+
}, 'request_access', messages.request_access, {
|
|
29
|
+
context: context
|
|
30
|
+
})
|
|
27
31
|
});
|
|
28
32
|
case 'PENDING_REQUEST_EXISTS':
|
|
29
33
|
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
@@ -40,4 +44,61 @@ export var extractRequestAccessContext = function extractRequestAccessContext(_r
|
|
|
40
44
|
default:
|
|
41
45
|
return jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess;
|
|
42
46
|
}
|
|
47
|
+
};
|
|
48
|
+
export var extractRequestAccessContextImproved = function extractRequestAccessContextImproved(_ref2) {
|
|
49
|
+
var _jsonLd$requestAccess2;
|
|
50
|
+
var jsonLd = _ref2.jsonLd,
|
|
51
|
+
url = _ref2.url,
|
|
52
|
+
product = _ref2.product;
|
|
53
|
+
switch (jsonLd === null || jsonLd === void 0 ? void 0 : (_jsonLd$requestAccess2 = jsonLd.requestAccess) === null || _jsonLd$requestAccess2 === void 0 ? void 0 : _jsonLd$requestAccess2.accessType) {
|
|
54
|
+
case 'DIRECT_ACCESS':
|
|
55
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
56
|
+
titleMessageKey: 'direct_access_title_crossjoin',
|
|
57
|
+
descriptiveMessageKey: 'direct_access_description_crossjoin',
|
|
58
|
+
callToActionMessageKey: 'direct_access_crossjoin',
|
|
59
|
+
action: ForbiddenAction(function () {
|
|
60
|
+
return window.open(url);
|
|
61
|
+
}, 'direct_access', messages.direct_access_crossjoin, {
|
|
62
|
+
product: product
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
case 'REQUEST_ACCESS':
|
|
66
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
67
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
68
|
+
descriptiveMessageKey: 'request_access_description_crossjoin',
|
|
69
|
+
callToActionMessageKey: 'request_access_crossjoin',
|
|
70
|
+
action: ForbiddenAction(function () {
|
|
71
|
+
return window.open(url);
|
|
72
|
+
}, 'request_access', messages.request_access_crossjoin)
|
|
73
|
+
});
|
|
74
|
+
case 'PENDING_REQUEST_EXISTS':
|
|
75
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
76
|
+
titleMessageKey: 'request_access_pending_title_crossjoin',
|
|
77
|
+
descriptiveMessageKey: 'request_access_pending_description_crossjoin',
|
|
78
|
+
callToActionMessageKey: 'request_access_pending_crossjoin',
|
|
79
|
+
action: ForbiddenAction(function () {
|
|
80
|
+
return window.open(url);
|
|
81
|
+
}, 'request_access_pending', messages.request_access_pending_crossjoin)
|
|
82
|
+
});
|
|
83
|
+
case 'DENIED_REQUEST_EXISTS':
|
|
84
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
85
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
86
|
+
descriptiveMessageKey: 'request_denied_description_crossjoin'
|
|
87
|
+
});
|
|
88
|
+
case 'ACCESS_EXISTS':
|
|
89
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
90
|
+
titleMessageKey: 'default_no_access_title_crossjoin',
|
|
91
|
+
descriptiveMessageKey: 'access_exists_description_crossjoin',
|
|
92
|
+
callToActionMessageKey: 'request_access_crossjoin',
|
|
93
|
+
action: ForbiddenAction(function () {
|
|
94
|
+
return window.open(url);
|
|
95
|
+
}, 'access_exists', messages.request_access_crossjoin)
|
|
96
|
+
});
|
|
97
|
+
case 'FORBIDDEN':
|
|
98
|
+
return _objectSpread(_objectSpread({}, jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess), {}, {
|
|
99
|
+
descriptiveMessageKey: 'forbidden_description'
|
|
100
|
+
});
|
|
101
|
+
default:
|
|
102
|
+
return jsonLd === null || jsonLd === void 0 ? void 0 : jsonLd.requestAccess;
|
|
103
|
+
}
|
|
43
104
|
};
|
package/dist/esm/messages.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { defineMessages } from 'react-intl-next';
|
|
2
|
+
|
|
3
|
+
// | 'forbidden_access_crossjoin'
|
|
4
|
+
// | 'forbidden_description_crossjoin';
|
|
2
5
|
export var messages = defineMessages({
|
|
3
6
|
actions: {
|
|
4
7
|
id: 'fabric.linking.actions',
|
|
@@ -454,5 +457,88 @@ export var messages = defineMessages({
|
|
|
454
457
|
id: 'fabric.linking.srclinkunknown',
|
|
455
458
|
defaultMessage: 'View Original',
|
|
456
459
|
description: "We have a link in our preview modals to the original document. This is for when we don't know the provider name"
|
|
460
|
+
},
|
|
461
|
+
/**
|
|
462
|
+
* Temp messages to put behind a feature flag for the cross join stream, replace the messages with the message of the same
|
|
463
|
+
* title (without _crossjoin) during cleanup in EDM-7977 [https://product-fabric.atlassian.net/browse/EDM-7977].
|
|
464
|
+
*/
|
|
465
|
+
default_no_access_title_crossjoin: {
|
|
466
|
+
id: 'fabric.linking.no_access_title_crossjoin',
|
|
467
|
+
defaultMessage: "You don't have access to this content",
|
|
468
|
+
description: 'Informs the user that they dont have access to certain content'
|
|
469
|
+
},
|
|
470
|
+
direct_access_title_crossjoin: {
|
|
471
|
+
id: 'fabric.linking.direct_access_title_crossjoin',
|
|
472
|
+
defaultMessage: 'Join your team in {product}',
|
|
473
|
+
description: 'Informs the user that they have access to this product, and can sign up or join right away.'
|
|
474
|
+
},
|
|
475
|
+
direct_access_description_crossjoin: {
|
|
476
|
+
id: 'fabric.linking.direct_access_description_crossjoin',
|
|
477
|
+
defaultMessage: 'All {emailDomain} emails are approved to access {hostname} in {product}.',
|
|
478
|
+
description: 'Informs the user that they have access to this product, and can sign up or join right away.'
|
|
479
|
+
},
|
|
480
|
+
direct_access_crossjoin: {
|
|
481
|
+
id: 'fabric.linking.direct_access_crossjoin',
|
|
482
|
+
defaultMessage: 'Go to {product}',
|
|
483
|
+
description: 'Allows the user join the product or service immediately'
|
|
484
|
+
},
|
|
485
|
+
request_access_description_crossjoin: {
|
|
486
|
+
id: 'fabric.linking.request_access_description_crossjoin',
|
|
487
|
+
defaultMessage: 'Contact your admin to request access.',
|
|
488
|
+
description: 'Informs the user to request access to a product by talking to the website administrator'
|
|
489
|
+
},
|
|
490
|
+
request_access_crossjoin: {
|
|
491
|
+
id: 'fabric.linking.request_access_crossjoin',
|
|
492
|
+
defaultMessage: 'Request access',
|
|
493
|
+
description: 'Allows the user to request access to a product or service'
|
|
494
|
+
},
|
|
495
|
+
request_access_pending_title_crossjoin: {
|
|
496
|
+
id: 'fabric.linking.request_access_pending_title_crossjoin',
|
|
497
|
+
defaultMessage: 'Access to {product} pending',
|
|
498
|
+
description: 'Informs the user that their request to view this content is pending'
|
|
499
|
+
},
|
|
500
|
+
request_access_pending_description_crossjoin: {
|
|
501
|
+
id: 'fabric.linking.request_access_pending_description_crossjoin',
|
|
502
|
+
defaultMessage: 'Your request to access {hostname} is awaiting admin approval.',
|
|
503
|
+
description: 'Informs the user that their request to view this content is pending website administrator approval'
|
|
504
|
+
},
|
|
505
|
+
request_access_pending_crossjoin: {
|
|
506
|
+
id: 'fabric.linking.request_access_pending_crossjoin',
|
|
507
|
+
defaultMessage: 'Pending approval',
|
|
508
|
+
description: 'Informs the user that their request to view this content is pending'
|
|
509
|
+
},
|
|
510
|
+
request_denied_description_crossjoin: {
|
|
511
|
+
id: 'fabric.linking.request_denied_description_crossjoin',
|
|
512
|
+
defaultMessage: "Your admin didn't approve your request to view {product} pages from {hostname}.",
|
|
513
|
+
description: 'Informs the user that their request to view this content was denied'
|
|
514
|
+
},
|
|
515
|
+
access_exists_description_crossjoin: {
|
|
516
|
+
id: 'fabric.linking.access_exists_description',
|
|
517
|
+
defaultMessage: 'Contact your admin and request access to view this content from {hostname}.',
|
|
518
|
+
description: 'Informs the user to contact the website administrator to request access to a product'
|
|
519
|
+
},
|
|
520
|
+
not_found_description_crossjoin: {
|
|
521
|
+
id: 'fabric.linking.not_found_description_crossjoin',
|
|
522
|
+
defaultMessage: "The page doesn't exist or it may have changed after this link was added.",
|
|
523
|
+
description: 'Error case for when a provided item is not found within the list of items'
|
|
524
|
+
},
|
|
525
|
+
not_found_title_crossjoin: {
|
|
526
|
+
id: 'fabric.linking.not_found_title_crossjoin',
|
|
527
|
+
defaultMessage: "We can't show you this {product} page",
|
|
528
|
+
description: 'Error case for when a provided link is not found'
|
|
457
529
|
}
|
|
530
|
+
|
|
531
|
+
// Pending designs:
|
|
532
|
+
// forbidden_access_crossjoin: {
|
|
533
|
+
// id: 'fabric.linking.forbidden_access_crossjoin',
|
|
534
|
+
// defaultMessage: 'Your access is forbidden',
|
|
535
|
+
// description:
|
|
536
|
+
// 'Shown when a user does not have access to a resource behind the link.',
|
|
537
|
+
// },
|
|
538
|
+
// forbidden_description_crossjoin: {
|
|
539
|
+
// id: 'fabric.linking.forbidden_description_crossjoin',
|
|
540
|
+
// defaultMessage:
|
|
541
|
+
// "You don't have access to this preview. Contact the site admin if you need access.",
|
|
542
|
+
// description: 'Informs the user that they cannot view this content.',
|
|
543
|
+
// },
|
|
458
544
|
});
|
|
@@ -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.28.
|
|
18
|
+
packageVersion: "26.28.2"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,13 +5,11 @@ import { messages } from '../../../messages';
|
|
|
5
5
|
export var ForbiddenAction = function ForbiddenAction(handler) {
|
|
6
6
|
var id = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'connect-other-account';
|
|
7
7
|
var message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : messages.try_another_account;
|
|
8
|
-
var
|
|
8
|
+
var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
9
9
|
return {
|
|
10
10
|
id: id,
|
|
11
11
|
text: /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, message, {
|
|
12
|
-
values:
|
|
13
|
-
context: context
|
|
14
|
-
}
|
|
12
|
+
values: values
|
|
15
13
|
})),
|
|
16
14
|
promise: function promise() {
|
|
17
15
|
return new Promise(function (resolve) {
|
|
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
11
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
var PACKAGE_DATA = {
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "26.28.
|
|
14
|
+
packageVersion: "26.28.2",
|
|
15
15
|
componentName: 'linkUrl'
|
|
16
16
|
};
|
|
17
17
|
var Link = withLinkClickedEvent('a');
|
|
@@ -5,3 +5,8 @@ export declare const extractRequestAccessContext: ({ jsonLd, url, context, }: {
|
|
|
5
5
|
url: string;
|
|
6
6
|
context?: string | undefined;
|
|
7
7
|
}) => RequestAccessContextProps;
|
|
8
|
+
export declare const extractRequestAccessContextImproved: ({ jsonLd, url, product, }: {
|
|
9
|
+
jsonLd: JsonLd.Meta.BaseMeta;
|
|
10
|
+
url: string;
|
|
11
|
+
product: string;
|
|
12
|
+
}) => RequestAccessContextProps;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageDescriptor } from 'react-intl-next';
|
|
2
|
-
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_description' | 'request_denied_description';
|
|
2
|
+
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title_crossjoin' | 'direct_access_title_crossjoin' | 'direct_access_description_crossjoin' | 'direct_access_crossjoin' | 'request_access_description_crossjoin' | 'request_access_crossjoin' | 'request_access_pending_title_crossjoin' | 'request_access_pending_description_crossjoin' | 'request_access_pending_crossjoin' | 'request_denied_description_crossjoin' | 'access_exists_description_crossjoin' | 'not_found_description_crossjoin' | 'not_found_title_crossjoin';
|
|
3
3
|
export type MessageKey = 'assigned_to' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'could_not_load_link' | 'download' | 'follow' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ActionProps } from '../components/Action';
|
|
2
|
-
export declare const ForbiddenAction: (handler: () => void, id?: string, message?: import("react-intl-next").MessageDescriptor,
|
|
2
|
+
export declare const ForbiddenAction: (handler: () => void, id?: string, message?: import("react-intl-next").MessageDescriptor, values?: {}) => ActionProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PopupComponentProps } from '@atlaskit/popup';
|
|
4
|
-
declare const CustomPopupContainer: React.ForwardRefExoticComponent<Pick<PopupComponentProps, "children" | "style" | "id" | "tabIndex" | "data-testid" | "data-placement"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CustomPopupContainer: React.ForwardRefExoticComponent<Pick<PopupComponentProps, "children" | "style" | "id" | "tabIndex" | "data-testid" | "shouldRenderToParent" | "data-placement"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default CustomPopupContainer;
|
|
@@ -20,6 +20,7 @@ export interface RequestAccessContextProps extends AccessContext {
|
|
|
20
20
|
action?: ActionProps;
|
|
21
21
|
callToActionMessageKey?: RequestAccessMessageKey;
|
|
22
22
|
descriptiveMessageKey?: RequestAccessMessageKey;
|
|
23
|
+
titleMessageKey?: RequestAccessMessageKey;
|
|
23
24
|
}
|
|
24
25
|
export type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
|
|
25
26
|
export type ErrorCardType = 'errored' | 'fallback' | 'forbidden' | 'not_found' | 'unauthorized';
|
|
@@ -5,3 +5,8 @@ export declare const extractRequestAccessContext: ({ jsonLd, url, context, }: {
|
|
|
5
5
|
url: string;
|
|
6
6
|
context?: string | undefined;
|
|
7
7
|
}) => RequestAccessContextProps;
|
|
8
|
+
export declare const extractRequestAccessContextImproved: ({ jsonLd, url, product, }: {
|
|
9
|
+
jsonLd: JsonLd.Meta.BaseMeta;
|
|
10
|
+
url: string;
|
|
11
|
+
product: string;
|
|
12
|
+
}) => RequestAccessContextProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageDescriptor } from 'react-intl-next';
|
|
2
|
-
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_description' | 'request_denied_description';
|
|
2
|
+
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title_crossjoin' | 'direct_access_title_crossjoin' | 'direct_access_description_crossjoin' | 'direct_access_crossjoin' | 'request_access_description_crossjoin' | 'request_access_crossjoin' | 'request_access_pending_title_crossjoin' | 'request_access_pending_description_crossjoin' | 'request_access_pending_crossjoin' | 'request_denied_description_crossjoin' | 'access_exists_description_crossjoin' | 'not_found_description_crossjoin' | 'not_found_title_crossjoin';
|
|
3
3
|
export type MessageKey = 'assigned_to' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'could_not_load_link' | 'download' | 'follow' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey;
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ActionProps } from '../components/Action';
|
|
2
|
-
export declare const ForbiddenAction: (handler: () => void, id?: string, message?: import("react-intl-next").MessageDescriptor,
|
|
2
|
+
export declare const ForbiddenAction: (handler: () => void, id?: string, message?: import("react-intl-next").MessageDescriptor, values?: {}) => ActionProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { PopupComponentProps } from '@atlaskit/popup';
|
|
4
|
-
declare const CustomPopupContainer: React.ForwardRefExoticComponent<Pick<PopupComponentProps, "children" | "style" | "id" | "tabIndex" | "data-testid" | "data-placement"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CustomPopupContainer: React.ForwardRefExoticComponent<Pick<PopupComponentProps, "children" | "style" | "id" | "tabIndex" | "data-testid" | "shouldRenderToParent" | "data-placement"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export default CustomPopupContainer;
|
|
@@ -20,6 +20,7 @@ export interface RequestAccessContextProps extends AccessContext {
|
|
|
20
20
|
action?: ActionProps;
|
|
21
21
|
callToActionMessageKey?: RequestAccessMessageKey;
|
|
22
22
|
descriptiveMessageKey?: RequestAccessMessageKey;
|
|
23
|
+
titleMessageKey?: RequestAccessMessageKey;
|
|
23
24
|
}
|
|
24
25
|
export type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
|
|
25
26
|
export type ErrorCardType = 'errored' | 'fallback' | 'forbidden' | 'not_found' | 'unauthorized';
|