@atlaskit/smart-card 25.0.5 → 25.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/i18n/ja.js +5 -5
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +1 -0
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +21 -13
- package/dist/cjs/view/InlineCard/index.js +7 -2
- package/dist/es2019/i18n/ja.js +5 -5
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +1 -0
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +7 -0
- package/dist/es2019/view/InlineCard/index.js +6 -1
- package/dist/esm/i18n/ja.js +5 -5
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/CardWithUrl/component.js +1 -0
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +21 -13
- package/dist/esm/view/InlineCard/index.js +7 -2
- package/dist/types/extractors/common/__mocks__/jsonld.d.ts +2 -95
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +5 -0
- package/dist/types/view/InlineCard/types.d.ts +2 -0
- package/package.json +5 -5
- package/report.api.md +1 -1
- package/dist/types/view/__mocks__/intersection-observer.d.ts +0 -26
- package/dist/types/view/__mocks__/intersection-observer.mock.d.ts +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 25.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0af4a6b6426`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0af4a6b6426) - Dependency update json-ld-types@3.4.0
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 25.0.6
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`c85ee838eae`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c85ee838eae) - [ux] Added analytics event 'appAccount authStarted' for inline smart card
|
|
15
|
+
|
|
3
16
|
## 25.0.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/i18n/ja.js
CHANGED
|
@@ -45,7 +45,7 @@ var _default = {
|
|
|
45
45
|
'fabric.linking.invalid_permissions': '制限付きコンテンツ',
|
|
46
46
|
'fabric.linking.invalid_permissions_description': 'このプレビューを表示するには、アクセスをリクエストするか別のアカウントで試してください。',
|
|
47
47
|
'fabric.linking.join_to_view': '{context}に参加してこの課題を見る',
|
|
48
|
-
'fabric.linking.learn_more_about_smart_links': '
|
|
48
|
+
'fabric.linking.learn_more_about_smart_links': 'スマート リンクの詳細',
|
|
49
49
|
'fabric.linking.link_safety_warning_message': 'リンク {unsafeLinkText} をクリックすると別のサイトが開きます。<a>実際のリンク先</a>',
|
|
50
50
|
'fabric.linking.loading': '読み込み中…',
|
|
51
51
|
'fabric.linking.modified_on_absolute': '更新日: {context}',
|
|
@@ -60,15 +60,15 @@ var _default = {
|
|
|
60
60
|
'fabric.linking.preview_max_size': '全画面表示',
|
|
61
61
|
'fabric.linking.preview_min_size': '全画面表示を閉じる',
|
|
62
62
|
'fabric.linking.priority_blocker': 'ブロッカー',
|
|
63
|
-
'fabric.linking.priority_critical': '
|
|
63
|
+
'fabric.linking.priority_critical': 'クリティカル',
|
|
64
64
|
'fabric.linking.priority_high': '高',
|
|
65
65
|
'fabric.linking.priority_highest': '最高',
|
|
66
66
|
'fabric.linking.priority_low': '低',
|
|
67
67
|
'fabric.linking.priority_lowest': '最低',
|
|
68
|
-
'fabric.linking.priority_major': '
|
|
68
|
+
'fabric.linking.priority_major': 'メジャー',
|
|
69
69
|
'fabric.linking.priority_medium': '中',
|
|
70
|
-
'fabric.linking.priority_minor': '
|
|
71
|
-
'fabric.linking.priority_trivial': '
|
|
70
|
+
'fabric.linking.priority_minor': 'マイナー',
|
|
71
|
+
'fabric.linking.priority_trivial': '軽度',
|
|
72
72
|
'fabric.linking.priority_undefined': '未定義',
|
|
73
73
|
'fabric.linking.request_access': 'アクセスをリクエスト',
|
|
74
74
|
'fabric.linking.request_access_description': 'このプレビューを表示するための{context}へのアクセスをリクエストします。',
|
package/dist/cjs/version.json
CHANGED
|
@@ -42,15 +42,23 @@ var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component) {
|
|
|
42
42
|
}
|
|
43
43
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
44
44
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleConnectAccount", function (event) {
|
|
45
|
-
var
|
|
45
|
+
var _this$props = _this.props,
|
|
46
|
+
analytics = _this$props.analytics,
|
|
47
|
+
extensionKey = _this$props.extensionKey,
|
|
48
|
+
onAuthorise = _this$props.onAuthorise;
|
|
46
49
|
event.preventDefault();
|
|
47
50
|
event.stopPropagation();
|
|
51
|
+
if (onAuthorise) {
|
|
52
|
+
analytics === null || analytics === void 0 ? void 0 : analytics.track.appAccountAuthStarted({
|
|
53
|
+
extensionKey: extensionKey
|
|
54
|
+
});
|
|
55
|
+
}
|
|
48
56
|
return onAuthorise();
|
|
49
57
|
});
|
|
50
58
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderRightSide", function () {
|
|
51
|
-
var _this$
|
|
52
|
-
onAuthorise = _this$
|
|
53
|
-
context = _this$
|
|
59
|
+
var _this$props2 = _this.props,
|
|
60
|
+
onAuthorise = _this$props2.onAuthorise,
|
|
61
|
+
context = _this$props2.context;
|
|
54
62
|
return onAuthorise ? /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
|
|
55
63
|
spacing: "none",
|
|
56
64
|
appearance: "subtle-link",
|
|
@@ -68,15 +76,15 @@ var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component) {
|
|
|
68
76
|
(0, _createClass2.default)(InlineCardUnauthorizedView, [{
|
|
69
77
|
key: "render",
|
|
70
78
|
value: function render() {
|
|
71
|
-
var _this$
|
|
72
|
-
url = _this$
|
|
73
|
-
icon = _this$
|
|
74
|
-
onClick = _this$
|
|
75
|
-
isSelected = _this$
|
|
76
|
-
_this$
|
|
77
|
-
testId = _this$
|
|
78
|
-
_this$
|
|
79
|
-
showAuthTooltip = _this$
|
|
79
|
+
var _this$props3 = this.props,
|
|
80
|
+
url = _this$props3.url,
|
|
81
|
+
icon = _this$props3.icon,
|
|
82
|
+
onClick = _this$props3.onClick,
|
|
83
|
+
isSelected = _this$props3.isSelected,
|
|
84
|
+
_this$props3$testId = _this$props3.testId,
|
|
85
|
+
testId = _this$props3$testId === void 0 ? 'inline-card-unauthorized-view' : _this$props3$testId,
|
|
86
|
+
_this$props3$showAuth = _this$props3.showAuthTooltip,
|
|
87
|
+
showAuthTooltip = _this$props3$showAuth === void 0 ? false : _this$props3$showAuth;
|
|
80
88
|
var inlineCardUnauthenticatedView = /*#__PURE__*/_react.default.createElement(_Frame.Frame, {
|
|
81
89
|
testId: testId,
|
|
82
90
|
isSelected: isSelected
|
|
@@ -48,9 +48,11 @@ var _ResolvingView = require("./ResolvingView");
|
|
|
48
48
|
var _UnauthorisedView = require("./UnauthorisedView");
|
|
49
49
|
var _extractors = require("@atlaskit/linking-common/extractors");
|
|
50
50
|
var _linkProvider = require("@atlaskit/link-provider");
|
|
51
|
+
var _helpers = require("../../state/helpers");
|
|
51
52
|
var InlineCard = function InlineCard(_ref) {
|
|
52
53
|
var _details$meta;
|
|
53
|
-
var
|
|
54
|
+
var analytics = _ref.analytics,
|
|
55
|
+
id = _ref.id,
|
|
54
56
|
url = _ref.url,
|
|
55
57
|
cardState = _ref.cardState,
|
|
56
58
|
handleAuthorize = _ref.handleAuthorize,
|
|
@@ -66,6 +68,7 @@ var InlineCard = function InlineCard(_ref) {
|
|
|
66
68
|
var status = cardState.status,
|
|
67
69
|
details = cardState.details;
|
|
68
70
|
var cardDetails = details && details.data || (0, _jsonld.getEmptyJsonLd)();
|
|
71
|
+
var extensionKey = (0, _helpers.getExtensionKey)(details);
|
|
69
72
|
var testIdWithStatus = testId ? "".concat(testId, "-").concat(status, "-view") : undefined;
|
|
70
73
|
var showHoverPreviewFlag = (0, _linkProvider.useFeatureFlag)('showHoverPreview');
|
|
71
74
|
if (showHoverPreview === undefined && showHoverPreviewFlag !== undefined) {
|
|
@@ -114,7 +117,9 @@ var InlineCard = function InlineCard(_ref) {
|
|
|
114
117
|
onAuthorise: handleAuthorize,
|
|
115
118
|
testId: testIdWithStatus,
|
|
116
119
|
showAuthTooltip: showAuthTooltip,
|
|
117
|
-
id: id
|
|
120
|
+
id: id,
|
|
121
|
+
analytics: analytics,
|
|
122
|
+
extensionKey: extensionKey
|
|
118
123
|
});
|
|
119
124
|
case 'forbidden':
|
|
120
125
|
if (onError) {
|
package/dist/es2019/i18n/ja.js
CHANGED
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
'fabric.linking.invalid_permissions': '制限付きコンテンツ',
|
|
40
40
|
'fabric.linking.invalid_permissions_description': 'このプレビューを表示するには、アクセスをリクエストするか別のアカウントで試してください。',
|
|
41
41
|
'fabric.linking.join_to_view': '{context}に参加してこの課題を見る',
|
|
42
|
-
'fabric.linking.learn_more_about_smart_links': '
|
|
42
|
+
'fabric.linking.learn_more_about_smart_links': 'スマート リンクの詳細',
|
|
43
43
|
'fabric.linking.link_safety_warning_message': 'リンク {unsafeLinkText} をクリックすると別のサイトが開きます。<a>実際のリンク先</a>',
|
|
44
44
|
'fabric.linking.loading': '読み込み中…',
|
|
45
45
|
'fabric.linking.modified_on_absolute': '更新日: {context}',
|
|
@@ -54,15 +54,15 @@ export default {
|
|
|
54
54
|
'fabric.linking.preview_max_size': '全画面表示',
|
|
55
55
|
'fabric.linking.preview_min_size': '全画面表示を閉じる',
|
|
56
56
|
'fabric.linking.priority_blocker': 'ブロッカー',
|
|
57
|
-
'fabric.linking.priority_critical': '
|
|
57
|
+
'fabric.linking.priority_critical': 'クリティカル',
|
|
58
58
|
'fabric.linking.priority_high': '高',
|
|
59
59
|
'fabric.linking.priority_highest': '最高',
|
|
60
60
|
'fabric.linking.priority_low': '低',
|
|
61
61
|
'fabric.linking.priority_lowest': '最低',
|
|
62
|
-
'fabric.linking.priority_major': '
|
|
62
|
+
'fabric.linking.priority_major': 'メジャー',
|
|
63
63
|
'fabric.linking.priority_medium': '中',
|
|
64
|
-
'fabric.linking.priority_minor': '
|
|
65
|
-
'fabric.linking.priority_trivial': '
|
|
64
|
+
'fabric.linking.priority_minor': 'マイナー',
|
|
65
|
+
'fabric.linking.priority_trivial': '軽度',
|
|
66
66
|
'fabric.linking.priority_undefined': '未定義',
|
|
67
67
|
'fabric.linking.request_access': 'アクセスをリクエスト',
|
|
68
68
|
'fabric.linking.request_access_description': 'このプレビューを表示するための{context}へのアクセスをリクエストします。',
|
package/dist/es2019/version.json
CHANGED
|
@@ -21,10 +21,17 @@ export class InlineCardUnauthorizedView extends React.Component {
|
|
|
21
21
|
super(...args);
|
|
22
22
|
_defineProperty(this, "handleConnectAccount", event => {
|
|
23
23
|
const {
|
|
24
|
+
analytics,
|
|
25
|
+
extensionKey,
|
|
24
26
|
onAuthorise
|
|
25
27
|
} = this.props;
|
|
26
28
|
event.preventDefault();
|
|
27
29
|
event.stopPropagation();
|
|
30
|
+
if (onAuthorise) {
|
|
31
|
+
analytics === null || analytics === void 0 ? void 0 : analytics.track.appAccountAuthStarted({
|
|
32
|
+
extensionKey
|
|
33
|
+
});
|
|
34
|
+
}
|
|
28
35
|
return onAuthorise();
|
|
29
36
|
});
|
|
30
37
|
_defineProperty(this, "renderRightSide", () => {
|
|
@@ -11,8 +11,10 @@ import { InlineCardResolvingView } from './ResolvingView';
|
|
|
11
11
|
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
12
12
|
import { extractProvider } from '@atlaskit/linking-common/extractors';
|
|
13
13
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
14
|
+
import { getExtensionKey } from '../../state/helpers';
|
|
14
15
|
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView };
|
|
15
16
|
export const InlineCard = ({
|
|
17
|
+
analytics,
|
|
16
18
|
id,
|
|
17
19
|
url,
|
|
18
20
|
cardState,
|
|
@@ -33,6 +35,7 @@ export const InlineCard = ({
|
|
|
33
35
|
details
|
|
34
36
|
} = cardState;
|
|
35
37
|
const cardDetails = details && details.data || getEmptyJsonLd();
|
|
38
|
+
const extensionKey = getExtensionKey(details);
|
|
36
39
|
const testIdWithStatus = testId ? `${testId}-${status}-view` : undefined;
|
|
37
40
|
const showHoverPreviewFlag = useFeatureFlag('showHoverPreview');
|
|
38
41
|
if (showHoverPreview === undefined && showHoverPreviewFlag !== undefined) {
|
|
@@ -81,7 +84,9 @@ export const InlineCard = ({
|
|
|
81
84
|
onAuthorise: handleAuthorize,
|
|
82
85
|
testId: testIdWithStatus,
|
|
83
86
|
showAuthTooltip: showAuthTooltip,
|
|
84
|
-
id: id
|
|
87
|
+
id: id,
|
|
88
|
+
analytics: analytics,
|
|
89
|
+
extensionKey: extensionKey
|
|
85
90
|
});
|
|
86
91
|
case 'forbidden':
|
|
87
92
|
if (onError) {
|
package/dist/esm/i18n/ja.js
CHANGED
|
@@ -39,7 +39,7 @@ export default {
|
|
|
39
39
|
'fabric.linking.invalid_permissions': '制限付きコンテンツ',
|
|
40
40
|
'fabric.linking.invalid_permissions_description': 'このプレビューを表示するには、アクセスをリクエストするか別のアカウントで試してください。',
|
|
41
41
|
'fabric.linking.join_to_view': '{context}に参加してこの課題を見る',
|
|
42
|
-
'fabric.linking.learn_more_about_smart_links': '
|
|
42
|
+
'fabric.linking.learn_more_about_smart_links': 'スマート リンクの詳細',
|
|
43
43
|
'fabric.linking.link_safety_warning_message': 'リンク {unsafeLinkText} をクリックすると別のサイトが開きます。<a>実際のリンク先</a>',
|
|
44
44
|
'fabric.linking.loading': '読み込み中…',
|
|
45
45
|
'fabric.linking.modified_on_absolute': '更新日: {context}',
|
|
@@ -54,15 +54,15 @@ export default {
|
|
|
54
54
|
'fabric.linking.preview_max_size': '全画面表示',
|
|
55
55
|
'fabric.linking.preview_min_size': '全画面表示を閉じる',
|
|
56
56
|
'fabric.linking.priority_blocker': 'ブロッカー',
|
|
57
|
-
'fabric.linking.priority_critical': '
|
|
57
|
+
'fabric.linking.priority_critical': 'クリティカル',
|
|
58
58
|
'fabric.linking.priority_high': '高',
|
|
59
59
|
'fabric.linking.priority_highest': '最高',
|
|
60
60
|
'fabric.linking.priority_low': '低',
|
|
61
61
|
'fabric.linking.priority_lowest': '最低',
|
|
62
|
-
'fabric.linking.priority_major': '
|
|
62
|
+
'fabric.linking.priority_major': 'メジャー',
|
|
63
63
|
'fabric.linking.priority_medium': '中',
|
|
64
|
-
'fabric.linking.priority_minor': '
|
|
65
|
-
'fabric.linking.priority_trivial': '
|
|
64
|
+
'fabric.linking.priority_minor': 'マイナー',
|
|
65
|
+
'fabric.linking.priority_trivial': '軽度',
|
|
66
66
|
'fabric.linking.priority_undefined': '未定義',
|
|
67
67
|
'fabric.linking.request_access': 'アクセスをリクエスト',
|
|
68
68
|
'fabric.linking.request_access_description': 'このプレビューを表示するための{context}へのアクセスをリクエストします。',
|
package/dist/esm/version.json
CHANGED
|
@@ -35,15 +35,23 @@ export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component)
|
|
|
35
35
|
}
|
|
36
36
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
37
37
|
_defineProperty(_assertThisInitialized(_this), "handleConnectAccount", function (event) {
|
|
38
|
-
var
|
|
38
|
+
var _this$props = _this.props,
|
|
39
|
+
analytics = _this$props.analytics,
|
|
40
|
+
extensionKey = _this$props.extensionKey,
|
|
41
|
+
onAuthorise = _this$props.onAuthorise;
|
|
39
42
|
event.preventDefault();
|
|
40
43
|
event.stopPropagation();
|
|
44
|
+
if (onAuthorise) {
|
|
45
|
+
analytics === null || analytics === void 0 ? void 0 : analytics.track.appAccountAuthStarted({
|
|
46
|
+
extensionKey: extensionKey
|
|
47
|
+
});
|
|
48
|
+
}
|
|
41
49
|
return onAuthorise();
|
|
42
50
|
});
|
|
43
51
|
_defineProperty(_assertThisInitialized(_this), "renderRightSide", function () {
|
|
44
|
-
var _this$
|
|
45
|
-
onAuthorise = _this$
|
|
46
|
-
context = _this$
|
|
52
|
+
var _this$props2 = _this.props,
|
|
53
|
+
onAuthorise = _this$props2.onAuthorise,
|
|
54
|
+
context = _this$props2.context;
|
|
47
55
|
return onAuthorise ? /*#__PURE__*/React.createElement(Button, {
|
|
48
56
|
spacing: "none",
|
|
49
57
|
appearance: "subtle-link",
|
|
@@ -61,15 +69,15 @@ export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component)
|
|
|
61
69
|
_createClass(InlineCardUnauthorizedView, [{
|
|
62
70
|
key: "render",
|
|
63
71
|
value: function render() {
|
|
64
|
-
var _this$
|
|
65
|
-
url = _this$
|
|
66
|
-
icon = _this$
|
|
67
|
-
onClick = _this$
|
|
68
|
-
isSelected = _this$
|
|
69
|
-
_this$
|
|
70
|
-
testId = _this$
|
|
71
|
-
_this$
|
|
72
|
-
showAuthTooltip = _this$
|
|
72
|
+
var _this$props3 = this.props,
|
|
73
|
+
url = _this$props3.url,
|
|
74
|
+
icon = _this$props3.icon,
|
|
75
|
+
onClick = _this$props3.onClick,
|
|
76
|
+
isSelected = _this$props3.isSelected,
|
|
77
|
+
_this$props3$testId = _this$props3.testId,
|
|
78
|
+
testId = _this$props3$testId === void 0 ? 'inline-card-unauthorized-view' : _this$props3$testId,
|
|
79
|
+
_this$props3$showAuth = _this$props3.showAuthTooltip,
|
|
80
|
+
showAuthTooltip = _this$props3$showAuth === void 0 ? false : _this$props3$showAuth;
|
|
73
81
|
var inlineCardUnauthenticatedView = /*#__PURE__*/React.createElement(Frame, {
|
|
74
82
|
testId: testId,
|
|
75
83
|
isSelected: isSelected
|
|
@@ -11,10 +11,12 @@ import { InlineCardResolvingView } from './ResolvingView';
|
|
|
11
11
|
import { InlineCardUnauthorizedView } from './UnauthorisedView';
|
|
12
12
|
import { extractProvider } from '@atlaskit/linking-common/extractors';
|
|
13
13
|
import { useFeatureFlag } from '@atlaskit/link-provider';
|
|
14
|
+
import { getExtensionKey } from '../../state/helpers';
|
|
14
15
|
export { InlineCardResolvedView, InlineCardResolvingView, InlineCardErroredView, InlineCardForbiddenView, InlineCardUnauthorizedView };
|
|
15
16
|
export var InlineCard = function InlineCard(_ref) {
|
|
16
17
|
var _details$meta;
|
|
17
|
-
var
|
|
18
|
+
var analytics = _ref.analytics,
|
|
19
|
+
id = _ref.id,
|
|
18
20
|
url = _ref.url,
|
|
19
21
|
cardState = _ref.cardState,
|
|
20
22
|
handleAuthorize = _ref.handleAuthorize,
|
|
@@ -30,6 +32,7 @@ export var InlineCard = function InlineCard(_ref) {
|
|
|
30
32
|
var status = cardState.status,
|
|
31
33
|
details = cardState.details;
|
|
32
34
|
var cardDetails = details && details.data || getEmptyJsonLd();
|
|
35
|
+
var extensionKey = getExtensionKey(details);
|
|
33
36
|
var testIdWithStatus = testId ? "".concat(testId, "-").concat(status, "-view") : undefined;
|
|
34
37
|
var showHoverPreviewFlag = useFeatureFlag('showHoverPreview');
|
|
35
38
|
if (showHoverPreview === undefined && showHoverPreviewFlag !== undefined) {
|
|
@@ -78,7 +81,9 @@ export var InlineCard = function InlineCard(_ref) {
|
|
|
78
81
|
onAuthorise: handleAuthorize,
|
|
79
82
|
testId: testIdWithStatus,
|
|
80
83
|
showAuthTooltip: showAuthTooltip,
|
|
81
|
-
id: id
|
|
84
|
+
id: id,
|
|
85
|
+
analytics: analytics,
|
|
86
|
+
extensionKey: extensionKey
|
|
82
87
|
});
|
|
83
88
|
case 'forbidden':
|
|
84
89
|
if (onError) {
|
|
@@ -254,98 +254,5 @@ export declare const TEST_DOCUMENT_WITH_PREVIEW: {
|
|
|
254
254
|
summaryMap?: Record<string, string> | undefined;
|
|
255
255
|
updated?: string | undefined;
|
|
256
256
|
};
|
|
257
|
-
export declare const TEST_DATA_WITH_LATEST_COMMIT_OBJ:
|
|
258
|
-
|
|
259
|
-
'@type': string;
|
|
260
|
-
name: string;
|
|
261
|
-
};
|
|
262
|
-
'@context': JsonLd.Primitives.Context;
|
|
263
|
-
'@type': JsonLd.Primitives.Property<JsonLd.Primitives.ObjectType>;
|
|
264
|
-
'schema:potentialAction'?: import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").DeleteAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | import("schema-dts").WatchAction | import("schema-dts").DownloadAction | import("schema-dts").ViewAction | (import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").DeleteAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | import("schema-dts").WatchAction | import("schema-dts").DownloadAction | import("schema-dts").ViewAction)[] | undefined;
|
|
265
|
-
'atlassian:downloadUrl'?: string | undefined;
|
|
266
|
-
'atlassian:visitUrl'?: string | undefined;
|
|
267
|
-
'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
|
|
268
|
-
'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | JsonLd.Primitives.Collection<JsonLd.Primitives.Link | JsonLd.Primitives.Person<any>> | undefined;
|
|
269
|
-
'schema:dateCreated'?: string | undefined;
|
|
270
|
-
'@id'?: string | undefined;
|
|
271
|
-
attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
272
|
-
attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
|
|
273
|
-
actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
274
|
-
}> | undefined;
|
|
275
|
-
audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
276
|
-
bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
277
|
-
bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
278
|
-
cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
279
|
-
context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
280
|
-
generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
281
|
-
icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
282
|
-
image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
283
|
-
inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
284
|
-
location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
285
|
-
oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
286
|
-
anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
287
|
-
closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
288
|
-
preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
|
|
289
|
-
replies?: JsonLd.Primitives.Collection<any> | undefined;
|
|
290
|
-
tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
291
|
-
to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
292
|
-
url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
|
|
293
|
-
content?: string | undefined;
|
|
294
|
-
contentMap?: Record<string, string> | undefined;
|
|
295
|
-
name?: string | undefined;
|
|
296
|
-
nameMap?: Record<string, string> | undefined;
|
|
297
|
-
duration?: string | undefined;
|
|
298
|
-
mediaType?: string | undefined;
|
|
299
|
-
endTime?: string | undefined;
|
|
300
|
-
published?: string | undefined;
|
|
301
|
-
startTime?: string | undefined;
|
|
302
|
-
summary?: string | undefined;
|
|
303
|
-
summaryMap?: Record<string, string> | undefined;
|
|
304
|
-
updated?: string | undefined;
|
|
305
|
-
};
|
|
306
|
-
export declare const TEST_DATA_WITH_LATEST_COMMIT_TEXT: {
|
|
307
|
-
'atlassian:latestCommit': string;
|
|
308
|
-
'@context': JsonLd.Primitives.Context;
|
|
309
|
-
'@type': JsonLd.Primitives.Property<JsonLd.Primitives.ObjectType>;
|
|
310
|
-
'schema:potentialAction'?: import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").DeleteAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | import("schema-dts").WatchAction | import("schema-dts").DownloadAction | import("schema-dts").ViewAction | (import("schema-dts").AssignAction | import("schema-dts").CommentAction | import("schema-dts").DeleteAction | import("schema-dts").ReplyAction | import("schema-dts").ShareAction | import("schema-dts").SubscribeAction | import("schema-dts").WatchAction | import("schema-dts").DownloadAction | import("schema-dts").ViewAction)[] | undefined;
|
|
311
|
-
'atlassian:downloadUrl'?: string | undefined;
|
|
312
|
-
'atlassian:visitUrl'?: string | undefined;
|
|
313
|
-
'atlassian:titlePrefix'?: JsonLd.Data.TitlePrefix | undefined;
|
|
314
|
-
'atlassian:updatedBy'?: JsonLd.Primitives.Link | JsonLd.Primitives.Person<any> | JsonLd.Primitives.Collection<JsonLd.Primitives.Link | JsonLd.Primitives.Person<any>> | undefined;
|
|
315
|
-
'schema:dateCreated'?: string | undefined;
|
|
316
|
-
'@id'?: string | undefined;
|
|
317
|
-
attachment?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
318
|
-
attributedTo?: JsonLd.Primitives.Property<(JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link) & {
|
|
319
|
-
actor?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
320
|
-
}> | undefined;
|
|
321
|
-
audience?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
322
|
-
bcc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
323
|
-
bto?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
324
|
-
cc?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
325
|
-
context?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
326
|
-
generator?: JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
327
|
-
icon?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
328
|
-
image?: JsonLd.Primitives.Link | JsonLd.Primitives.Image | undefined;
|
|
329
|
-
inReplyTo?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
330
|
-
location?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
331
|
-
oneOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
332
|
-
anyOf?: (JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link)[] | undefined;
|
|
333
|
-
closed?: boolean | JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link | undefined;
|
|
334
|
-
preview?: string | ((JsonLd.Primitives.Object<any> | JsonLd.Primitives.LinkModel) & JsonLd.Primitives.PreviewExtension) | undefined;
|
|
335
|
-
replies?: JsonLd.Primitives.Collection<any> | undefined;
|
|
336
|
-
tag?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
337
|
-
to?: JsonLd.Primitives.Property<JsonLd.Primitives.Object<any> | JsonLd.Primitives.Link> | undefined;
|
|
338
|
-
url?: JsonLd.Primitives.Property<JsonLd.Primitives.Link> | undefined;
|
|
339
|
-
content?: string | undefined;
|
|
340
|
-
contentMap?: Record<string, string> | undefined;
|
|
341
|
-
name?: string | undefined;
|
|
342
|
-
nameMap?: Record<string, string> | undefined;
|
|
343
|
-
duration?: string | undefined;
|
|
344
|
-
mediaType?: string | undefined;
|
|
345
|
-
endTime?: string | undefined;
|
|
346
|
-
published?: string | undefined;
|
|
347
|
-
startTime?: string | undefined;
|
|
348
|
-
summary?: string | undefined;
|
|
349
|
-
summaryMap?: Record<string, string> | undefined;
|
|
350
|
-
updated?: string | undefined;
|
|
351
|
-
};
|
|
257
|
+
export declare const TEST_DATA_WITH_LATEST_COMMIT_OBJ: JsonLd.Data.SourceCodeRepository;
|
|
258
|
+
export declare const TEST_DATA_WITH_LATEST_COMMIT_TEXT: JsonLd.Data.SourceCodeRepository;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { AnalyticsFacade } from '../../../state/analytics';
|
|
2
3
|
export interface InlineCardUnauthorizedViewProps {
|
|
3
4
|
/** The url to display */
|
|
4
5
|
url: string;
|
|
@@ -18,6 +19,10 @@ export interface InlineCardUnauthorizedViewProps {
|
|
|
18
19
|
showAuthTooltip?: boolean;
|
|
19
20
|
/** A smart link id that may be used in analytics */
|
|
20
21
|
id?: string;
|
|
22
|
+
/** An AnalyticsFacade object used for calling analytics. */
|
|
23
|
+
analytics: AnalyticsFacade;
|
|
24
|
+
/** An identifier of the provider which will be executing the action. */
|
|
25
|
+
extensionKey?: string;
|
|
21
26
|
}
|
|
22
27
|
export declare class InlineCardUnauthorizedView extends React.Component<InlineCardUnauthorizedViewProps> {
|
|
23
28
|
handleConnectAccount: (event: React.MouseEvent<HTMLElement>) => void;
|
|
@@ -2,6 +2,7 @@ import { EventHandler, MouseEvent, KeyboardEvent } from 'react';
|
|
|
2
2
|
import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
3
3
|
import { CardState } from '../../state/types';
|
|
4
4
|
import { InlinePreloaderStyle, OnErrorCallback } from '../types';
|
|
5
|
+
import { AnalyticsFacade } from '../../state/analytics';
|
|
5
6
|
export declare type InlineCardProps = {
|
|
6
7
|
id: string;
|
|
7
8
|
url: string;
|
|
@@ -19,4 +20,5 @@ export declare type InlineCardProps = {
|
|
|
19
20
|
renderers?: CardProviderRenderers;
|
|
20
21
|
showHoverPreview?: boolean;
|
|
21
22
|
showAuthTooltip?: boolean;
|
|
23
|
+
analytics: AnalyticsFacade;
|
|
22
24
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "25.0.
|
|
3
|
+
"version": "25.0.7",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/outbound-auth-flow-client": "^3.3.0",
|
|
42
42
|
"@atlaskit/popup": "^1.5.0",
|
|
43
43
|
"@atlaskit/spinner": "^15.4.0",
|
|
44
|
-
"@atlaskit/theme": "^12.
|
|
44
|
+
"@atlaskit/theme": "^12.3.0",
|
|
45
45
|
"@atlaskit/tokens": "^1.2.0",
|
|
46
46
|
"@atlaskit/tooltip": "^17.7.0",
|
|
47
47
|
"@atlaskit/ufo": "^0.1.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@emotion/styled": "^11.0.0",
|
|
51
51
|
"@formatjs/intl-utils": "^3.8.4",
|
|
52
52
|
"facepaint": "^1.2.1",
|
|
53
|
-
"json-ld-types": "3.
|
|
53
|
+
"json-ld-types": "3.4.0",
|
|
54
54
|
"react-error-boundary": "^3.1.3",
|
|
55
55
|
"react-lazily-render": "^1.2.0",
|
|
56
56
|
"react-loadable": "^5.1.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"uuid": "^3.1.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@atlaskit/link-provider": "^1.5.
|
|
61
|
+
"@atlaskit/link-provider": "^1.5.1",
|
|
62
62
|
"react": "^16.8.0",
|
|
63
63
|
"react-dom": "^16.8.0",
|
|
64
64
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@atlaskit/field-base": "^15.0.6",
|
|
73
73
|
"@atlaskit/form": "^8.8.0",
|
|
74
74
|
"@atlaskit/inline-message": "^11.4.0",
|
|
75
|
-
"@atlaskit/link-test-helpers": "^2.
|
|
75
|
+
"@atlaskit/link-test-helpers": "^2.2.0",
|
|
76
76
|
"@atlaskit/lozenge": "^11.3.0",
|
|
77
77
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
78
78
|
"@atlaskit/media-test-helpers": "^30.1.0",
|
package/report.api.md
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
interface MockEntry {
|
|
3
|
-
isIntersecting: boolean;
|
|
4
|
-
}
|
|
5
|
-
export interface MockIntersectionObserverOpts {
|
|
6
|
-
getMockEntries: () => MockEntry[];
|
|
7
|
-
disconnect: jest.Mock;
|
|
8
|
-
takeRecords?: jest.Mock;
|
|
9
|
-
unobserve?: jest.Mock;
|
|
10
|
-
}
|
|
11
|
-
export declare const MockIntersectionObserverFactory: (mockIntersectionObserverOpts: MockIntersectionObserverOpts) => {
|
|
12
|
-
new (callback: IntersectionObserverCallback): {
|
|
13
|
-
readonly root: Element | null;
|
|
14
|
-
readonly rootMargin: string;
|
|
15
|
-
readonly thresholds: ReadonlyArray<number>;
|
|
16
|
-
previousMockEntries: MockEntry[];
|
|
17
|
-
callback: IntersectionObserverCallback;
|
|
18
|
-
observe(_element: HTMLElement): void;
|
|
19
|
-
callIntersectionObserverCallback: () => void;
|
|
20
|
-
checkIntersection: () => void;
|
|
21
|
-
disconnect: jest.Mock<any, any>;
|
|
22
|
-
takeRecords: jest.Mock<any, any>;
|
|
23
|
-
unobserve: jest.Mock<any, any>;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
export declare class MockIntersectionObserver implements IntersectionObserver {
|
|
3
|
-
callback: IntersectionObserverCallback;
|
|
4
|
-
readonly root: Element | null;
|
|
5
|
-
readonly rootMargin: string;
|
|
6
|
-
readonly thresholds: ReadonlyArray<number>;
|
|
7
|
-
constructor(callback: IntersectionObserverCallback);
|
|
8
|
-
observe(_element: HTMLElement): void;
|
|
9
|
-
disconnect: jest.Mock<any, any>;
|
|
10
|
-
takeRecords: jest.Mock<any, any>;
|
|
11
|
-
unobserve: jest.Mock<any, any>;
|
|
12
|
-
}
|