@atlaskit/smart-card 40.10.2 → 40.10.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.
- package/CHANGELOG.md +15 -0
- package/analytics.spec.yaml +11 -15
- package/dist/cjs/extractors/flexible/utils.js +12 -19
- package/dist/cjs/state/helpers.js +21 -45
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +7 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/flexible/utils.js +10 -17
- package/dist/es2019/state/helpers.js +20 -42
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +8 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/flexible/utils.js +12 -19
- package/dist/esm/state/helpers.js +20 -44
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +8 -4
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/analytics/generated/analytics.types.d.ts +3 -5
- package/dist/types/state/helpers.d.ts +1 -10
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +3 -5
- package/dist/types-ts4.5/state/helpers.d.ts +1 -10
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 40.10.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`72230d76e232a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/72230d76e232a) -
|
|
8
|
+
NAVX-1308 cleaning up platform-linking-slack-entity-support
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 40.10.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`eeed50fbee70e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eeed50fbee70e) -
|
|
16
|
+
Updated SmartCard module for legal spec changes for 3P Click Analytics
|
|
17
|
+
|
|
3
18
|
## 40.10.2
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/analytics.spec.yaml
CHANGED
|
@@ -753,25 +753,21 @@ events:
|
|
|
753
753
|
3P Workflows team
|
|
754
754
|
attributes:
|
|
755
755
|
<<: [*PackageMetaDataContext, *CommonContext, *ResolvedContext]
|
|
756
|
-
firstPartyARI:
|
|
757
|
-
required: true
|
|
758
|
-
type: string
|
|
759
|
-
description:
|
|
760
|
-
The first party ARI for this Smart Link - this is NOT the ARI of the link the user
|
|
761
|
-
clicked on, but the ARI of the page where the Smart Link is rendered
|
|
762
756
|
thirdPartyARI:
|
|
763
757
|
required: true
|
|
764
758
|
type: string
|
|
765
759
|
description: The third-party ARI for this Smart Link
|
|
766
|
-
|
|
767
|
-
required:
|
|
768
|
-
type: string
|
|
769
|
-
description: The Issue ID for the Jira specific ticket this Smart Link is pasted on
|
|
770
|
-
confluenceContentId:
|
|
771
|
-
required: false
|
|
760
|
+
eventName:
|
|
761
|
+
required: true
|
|
772
762
|
type: string
|
|
773
|
-
description:
|
|
774
|
-
|
|
763
|
+
description:
|
|
764
|
+
The name of the event being tracked - for this event will always be
|
|
765
|
+
smartLinkClickAnalyticsThirdPartyWorkflows since there are multiple event types in the
|
|
766
|
+
same SQS pipeline
|
|
767
|
+
firstPartyIdentifier:
|
|
775
768
|
required: false
|
|
776
769
|
type: string
|
|
777
|
-
description:
|
|
770
|
+
description:
|
|
771
|
+
A null-capable field representing the Confluence content ID, Confluence page ID, or Jira
|
|
772
|
+
issue key. This can be null if it is a value for an unsupported 1P provider (eg,
|
|
773
|
+
Bitbucket, Loom), and will be prefixed by an identifier based on the source product.
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.extractVoteCount = exports.extractViewCount = exports.extractUserAttributes = exports.extractTeamMemberCount = exports.extractTargetBranch = exports.extractSubscriberCount = exports.extractSubTasksProgress = exports.extractStoryPoints = exports.extractSourceBranch = exports.extractSmartLinkSentOn = exports.extractSmartLinkReactCount = exports.extractSmartLinkCommentCount = exports.extractSentOn = exports.extractReadTime = exports.extractReactCount = exports.extractProgrammingLanguage = exports.extractPersonAssignedToAsArray = exports.extractOwnedBy = exports.extractModifiedBy = exports.extractMetaTenantId = exports.extractMetaResourceType = exports.extractMetaObjectId = exports.extractLocation = exports.extractDueOn = exports.extractCreatedBy = exports.extractCommentCount = exports.extractChecklistProgress = exports.extractAttachmentCount = exports.extractAssignedTo = exports.extractAppliedToComponentsCount = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var extractLinkName = function extractLinkName(link) {
|
|
12
11
|
if (link && (0, _typeof2.default)(link) === 'object' && link['@type'] === 'Link') {
|
|
13
12
|
return link.name;
|
|
@@ -27,11 +26,9 @@ var extractSmartLinkCommentCount = exports.extractSmartLinkCommentCount = functi
|
|
|
27
26
|
if (!response || !response.data) {
|
|
28
27
|
return undefined;
|
|
29
28
|
}
|
|
30
|
-
if ((0,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
34
|
-
}
|
|
29
|
+
if ((0, _linkExtractors.isEntityPresent)(response)) {
|
|
30
|
+
var entity = (0, _linkExtractors.extractEntity)(response);
|
|
31
|
+
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
35
32
|
}
|
|
36
33
|
return (response === null || response === void 0 ? void 0 : response.data) && extractCommentCount(response === null || response === void 0 ? void 0 : response.data);
|
|
37
34
|
};
|
|
@@ -55,14 +52,12 @@ var extractSmartLinkReactCount = exports.extractSmartLinkReactCount = function e
|
|
|
55
52
|
if (!response || !response.data) {
|
|
56
53
|
return undefined;
|
|
57
54
|
}
|
|
58
|
-
if ((0,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
}, 0);
|
|
65
|
-
}
|
|
55
|
+
if ((0, _linkExtractors.isEntityPresent)(response)) {
|
|
56
|
+
var entity = (0, _linkExtractors.extractEntity)(response);
|
|
57
|
+
var reactions = entity && 'reactions' in entity && Array.isArray(entity.reactions) ? entity.reactions : undefined;
|
|
58
|
+
return reactions === null || reactions === void 0 ? void 0 : reactions.reduce(function (total, reaction) {
|
|
59
|
+
return total + (reaction === null || reaction === void 0 ? void 0 : reaction.total);
|
|
60
|
+
}, 0);
|
|
66
61
|
}
|
|
67
62
|
return (response === null || response === void 0 ? void 0 : response.data) && extractReactCount(response === null || response === void 0 ? void 0 : response.data);
|
|
68
63
|
};
|
|
@@ -152,11 +147,9 @@ var extractSmartLinkSentOn = exports.extractSmartLinkSentOn = function extractSm
|
|
|
152
147
|
if (!response || !response.data) {
|
|
153
148
|
return undefined;
|
|
154
149
|
}
|
|
155
|
-
if ((0,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
return (_extractEntity = (0, _linkExtractors.extractEntity)(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
159
|
-
}
|
|
150
|
+
if ((0, _linkExtractors.isEntityPresent)(response)) {
|
|
151
|
+
var _extractEntity;
|
|
152
|
+
return (_extractEntity = (0, _linkExtractors.extractEntity)(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
160
153
|
}
|
|
161
154
|
return (response === null || response === void 0 ? void 0 : response.data) && extractSentOn(response === null || response === void 0 ? void 0 : response.data);
|
|
162
155
|
};
|
|
@@ -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.isVisible = exports.isFinalState = exports.isAccessible = exports.hasResolved = exports.hasAuthScopeOverrides = exports.getThirdPartyARI = exports.getSubproduct = exports.getStatusDetails = exports.getServices = exports.getResourceType = exports.getProduct = exports.
|
|
7
|
+
exports.isVisible = exports.isFinalState = exports.isAccessible = exports.hasResolved = exports.hasAuthScopeOverrides = exports.getThirdPartyARI = exports.getSubproduct = exports.getStatusDetails = exports.getServices = exports.getResourceType = exports.getProduct = exports.getObjectName = exports.getObjectIconUrl = exports.getObjectAri = exports.getFirstPartyIdentifier = exports.getExtensionKey = exports.getDefinitionId = exports.getDatasources = exports.getClickUrl = exports.getCanBeDatasource = exports.getByDefinitionId = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
10
|
var _extractVisitUrl = require("../extractors/common/primitives/extractVisitUrl");
|
|
@@ -43,44 +43,29 @@ var getThirdPartyARI = exports.getThirdPartyARI = function getThirdPartyARI(deta
|
|
|
43
43
|
}
|
|
44
44
|
return undefined;
|
|
45
45
|
};
|
|
46
|
-
var
|
|
47
|
-
if ((0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics')) {
|
|
48
|
-
|
|
49
|
-
if (currentProduct === 'confluence') {
|
|
50
|
-
if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
|
|
51
|
-
if (typeof details.data.url === 'string') {
|
|
52
|
-
return extractPageIdFromURL(details.data.url);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
46
|
+
var getFirstPartyIdentifier = exports.getFirstPartyIdentifier = function getFirstPartyIdentifier() {
|
|
47
|
+
if (!(0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics')) {
|
|
48
|
+
return undefined;
|
|
56
49
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
|
|
64
|
-
if (typeof details.data.url === 'string') {
|
|
65
|
-
return extractContentIdFromURL(details.data.url);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
50
|
+
var product = getProductFromWindowURL();
|
|
51
|
+
var currentURL = window.location.href;
|
|
52
|
+
if (product === 'confluence') {
|
|
53
|
+
var contentId = extractContentIdFromURL(currentURL);
|
|
54
|
+
if (contentId) {
|
|
55
|
+
return "ConfluenceContentId:".concat(contentId);
|
|
68
56
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
if (typeof details.data.url === 'string') {
|
|
78
|
-
return extractJiraIssueIdFromURL(details.data.url);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
57
|
+
var pageId = extractPageIdFromURL(currentURL);
|
|
58
|
+
if (pageId) {
|
|
59
|
+
return "ConfluencePageId:".concat(pageId);
|
|
60
|
+
}
|
|
61
|
+
} else if (product === 'jira') {
|
|
62
|
+
var issueKey = extractJiraIssueIdFromURL(currentURL);
|
|
63
|
+
if (issueKey) {
|
|
64
|
+
return "JiraIssueKey:".concat(issueKey);
|
|
81
65
|
}
|
|
66
|
+
} else {
|
|
67
|
+
return undefined;
|
|
82
68
|
}
|
|
83
|
-
return undefined;
|
|
84
69
|
};
|
|
85
70
|
var getObjectName = exports.getObjectName = function getObjectName(details) {
|
|
86
71
|
return (details === null || details === void 0 ? void 0 : details.data) && 'name' in details.data && details.data.name || undefined;
|
|
@@ -213,16 +198,7 @@ var extractJiraIssueIdFromURL = function extractJiraIssueIdFromURL(url) {
|
|
|
213
198
|
}
|
|
214
199
|
return undefined;
|
|
215
200
|
};
|
|
216
|
-
var
|
|
217
|
-
return {
|
|
218
|
-
firstPartyARI: getObjectAri(details),
|
|
219
|
-
thirdPartyARI: thirdPartyARI,
|
|
220
|
-
jiraIssueId: getJiraIssueId(details),
|
|
221
|
-
confluenceContentId: getContentId(details),
|
|
222
|
-
confluencePageId: getPageId(details)
|
|
223
|
-
};
|
|
224
|
-
};
|
|
225
|
-
var getProductFromWindowUrl = function getProductFromWindowUrl() {
|
|
201
|
+
var getProductFromWindowURL = function getProductFromWindowURL() {
|
|
226
202
|
try {
|
|
227
203
|
var currentUrl = window.location.href;
|
|
228
204
|
var urlObj = new URL(currentUrl);
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "40.10.
|
|
14
|
+
packageVersion: "40.10.3"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -74,6 +74,7 @@ function Component(_ref) {
|
|
|
74
74
|
var resourceType = (0, _helpers.getResourceType)(state.details);
|
|
75
75
|
var services = (0, _helpers.getServices)(state.details);
|
|
76
76
|
var thirdPartyARI = (0, _helpers.getThirdPartyARI)(state.details);
|
|
77
|
+
var firstPartyIdentifier = (0, _helpers.getFirstPartyIdentifier)();
|
|
77
78
|
var isFlexibleUi = (0, _react.useMemo)(function () {
|
|
78
79
|
return (0, _flexible.isFlexibleUiCard)(children, ui);
|
|
79
80
|
}, [children, ui]);
|
|
@@ -103,9 +104,12 @@ function Component(_ref) {
|
|
|
103
104
|
actionSubjectId: 'smartlinkClickAnalyticsWorkflows',
|
|
104
105
|
eventType: 'ui',
|
|
105
106
|
attributes: {
|
|
106
|
-
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows'
|
|
107
|
+
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows',
|
|
108
|
+
firstPartyIdentifier: firstPartyIdentifier
|
|
107
109
|
},
|
|
108
|
-
nonPrivacySafeAttributes:
|
|
110
|
+
nonPrivacySafeAttributes: {
|
|
111
|
+
thirdPartyARI: thirdPartyARI
|
|
112
|
+
}
|
|
109
113
|
});
|
|
110
114
|
smartlinkClickAnalyticsEvent.fire('media');
|
|
111
115
|
}
|
|
@@ -150,7 +154,7 @@ function Component(_ref) {
|
|
|
150
154
|
}
|
|
151
155
|
(0, _click.fireLinkClickedEvent)(createAnalyticsEvent)(event);
|
|
152
156
|
}
|
|
153
|
-
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari, name, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, thirdPartyARI]);
|
|
157
|
+
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari, name, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, thirdPartyARI, firstPartyIdentifier]);
|
|
154
158
|
var handleAuthorize = (0, _react.useCallback)(function () {
|
|
155
159
|
return actions.authorize(appearance);
|
|
156
160
|
}, [actions, appearance]);
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "40.10.
|
|
22
|
+
packageVersion: "40.10.3",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { extractEntity, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonOwnedBy, extractPersonUpdatedBy, isEntityPresent } from '@atlaskit/link-extractors';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
const extractLinkName = link => {
|
|
4
3
|
if (link && typeof link === 'object' && link['@type'] === 'Link') {
|
|
5
4
|
return link.name;
|
|
@@ -17,11 +16,9 @@ export const extractSmartLinkCommentCount = response => {
|
|
|
17
16
|
if (!response || !response.data) {
|
|
18
17
|
return undefined;
|
|
19
18
|
}
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
24
|
-
}
|
|
19
|
+
if (isEntityPresent(response)) {
|
|
20
|
+
const entity = extractEntity(response);
|
|
21
|
+
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
25
22
|
}
|
|
26
23
|
return (response === null || response === void 0 ? void 0 : response.data) && extractCommentCount(response === null || response === void 0 ? void 0 : response.data);
|
|
27
24
|
};
|
|
@@ -37,12 +34,10 @@ export const extractSmartLinkReactCount = response => {
|
|
|
37
34
|
if (!response || !response.data) {
|
|
38
35
|
return undefined;
|
|
39
36
|
}
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return reactions === null || reactions === void 0 ? void 0 : reactions.reduce((total, reaction) => total + (reaction === null || reaction === void 0 ? void 0 : reaction.total), 0);
|
|
45
|
-
}
|
|
37
|
+
if (isEntityPresent(response)) {
|
|
38
|
+
const entity = extractEntity(response);
|
|
39
|
+
const reactions = entity && 'reactions' in entity && Array.isArray(entity.reactions) ? entity.reactions : undefined;
|
|
40
|
+
return reactions === null || reactions === void 0 ? void 0 : reactions.reduce((total, reaction) => total + (reaction === null || reaction === void 0 ? void 0 : reaction.total), 0);
|
|
46
41
|
}
|
|
47
42
|
return (response === null || response === void 0 ? void 0 : response.data) && extractReactCount(response === null || response === void 0 ? void 0 : response.data);
|
|
48
43
|
};
|
|
@@ -121,11 +116,9 @@ export const extractSmartLinkSentOn = response => {
|
|
|
121
116
|
if (!response || !response.data) {
|
|
122
117
|
return undefined;
|
|
123
118
|
}
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return (_extractEntity = extractEntity(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
128
|
-
}
|
|
119
|
+
if (isEntityPresent(response)) {
|
|
120
|
+
var _extractEntity;
|
|
121
|
+
return (_extractEntity = extractEntity(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
129
122
|
}
|
|
130
123
|
return (response === null || response === void 0 ? void 0 : response.data) && extractSentOn(response === null || response === void 0 ? void 0 : response.data);
|
|
131
124
|
};
|
|
@@ -35,44 +35,29 @@ export const getThirdPartyARI = details => {
|
|
|
35
35
|
}
|
|
36
36
|
return undefined;
|
|
37
37
|
};
|
|
38
|
-
export const
|
|
39
|
-
if (fg('platform_smartlink_3pclick_analytics')) {
|
|
40
|
-
|
|
41
|
-
if (currentProduct === 'confluence') {
|
|
42
|
-
if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
|
|
43
|
-
if (typeof details.data.url === 'string') {
|
|
44
|
-
return extractPageIdFromURL(details.data.url);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
38
|
+
export const getFirstPartyIdentifier = () => {
|
|
39
|
+
if (!fg('platform_smartlink_3pclick_analytics')) {
|
|
40
|
+
return undefined;
|
|
48
41
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
|
|
56
|
-
if (typeof details.data.url === 'string') {
|
|
57
|
-
return extractContentIdFromURL(details.data.url);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
42
|
+
const product = getProductFromWindowURL();
|
|
43
|
+
const currentURL = window.location.href;
|
|
44
|
+
if (product === 'confluence') {
|
|
45
|
+
const contentId = extractContentIdFromURL(currentURL);
|
|
46
|
+
if (contentId) {
|
|
47
|
+
return `ConfluenceContentId:${contentId}`;
|
|
60
48
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
export const getJiraIssueId = details => {
|
|
65
|
-
if (fg('platform_smartlink_3pclick_analytics')) {
|
|
66
|
-
const currentProduct = getProductFromWindowUrl();
|
|
67
|
-
if (currentProduct === 'jira') {
|
|
68
|
-
if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
|
|
69
|
-
if (typeof details.data.url === 'string') {
|
|
70
|
-
return extractJiraIssueIdFromURL(details.data.url);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
49
|
+
const pageId = extractPageIdFromURL(currentURL);
|
|
50
|
+
if (pageId) {
|
|
51
|
+
return `ConfluencePageId:${pageId}`;
|
|
73
52
|
}
|
|
53
|
+
} else if (product === 'jira') {
|
|
54
|
+
const issueKey = extractJiraIssueIdFromURL(currentURL);
|
|
55
|
+
if (issueKey) {
|
|
56
|
+
return `JiraIssueKey:${issueKey}`;
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
return undefined;
|
|
74
60
|
}
|
|
75
|
-
return undefined;
|
|
76
61
|
};
|
|
77
62
|
export const getObjectName = details => (details === null || details === void 0 ? void 0 : details.data) && 'name' in details.data && details.data.name || undefined;
|
|
78
63
|
export const getObjectIconUrl = details => {
|
|
@@ -197,14 +182,7 @@ const extractJiraIssueIdFromURL = url => {
|
|
|
197
182
|
}
|
|
198
183
|
return undefined;
|
|
199
184
|
};
|
|
200
|
-
|
|
201
|
-
firstPartyARI: getObjectAri(details),
|
|
202
|
-
thirdPartyARI: thirdPartyARI,
|
|
203
|
-
jiraIssueId: getJiraIssueId(details),
|
|
204
|
-
confluenceContentId: getContentId(details),
|
|
205
|
-
confluencePageId: getPageId(details)
|
|
206
|
-
});
|
|
207
|
-
const getProductFromWindowUrl = () => {
|
|
185
|
+
const getProductFromWindowURL = () => {
|
|
208
186
|
try {
|
|
209
187
|
const currentUrl = window.location.href;
|
|
210
188
|
const urlObj = new URL(currentUrl);
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "40.10.
|
|
5
|
+
packageVersion: "40.10.3"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,7 +5,7 @@ import { useAnalyticsEvents } from '../../common/analytics/generated/use-analyti
|
|
|
5
5
|
import { CardDisplay } from '../../constants';
|
|
6
6
|
import { useSmartLink } from '../../state';
|
|
7
7
|
import { succeedUfoExperience } from '../../state/analytics';
|
|
8
|
-
import { getClickUrl, getDefinitionId, getExtensionKey,
|
|
8
|
+
import { getClickUrl, getDefinitionId, getExtensionKey, getFirstPartyIdentifier, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
|
|
9
9
|
import { SmartLinkModalProvider } from '../../state/modal';
|
|
10
10
|
import { isSpecialClick, isSpecialEvent, isSpecialKey } from '../../utils';
|
|
11
11
|
import { combineActionOptions } from '../../utils/actions/combine-action-options';
|
|
@@ -69,6 +69,7 @@ function Component({
|
|
|
69
69
|
const resourceType = getResourceType(state.details);
|
|
70
70
|
const services = getServices(state.details);
|
|
71
71
|
const thirdPartyARI = getThirdPartyARI(state.details);
|
|
72
|
+
const firstPartyIdentifier = getFirstPartyIdentifier();
|
|
72
73
|
let isFlexibleUi = useMemo(() => isFlexibleUiCard(children, ui), [children, ui]);
|
|
73
74
|
const actionOptions = combineActionOptions({
|
|
74
75
|
actionOptions: actionOptionsProp,
|
|
@@ -96,9 +97,12 @@ function Component({
|
|
|
96
97
|
actionSubjectId: 'smartlinkClickAnalyticsWorkflows',
|
|
97
98
|
eventType: 'ui',
|
|
98
99
|
attributes: {
|
|
99
|
-
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows'
|
|
100
|
+
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows',
|
|
101
|
+
firstPartyIdentifier: firstPartyIdentifier
|
|
100
102
|
},
|
|
101
|
-
nonPrivacySafeAttributes:
|
|
103
|
+
nonPrivacySafeAttributes: {
|
|
104
|
+
thirdPartyARI: thirdPartyARI
|
|
105
|
+
}
|
|
102
106
|
});
|
|
103
107
|
smartlinkClickAnalyticsEvent.fire('media');
|
|
104
108
|
}
|
|
@@ -143,7 +147,7 @@ function Component({
|
|
|
143
147
|
}
|
|
144
148
|
fireLinkClickedEvent(createAnalyticsEvent)(event);
|
|
145
149
|
}
|
|
146
|
-
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari, name, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, thirdPartyARI]);
|
|
150
|
+
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari, name, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, thirdPartyARI, firstPartyIdentifier]);
|
|
147
151
|
const handleAuthorize = useCallback(() => actions.authorize(appearance), [actions, appearance]);
|
|
148
152
|
const handleRetry = useCallback(() => {
|
|
149
153
|
actions.reload();
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "40.10.
|
|
12
|
+
packageVersion: "40.10.3",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import { extractEntity, extractPersonAssignedTo, extractPersonCreatedBy, extractPersonOwnedBy, extractPersonUpdatedBy, isEntityPresent } from '@atlaskit/link-extractors';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
var extractLinkName = function extractLinkName(link) {
|
|
5
4
|
if (link && _typeof(link) === 'object' && link['@type'] === 'Link') {
|
|
6
5
|
return link.name;
|
|
@@ -20,11 +19,9 @@ export var extractSmartLinkCommentCount = function extractSmartLinkCommentCount(
|
|
|
20
19
|
if (!response || !response.data) {
|
|
21
20
|
return undefined;
|
|
22
21
|
}
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
27
|
-
}
|
|
22
|
+
if (isEntityPresent(response)) {
|
|
23
|
+
var entity = extractEntity(response);
|
|
24
|
+
return entity && 'commentCount' in entity && typeof entity.commentCount === 'number' ? entity === null || entity === void 0 ? void 0 : entity.commentCount : undefined;
|
|
28
25
|
}
|
|
29
26
|
return (response === null || response === void 0 ? void 0 : response.data) && extractCommentCount(response === null || response === void 0 ? void 0 : response.data);
|
|
30
27
|
};
|
|
@@ -48,14 +45,12 @@ export var extractSmartLinkReactCount = function extractSmartLinkReactCount(resp
|
|
|
48
45
|
if (!response || !response.data) {
|
|
49
46
|
return undefined;
|
|
50
47
|
}
|
|
51
|
-
if (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return
|
|
56
|
-
|
|
57
|
-
}, 0);
|
|
58
|
-
}
|
|
48
|
+
if (isEntityPresent(response)) {
|
|
49
|
+
var entity = extractEntity(response);
|
|
50
|
+
var reactions = entity && 'reactions' in entity && Array.isArray(entity.reactions) ? entity.reactions : undefined;
|
|
51
|
+
return reactions === null || reactions === void 0 ? void 0 : reactions.reduce(function (total, reaction) {
|
|
52
|
+
return total + (reaction === null || reaction === void 0 ? void 0 : reaction.total);
|
|
53
|
+
}, 0);
|
|
59
54
|
}
|
|
60
55
|
return (response === null || response === void 0 ? void 0 : response.data) && extractReactCount(response === null || response === void 0 ? void 0 : response.data);
|
|
61
56
|
};
|
|
@@ -145,11 +140,9 @@ export var extractSmartLinkSentOn = function extractSmartLinkSentOn(response) {
|
|
|
145
140
|
if (!response || !response.data) {
|
|
146
141
|
return undefined;
|
|
147
142
|
}
|
|
148
|
-
if (
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return (_extractEntity = extractEntity(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
152
|
-
}
|
|
143
|
+
if (isEntityPresent(response)) {
|
|
144
|
+
var _extractEntity;
|
|
145
|
+
return (_extractEntity = extractEntity(response)) === null || _extractEntity === void 0 ? void 0 : _extractEntity.createdAt;
|
|
153
146
|
}
|
|
154
147
|
return (response === null || response === void 0 ? void 0 : response.data) && extractSentOn(response === null || response === void 0 ? void 0 : response.data);
|
|
155
148
|
};
|
|
@@ -36,44 +36,29 @@ export var getThirdPartyARI = function getThirdPartyARI(details) {
|
|
|
36
36
|
}
|
|
37
37
|
return undefined;
|
|
38
38
|
};
|
|
39
|
-
export var
|
|
40
|
-
if (fg('platform_smartlink_3pclick_analytics')) {
|
|
41
|
-
|
|
42
|
-
if (currentProduct === 'confluence') {
|
|
43
|
-
if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
|
|
44
|
-
if (typeof details.data.url === 'string') {
|
|
45
|
-
return extractPageIdFromURL(details.data.url);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
39
|
+
export var getFirstPartyIdentifier = function getFirstPartyIdentifier() {
|
|
40
|
+
if (!fg('platform_smartlink_3pclick_analytics')) {
|
|
41
|
+
return undefined;
|
|
49
42
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
|
|
57
|
-
if (typeof details.data.url === 'string') {
|
|
58
|
-
return extractContentIdFromURL(details.data.url);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
43
|
+
var product = getProductFromWindowURL();
|
|
44
|
+
var currentURL = window.location.href;
|
|
45
|
+
if (product === 'confluence') {
|
|
46
|
+
var contentId = extractContentIdFromURL(currentURL);
|
|
47
|
+
if (contentId) {
|
|
48
|
+
return "ConfluenceContentId:".concat(contentId);
|
|
61
49
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (
|
|
67
|
-
var
|
|
68
|
-
if (
|
|
69
|
-
|
|
70
|
-
if (typeof details.data.url === 'string') {
|
|
71
|
-
return extractJiraIssueIdFromURL(details.data.url);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
50
|
+
var pageId = extractPageIdFromURL(currentURL);
|
|
51
|
+
if (pageId) {
|
|
52
|
+
return "ConfluencePageId:".concat(pageId);
|
|
53
|
+
}
|
|
54
|
+
} else if (product === 'jira') {
|
|
55
|
+
var issueKey = extractJiraIssueIdFromURL(currentURL);
|
|
56
|
+
if (issueKey) {
|
|
57
|
+
return "JiraIssueKey:".concat(issueKey);
|
|
74
58
|
}
|
|
59
|
+
} else {
|
|
60
|
+
return undefined;
|
|
75
61
|
}
|
|
76
|
-
return undefined;
|
|
77
62
|
};
|
|
78
63
|
export var getObjectName = function getObjectName(details) {
|
|
79
64
|
return (details === null || details === void 0 ? void 0 : details.data) && 'name' in details.data && details.data.name || undefined;
|
|
@@ -206,16 +191,7 @@ var extractJiraIssueIdFromURL = function extractJiraIssueIdFromURL(url) {
|
|
|
206
191
|
}
|
|
207
192
|
return undefined;
|
|
208
193
|
};
|
|
209
|
-
|
|
210
|
-
return {
|
|
211
|
-
firstPartyARI: getObjectAri(details),
|
|
212
|
-
thirdPartyARI: thirdPartyARI,
|
|
213
|
-
jiraIssueId: getJiraIssueId(details),
|
|
214
|
-
confluenceContentId: getContentId(details),
|
|
215
|
-
confluencePageId: getPageId(details)
|
|
216
|
-
};
|
|
217
|
-
};
|
|
218
|
-
var getProductFromWindowUrl = function getProductFromWindowUrl() {
|
|
194
|
+
var getProductFromWindowURL = function getProductFromWindowURL() {
|
|
219
195
|
try {
|
|
220
196
|
var currentUrl = window.location.href;
|
|
221
197
|
var urlObj = new URL(currentUrl);
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "40.10.
|
|
7
|
+
packageVersion: "40.10.3"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,7 +5,7 @@ import { useAnalyticsEvents } from '../../common/analytics/generated/use-analyti
|
|
|
5
5
|
import { CardDisplay } from '../../constants';
|
|
6
6
|
import { useSmartLink } from '../../state';
|
|
7
7
|
import { succeedUfoExperience } from '../../state/analytics';
|
|
8
|
-
import { getClickUrl, getDefinitionId, getExtensionKey,
|
|
8
|
+
import { getClickUrl, getDefinitionId, getExtensionKey, getFirstPartyIdentifier, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
|
|
9
9
|
import { SmartLinkModalProvider } from '../../state/modal';
|
|
10
10
|
import { isSpecialClick, isSpecialEvent, isSpecialKey } from '../../utils';
|
|
11
11
|
import { combineActionOptions } from '../../utils/actions/combine-action-options';
|
|
@@ -65,6 +65,7 @@ function Component(_ref) {
|
|
|
65
65
|
var resourceType = getResourceType(state.details);
|
|
66
66
|
var services = getServices(state.details);
|
|
67
67
|
var thirdPartyARI = getThirdPartyARI(state.details);
|
|
68
|
+
var firstPartyIdentifier = getFirstPartyIdentifier();
|
|
68
69
|
var isFlexibleUi = useMemo(function () {
|
|
69
70
|
return isFlexibleUiCard(children, ui);
|
|
70
71
|
}, [children, ui]);
|
|
@@ -94,9 +95,12 @@ function Component(_ref) {
|
|
|
94
95
|
actionSubjectId: 'smartlinkClickAnalyticsWorkflows',
|
|
95
96
|
eventType: 'ui',
|
|
96
97
|
attributes: {
|
|
97
|
-
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows'
|
|
98
|
+
eventName: 'smartLinkClickAnalyticsThirdPartyWorkflows',
|
|
99
|
+
firstPartyIdentifier: firstPartyIdentifier
|
|
98
100
|
},
|
|
99
|
-
nonPrivacySafeAttributes:
|
|
101
|
+
nonPrivacySafeAttributes: {
|
|
102
|
+
thirdPartyARI: thirdPartyARI
|
|
103
|
+
}
|
|
100
104
|
});
|
|
101
105
|
smartlinkClickAnalyticsEvent.fire('media');
|
|
102
106
|
}
|
|
@@ -141,7 +145,7 @@ function Component(_ref) {
|
|
|
141
145
|
}
|
|
142
146
|
fireLinkClickedEvent(createAnalyticsEvent)(event);
|
|
143
147
|
}
|
|
144
|
-
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari, name, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, thirdPartyARI]);
|
|
148
|
+
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, state.details, ari, name, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, thirdPartyARI, firstPartyIdentifier]);
|
|
145
149
|
var handleAuthorize = useCallback(function () {
|
|
146
150
|
return actions.authorize(appearance);
|
|
147
151
|
}, [actions, appearance]);
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "40.10.
|
|
15
|
+
packageVersion: "40.10.3",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::2d9f03b82528803f03b90d6cae5d690d>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataContextType = {
|
|
@@ -231,11 +231,9 @@ export type SmartLinkRenderFailedAttributesType = {
|
|
|
231
231
|
id: string | null;
|
|
232
232
|
};
|
|
233
233
|
export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
|
|
234
|
-
firstPartyARI: string;
|
|
235
234
|
thirdPartyARI: string;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
confluencePageId: string | null;
|
|
235
|
+
eventName: string;
|
|
236
|
+
firstPartyIdentifier: string | null;
|
|
239
237
|
};
|
|
240
238
|
export type AnalyticsEventAttributes = {
|
|
241
239
|
/**
|
|
@@ -9,9 +9,7 @@ export declare const getDefinitionId: (details?: JsonLd.Response) => string | un
|
|
|
9
9
|
export declare const getExtensionKey: (details?: JsonLd.Response) => string | undefined;
|
|
10
10
|
export declare const getObjectAri: (details?: JsonLd.Response) => string | undefined;
|
|
11
11
|
export declare const getThirdPartyARI: (details?: SmartLinkResponse) => string | undefined;
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const getContentId: (details?: JsonLd.Response) => string | undefined;
|
|
14
|
-
export declare const getJiraIssueId: (details?: JsonLd.Response) => string | undefined;
|
|
12
|
+
export declare const getFirstPartyIdentifier: () => string | undefined;
|
|
15
13
|
export declare const getObjectName: (details?: JsonLd.Response) => string | undefined;
|
|
16
14
|
export declare const getObjectIconUrl: (details?: JsonLd.Response) => string | undefined;
|
|
17
15
|
export declare const getResourceType: (details?: JsonLd.Response) => string | undefined;
|
|
@@ -26,10 +24,3 @@ export declare const isFinalState: (status: CardType) => boolean;
|
|
|
26
24
|
export declare const getDatasources: (details?: JsonLdDatasourceResponse) => DatasourceResolveResponse[] | undefined;
|
|
27
25
|
export declare const getCanBeDatasource: (details?: JsonLdDatasourceResponse) => boolean;
|
|
28
26
|
export declare const hasAuthScopeOverrides: (details?: JsonLd.Response) => boolean;
|
|
29
|
-
export declare const getLinkClickAnalyticsThirdPartyAttributes: (thirdPartyARI: string | undefined, details?: JsonLd.Response) => {
|
|
30
|
-
firstPartyARI: string | undefined;
|
|
31
|
-
thirdPartyARI: string | undefined;
|
|
32
|
-
jiraIssueId: string | undefined;
|
|
33
|
-
confluenceContentId: string | undefined;
|
|
34
|
-
confluencePageId: string | undefined;
|
|
35
|
-
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::2d9f03b82528803f03b90d6cae5d690d>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataContextType = {
|
|
@@ -231,11 +231,9 @@ export type SmartLinkRenderFailedAttributesType = {
|
|
|
231
231
|
id: string | null;
|
|
232
232
|
};
|
|
233
233
|
export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
|
|
234
|
-
firstPartyARI: string;
|
|
235
234
|
thirdPartyARI: string;
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
confluencePageId: string | null;
|
|
235
|
+
eventName: string;
|
|
236
|
+
firstPartyIdentifier: string | null;
|
|
239
237
|
};
|
|
240
238
|
export type AnalyticsEventAttributes = {
|
|
241
239
|
/**
|
|
@@ -9,9 +9,7 @@ export declare const getDefinitionId: (details?: JsonLd.Response) => string | un
|
|
|
9
9
|
export declare const getExtensionKey: (details?: JsonLd.Response) => string | undefined;
|
|
10
10
|
export declare const getObjectAri: (details?: JsonLd.Response) => string | undefined;
|
|
11
11
|
export declare const getThirdPartyARI: (details?: SmartLinkResponse) => string | undefined;
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const getContentId: (details?: JsonLd.Response) => string | undefined;
|
|
14
|
-
export declare const getJiraIssueId: (details?: JsonLd.Response) => string | undefined;
|
|
12
|
+
export declare const getFirstPartyIdentifier: () => string | undefined;
|
|
15
13
|
export declare const getObjectName: (details?: JsonLd.Response) => string | undefined;
|
|
16
14
|
export declare const getObjectIconUrl: (details?: JsonLd.Response) => string | undefined;
|
|
17
15
|
export declare const getResourceType: (details?: JsonLd.Response) => string | undefined;
|
|
@@ -26,10 +24,3 @@ export declare const isFinalState: (status: CardType) => boolean;
|
|
|
26
24
|
export declare const getDatasources: (details?: JsonLdDatasourceResponse) => DatasourceResolveResponse[] | undefined;
|
|
27
25
|
export declare const getCanBeDatasource: (details?: JsonLdDatasourceResponse) => boolean;
|
|
28
26
|
export declare const hasAuthScopeOverrides: (details?: JsonLd.Response) => boolean;
|
|
29
|
-
export declare const getLinkClickAnalyticsThirdPartyAttributes: (thirdPartyARI: string | undefined, details?: JsonLd.Response) => {
|
|
30
|
-
firstPartyARI: string | undefined;
|
|
31
|
-
thirdPartyARI: string | undefined;
|
|
32
|
-
jiraIssueId: string | undefined;
|
|
33
|
-
confluenceContentId: string | undefined;
|
|
34
|
-
confluencePageId: string | undefined;
|
|
35
|
-
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "40.10.
|
|
3
|
+
"version": "40.10.4",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/css": "^0.12.0",
|
|
37
37
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
38
38
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
39
|
-
"@atlaskit/form": "^12.
|
|
39
|
+
"@atlaskit/form": "^12.1.0",
|
|
40
40
|
"@atlaskit/frontend-utilities": "^3.1.0",
|
|
41
41
|
"@atlaskit/heading": "^5.2.0",
|
|
42
42
|
"@atlaskit/icon": "^27.12.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@af/visual-regression": "workspace:^",
|
|
97
97
|
"@atlaskit/analytics-listeners": "^9.0.0",
|
|
98
98
|
"@atlaskit/css-reset": "^7.3.0",
|
|
99
|
-
"@atlaskit/media-test-helpers": "^
|
|
99
|
+
"@atlaskit/media-test-helpers": "^39.0.0",
|
|
100
100
|
"@atlaskit/react-ufo": "^4.3.0",
|
|
101
101
|
"@atlaskit/ssr": "workspace:^",
|
|
102
102
|
"@atlaskit/visual-regression": "workspace:^",
|
|
@@ -226,9 +226,6 @@
|
|
|
226
226
|
"platform_editor_inline_card_selected_state_fix": {
|
|
227
227
|
"type": "boolean"
|
|
228
228
|
},
|
|
229
|
-
"platform-linking-slack-entity-support": {
|
|
230
|
-
"type": "boolean"
|
|
231
|
-
},
|
|
232
229
|
"navx-1184-fix-smart-link-a11y-interactive-states": {
|
|
233
230
|
"type": "boolean"
|
|
234
231
|
},
|