@atlaskit/smart-card 44.3.16 → 44.3.18

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 (25) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +3 -0
  3. package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +6 -3
  4. package/dist/cjs/state/hooks/use-inline-action-nudge-experiment/index.js +6 -7
  5. package/dist/cjs/utils/analytics/analytics.js +1 -1
  6. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +3 -4
  7. package/dist/cjs/view/LinkUrl/index.js +1 -1
  8. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +3 -0
  9. package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +6 -3
  10. package/dist/es2019/state/hooks/use-inline-action-nudge-experiment/index.js +6 -7
  11. package/dist/es2019/utils/analytics/analytics.js +1 -1
  12. package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +3 -4
  13. package/dist/es2019/view/LinkUrl/index.js +1 -1
  14. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +3 -0
  15. package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +6 -3
  16. package/dist/esm/state/hooks/use-inline-action-nudge-experiment/index.js +6 -7
  17. package/dist/esm/utils/analytics/analytics.js +1 -1
  18. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +3 -4
  19. package/dist/esm/view/LinkUrl/index.js +1 -1
  20. package/dist/types/state/hooks/use-inline-action-nudge-experiment/index.d.ts +1 -1
  21. package/dist/types-ts4.5/state/hooks/use-inline-action-nudge-experiment/index.d.ts +1 -1
  22. package/package.json +3 -3
  23. /package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-with-google-rovo-chat-action--default.png → hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png} +0 -0
  24. /package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-with-google-rovo-chat-action--default.png → hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png} +0 -0
  25. /package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-with-google-rovo-chat-action--default.png → hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 44.3.18
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3c706ac2f9b52`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3c706ac2f9b52) -
8
+ [ux] Opt Google into 640 experiment with AI actions and CTA. Change RovoActions check to an
9
+ allowlist of extensionkeys
10
+
11
+ ## 44.3.17
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 44.3.16
4
18
 
5
19
  ### Patch Changes
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43fbdc9bbdc8153019286429b71a36b4709b3f6c40e63478482d08f8d204a234
3
+ size 25329
@@ -12,6 +12,8 @@ var _helpers = require("../../../state/helpers");
12
12
  var _canShowAction = require("../../../utils/actions/can-show-action");
13
13
  var _rovo = require("../../../utils/rovo");
14
14
  var _types = require("../../../view/Card/types");
15
+ // For rovogrowth-640 post auth inline experiment
16
+ var ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
15
17
  var extractRovoChatAction = function extractRovoChatAction(_ref) {
16
18
  var _response$meta, _actionOptions$rovoCh;
17
19
  var actionOptions = _ref.actionOptions,
@@ -28,9 +30,10 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
28
30
  return;
29
31
  }
30
32
  var supportsRovoActions = response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.supportedFeature) === null || _response$meta === void 0 ? void 0 : _response$meta.includes('RovoActions');
31
- var isGoogleProvider = (0, _helpers.getExtensionKey)(response) === 'google-object-provider';
33
+ var extensionKey = (0, _helpers.getExtensionKey)(response);
34
+ var isGoogleProvider = extensionKey === 'google-object-provider';
32
35
  var is3PAuthRovoActionEnabled = isGoogleProvider && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch');
33
- var is3PInlinePostAuthActionsEnabled = supportsRovoActions && !isGoogleProvider && (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
36
+ var is3PInlinePostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
34
37
  var is3PBlockPostAuthActionsEnabled = supportsRovoActions && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_block_card_kill_switch');
35
38
  var isSupportedFeature = is3PInlinePostAuthActionsEnabled || is3PAuthRovoActionEnabled || is3PBlockPostAuthActionsEnabled;
36
39
  var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
@@ -41,7 +44,7 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
41
44
  actionType: _constants.ActionName.RovoChatAction,
42
45
  definitionId: (0, _helpers.getDefinitionId)(response),
43
46
  display: appearance,
44
- extensionKey: (0, _helpers.getExtensionKey)(response),
47
+ extensionKey: extensionKey,
45
48
  id: id,
46
49
  resourceType: (0, _helpers.getResourceType)(response)
47
50
  },
@@ -11,7 +11,7 @@ var _rovo = require("../../../utils/rovo");
11
11
  var _helpers = require("../../helpers");
12
12
  var _store = require("../../store");
13
13
  var _useRovoConfig = _interopRequireDefault(require("../use-rovo-config"));
14
- var EXCLUDED_EXTENSION_KEYS = new Set(['figma-object-provider', 'google-object-provider']);
14
+ var ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
15
15
  var NOT_ENABLED_RESULT = {
16
16
  isEnabled: false
17
17
  };
@@ -24,31 +24,30 @@ var NOT_ENABLED_RESULT = {
24
24
  * 1. Rovo chat must be enabled for the tenant.
25
25
  * 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
26
26
  * 3. The link must support the RovoActions feature.
27
- * 4. The extension key must not be excluded (Figma and Google links are excluded).
27
+ * 4. The extension key must be one of the supported options.
28
28
  * 5. The experiment value must be true (via tmp-editor-statsig).
29
29
  *
30
30
  * The extension key is derived from the card store via the resolved URL,
31
31
  * so callers don't need to thread it as a prop.
32
32
  */
33
33
  var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url, showHoverPreview, actionOptions) {
34
- var _cardState$details$me, _cardState$details, _actionOptions$rovoCh, _actionOptions$rovoCh2;
34
+ var _actionOptions$rovoCh, _actionOptions$rovoCh2;
35
35
  var rovoConfig = (0, _useRovoConfig.default)();
36
36
  var isRovoChatEnabled = (0, _rovo.getIsRovoChatEnabled)(rovoConfig);
37
37
  var cardState = (0, _store.useSmartCardState)(url !== null && url !== void 0 ? url : '');
38
- var supportsRovoActions = (_cardState$details$me = cardState === null || cardState === void 0 || (_cardState$details = cardState.details) === null || _cardState$details === void 0 || (_cardState$details = _cardState$details.meta) === null || _cardState$details === void 0 || (_cardState$details = _cardState$details.supportedFeature) === null || _cardState$details === void 0 ? void 0 : _cardState$details.includes('RovoActions')) !== null && _cardState$details$me !== void 0 ? _cardState$details$me : false;
39
38
  var extensionKey = (0, _helpers.getExtensionKey)(cardState.details);
40
39
  var isRovoChatActionOptedIn = (_actionOptions$rovoCh = actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh2 = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh2 === void 0 ? void 0 : _actionOptions$rovoCh2.optIn) !== null && _actionOptions$rovoCh !== void 0 ? _actionOptions$rovoCh : false;
41
40
  return (0, _react.useMemo)(function () {
42
- if (!isRovoChatEnabled || !showHoverPreview || !supportsRovoActions || !url || !isRovoChatActionOptedIn) {
41
+ if (!isRovoChatEnabled || !showHoverPreview || !url || !isRovoChatActionOptedIn) {
43
42
  return NOT_ENABLED_RESULT;
44
43
  }
45
- if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
44
+ if (extensionKey && !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
46
45
  return NOT_ENABLED_RESULT;
47
46
  }
48
47
  var isEnabled = (0, _expValEquals.expValEquals)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
49
48
  return {
50
49
  isEnabled: isEnabled
51
50
  };
52
- }, [isRovoChatEnabled, extensionKey, showHoverPreview, supportsRovoActions, url, isRovoChatActionOptedIn]);
51
+ }, [isRovoChatEnabled, extensionKey, showHoverPreview, url, isRovoChatActionOptedIn]);
53
52
  };
54
53
  var _default = exports.default = useInlineActionNudgeExperiment;
@@ -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.15"
14
+ packageVersion: "44.3.17"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -269,7 +269,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
269
269
  }
270
270
  };
271
271
  var RovoChatAction = function RovoChatAction(_ref2) {
272
- var _context$actions, _data$invokeAction2;
272
+ var _context$actions;
273
273
  var onClickCallback = _ref2.onClick,
274
274
  prompts = _ref2.prompts,
275
275
  _ref2$testId = _ref2.testId,
@@ -282,15 +282,14 @@ var RovoChatAction = function RovoChatAction(_ref2) {
282
282
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
283
283
  var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.RovoChatAction];
284
284
  var resolvedPrompts = (0, _react.useMemo)(function () {
285
- var _data$invokeAction;
286
285
  if (prompts) {
287
286
  return prompts;
288
287
  }
289
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) && (data === null || data === void 0 || (_data$invokeAction = data.invokeAction) === null || _data$invokeAction === void 0 ? void 0 : _data$invokeAction.extensionKey) !== 'google-object-provider') {
288
+ if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true)) {
290
289
  return GENERIC_3P_PROMPTS;
291
290
  }
292
291
  return DEFAULT_PROMPTS;
293
- }, [prompts, data === null || data === void 0 || (_data$invokeAction2 = data.invokeAction) === null || _data$invokeAction2 === void 0 ? void 0 : _data$invokeAction2.extensionKey]);
292
+ }, [prompts]);
294
293
  var invoke = (0, _useInvokeClientAction.default)({});
295
294
  var _onClick = (0, _react.useCallback)(function (promptData, promptKey) {
296
295
  if (promptData && data !== null && data !== void 0 && data.invokeAction) {
@@ -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.15",
25
+ packageVersion: "44.3.17",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43fbdc9bbdc8153019286429b71a36b4709b3f6c40e63478482d08f8d204a234
3
+ size 25329
@@ -6,6 +6,8 @@ import { getDefinitionId, getExtensionKey, getResourceType } from '../../../stat
6
6
  import { canShowAction } from '../../../utils/actions/can-show-action';
7
7
  import { getIsRovoChatEnabled } from '../../../utils/rovo';
8
8
  import { CardAction } from '../../../view/Card/types';
9
+ // For rovogrowth-640 post auth inline experiment
10
+ const ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
9
11
  const extractRovoChatAction = ({
10
12
  actionOptions,
11
13
  appearance,
@@ -23,9 +25,10 @@ const extractRovoChatAction = ({
23
25
  return;
24
26
  }
25
27
  const supportsRovoActions = response === null || response === void 0 ? void 0 : (_response$meta = response.meta) === null || _response$meta === void 0 ? void 0 : (_response$meta$suppor = _response$meta.supportedFeature) === null || _response$meta$suppor === void 0 ? void 0 : _response$meta$suppor.includes('RovoActions');
26
- const isGoogleProvider = getExtensionKey(response) === 'google-object-provider';
28
+ const extensionKey = getExtensionKey(response);
29
+ const isGoogleProvider = extensionKey === 'google-object-provider';
27
30
  const is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
28
- const is3PInlinePostAuthActionsEnabled = supportsRovoActions && !isGoogleProvider && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
31
+ const is3PInlinePostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
29
32
  const is3PBlockPostAuthActionsEnabled = supportsRovoActions && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
30
33
  const isSupportedFeature = is3PInlinePostAuthActionsEnabled || is3PAuthRovoActionEnabled || is3PBlockPostAuthActionsEnabled;
31
34
  const isOptIn = (actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
@@ -36,7 +39,7 @@ const extractRovoChatAction = ({
36
39
  actionType: ActionName.RovoChatAction,
37
40
  definitionId: getDefinitionId(response),
38
41
  display: appearance,
39
- extensionKey: getExtensionKey(response),
42
+ extensionKey,
40
43
  id,
41
44
  resourceType: getResourceType(response)
42
45
  },
@@ -4,7 +4,7 @@ import { getIsRovoChatEnabled } from '../../../utils/rovo';
4
4
  import { getExtensionKey } from '../../helpers';
5
5
  import { useSmartCardState } from '../../store';
6
6
  import useRovoConfig from '../use-rovo-config';
7
- const EXCLUDED_EXTENSION_KEYS = new Set(['figma-object-provider', 'google-object-provider']);
7
+ const ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
8
8
  const NOT_ENABLED_RESULT = {
9
9
  isEnabled: false
10
10
  };
@@ -17,31 +17,30 @@ const NOT_ENABLED_RESULT = {
17
17
  * 1. Rovo chat must be enabled for the tenant.
18
18
  * 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
19
19
  * 3. The link must support the RovoActions feature.
20
- * 4. The extension key must not be excluded (Figma and Google links are excluded).
20
+ * 4. The extension key must be one of the supported options.
21
21
  * 5. The experiment value must be true (via tmp-editor-statsig).
22
22
  *
23
23
  * The extension key is derived from the card store via the resolved URL,
24
24
  * so callers don't need to thread it as a prop.
25
25
  */
26
26
  const useInlineActionNudgeExperiment = (url, showHoverPreview, actionOptions) => {
27
- var _cardState$details$me, _cardState$details, _cardState$details$me2, _cardState$details$me3, _actionOptions$rovoCh, _actionOptions$rovoCh2;
27
+ var _actionOptions$rovoCh, _actionOptions$rovoCh2;
28
28
  const rovoConfig = useRovoConfig();
29
29
  const isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
30
30
  const cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
31
- const supportsRovoActions = (_cardState$details$me = cardState === null || cardState === void 0 ? void 0 : (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : (_cardState$details$me2 = _cardState$details.meta) === null || _cardState$details$me2 === void 0 ? void 0 : (_cardState$details$me3 = _cardState$details$me2.supportedFeature) === null || _cardState$details$me3 === void 0 ? void 0 : _cardState$details$me3.includes('RovoActions')) !== null && _cardState$details$me !== void 0 ? _cardState$details$me : false;
32
31
  const extensionKey = getExtensionKey(cardState.details);
33
32
  const isRovoChatActionOptedIn = (_actionOptions$rovoCh = actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$rovoCh2 = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh2 === void 0 ? void 0 : _actionOptions$rovoCh2.optIn) !== null && _actionOptions$rovoCh !== void 0 ? _actionOptions$rovoCh : false;
34
33
  return useMemo(() => {
35
- if (!isRovoChatEnabled || !showHoverPreview || !supportsRovoActions || !url || !isRovoChatActionOptedIn) {
34
+ if (!isRovoChatEnabled || !showHoverPreview || !url || !isRovoChatActionOptedIn) {
36
35
  return NOT_ENABLED_RESULT;
37
36
  }
38
- if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
37
+ if (extensionKey && !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
39
38
  return NOT_ENABLED_RESULT;
40
39
  }
41
40
  const isEnabled = expValEquals('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
42
41
  return {
43
42
  isEnabled
44
43
  };
45
- }, [isRovoChatEnabled, extensionKey, showHoverPreview, supportsRovoActions, url, isRovoChatActionOptedIn]);
44
+ }, [isRovoChatEnabled, extensionKey, showHoverPreview, url, isRovoChatActionOptedIn]);
46
45
  };
47
46
  export default useInlineActionNudgeExperiment;
@@ -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.15"
5
+ packageVersion: "44.3.17"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -257,7 +257,7 @@ const RovoChatAction = ({
257
257
  testId = 'smart-action-rovo-chat-action',
258
258
  ...props
259
259
  }) => {
260
- var _context$actions, _data$invokeAction2;
260
+ var _context$actions;
261
261
  const intl = useIntl();
262
262
  const {
263
263
  isRovoChatEnabled,
@@ -266,15 +266,14 @@ const RovoChatAction = ({
266
266
  const context = useFlexibleUiContext();
267
267
  const data = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction];
268
268
  const resolvedPrompts = useMemo(() => {
269
- var _data$invokeAction;
270
269
  if (prompts) {
271
270
  return prompts;
272
271
  }
273
- if (expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) && (data === null || data === void 0 ? void 0 : (_data$invokeAction = data.invokeAction) === null || _data$invokeAction === void 0 ? void 0 : _data$invokeAction.extensionKey) !== 'google-object-provider') {
272
+ if (expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true)) {
274
273
  return GENERIC_3P_PROMPTS;
275
274
  }
276
275
  return DEFAULT_PROMPTS;
277
- }, [prompts, data === null || data === void 0 ? void 0 : (_data$invokeAction2 = data.invokeAction) === null || _data$invokeAction2 === void 0 ? void 0 : _data$invokeAction2.extensionKey]);
276
+ }, [prompts]);
278
277
  const invoke = useInvokeClientAction({});
279
278
  const onClick = useCallback((promptData, promptKey) => {
280
279
  if (promptData && data !== null && data !== void 0 && data.invokeAction) {
@@ -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.15",
15
+ packageVersion: "44.3.17",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  const Anchor = withLinkClickedEvent('a');
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43fbdc9bbdc8153019286429b71a36b4709b3f6c40e63478482d08f8d204a234
3
+ size 25329
@@ -6,6 +6,8 @@ import { getDefinitionId, getExtensionKey, getResourceType } from '../../../stat
6
6
  import { canShowAction } from '../../../utils/actions/can-show-action';
7
7
  import { getIsRovoChatEnabled } from '../../../utils/rovo';
8
8
  import { CardAction } from '../../../view/Card/types';
9
+ // For rovogrowth-640 post auth inline experiment
10
+ var ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
9
11
  var extractRovoChatAction = function extractRovoChatAction(_ref) {
10
12
  var _response$meta, _actionOptions$rovoCh;
11
13
  var actionOptions = _ref.actionOptions,
@@ -22,9 +24,10 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
22
24
  return;
23
25
  }
24
26
  var supportsRovoActions = response === null || response === void 0 || (_response$meta = response.meta) === null || _response$meta === void 0 || (_response$meta = _response$meta.supportedFeature) === null || _response$meta === void 0 ? void 0 : _response$meta.includes('RovoActions');
25
- var isGoogleProvider = getExtensionKey(response) === 'google-object-provider';
27
+ var extensionKey = getExtensionKey(response);
28
+ var isGoogleProvider = extensionKey === 'google-object-provider';
26
29
  var is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
27
- var is3PInlinePostAuthActionsEnabled = supportsRovoActions && !isGoogleProvider && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
30
+ var is3PInlinePostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
28
31
  var is3PBlockPostAuthActionsEnabled = supportsRovoActions && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
29
32
  var isSupportedFeature = is3PInlinePostAuthActionsEnabled || is3PAuthRovoActionEnabled || is3PBlockPostAuthActionsEnabled;
30
33
  var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
@@ -35,7 +38,7 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
35
38
  actionType: ActionName.RovoChatAction,
36
39
  definitionId: getDefinitionId(response),
37
40
  display: appearance,
38
- extensionKey: getExtensionKey(response),
41
+ extensionKey: extensionKey,
39
42
  id: id,
40
43
  resourceType: getResourceType(response)
41
44
  },
@@ -4,7 +4,7 @@ import { getIsRovoChatEnabled } from '../../../utils/rovo';
4
4
  import { getExtensionKey } from '../../helpers';
5
5
  import { useSmartCardState } from '../../store';
6
6
  import useRovoConfig from '../use-rovo-config';
7
- var EXCLUDED_EXTENSION_KEYS = new Set(['figma-object-provider', 'google-object-provider']);
7
+ var ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
8
8
  var NOT_ENABLED_RESULT = {
9
9
  isEnabled: false
10
10
  };
@@ -17,31 +17,30 @@ var NOT_ENABLED_RESULT = {
17
17
  * 1. Rovo chat must be enabled for the tenant.
18
18
  * 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
19
19
  * 3. The link must support the RovoActions feature.
20
- * 4. The extension key must not be excluded (Figma and Google links are excluded).
20
+ * 4. The extension key must be one of the supported options.
21
21
  * 5. The experiment value must be true (via tmp-editor-statsig).
22
22
  *
23
23
  * The extension key is derived from the card store via the resolved URL,
24
24
  * so callers don't need to thread it as a prop.
25
25
  */
26
26
  var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url, showHoverPreview, actionOptions) {
27
- var _cardState$details$me, _cardState$details, _actionOptions$rovoCh, _actionOptions$rovoCh2;
27
+ var _actionOptions$rovoCh, _actionOptions$rovoCh2;
28
28
  var rovoConfig = useRovoConfig();
29
29
  var isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
30
30
  var cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
31
- var supportsRovoActions = (_cardState$details$me = cardState === null || cardState === void 0 || (_cardState$details = cardState.details) === null || _cardState$details === void 0 || (_cardState$details = _cardState$details.meta) === null || _cardState$details === void 0 || (_cardState$details = _cardState$details.supportedFeature) === null || _cardState$details === void 0 ? void 0 : _cardState$details.includes('RovoActions')) !== null && _cardState$details$me !== void 0 ? _cardState$details$me : false;
32
31
  var extensionKey = getExtensionKey(cardState.details);
33
32
  var isRovoChatActionOptedIn = (_actionOptions$rovoCh = actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh2 = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh2 === void 0 ? void 0 : _actionOptions$rovoCh2.optIn) !== null && _actionOptions$rovoCh !== void 0 ? _actionOptions$rovoCh : false;
34
33
  return useMemo(function () {
35
- if (!isRovoChatEnabled || !showHoverPreview || !supportsRovoActions || !url || !isRovoChatActionOptedIn) {
34
+ if (!isRovoChatEnabled || !showHoverPreview || !url || !isRovoChatActionOptedIn) {
36
35
  return NOT_ENABLED_RESULT;
37
36
  }
38
- if (extensionKey && EXCLUDED_EXTENSION_KEYS.has(extensionKey)) {
37
+ if (extensionKey && !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
39
38
  return NOT_ENABLED_RESULT;
40
39
  }
41
40
  var isEnabled = expValEquals('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
42
41
  return {
43
42
  isEnabled: isEnabled
44
43
  };
45
- }, [isRovoChatEnabled, extensionKey, showHoverPreview, supportsRovoActions, url, isRovoChatActionOptedIn]);
44
+ }, [isRovoChatEnabled, extensionKey, showHoverPreview, url, isRovoChatActionOptedIn]);
46
45
  };
47
46
  export default useInlineActionNudgeExperiment;
@@ -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.15"
7
+ packageVersion: "44.3.17"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -260,7 +260,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
260
260
  }
261
261
  };
262
262
  var RovoChatAction = function RovoChatAction(_ref2) {
263
- var _context$actions, _data$invokeAction2;
263
+ var _context$actions;
264
264
  var onClickCallback = _ref2.onClick,
265
265
  prompts = _ref2.prompts,
266
266
  _ref2$testId = _ref2.testId,
@@ -273,15 +273,14 @@ var RovoChatAction = function RovoChatAction(_ref2) {
273
273
  var context = useFlexibleUiContext();
274
274
  var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction];
275
275
  var resolvedPrompts = useMemo(function () {
276
- var _data$invokeAction;
277
276
  if (prompts) {
278
277
  return prompts;
279
278
  }
280
- if (expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) && (data === null || data === void 0 || (_data$invokeAction = data.invokeAction) === null || _data$invokeAction === void 0 ? void 0 : _data$invokeAction.extensionKey) !== 'google-object-provider') {
279
+ if (expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true)) {
281
280
  return GENERIC_3P_PROMPTS;
282
281
  }
283
282
  return DEFAULT_PROMPTS;
284
- }, [prompts, data === null || data === void 0 || (_data$invokeAction2 = data.invokeAction) === null || _data$invokeAction2 === void 0 ? void 0 : _data$invokeAction2.extensionKey]);
283
+ }, [prompts]);
285
284
  var invoke = useInvokeClientAction({});
286
285
  var _onClick = useCallback(function (promptData, promptKey) {
287
286
  if (promptData && data !== null && data !== void 0 && data.invokeAction) {
@@ -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.15",
18
+ packageVersion: "44.3.17",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -14,7 +14,7 @@ export interface InlineActionNudgeExperiment {
14
14
  * 1. Rovo chat must be enabled for the tenant.
15
15
  * 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
16
16
  * 3. The link must support the RovoActions feature.
17
- * 4. The extension key must not be excluded (Figma and Google links are excluded).
17
+ * 4. The extension key must be one of the supported options.
18
18
  * 5. The experiment value must be true (via tmp-editor-statsig).
19
19
  *
20
20
  * The extension key is derived from the card store via the resolved URL,
@@ -14,7 +14,7 @@ export interface InlineActionNudgeExperiment {
14
14
  * 1. Rovo chat must be enabled for the tenant.
15
15
  * 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
16
16
  * 3. The link must support the RovoActions feature.
17
- * 4. The extension key must not be excluded (Figma and Google links are excluded).
17
+ * 4. The extension key must be one of the supported options.
18
18
  * 5. The experiment value must be true (via tmp-editor-statsig).
19
19
  *
20
20
  * The extension key is derived from the card store via the resolved URL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "44.3.16",
3
+ "version": "44.3.18",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -75,7 +75,7 @@
75
75
  "@atlaskit/popup": "^4.17.0",
76
76
  "@atlaskit/primitives": "^19.0.0",
77
77
  "@atlaskit/react-ufo": "^5.16.0",
78
- "@atlaskit/rovo-triggers": "^5.44.0",
78
+ "@atlaskit/rovo-triggers": "^5.45.0",
79
79
  "@atlaskit/section-message": "^8.12.0",
80
80
  "@atlaskit/select": "^21.10.0",
81
81
  "@atlaskit/spinner": "^19.1.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/textfield": "^8.3.0",
85
85
  "@atlaskit/theme": "^23.2.0",
86
86
  "@atlaskit/tile": "^1.0.0",
87
- "@atlaskit/tmp-editor-statsig": "^70.4.0",
87
+ "@atlaskit/tmp-editor-statsig": "^71.0.0",
88
88
  "@atlaskit/tokens": "^13.0.0",
89
89
  "@atlaskit/tooltip": "^21.2.0",
90
90
  "@atlaskit/ufo": "^0.4.0",