@atlaskit/smart-card 44.0.3 → 44.0.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 +12 -0
- package/analytics.spec.yaml +3 -3
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedModal/index.js +2 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedModal/index.js +2 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedModal/index.js +2 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/analytics/generated/analytics.types.d.ts +8 -8
- package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +8 -8
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 44.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef22944bdbbdf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef22944bdbbdf) -
|
|
8
|
+
Migrate smart link visited analytics from UI event to track event. The `ui.smartLink.visited`
|
|
9
|
+
event has been replaced with `track.smartLink.visited` to better capture engagement metrics for
|
|
10
|
+
smart links. This change is gated behind the `cc_integrations_editor_open_link_click_analytics`
|
|
11
|
+
feature flag and includes additional attributes (displayCategory, extensionKey, status,
|
|
12
|
+
statusDetails) when the flag is enabled.
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 44.0.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/analytics.spec.yaml
CHANGED
|
@@ -608,10 +608,10 @@ events:
|
|
|
608
608
|
type: boolean
|
|
609
609
|
description: Whether a modifier key was pressed when clicking the Smart Link.
|
|
610
610
|
- smartLink visited:
|
|
611
|
-
type:
|
|
612
|
-
description: fires
|
|
611
|
+
type: track
|
|
612
|
+
description: fires a tracking event that represents when a user visits a Smart Link target.
|
|
613
613
|
attributes:
|
|
614
|
-
<<: [*PackageMetaDataContext, *CommonContext
|
|
614
|
+
<<: [*PackageMetaDataContext, *CommonContext]
|
|
615
615
|
id:
|
|
616
616
|
required: true
|
|
617
617
|
type: string
|
|
@@ -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: "44.0.
|
|
14
|
+
packageVersion: "44.0.3"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -96,7 +96,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
96
96
|
var visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
97
97
|
if (visitedDisplay && (0, _expValEquals.expValEquals)('cc_integrations_editor_open_link_click_analytics', 'isEnabled', true)) {
|
|
98
98
|
var _invokeViewAction$id, _invokeViewAction$def;
|
|
99
|
-
fireEvent === null || fireEvent === void 0 || fireEvent('
|
|
99
|
+
fireEvent === null || fireEvent === void 0 || fireEvent('track.smartLink.visited', {
|
|
100
100
|
id: (_invokeViewAction$id = invokeViewAction.id) !== null && _invokeViewAction$id !== void 0 ? _invokeViewAction$id : iframeName,
|
|
101
101
|
display: visitedDisplay,
|
|
102
102
|
definitionId: (_invokeViewAction$def = invokeViewAction.definitionId) !== null && _invokeViewAction$def !== void 0 ? _invokeViewAction$def : null
|
|
@@ -112,7 +112,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
112
112
|
var visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
113
113
|
if (visitedDisplay && (0, _expValEquals.expValEquals)('cc_integrations_editor_open_link_click_analytics', 'isEnabled', true)) {
|
|
114
114
|
var _invokeViewAction$id2, _invokeViewAction$def2;
|
|
115
|
-
fireEvent === null || fireEvent === void 0 || fireEvent('
|
|
115
|
+
fireEvent === null || fireEvent === void 0 || fireEvent('track.smartLink.visited', {
|
|
116
116
|
id: (_invokeViewAction$id2 = invokeViewAction.id) !== null && _invokeViewAction$id2 !== void 0 ? _invokeViewAction$id2 : iframeName,
|
|
117
117
|
display: visitedDisplay,
|
|
118
118
|
definitionId: (_invokeViewAction$def2 = invokeViewAction.definitionId) !== null && _invokeViewAction$def2 !== void 0 ? _invokeViewAction$def2 : null
|
|
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
22
22
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
23
23
|
var PACKAGE_DATA = {
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "44.0.
|
|
25
|
+
packageVersion: "44.0.3",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -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: "44.0.
|
|
5
|
+
packageVersion: "44.0.3"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -72,7 +72,7 @@ const EmbedModal = ({
|
|
|
72
72
|
const visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
73
73
|
if (visitedDisplay && expValEquals('cc_integrations_editor_open_link_click_analytics', 'isEnabled', true)) {
|
|
74
74
|
var _invokeViewAction$id, _invokeViewAction$def;
|
|
75
|
-
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('
|
|
75
|
+
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('track.smartLink.visited', {
|
|
76
76
|
id: (_invokeViewAction$id = invokeViewAction.id) !== null && _invokeViewAction$id !== void 0 ? _invokeViewAction$id : iframeName,
|
|
77
77
|
display: visitedDisplay,
|
|
78
78
|
definitionId: (_invokeViewAction$def = invokeViewAction.definitionId) !== null && _invokeViewAction$def !== void 0 ? _invokeViewAction$def : null
|
|
@@ -88,7 +88,7 @@ const EmbedModal = ({
|
|
|
88
88
|
const visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
89
89
|
if (visitedDisplay && expValEquals('cc_integrations_editor_open_link_click_analytics', 'isEnabled', true)) {
|
|
90
90
|
var _invokeViewAction$id2, _invokeViewAction$def2;
|
|
91
|
-
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('
|
|
91
|
+
fireEvent === null || fireEvent === void 0 ? void 0 : fireEvent('track.smartLink.visited', {
|
|
92
92
|
id: (_invokeViewAction$id2 = invokeViewAction.id) !== null && _invokeViewAction$id2 !== void 0 ? _invokeViewAction$id2 : iframeName,
|
|
93
93
|
display: visitedDisplay,
|
|
94
94
|
definitionId: (_invokeViewAction$def2 = invokeViewAction.definitionId) !== null && _invokeViewAction$def2 !== void 0 ? _invokeViewAction$def2 : null
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
const PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "44.0.
|
|
15
|
+
packageVersion: "44.0.3",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -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: "44.0.
|
|
7
|
+
packageVersion: "44.0.3"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -87,7 +87,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
87
87
|
var visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
88
88
|
if (visitedDisplay && expValEquals('cc_integrations_editor_open_link_click_analytics', 'isEnabled', true)) {
|
|
89
89
|
var _invokeViewAction$id, _invokeViewAction$def;
|
|
90
|
-
fireEvent === null || fireEvent === void 0 || fireEvent('
|
|
90
|
+
fireEvent === null || fireEvent === void 0 || fireEvent('track.smartLink.visited', {
|
|
91
91
|
id: (_invokeViewAction$id = invokeViewAction.id) !== null && _invokeViewAction$id !== void 0 ? _invokeViewAction$id : iframeName,
|
|
92
92
|
display: visitedDisplay,
|
|
93
93
|
definitionId: (_invokeViewAction$def = invokeViewAction.definitionId) !== null && _invokeViewAction$def !== void 0 ? _invokeViewAction$def : null
|
|
@@ -103,7 +103,7 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
103
103
|
var visitedDisplay = invokeViewAction.display && invokeViewAction.display !== 'url' ? invokeViewAction.display : null;
|
|
104
104
|
if (visitedDisplay && expValEquals('cc_integrations_editor_open_link_click_analytics', 'isEnabled', true)) {
|
|
105
105
|
var _invokeViewAction$id2, _invokeViewAction$def2;
|
|
106
|
-
fireEvent === null || fireEvent === void 0 || fireEvent('
|
|
106
|
+
fireEvent === null || fireEvent === void 0 || fireEvent('track.smartLink.visited', {
|
|
107
107
|
id: (_invokeViewAction$id2 = invokeViewAction.id) !== null && _invokeViewAction$id2 !== void 0 ? _invokeViewAction$id2 : iframeName,
|
|
108
108
|
display: visitedDisplay,
|
|
109
109
|
definitionId: (_invokeViewAction$def2 = invokeViewAction.definitionId) !== null && _invokeViewAction$def2 !== void 0 ? _invokeViewAction$def2 : null
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "44.0.
|
|
18
|
+
packageVersion: "44.0.3",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
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::1c5f802d8b5609627e5ffbebf73bad6e>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataContextType = {
|
|
@@ -116,13 +116,12 @@ export type SmartLinkIframeFocusedAttributesType = {
|
|
|
116
116
|
id: string;
|
|
117
117
|
display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url';
|
|
118
118
|
definitionId: string | null;
|
|
119
|
-
interactionType?: 'mouseenter' | 'mouseleave' | 'focus';
|
|
119
|
+
interactionType?: 'mouseenter' | 'mouseleave' | 'focus' | null;
|
|
120
120
|
};
|
|
121
121
|
export type ApplicationAccountConnectedAttributesType = {
|
|
122
122
|
definitionId: string | null;
|
|
123
123
|
};
|
|
124
124
|
export type ApplicationAccountAuthStartedAttributesType = {};
|
|
125
|
-
export type ButtonClickedDismissAttributesType = {};
|
|
126
125
|
export type SmartLinkQuickActionStartedAttributesType = {
|
|
127
126
|
smartLinkActionType: 'FollowEntityAction' | 'GetStatusTransitionsAction' | 'StatusUpdateAction' | 'UnfollowEntityAction' | 'StatusUpdate';
|
|
128
127
|
};
|
|
@@ -263,6 +262,7 @@ export type SmartLinkRenderFailedAttributesType = {
|
|
|
263
262
|
errorInfo: Record<string, unknown>;
|
|
264
263
|
id: string | null;
|
|
265
264
|
};
|
|
265
|
+
export type ButtonClickedDismissAttributesType = {};
|
|
266
266
|
export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
|
|
267
267
|
thirdPartyARI: string;
|
|
268
268
|
eventName: string;
|
|
@@ -270,9 +270,6 @@ export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
|
|
|
270
270
|
clickedAt: string;
|
|
271
271
|
};
|
|
272
272
|
export type AnalyticsEventAttributes = {
|
|
273
|
-
/**
|
|
274
|
-
* Fired when a button is clicked to dismiss a hover card */
|
|
275
|
-
'ui.button.clicked.dismiss': ButtonClickedDismissAttributesType;
|
|
276
273
|
/**
|
|
277
274
|
* Fired when an copy link is clicked */
|
|
278
275
|
'ui.button.clicked.copyLink': ButtonClickedCopyLinkAttributesType;
|
|
@@ -388,8 +385,8 @@ export type AnalyticsEventAttributes = {
|
|
|
388
385
|
* fires an event that represents when a user clicks on a Smart Link. */
|
|
389
386
|
'ui.smartLink.clicked': SmartLinkClickedAttributesType;
|
|
390
387
|
/**
|
|
391
|
-
* fires
|
|
392
|
-
'
|
|
388
|
+
* fires a tracking event that represents when a user visits a Smart Link target. */
|
|
389
|
+
'track.smartLink.visited': SmartLinkVisitedAttributesType;
|
|
393
390
|
/**
|
|
394
391
|
* fires an event that represents when a user clicks on a Smart Link. */
|
|
395
392
|
'ui.smartLink.clicked.titleGoToLink': SmartLinkClickedTitleGoToLinkAttributesType;
|
|
@@ -445,5 +442,8 @@ export type AnalyticsEventAttributes = {
|
|
|
445
442
|
/**
|
|
446
443
|
* fires an event that represents when a user clicks on a Smart Link to track analytics for the 3P Workflows team */
|
|
447
444
|
'ui.smartLink.clicked.smartlinkClickAnalyticsWorkflows': SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType;
|
|
445
|
+
/**
|
|
446
|
+
* fires an event that represents when a user dismisses a hover card */
|
|
447
|
+
'ui.button.clicked.dismiss': ButtonClickedDismissAttributesType;
|
|
448
448
|
};
|
|
449
449
|
export type EventKey = keyof AnalyticsEventAttributes;
|
|
@@ -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::1c5f802d8b5609627e5ffbebf73bad6e>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataContextType = {
|
|
@@ -116,13 +116,12 @@ export type SmartLinkIframeFocusedAttributesType = {
|
|
|
116
116
|
id: string;
|
|
117
117
|
display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url';
|
|
118
118
|
definitionId: string | null;
|
|
119
|
-
interactionType?: 'mouseenter' | 'mouseleave' | 'focus';
|
|
119
|
+
interactionType?: 'mouseenter' | 'mouseleave' | 'focus' | null;
|
|
120
120
|
};
|
|
121
121
|
export type ApplicationAccountConnectedAttributesType = {
|
|
122
122
|
definitionId: string | null;
|
|
123
123
|
};
|
|
124
124
|
export type ApplicationAccountAuthStartedAttributesType = {};
|
|
125
|
-
export type ButtonClickedDismissAttributesType = {};
|
|
126
125
|
export type SmartLinkQuickActionStartedAttributesType = {
|
|
127
126
|
smartLinkActionType: 'FollowEntityAction' | 'GetStatusTransitionsAction' | 'StatusUpdateAction' | 'UnfollowEntityAction' | 'StatusUpdate';
|
|
128
127
|
};
|
|
@@ -263,6 +262,7 @@ export type SmartLinkRenderFailedAttributesType = {
|
|
|
263
262
|
errorInfo: Record<string, unknown>;
|
|
264
263
|
id: string | null;
|
|
265
264
|
};
|
|
265
|
+
export type ButtonClickedDismissAttributesType = {};
|
|
266
266
|
export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
|
|
267
267
|
thirdPartyARI: string;
|
|
268
268
|
eventName: string;
|
|
@@ -270,9 +270,6 @@ export type SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType = {
|
|
|
270
270
|
clickedAt: string;
|
|
271
271
|
};
|
|
272
272
|
export type AnalyticsEventAttributes = {
|
|
273
|
-
/**
|
|
274
|
-
* Fired when a button is clicked to dismiss a hover card */
|
|
275
|
-
'ui.button.clicked.dismiss': ButtonClickedDismissAttributesType;
|
|
276
273
|
/**
|
|
277
274
|
* Fired when an copy link is clicked */
|
|
278
275
|
'ui.button.clicked.copyLink': ButtonClickedCopyLinkAttributesType;
|
|
@@ -388,8 +385,8 @@ export type AnalyticsEventAttributes = {
|
|
|
388
385
|
* fires an event that represents when a user clicks on a Smart Link. */
|
|
389
386
|
'ui.smartLink.clicked': SmartLinkClickedAttributesType;
|
|
390
387
|
/**
|
|
391
|
-
* fires
|
|
392
|
-
'
|
|
388
|
+
* fires a tracking event that represents when a user visits a Smart Link target. */
|
|
389
|
+
'track.smartLink.visited': SmartLinkVisitedAttributesType;
|
|
393
390
|
/**
|
|
394
391
|
* fires an event that represents when a user clicks on a Smart Link. */
|
|
395
392
|
'ui.smartLink.clicked.titleGoToLink': SmartLinkClickedTitleGoToLinkAttributesType;
|
|
@@ -445,5 +442,8 @@ export type AnalyticsEventAttributes = {
|
|
|
445
442
|
/**
|
|
446
443
|
* fires an event that represents when a user clicks on a Smart Link to track analytics for the 3P Workflows team */
|
|
447
444
|
'ui.smartLink.clicked.smartlinkClickAnalyticsWorkflows': SmartLinkClickedSmartlinkClickAnalyticsWorkflowsAttributesType;
|
|
445
|
+
/**
|
|
446
|
+
* fires an event that represents when a user dismisses a hover card */
|
|
447
|
+
'ui.button.clicked.dismiss': ButtonClickedDismissAttributesType;
|
|
448
448
|
};
|
|
449
449
|
export type EventKey = keyof AnalyticsEventAttributes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "44.0.
|
|
3
|
+
"version": "44.0.4",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@atlaskit/textfield": "^8.3.0",
|
|
84
84
|
"@atlaskit/theme": "^23.0.0",
|
|
85
85
|
"@atlaskit/tile": "^1.0.0",
|
|
86
|
-
"@atlaskit/tmp-editor-statsig": "^62.
|
|
86
|
+
"@atlaskit/tmp-editor-statsig": "^62.1.0",
|
|
87
87
|
"@atlaskit/tokens": "^13.0.0",
|
|
88
88
|
"@atlaskit/tooltip": "^21.1.0",
|
|
89
89
|
"@atlaskit/ufo": "^0.4.0",
|