@atlaskit/smart-card 26.52.0 → 26.52.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/analytics.spec.yaml +18 -0
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-event-summary-viewed/index.js +7 -0
  5. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +5 -0
  6. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +2 -2
  7. package/dist/cjs/view/LinkUrl/index.js +1 -1
  8. package/dist/es2019/utils/analytics/analytics.js +1 -1
  9. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-event-summary-viewed/index.js +7 -0
  10. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +5 -0
  11. package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +2 -2
  12. package/dist/es2019/view/LinkUrl/index.js +1 -1
  13. package/dist/esm/utils/analytics/analytics.js +1 -1
  14. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-event-summary-viewed/index.js +7 -0
  15. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +5 -0
  16. package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +2 -2
  17. package/dist/esm/view/LinkUrl/index.js +1 -1
  18. package/dist/types/common/analytics/generated/analytics.types.d.ts +10 -4
  19. package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +10 -4
  20. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.52.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#88354](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/88354) [`4c87d9b4f0c2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/4c87d9b4f0c2) - The internal composition of this component has changed. There is no expected change in behavior.
8
+ - Updated dependencies
9
+
10
+ ## 26.52.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [#87946](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/87946) [`784121aa50b4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/784121aa50b4) - Add ai mau analytics
15
+ - Updated dependencies
16
+
3
17
  ## 26.52.0
4
18
 
5
19
  ### Minor Changes
@@ -72,6 +72,18 @@ context:
72
72
  required: false
73
73
  description: An indicator that a link can be converted to datasource view
74
74
 
75
+ aiInteractionAttributes: &aiInteractionAttributes
76
+ aiFeatureName:
77
+ type: string
78
+ description: The name of the AI feature as shared with AI team
79
+ proactiveAIGenerated:
80
+ type: number
81
+ description: Attribute that captures the fact that an AI generated result was proactively served to a user.
82
+ userGeneratedAI:
83
+ type: number
84
+ description: Attribute that captures the fact that a user interaction with a feature lead to generation of an AI result.
85
+
86
+
75
87
  events:
76
88
  - button clicked (aiSummary):
77
89
  type: ui
@@ -110,3 +122,9 @@ events:
110
122
  required: false
111
123
  type: string
112
124
  description: failure reason
125
+
126
+ - aiInteraction initiated:
127
+ type: track
128
+ description: fired when an explicit request is made to use an AI-powered feature
129
+ attributes:
130
+ <<: [*PackageMetaDataContext, *aiInteractionAttributes]
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "26.52.0"
25
+ packageVersion: "26.52.2"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -15,6 +15,13 @@ var AIEventSummaryViewed = function AIEventSummaryViewed(_ref) {
15
15
  fireEvent('ui.summary.viewed', {
16
16
  fromCache: fromCache
17
17
  });
18
+ if (fromCache) {
19
+ fireEvent('track.aiInteraction.initiated', {
20
+ aiFeatureName: 'Smart Links Summary',
21
+ proactiveAIGenerated: 1,
22
+ userGeneratedAI: 0
23
+ });
24
+ }
18
25
  }, [fireEvent, fromCache]);
19
26
  return null;
20
27
  };
@@ -98,6 +98,11 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
98
98
  name: _constants.ActionName.CustomAction,
99
99
  onClick: function onClick() {
100
100
  fireEvent('ui.button.clicked.aiSummary', {});
101
+ fireEvent('track.aiInteraction.initiated', {
102
+ aiFeatureName: 'Smart Links Summary',
103
+ proactiveAIGenerated: 0,
104
+ userGeneratedAI: 1
105
+ });
101
106
  summariseUrl();
102
107
  },
103
108
  testId: "".concat(testId, "-ai-summary-action"),
@@ -30,8 +30,8 @@ var ResolvedResultsStack = function ResolvedResultsStack(_ref) {
30
30
  testId: "".concat(testId, "-items-wrapper"),
31
31
  as: "ul",
32
32
  xcss: (0, _primitives.xcss)({
33
- paddingLeft: '0px',
34
- marginTop: '0px'
33
+ paddingLeft: 'space.0',
34
+ marginTop: 'space.0'
35
35
  })
36
36
  }, resolvedResults.map(function (resolvedResults, idx) {
37
37
  return /*#__PURE__*/_react.default.createElement(_analytics.RelatedUrlItemAnalyticsContext, {
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "26.52.0",
20
+ packageVersion: "26.52.2",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "26.52.0"
7
+ packageVersion: "26.52.2"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -10,6 +10,13 @@ const AIEventSummaryViewed = ({
10
10
  fireEvent('ui.summary.viewed', {
11
11
  fromCache
12
12
  });
13
+ if (fromCache) {
14
+ fireEvent('track.aiInteraction.initiated', {
15
+ aiFeatureName: 'Smart Links Summary',
16
+ proactiveAIGenerated: 1,
17
+ userGeneratedAI: 0
18
+ });
19
+ }
13
20
  }, [fireEvent, fromCache]);
14
21
  return null;
15
22
  };
@@ -92,6 +92,11 @@ const AISummaryBlockResolvedView = props => {
92
92
  name: ActionName.CustomAction,
93
93
  onClick: () => {
94
94
  fireEvent('ui.button.clicked.aiSummary', {});
95
+ fireEvent('track.aiInteraction.initiated', {
96
+ aiFeatureName: 'Smart Links Summary',
97
+ proactiveAIGenerated: 0,
98
+ userGeneratedAI: 1
99
+ });
95
100
  summariseUrl();
96
101
  },
97
102
  testId: `${testId}-ai-summary-action`,
@@ -22,8 +22,8 @@ const ResolvedResultsStack = ({
22
22
  testId: `${testId}-items-wrapper`,
23
23
  as: "ul",
24
24
  xcss: xcss({
25
- paddingLeft: '0px',
26
- marginTop: '0px'
25
+ paddingLeft: 'space.0',
26
+ marginTop: 'space.0'
27
27
  })
28
28
  }, resolvedResults.map((resolvedResults, idx) => /*#__PURE__*/React.createElement(RelatedUrlItemAnalyticsContext, {
29
29
  details: resolvedResults,
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "26.52.0",
10
+ packageVersion: "26.52.2",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "26.52.0"
18
+ packageVersion: "26.52.2"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -9,6 +9,13 @@ var AIEventSummaryViewed = function AIEventSummaryViewed(_ref) {
9
9
  fireEvent('ui.summary.viewed', {
10
10
  fromCache: fromCache
11
11
  });
12
+ if (fromCache) {
13
+ fireEvent('track.aiInteraction.initiated', {
14
+ aiFeatureName: 'Smart Links Summary',
15
+ proactiveAIGenerated: 1,
16
+ userGeneratedAI: 0
17
+ });
18
+ }
12
19
  }, [fireEvent, fromCache]);
13
20
  return null;
14
21
  };
@@ -88,6 +88,11 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
88
88
  name: ActionName.CustomAction,
89
89
  onClick: function onClick() {
90
90
  fireEvent('ui.button.clicked.aiSummary', {});
91
+ fireEvent('track.aiInteraction.initiated', {
92
+ aiFeatureName: 'Smart Links Summary',
93
+ proactiveAIGenerated: 0,
94
+ userGeneratedAI: 1
95
+ });
91
96
  summariseUrl();
92
97
  },
93
98
  testId: "".concat(testId, "-ai-summary-action"),
@@ -20,8 +20,8 @@ var ResolvedResultsStack = function ResolvedResultsStack(_ref) {
20
20
  testId: "".concat(testId, "-items-wrapper"),
21
21
  as: "ul",
22
22
  xcss: xcss({
23
- paddingLeft: '0px',
24
- marginTop: '0px'
23
+ paddingLeft: 'space.0',
24
+ marginTop: 'space.0'
25
25
  })
26
26
  }, resolvedResults.map(function (resolvedResults, idx) {
27
27
  return /*#__PURE__*/React.createElement(RelatedUrlItemAnalyticsContext, {
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "26.52.0",
13
+ packageVersion: "26.52.2",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = 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::81a232dd81b5db01399e6f7e28181c20>>
6
+ * @codegen <<SignedSource::c4023f0dc3ef442249a36d387b17308e>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -28,13 +28,16 @@ export type ButtonClickedAiSummaryAttributesType = {};
28
28
  export type SummaryViewedAttributesType = {
29
29
  fromCache: boolean | null;
30
30
  };
31
- export type ErrorViewedAiSummaryAttributesType = {
32
- reason?: string;
33
- };
31
+ export type ErrorViewedAiSummaryAttributesType = {};
34
32
  export type SummarySuccessAttributesType = {};
35
33
  export type SummaryFailedAttributesType = {
36
34
  reason: string | null;
37
35
  };
36
+ export type AiInteractionInitiatedAttributesType = {
37
+ aiFeatureName: string;
38
+ proactiveAIGenerated: number;
39
+ userGeneratedAI: number;
40
+ };
38
41
  export type AnalyticsEventAttributes = {
39
42
  /**
40
43
  * fired when an ai summary is clicked */
@@ -51,5 +54,8 @@ export type AnalyticsEventAttributes = {
51
54
  /**
52
55
  * fired when a summary request finishes with a failed response */
53
56
  'operational.summary.failed': SummaryFailedAttributesType;
57
+ /**
58
+ * fired when an explicit request is made to use an AI-powered feature */
59
+ 'track.aiInteraction.initiated': AiInteractionInitiatedAttributesType;
54
60
  };
55
61
  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::81a232dd81b5db01399e6f7e28181c20>>
6
+ * @codegen <<SignedSource::c4023f0dc3ef442249a36d387b17308e>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataType = {
@@ -28,13 +28,16 @@ export type ButtonClickedAiSummaryAttributesType = {};
28
28
  export type SummaryViewedAttributesType = {
29
29
  fromCache: boolean | null;
30
30
  };
31
- export type ErrorViewedAiSummaryAttributesType = {
32
- reason?: string;
33
- };
31
+ export type ErrorViewedAiSummaryAttributesType = {};
34
32
  export type SummarySuccessAttributesType = {};
35
33
  export type SummaryFailedAttributesType = {
36
34
  reason: string | null;
37
35
  };
36
+ export type AiInteractionInitiatedAttributesType = {
37
+ aiFeatureName: string;
38
+ proactiveAIGenerated: number;
39
+ userGeneratedAI: number;
40
+ };
38
41
  export type AnalyticsEventAttributes = {
39
42
  /**
40
43
  * fired when an ai summary is clicked */
@@ -51,5 +54,8 @@ export type AnalyticsEventAttributes = {
51
54
  /**
52
55
  * fired when a summary request finishes with a failed response */
53
56
  'operational.summary.failed': SummaryFailedAttributesType;
57
+ /**
58
+ * fired when an explicit request is made to use an AI-powered feature */
59
+ 'track.aiInteraction.initiated': AiInteractionInitiatedAttributesType;
54
60
  };
55
61
  export type EventKey = keyof AnalyticsEventAttributes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.52.0",
3
+ "version": "26.52.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/avatar": "^21.5.0",
34
34
  "@atlaskit/avatar-group": "^9.5.0",
35
35
  "@atlaskit/badge": "^15.3.0",
36
- "@atlaskit/button": "^17.8.0",
36
+ "@atlaskit/button": "^17.11.0",
37
37
  "@atlaskit/dropdown-menu": "^12.8.0",
38
38
  "@atlaskit/icon": "^22.1.0",
39
39
  "@atlaskit/icon-file-type": "^6.4.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/link-client-extension": "^1.8.0",
45
45
  "@atlaskit/link-extractors": "^1.3.0",
46
46
  "@atlaskit/linking-common": "^5.6.0",
47
- "@atlaskit/linking-types": "^8.7.0",
47
+ "@atlaskit/linking-types": "^8.8.0",
48
48
  "@atlaskit/logo": "^13.15.0",
49
49
  "@atlaskit/lozenge": "^11.6.0",
50
50
  "@atlaskit/modal-dialog": "^12.10.0",
@@ -83,7 +83,7 @@
83
83
  "@af/integration-testing": "*",
84
84
  "@af/visual-regression": "*",
85
85
  "@atlaskit/analytics-listeners": "^8.9.0",
86
- "@atlaskit/css-reset": "^6.7.0",
86
+ "@atlaskit/css-reset": "^6.8.0",
87
87
  "@atlaskit/link-test-helpers": "^7.0.0",
88
88
  "@atlaskit/media-test-helpers": "^33.0.0",
89
89
  "@atlaskit/ssr": "*",