@atlaskit/smart-card 40.10.2 → 40.10.3

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 40.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`eeed50fbee70e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eeed50fbee70e) -
8
+ Updated SmartCard module for legal spec changes for 3P Click Analytics
9
+
3
10
  ## 40.10.2
4
11
 
5
12
  ### Patch Changes
@@ -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
- jiraIssueId:
767
- required: false
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: The Content ID for the Confluence specific page this Smart Link is pasted on
774
- confluencePageId:
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: The Page ID for the Confluence specific page this Smart Link is pasted on
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.
@@ -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.getPageId = exports.getObjectName = exports.getObjectIconUrl = exports.getObjectAri = exports.getLinkClickAnalyticsThirdPartyAttributes = exports.getJiraIssueId = exports.getExtensionKey = exports.getDefinitionId = exports.getDatasources = exports.getContentId = exports.getClickUrl = exports.getCanBeDatasource = exports.getByDefinitionId = void 0;
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 getPageId = exports.getPageId = function getPageId(details) {
47
- if ((0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics')) {
48
- var currentProduct = getProductFromWindowUrl();
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
- return undefined;
58
- };
59
- var getContentId = exports.getContentId = function getContentId(details) {
60
- if ((0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics')) {
61
- var currentProduct = getProductFromWindowUrl();
62
- if (currentProduct === 'confluence') {
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
- return undefined;
71
- };
72
- var getJiraIssueId = exports.getJiraIssueId = function getJiraIssueId(details) {
73
- if ((0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics')) {
74
- var currentProduct = getProductFromWindowUrl();
75
- if (currentProduct === 'jira') {
76
- if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
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 getLinkClickAnalyticsThirdPartyAttributes = exports.getLinkClickAnalyticsThirdPartyAttributes = function getLinkClickAnalyticsThirdPartyAttributes(thirdPartyARI, details) {
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.1"
14
+ packageVersion: "40.10.2"
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: (0, _helpers.getLinkClickAnalyticsThirdPartyAttributes)(thirdPartyARI, state.details)
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.1",
22
+ packageVersion: "40.10.2",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -35,44 +35,29 @@ export const getThirdPartyARI = details => {
35
35
  }
36
36
  return undefined;
37
37
  };
38
- export const getPageId = details => {
39
- if (fg('platform_smartlink_3pclick_analytics')) {
40
- const currentProduct = getProductFromWindowUrl();
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
- return undefined;
50
- };
51
- export const getContentId = details => {
52
- if (fg('platform_smartlink_3pclick_analytics')) {
53
- const currentProduct = getProductFromWindowUrl();
54
- if (currentProduct === 'confluence') {
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
- return undefined;
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
- export const getLinkClickAnalyticsThirdPartyAttributes = (thirdPartyARI, details) => ({
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.1"
5
+ packageVersion: "40.10.2"
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, getLinkClickAnalyticsThirdPartyAttributes, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
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: getLinkClickAnalyticsThirdPartyAttributes(thirdPartyARI, state.details)
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.1",
12
+ packageVersion: "40.10.2",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const Anchor = withLinkClickedEvent('a');
@@ -36,44 +36,29 @@ export var getThirdPartyARI = function getThirdPartyARI(details) {
36
36
  }
37
37
  return undefined;
38
38
  };
39
- export var getPageId = function getPageId(details) {
40
- if (fg('platform_smartlink_3pclick_analytics')) {
41
- var currentProduct = getProductFromWindowUrl();
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
- return undefined;
51
- };
52
- export var getContentId = function getContentId(details) {
53
- if (fg('platform_smartlink_3pclick_analytics')) {
54
- var currentProduct = getProductFromWindowUrl();
55
- if (currentProduct === 'confluence') {
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
- return undefined;
64
- };
65
- export var getJiraIssueId = function getJiraIssueId(details) {
66
- if (fg('platform_smartlink_3pclick_analytics')) {
67
- var currentProduct = getProductFromWindowUrl();
68
- if (currentProduct === 'jira') {
69
- if (details !== null && details !== void 0 && details.data && 'url' in details.data) {
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
- export var getLinkClickAnalyticsThirdPartyAttributes = function getLinkClickAnalyticsThirdPartyAttributes(thirdPartyARI, details) {
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.1"
7
+ packageVersion: "40.10.2"
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, getLinkClickAnalyticsThirdPartyAttributes, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
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: getLinkClickAnalyticsThirdPartyAttributes(thirdPartyARI, state.details)
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.1",
15
+ packageVersion: "40.10.2",
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::9e03e5e3a6be04ef3aa7e2d7a018d8a7>>
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
- jiraIssueId: string | null;
237
- confluenceContentId: string | null;
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 getPageId: (details?: JsonLd.Response) => string | undefined;
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::9e03e5e3a6be04ef3aa7e2d7a018d8a7>>
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
- jiraIssueId: string | null;
237
- confluenceContentId: string | null;
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 getPageId: (details?: JsonLd.Response) => string | undefined;
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.2",
3
+ "version": "40.10.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"