@atlaskit/smart-card 32.1.0 → 32.2.0

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 (27) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/analytics.spec.yaml +1 -1
  3. package/dist/cjs/common/analytics/generated/create-event-payload.js +1 -1
  4. package/dist/cjs/common/analytics/generated/use-analytics-events.js +1 -1
  5. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  6. package/dist/cjs/utils/analytics/analytics.js +1 -1
  7. package/dist/cjs/view/CardWithUrl/component.js +1 -1
  8. package/dist/cjs/view/LinkUrl/index.js +1 -1
  9. package/dist/es2019/common/analytics/generated/create-event-payload.js +1 -1
  10. package/dist/es2019/common/analytics/generated/use-analytics-events.js +1 -1
  11. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  12. package/dist/es2019/utils/analytics/analytics.js +1 -1
  13. package/dist/es2019/view/CardWithUrl/component.js +1 -1
  14. package/dist/es2019/view/LinkUrl/index.js +1 -1
  15. package/dist/esm/common/analytics/generated/create-event-payload.js +1 -1
  16. package/dist/esm/common/analytics/generated/use-analytics-events.js +1 -1
  17. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +1 -2
  18. package/dist/esm/utils/analytics/analytics.js +1 -1
  19. package/dist/esm/view/CardWithUrl/component.js +1 -1
  20. package/dist/esm/view/LinkUrl/index.js +1 -1
  21. package/dist/types/common/analytics/generated/analytics.types.d.ts +3 -3
  22. package/dist/types/common/analytics/generated/create-event-payload.d.ts +2 -2
  23. package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -8
  24. package/dist/types-ts4.5/common/analytics/generated/analytics.types.d.ts +3 -3
  25. package/dist/types-ts4.5/common/analytics/generated/create-event-payload.d.ts +2 -2
  26. package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -8
  27. package/package.json +2 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 32.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#168570](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168570)
8
+ [`cd8f5fa3d2b57`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cd8f5fa3d2b57) -
9
+ [ux] EDM-11342 Cleanup of AI summary agent FF
10
+
11
+ ## 32.1.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#170976](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170976)
16
+ [`dd792fd8a84f0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dd792fd8a84f0) -
17
+ Fix analytics naming for smartLinkIframe focused
18
+
3
19
  ## 32.1.0
4
20
 
5
21
  ### Minor Changes
@@ -290,7 +290,7 @@ events:
290
290
  required: true
291
291
  type: number
292
292
  description: Percentage element was visible at end of dwell
293
- - smartLinkIframe focus:
293
+ - smartLinkIframe focused:
294
294
  type: ui
295
295
  description: fires when a user clicks or tabs into a Smart Link's iframe.
296
296
  attributes:
@@ -11,7 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
11
11
  *
12
12
  * Generates Typescript types for analytics events from analytics.spec.yaml
13
13
  *
14
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
14
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
15
15
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
16
16
  */
17
17
 
@@ -14,7 +14,7 @@ var _createEventPayload = _interopRequireDefault(require("./create-event-payload
14
14
  *
15
15
  * Generates Typescript types for analytics events from analytics.spec.yaml
16
16
  *
17
- * @codegen <<SignedSource::3fdfbbdbdb062babb9a2ab4e53454d79>>
17
+ * @codegen <<SignedSource::1f3587129789e7883af37adad3817cd2>>
18
18
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
19
19
  */
20
20
 
@@ -12,7 +12,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
13
  var _uuid = _interopRequireDefault(require("uuid"));
14
14
  var _linkingCommon = require("@atlaskit/linking-common");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _readStream = require("./readStream");
17
16
  var _types = require("./types");
18
17
  var _utils = require("./utils");
@@ -47,7 +46,7 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
47
46
  while (1) switch (_context.prev = _context.next) {
48
47
  case 0:
49
48
  payload = {
50
- recipient_agent_named_id: (0, _platformFeatureFlags.fg)('platform-smart-card-use-ai-smartlink-summary-agent') ? 'smartlink_summary_agent' : 'summary_agent',
49
+ recipient_agent_named_id: 'smartlink_summary_agent',
51
50
  agent_input_context: {
52
51
  content_url: _this.url,
53
52
  content_ari: _this.ari,
@@ -17,7 +17,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
17
17
  var context = exports.context = {
18
18
  componentName: 'smart-cards',
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "32.1.0"
20
+ packageVersion: "32.2.0"
21
21
  };
22
22
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
23
23
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -167,7 +167,7 @@ function Component(_ref) {
167
167
  });
168
168
  }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
169
169
  var onIframeFocus = (0, _react.useCallback)(function () {
170
- fireEvent('ui.smartLinkIframe.focus', {
170
+ fireEvent('ui.smartLinkIframe.focused', {
171
171
  id: id,
172
172
  definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
173
173
  display: isFlexibleUi ? 'flexible' : appearance
@@ -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: "32.1.0",
20
+ packageVersion: "32.2.0",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.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::0d08fdca953a1eb1130683499e509165>>
6
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::3fdfbbdbdb062babb9a2ab4e53454d79>>
6
+ * @codegen <<SignedSource::1f3587129789e7883af37adad3817cd2>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  import { useCallback } from 'react';
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import uuid from 'uuid';
3
3
  import { getBaseUrl } from '@atlaskit/linking-common';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { readStream } from './readStream';
6
5
  import { ChunkProcessingError } from './types';
7
6
  import { addPath, getXProductHeaderValue } from './utils';
@@ -23,7 +22,7 @@ export class AISummaryService {
23
22
  });
24
23
  _defineProperty(this, "fetchStream", async () => {
25
24
  const payload = {
26
- recipient_agent_named_id: fg('platform-smart-card-use-ai-smartlink-summary-agent') ? 'smartlink_summary_agent' : 'summary_agent',
25
+ recipient_agent_named_id: 'smartlink_summary_agent',
27
26
  agent_input_context: {
28
27
  content_url: this.url,
29
28
  content_ari: this.ari,
@@ -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: "32.1.0"
7
+ packageVersion: "32.2.0"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -155,7 +155,7 @@ function Component({
155
155
  });
156
156
  }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
157
157
  const onIframeFocus = useCallback(() => {
158
- fireEvent('ui.smartLinkIframe.focus', {
158
+ fireEvent('ui.smartLinkIframe.focused', {
159
159
  id,
160
160
  definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
161
161
  display: isFlexibleUi ? 'flexible' : appearance
@@ -7,7 +7,7 @@ import LinkWarningModal from './LinkWarningModal';
7
7
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "32.1.0",
10
+ packageVersion: "32.2.0",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  *
5
5
  * Generates Typescript types for analytics events from analytics.spec.yaml
6
6
  *
7
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
7
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
8
8
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
9
9
  */
10
10
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::3fdfbbdbdb062babb9a2ab4e53454d79>>
6
+ * @codegen <<SignedSource::1f3587129789e7883af37adad3817cd2>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  import { useCallback } from 'react';
@@ -12,7 +12,6 @@ function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symb
12
12
  function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
13
13
  import uuid from 'uuid';
14
14
  import { getBaseUrl } from '@atlaskit/linking-common';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { readStream } from './readStream';
17
16
  import { ChunkProcessingError } from './types';
18
17
  import { addPath, getXProductHeaderValue } from './utils';
@@ -40,7 +39,7 @@ export var AISummaryService = /*#__PURE__*/function () {
40
39
  while (1) switch (_context.prev = _context.next) {
41
40
  case 0:
42
41
  payload = {
43
- recipient_agent_named_id: fg('platform-smart-card-use-ai-smartlink-summary-agent') ? 'smartlink_summary_agent' : 'summary_agent',
42
+ recipient_agent_named_id: 'smartlink_summary_agent',
44
43
  agent_input_context: {
45
44
  content_url: _this.url,
46
45
  content_ari: _this.ari,
@@ -10,7 +10,7 @@ export var ANALYTICS_CHANNEL = 'media';
10
10
  export var context = {
11
11
  componentName: 'smart-cards',
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "32.1.0"
13
+ packageVersion: "32.2.0"
14
14
  };
15
15
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
16
16
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -157,7 +157,7 @@ function Component(_ref) {
157
157
  });
158
158
  }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
159
159
  var onIframeFocus = useCallback(function () {
160
- fireEvent('ui.smartLinkIframe.focus', {
160
+ fireEvent('ui.smartLinkIframe.focused', {
161
161
  id: id,
162
162
  definitionId: definitionId !== null && definitionId !== void 0 ? definitionId : null,
163
163
  display: isFlexibleUi ? 'flexible' : appearance
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "32.1.0",
13
+ packageVersion: "32.2.0",
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::b25cecd58c98d2c650c7c6c94fdf3c0c>>
6
+ * @codegen <<SignedSource::6a2a0a5715993e0dd235d38d95d6bbcc>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -71,7 +71,7 @@ export type SmartLinkIframeDwelledAttributesType = {
71
71
  dwellTime: number;
72
72
  dwellPercentVisible: number;
73
73
  };
74
- export type SmartLinkIframeFocusAttributesType = {
74
+ export type SmartLinkIframeFocusedAttributesType = {
75
75
  id: string;
76
76
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
77
77
  definitionId: string | null;
@@ -138,7 +138,7 @@ export type AnalyticsEventAttributes = {
138
138
  'ui.smartLinkIframe.dwelled': SmartLinkIframeDwelledAttributesType;
139
139
  /**
140
140
  * fires when a user clicks or tabs into a Smart Link's iframe. */
141
- 'ui.smartLinkIframe.focus': SmartLinkIframeFocusAttributesType;
141
+ 'ui.smartLinkIframe.focused': SmartLinkIframeFocusedAttributesType;
142
142
  /**
143
143
  * user connecting their account to view a Smart Link. */
144
144
  'track.applicationAccount.connected': ApplicationAccountConnectedAttributesType;
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
6
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
- import { type AnalyticsEventAttributes, type EventKey } from './analytics.types';
9
+ import type { AnalyticsEventAttributes, EventKey } from './analytics.types';
10
10
  type OptionalIfUndefined<T> = undefined extends T ? [param?: T] : [param: T];
11
11
  export type EventPayloadAttributes<K extends EventKey> = OptionalIfUndefined<AnalyticsEventAttributes[K]>;
12
12
  type EventTypes = 'ui' | 'track' | 'operational' | 'screen';
@@ -28,15 +28,8 @@ export type AISummaryStatus = 'ready' | 'loading' | 'error' | 'done';
28
28
  export type PostAgentPayload = {
29
29
  /**
30
30
  * Which agent in `assistance_service` to use.
31
- *
32
- * The AI mate team requested Linking Platform to move away from the default
33
- * summary agent and create our own.
34
- *
35
- * There is likely to be a future migration from `assistance-service`
36
- * to `convo-ai` which is currently unclear:
37
- * https://atlassian.slack.com/archives/C05S4PH8YAY/p1728528096549549
38
31
  */
39
- recipient_agent_named_id: 'smartlink_summary_agent' | 'summary_agent';
32
+ recipient_agent_named_id: 'smartlink_summary_agent';
40
33
  agent_input_context: AgentInputContext;
41
34
  user_intent?: string;
42
35
  };
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::b25cecd58c98d2c650c7c6c94fdf3c0c>>
6
+ * @codegen <<SignedSource::6a2a0a5715993e0dd235d38d95d6bbcc>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -71,7 +71,7 @@ export type SmartLinkIframeDwelledAttributesType = {
71
71
  dwellTime: number;
72
72
  dwellPercentVisible: number;
73
73
  };
74
- export type SmartLinkIframeFocusAttributesType = {
74
+ export type SmartLinkIframeFocusedAttributesType = {
75
75
  id: string;
76
76
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
77
77
  definitionId: string | null;
@@ -138,7 +138,7 @@ export type AnalyticsEventAttributes = {
138
138
  'ui.smartLinkIframe.dwelled': SmartLinkIframeDwelledAttributesType;
139
139
  /**
140
140
  * fires when a user clicks or tabs into a Smart Link's iframe. */
141
- 'ui.smartLinkIframe.focus': SmartLinkIframeFocusAttributesType;
141
+ 'ui.smartLinkIframe.focused': SmartLinkIframeFocusedAttributesType;
142
142
  /**
143
143
  * user connecting their account to view a Smart Link. */
144
144
  'track.applicationAccount.connected': ApplicationAccountConnectedAttributesType;
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::0d08fdca953a1eb1130683499e509165>>
6
+ * @codegen <<SignedSource::eb8cd1263459fb798341024dc0c461ea>>
7
7
  * @codegenCommand yarn workspace @atlassian/analytics-tooling run analytics:codegen smart-card
8
8
  */
9
- import { type AnalyticsEventAttributes, type EventKey } from './analytics.types';
9
+ import type { AnalyticsEventAttributes, EventKey } from './analytics.types';
10
10
  type OptionalIfUndefined<T> = undefined extends T ? [
11
11
  param?: T
12
12
  ] : [
@@ -28,15 +28,8 @@ export type AISummaryStatus = 'ready' | 'loading' | 'error' | 'done';
28
28
  export type PostAgentPayload = {
29
29
  /**
30
30
  * Which agent in `assistance_service` to use.
31
- *
32
- * The AI mate team requested Linking Platform to move away from the default
33
- * summary agent and create our own.
34
- *
35
- * There is likely to be a future migration from `assistance-service`
36
- * to `convo-ai` which is currently unclear:
37
- * https://atlassian.slack.com/archives/C05S4PH8YAY/p1728528096549549
38
31
  */
39
- recipient_agent_named_id: 'smartlink_summary_agent' | 'summary_agent';
32
+ recipient_agent_named_id: 'smartlink_summary_agent';
40
33
  agent_input_context: AgentInputContext;
41
34
  user_intent?: string;
42
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "32.1.0",
3
+ "version": "32.2.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -49,7 +49,7 @@
49
49
  "@atlaskit/logo": "^14.3.0",
50
50
  "@atlaskit/lozenge": "^11.12.0",
51
51
  "@atlaskit/menu": "^2.13.0",
52
- "@atlaskit/modal-dialog": "^12.17.0",
52
+ "@atlaskit/modal-dialog": "^12.18.0",
53
53
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
54
54
  "@atlaskit/platform-feature-flags": "^0.3.0",
55
55
  "@atlaskit/popup": "^1.29.0",
@@ -165,9 +165,6 @@
165
165
  "send-smart-link-rendered-ufo-event-half-time": {
166
166
  "type": "boolean"
167
167
  },
168
- "platform-smart-card-use-ai-smartlink-summary-agent": {
169
- "type": "boolean"
170
- },
171
168
  "platform-visual-refresh-icons": {
172
169
  "type": "boolean"
173
170
  },