@atlaskit/smart-card 44.3.10 → 44.3.11

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,13 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 44.3.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7e1e133a98bbd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7e1e133a98bbd) -
8
+ Adds analytics attribute rovoActionsCtaShown to smartLink renderSuccess and hoverCard viewed
9
+ events
10
+
3
11
  ## 44.3.10
4
12
 
5
13
  ### Patch Changes
@@ -680,6 +680,10 @@ events:
680
680
  required: false
681
681
  type: string
682
682
  description: The definitionId of the Smart Link resolver invoked.
683
+ rovoActionsCtaShown:
684
+ required: false
685
+ type: boolean
686
+ description: Whether the Rovo Actions CTA icon was shown for this Smart Link
683
687
  - hoverCard dismissed:
684
688
  type: ui
685
689
  description: fires an event that represents a hover preview being dismissed.
@@ -702,6 +706,10 @@ events:
702
706
  required: false
703
707
  type: string
704
708
  description: The definitionId of the Smart Link resolver invoked.
709
+ rovoActionsCtaShown:
710
+ required: false
711
+ type: boolean
712
+ description: Whether the Rovo Actions CTA (inline nudge) was shown for this Smart Link
705
713
  - button clicked (connectAccount):
706
714
  type: ui
707
715
  description:
@@ -830,6 +838,10 @@ events:
830
838
  required: true
831
839
  type: ['inline', 'block', 'embed', 'embedPreview', 'flexible', 'hoverCardPreview']
832
840
  description: Whether the card was an Inline, Block, Embed or Flexible UI
841
+ rovoActionsCtaShown:
842
+ required: false
843
+ type: boolean
844
+ description: Whether the Rovo Actions CTA (inline nudge) was shown for this Smart Link
833
845
  - smartLink renderFailed:
834
846
  type: ui
835
847
  description: fires an event that represents when a Smart Link renders unsuccessfully.
@@ -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.3.9"
14
+ packageVersion: "44.3.10"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.CardWithUrlContent = exports.CardWithUrl = void 0;
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
10
  var _react = _interopRequireWildcard(require("react"));
10
11
  var _analyticsNext = require("@atlaskit/analytics-next");
11
12
  var _linkExtractors = require("@atlaskit/link-extractors");
@@ -18,6 +19,7 @@ var _constants = require("../../constants");
18
19
  var _state = require("../../state");
19
20
  var _analytics = require("../../state/analytics");
20
21
  var _helpers = require("../../state/helpers");
22
+ var _useInlineActionNudgeExperiment = _interopRequireDefault(require("../../state/hooks/use-inline-action-nudge-experiment"));
21
23
  var _modal = require("../../state/modal");
22
24
  var _utils = require("../../utils");
23
25
  var _combineActionOptions = require("../../utils/actions/combine-action-options");
@@ -32,6 +34,8 @@ var _InlineCard = require("../InlineCard");
32
34
  var _useSmartLinkEvents = require("../SmartLinkEvents/useSmartLinkEvents");
33
35
  var _cardIntersectionObserver = _interopRequireDefault(require("./card-intersection-observer"));
34
36
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
37
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
38
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
35
39
  var thirdPartyARIPrefix = 'ari:third-party';
36
40
  var EmbedCardComponent = (0, _platformFeatureFlagsReact.componentWithFG)('rovo_chat_embed_card_dwell_and_hover_metrics', _EmbedCard.EmbedCardUpdated, _EmbedCard.EmbedCard);
37
41
  function Component(_ref) {
@@ -93,6 +97,8 @@ function Component(_ref) {
93
97
  actionOptions: actionOptionsProp,
94
98
  platform: platform
95
99
  });
100
+ var _useInlineActionNudge = (0, _useInlineActionNudgeExperiment.default)(url, showHoverPreview, actionOptions),
101
+ rovoActionsCtaShown = _useInlineActionNudge.isEnabled;
96
102
  var fire3PClickEvent = (0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics') ?
97
103
  // eslint-disable-next-line react-hooks/rules-of-hooks
98
104
  (0, _useSmartLinkEvents.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -216,11 +222,13 @@ function Component(_ref) {
216
222
  (0, _analytics.succeedUfoExperience)('smart-link-authenticated', id || 'NULL', {
217
223
  display: isFlexibleUi ? 'flexible' : appearance
218
224
  });
219
- fireEvent('ui.smartLink.renderSuccess', {
225
+ fireEvent('ui.smartLink.renderSuccess', _objectSpread({
220
226
  display: isFlexibleUi ? 'flexible' : appearance
221
- });
227
+ }, appearance === 'inline' && {
228
+ rovoActionsCtaShown: rovoActionsCtaShown
229
+ }));
222
230
  }
223
- }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, state.status]);
231
+ }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, rovoActionsCtaShown, state.status]);
224
232
 
225
233
  // Fire smartLink seen event once on a successful render card is in the viewport
226
234
  (0, _react.useEffect)(function () {
@@ -410,6 +418,8 @@ function ComponentUpdated(_ref2) {
410
418
  actionOptions: actionOptionsProp,
411
419
  platform: platform
412
420
  });
421
+ var _useInlineActionNudge2 = (0, _useInlineActionNudgeExperiment.default)(url, showHoverPreview, actionOptions),
422
+ rovoActionsCtaShown = _useInlineActionNudge2.isEnabled;
413
423
  var fire3PClickEvent = (0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics') ?
414
424
  // eslint-disable-next-line react-hooks/rules-of-hooks
415
425
  (0, _useSmartLinkEvents.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -533,11 +543,13 @@ function ComponentUpdated(_ref2) {
533
543
  (0, _analytics.succeedUfoExperience)('smart-link-authenticated', id || 'NULL', {
534
544
  display: isFlexibleUi ? 'flexible' : appearance
535
545
  });
536
- fireEvent('ui.smartLink.renderSuccess', {
546
+ fireEvent('ui.smartLink.renderSuccess', _objectSpread({
537
547
  display: isFlexibleUi ? 'flexible' : appearance
538
- });
548
+ }, appearance === 'inline' && {
549
+ rovoActionsCtaShown: rovoActionsCtaShown
550
+ }));
539
551
  }
540
- }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, state.status]);
552
+ }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, rovoActionsCtaShown, state.status]);
541
553
 
542
554
  // Fire smartLink seen event once on a successful render card is in the viewport
543
555
  (0, _react.useEffect)(function () {
@@ -19,6 +19,7 @@ var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-anal
19
19
  var _constants = require("../../../constants");
20
20
  var _extractRovoChatAction = _interopRequireDefault(require("../../../extractors/flexible/actions/extract-rovo-chat-action"));
21
21
  var _helpers = require("../../../state/helpers");
22
+ var _useInlineActionNudgeExperiment = _interopRequireDefault(require("../../../state/hooks/use-inline-action-nudge-experiment"));
22
23
  var _useRovoConfig = _interopRequireDefault(require("../../../state/hooks/use-rovo-config"));
23
24
  var _store = require("../../../state/store");
24
25
  var _utils = require("../../../utils");
@@ -324,7 +325,8 @@ var HoverCardContent = function HoverCardContent(_ref4) {
324
325
  };
325
326
  var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(props) {
326
327
  var cardState = props.cardState,
327
- actionOptions = props.actionOptions;
328
+ actionOptions = props.actionOptions,
329
+ url = props.url;
328
330
  var rovoConfig = (0, _useRovoConfig.default)();
329
331
  var isResolved = useIsResolvedView(props);
330
332
  var showPreauthBetterHovercard = useIsShowPreauthBetterHovercard(props);
@@ -335,6 +337,8 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
335
337
  actionOptions: actionOptions
336
338
  }) !== undefined;
337
339
  }, [actionOptions, cardState.details, rovoConfig, isResolved]);
340
+ var _useInlineActionNudge = (0, _useInlineActionNudgeExperiment.default)(url, true, actionOptions),
341
+ rovoActionsCtaShown = _useInlineActionNudge.isEnabled;
338
342
  var data = (0, _react.useMemo)(function () {
339
343
  var viewVariant = 'default';
340
344
  if (showRovoResolvedView && ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true))) {
@@ -344,10 +348,11 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
344
348
  }
345
349
  return {
346
350
  attributes: {
347
- viewVariant: viewVariant
351
+ viewVariant: viewVariant,
352
+ rovoActionsCtaShown: rovoActionsCtaShown
348
353
  }
349
354
  };
350
- }, [showRovoResolvedView, showPreauthBetterHovercard]);
355
+ }, [showRovoResolvedView, showPreauthBetterHovercard, rovoActionsCtaShown]);
351
356
  return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
352
357
  data: data
353
358
  }, /*#__PURE__*/_react.default.createElement(HoverCardContent, (0, _extends2.default)({}, props, {
@@ -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.3.9",
25
+ packageVersion: "44.3.10",
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.3.9"
5
+ packageVersion: "44.3.10"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -10,6 +10,7 @@ import { CardDisplay } from '../../constants';
10
10
  import { useSmartLink } from '../../state';
11
11
  import { succeedUfoExperience } from '../../state/analytics';
12
12
  import { getClickUrl, getDefinitionId, getExtensionKey, getFirstPartyIdentifier, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
13
+ import useInlineActionNudgeExperiment from '../../state/hooks/use-inline-action-nudge-experiment';
13
14
  import { SmartLinkModalProvider } from '../../state/modal';
14
15
  import { isSpecialClick, isSpecialEvent, isSpecialKey } from '../../utils';
15
16
  import { combineActionOptions } from '../../utils/actions/combine-action-options';
@@ -86,6 +87,9 @@ function Component({
86
87
  actionOptions: actionOptionsProp,
87
88
  platform
88
89
  });
90
+ const {
91
+ isEnabled: rovoActionsCtaShown
92
+ } = useInlineActionNudgeExperiment(url, showHoverPreview, actionOptions);
89
93
  const fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
90
94
  // eslint-disable-next-line react-hooks/rules-of-hooks
91
95
  useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -206,10 +210,13 @@ function Component({
206
210
  display: isFlexibleUi ? 'flexible' : appearance
207
211
  });
208
212
  fireEvent('ui.smartLink.renderSuccess', {
209
- display: isFlexibleUi ? 'flexible' : appearance
213
+ display: isFlexibleUi ? 'flexible' : appearance,
214
+ ...(appearance === 'inline' && {
215
+ rovoActionsCtaShown
216
+ })
210
217
  });
211
218
  }
212
- }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, state.status]);
219
+ }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, rovoActionsCtaShown, state.status]);
213
220
 
214
221
  // Fire smartLink seen event once on a successful render card is in the viewport
215
222
  useEffect(() => {
@@ -401,6 +408,9 @@ function ComponentUpdated({
401
408
  actionOptions: actionOptionsProp,
402
409
  platform
403
410
  });
411
+ const {
412
+ isEnabled: rovoActionsCtaShown
413
+ } = useInlineActionNudgeExperiment(url, showHoverPreview, actionOptions);
404
414
  const fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
405
415
  // eslint-disable-next-line react-hooks/rules-of-hooks
406
416
  useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -521,10 +531,13 @@ function ComponentUpdated({
521
531
  display: isFlexibleUi ? 'flexible' : appearance
522
532
  });
523
533
  fireEvent('ui.smartLink.renderSuccess', {
524
- display: isFlexibleUi ? 'flexible' : appearance
534
+ display: isFlexibleUi ? 'flexible' : appearance,
535
+ ...(appearance === 'inline' && {
536
+ rovoActionsCtaShown
537
+ })
525
538
  });
526
539
  }
527
- }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, state.status]);
540
+ }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, rovoActionsCtaShown, state.status]);
528
541
 
529
542
  // Fire smartLink seen event once on a successful render card is in the viewport
530
543
  useEffect(() => {
@@ -10,6 +10,7 @@ import { useAnalyticsEvents } from '../../../common/analytics/generated/use-anal
10
10
  import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../constants';
11
11
  import extractRovoChatAction from '../../../extractors/flexible/actions/extract-rovo-chat-action';
12
12
  import { getDefinitionId, getExtensionKey, getServices } from '../../../state/helpers';
13
+ import useInlineActionNudgeExperiment from '../../../state/hooks/use-inline-action-nudge-experiment';
13
14
  import useRovoConfig from '../../../state/hooks/use-rovo-config';
14
15
  import { useSmartCardState } from '../../../state/store';
15
16
  import { isSpecialEvent } from '../../../utils';
@@ -303,7 +304,8 @@ const HoverCardContent = ({
303
304
  const HoverCardContentWithViewVariant = props => {
304
305
  const {
305
306
  cardState,
306
- actionOptions
307
+ actionOptions,
308
+ url
307
309
  } = props;
308
310
  const rovoConfig = useRovoConfig();
309
311
  const isResolved = useIsResolvedView(props);
@@ -313,6 +315,9 @@ const HoverCardContentWithViewVariant = props => {
313
315
  rovoConfig,
314
316
  actionOptions
315
317
  }) !== undefined, [actionOptions, cardState.details, rovoConfig, isResolved]);
318
+ const {
319
+ isEnabled: rovoActionsCtaShown
320
+ } = useInlineActionNudgeExperiment(url, true, actionOptions);
316
321
  const data = useMemo(() => {
317
322
  let viewVariant = 'default';
318
323
  if (showRovoResolvedView && (expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true) || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true))) {
@@ -322,10 +327,11 @@ const HoverCardContentWithViewVariant = props => {
322
327
  }
323
328
  return {
324
329
  attributes: {
325
- viewVariant
330
+ viewVariant,
331
+ rovoActionsCtaShown
326
332
  }
327
333
  };
328
- }, [showRovoResolvedView, showPreauthBetterHovercard]);
334
+ }, [showRovoResolvedView, showPreauthBetterHovercard, rovoActionsCtaShown]);
329
335
  return /*#__PURE__*/React.createElement(AnalyticsContext, {
330
336
  data: data
331
337
  }, /*#__PURE__*/React.createElement(HoverCardContent, _extends({}, props, {
@@ -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.3.9",
15
+ packageVersion: "44.3.10",
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.3.9"
7
+ packageVersion: "44.3.10"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,3 +1,6 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
4
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
2
5
  import { useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
3
6
  import { extractSmartLinkEmbed } from '@atlaskit/link-extractors';
@@ -10,6 +13,7 @@ import { CardDisplay } from '../../constants';
10
13
  import { useSmartLink } from '../../state';
11
14
  import { succeedUfoExperience } from '../../state/analytics';
12
15
  import { getClickUrl, getDefinitionId, getExtensionKey, getFirstPartyIdentifier, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
16
+ import useInlineActionNudgeExperiment from '../../state/hooks/use-inline-action-nudge-experiment';
13
17
  import { SmartLinkModalProvider } from '../../state/modal';
14
18
  import { isSpecialClick, isSpecialEvent, isSpecialKey } from '../../utils';
15
19
  import { combineActionOptions } from '../../utils/actions/combine-action-options';
@@ -84,6 +88,8 @@ function Component(_ref) {
84
88
  actionOptions: actionOptionsProp,
85
89
  platform: platform
86
90
  });
91
+ var _useInlineActionNudge = useInlineActionNudgeExperiment(url, showHoverPreview, actionOptions),
92
+ rovoActionsCtaShown = _useInlineActionNudge.isEnabled;
87
93
  var fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
88
94
  // eslint-disable-next-line react-hooks/rules-of-hooks
89
95
  useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -207,11 +213,13 @@ function Component(_ref) {
207
213
  succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
208
214
  display: isFlexibleUi ? 'flexible' : appearance
209
215
  });
210
- fireEvent('ui.smartLink.renderSuccess', {
216
+ fireEvent('ui.smartLink.renderSuccess', _objectSpread({
211
217
  display: isFlexibleUi ? 'flexible' : appearance
212
- });
218
+ }, appearance === 'inline' && {
219
+ rovoActionsCtaShown: rovoActionsCtaShown
220
+ }));
213
221
  }
214
- }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, state.status]);
222
+ }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, rovoActionsCtaShown, state.status]);
215
223
 
216
224
  // Fire smartLink seen event once on a successful render card is in the viewport
217
225
  useEffect(function () {
@@ -401,6 +409,8 @@ function ComponentUpdated(_ref2) {
401
409
  actionOptions: actionOptionsProp,
402
410
  platform: platform
403
411
  });
412
+ var _useInlineActionNudge2 = useInlineActionNudgeExperiment(url, showHoverPreview, actionOptions),
413
+ rovoActionsCtaShown = _useInlineActionNudge2.isEnabled;
404
414
  var fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
405
415
  // eslint-disable-next-line react-hooks/rules-of-hooks
406
416
  useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -524,11 +534,13 @@ function ComponentUpdated(_ref2) {
524
534
  succeedUfoExperience('smart-link-authenticated', id || 'NULL', {
525
535
  display: isFlexibleUi ? 'flexible' : appearance
526
536
  });
527
- fireEvent('ui.smartLink.renderSuccess', {
537
+ fireEvent('ui.smartLink.renderSuccess', _objectSpread({
528
538
  display: isFlexibleUi ? 'flexible' : appearance
529
- });
539
+ }, appearance === 'inline' && {
540
+ rovoActionsCtaShown: rovoActionsCtaShown
541
+ }));
530
542
  }
531
- }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, state.status]);
543
+ }, [appearance, extensionKey, fireEvent, id, isFlexibleUi, rovoActionsCtaShown, state.status]);
532
544
 
533
545
  // Fire smartLink seen event once on a successful render card is in the viewport
534
546
  useEffect(function () {
@@ -13,6 +13,7 @@ import { useAnalyticsEvents } from '../../../common/analytics/generated/use-anal
13
13
  import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../constants';
14
14
  import extractRovoChatAction from '../../../extractors/flexible/actions/extract-rovo-chat-action';
15
15
  import { getDefinitionId, getExtensionKey, getServices } from '../../../state/helpers';
16
+ import useInlineActionNudgeExperiment from '../../../state/hooks/use-inline-action-nudge-experiment';
16
17
  import useRovoConfig from '../../../state/hooks/use-rovo-config';
17
18
  import { useSmartCardState } from '../../../state/store';
18
19
  import { isSpecialEvent } from '../../../utils';
@@ -315,7 +316,8 @@ var HoverCardContent = function HoverCardContent(_ref4) {
315
316
  };
316
317
  var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(props) {
317
318
  var cardState = props.cardState,
318
- actionOptions = props.actionOptions;
319
+ actionOptions = props.actionOptions,
320
+ url = props.url;
319
321
  var rovoConfig = useRovoConfig();
320
322
  var isResolved = useIsResolvedView(props);
321
323
  var showPreauthBetterHovercard = useIsShowPreauthBetterHovercard(props);
@@ -326,6 +328,8 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
326
328
  actionOptions: actionOptions
327
329
  }) !== undefined;
328
330
  }, [actionOptions, cardState.details, rovoConfig, isResolved]);
331
+ var _useInlineActionNudge = useInlineActionNudgeExperiment(url, true, actionOptions),
332
+ rovoActionsCtaShown = _useInlineActionNudge.isEnabled;
329
333
  var data = useMemo(function () {
330
334
  var viewVariant = 'default';
331
335
  if (showRovoResolvedView && (expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true) || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true))) {
@@ -335,10 +339,11 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
335
339
  }
336
340
  return {
337
341
  attributes: {
338
- viewVariant: viewVariant
342
+ viewVariant: viewVariant,
343
+ rovoActionsCtaShown: rovoActionsCtaShown
339
344
  }
340
345
  };
341
- }, [showRovoResolvedView, showPreauthBetterHovercard]);
346
+ }, [showRovoResolvedView, showPreauthBetterHovercard, rovoActionsCtaShown]);
342
347
  return /*#__PURE__*/React.createElement(AnalyticsContext, {
343
348
  data: data
344
349
  }, /*#__PURE__*/React.createElement(HoverCardContent, _extends({}, props, {
@@ -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.3.9",
18
+ packageVersion: "44.3.10",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -217,12 +217,14 @@ export type HoverCardViewedAttributesType = {
217
217
  previewDisplay: 'card' | 'embed';
218
218
  previewInvokeMethod: 'keyboard' | 'mouse_hover' | 'mouse_click' | null;
219
219
  definitionId: string | null;
220
+ rovoActionsCtaShown?: boolean;
220
221
  };
221
222
  export type HoverCardDismissedAttributesType = {
222
223
  previewDisplay: 'card' | 'embed';
223
224
  hoverTime: number;
224
225
  previewInvokeMethod: 'keyboard' | 'mouse_hover' | 'mouse_click' | null;
225
226
  definitionId: string | null;
227
+ rovoActionsCtaShown?: boolean;
226
228
  };
227
229
  export type ButtonClickedConnectAccountAttributesType = {
228
230
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url';
@@ -255,6 +257,7 @@ export type ButtonClickedEmbedPreviewResizeAttributesType = {
255
257
  };
256
258
  export type SmartLinkRenderSuccessAttributesType = {
257
259
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
260
+ rovoActionsCtaShown?: boolean;
258
261
  };
259
262
  export type SmartLinkRenderFailedAttributesType = {
260
263
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
@@ -217,12 +217,14 @@ export type HoverCardViewedAttributesType = {
217
217
  previewDisplay: 'card' | 'embed';
218
218
  previewInvokeMethod: 'keyboard' | 'mouse_hover' | 'mouse_click' | null;
219
219
  definitionId: string | null;
220
+ rovoActionsCtaShown?: boolean;
220
221
  };
221
222
  export type HoverCardDismissedAttributesType = {
222
223
  previewDisplay: 'card' | 'embed';
223
224
  hoverTime: number;
224
225
  previewInvokeMethod: 'keyboard' | 'mouse_hover' | 'mouse_click' | null;
225
226
  definitionId: string | null;
227
+ rovoActionsCtaShown?: boolean;
226
228
  };
227
229
  export type ButtonClickedConnectAccountAttributesType = {
228
230
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url';
@@ -255,6 +257,7 @@ export type ButtonClickedEmbedPreviewResizeAttributesType = {
255
257
  };
256
258
  export type SmartLinkRenderSuccessAttributesType = {
257
259
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
260
+ rovoActionsCtaShown?: boolean;
258
261
  };
259
262
  export type SmartLinkRenderFailedAttributesType = {
260
263
  display: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "44.3.10",
3
+ "version": "44.3.11",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"