@atlaskit/smart-card 44.23.1 → 44.23.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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-entity-support--default.png +2 -2
- package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +2 -4
- package/dist/cjs/extractors/flexible/actions/index.js +1 -1
- package/dist/cjs/extractors/flexible/index.js +1 -1
- package/dist/cjs/state/hooks/use-rovo-chat/index.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +0 -9
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +7 -28
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -10
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +0 -7
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.compiled.css +2 -6
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +4 -26
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +0 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/index.js +2 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +7 -15
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +4 -11
- package/dist/cjs/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +2 -8
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/index.js +1 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-entity-support--default.png +2 -2
- package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +2 -4
- package/dist/es2019/extractors/flexible/actions/index.js +1 -1
- package/dist/es2019/extractors/flexible/index.js +1 -1
- package/dist/es2019/state/hooks/use-rovo-chat/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +3 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +0 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +7 -28
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +0 -7
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.compiled.css +2 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +4 -26
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +0 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/index.js +2 -2
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +7 -16
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +3 -11
- package/dist/es2019/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +3 -10
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/index.js +1 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-entity-support--default.png +2 -2
- package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +2 -4
- package/dist/esm/extractors/flexible/actions/index.js +1 -1
- package/dist/esm/extractors/flexible/index.js +1 -1
- package/dist/esm/state/hooks/use-rovo-chat/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +3 -3
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +0 -9
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +7 -28
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -10
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +0 -7
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.compiled.css +2 -6
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +4 -26
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +0 -1
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -4
- package/dist/esm/view/FlexibleCard/index.js +2 -2
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +7 -15
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +4 -11
- package/dist/esm/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +3 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/index.js +1 -3
- package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -2
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -2
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/package.json +1 -4
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png +0 -3
- 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 +0 -3
- package/dist/cjs/state/hooks/use-inline-action-nudge-experiment/index.js +0 -54
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +0 -15
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +0 -44
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png +0 -3
- 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 +0 -3
- package/dist/es2019/state/hooks/use-inline-action-nudge-experiment/index.js +0 -48
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +0 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +0 -36
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png +0 -3
- 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 +0 -3
- package/dist/esm/state/hooks/use-inline-action-nudge-experiment/index.js +0 -47
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +0 -15
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +0 -35
- package/dist/types/state/hooks/use-inline-action-nudge-experiment/index.d.ts +0 -24
- package/dist/types/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.d.ts +0 -12
- package/dist/types-ts4.5/state/hooks/use-inline-action-nudge-experiment/index.d.ts +0 -24
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.d.ts +0 -12
|
@@ -11,7 +11,6 @@ import React, { useCallback, useState } from 'react';
|
|
|
11
11
|
import { FormattedMessage } from 'react-intl';
|
|
12
12
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
15
14
|
import { ActionName } from '../../../../../constants';
|
|
16
15
|
import { messages } from '../../../../../messages';
|
|
17
16
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -64,7 +63,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
64
63
|
color: "currentColor",
|
|
65
64
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
66
65
|
spacing: "spacious"
|
|
67
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
66
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
68
67
|
size: props.iconSize
|
|
69
68
|
} : {})),
|
|
70
69
|
onClick: onClick,
|
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
6
6
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
8
|
import { ActionName } from '../../../../../constants';
|
|
10
9
|
import { messages } from '../../../../../messages';
|
|
11
10
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -74,7 +73,7 @@ var FollowAction = function FollowAction(props) {
|
|
|
74
73
|
};
|
|
75
74
|
return /*#__PURE__*/React.createElement(ServerAction, _extends({
|
|
76
75
|
content: /*#__PURE__*/React.createElement(FormattedMessage, label)
|
|
77
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
76
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
78
77
|
ariaLabel: intl.formatMessage(label)
|
|
79
78
|
} : {}, {
|
|
80
79
|
icon: followIcon,
|
|
@@ -7,7 +7,6 @@ import MediaServicesActualSizeIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
|
7
7
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
10
|
import { ActionName } from '../../../../../constants';
|
|
12
11
|
import { messages } from '../../../../../messages';
|
|
13
12
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -38,7 +37,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
38
37
|
color: "currentColor",
|
|
39
38
|
spacing: "spacious",
|
|
40
39
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
41
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
40
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
42
41
|
size: props.iconSize
|
|
43
42
|
} : {}));
|
|
44
43
|
}
|
|
@@ -46,7 +45,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
46
45
|
color: "currentColor",
|
|
47
46
|
spacing: "spacious",
|
|
48
47
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
49
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
48
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
50
49
|
size: props.iconSize
|
|
51
50
|
} : {}));
|
|
52
51
|
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
@@ -8,7 +8,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
8
|
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; }
|
|
9
9
|
import React, { useCallback, useMemo } from 'react';
|
|
10
10
|
import { useIntl } from 'react-intl';
|
|
11
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
12
11
|
import { ActionName } from '../../../../../constants';
|
|
13
12
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
14
13
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
@@ -16,9 +15,6 @@ import useRovoChat from '../../../../../state/hooks/use-rovo-chat';
|
|
|
16
15
|
import { getPromptAction, RovoChatPromptKey } from "../../../../common/rovo-chat-utils";
|
|
17
16
|
import Action from '../action';
|
|
18
17
|
var GOOGLE_PROMPTS = [RovoChatPromptKey.RECOMMEND_OTHER_SOURCES, RovoChatPromptKey.SHOW_OTHER_MENTIONS, RovoChatPromptKey.SUGGEST_IMPROVEMENT];
|
|
19
|
-
var GENERIC_3P_PROMPTS = [
|
|
20
|
-
// For rovogrowth-640-inline-action-nudge-exp only
|
|
21
|
-
RovoChatPromptKey.SHOW_ME_WHATS_RELEVANT, RovoChatPromptKey.SUMMARIZE_THIS_FOR_ME, RovoChatPromptKey.ASK_A_SPECIFIC_QUESTION];
|
|
22
18
|
var DEFAULT_PROMPTS = GOOGLE_PROMPTS;
|
|
23
19
|
var RovoChatAction = function RovoChatAction(_ref) {
|
|
24
20
|
var _context$actions;
|
|
@@ -37,9 +33,6 @@ var RovoChatAction = function RovoChatAction(_ref) {
|
|
|
37
33
|
if (prompts) {
|
|
38
34
|
return prompts;
|
|
39
35
|
}
|
|
40
|
-
if (expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true)) {
|
|
41
|
-
return GENERIC_3P_PROMPTS;
|
|
42
|
-
}
|
|
43
36
|
return DEFAULT_PROMPTS;
|
|
44
37
|
}, [prompts]);
|
|
45
38
|
var invoke = useInvokeClientAction({});
|
|
@@ -4,7 +4,6 @@ var _excluded = ["onClick"];
|
|
|
4
4
|
import React, { lazy, useCallback } from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
7
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
9
8
|
import { messages } from '../../../../../messages';
|
|
10
9
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -39,10 +38,10 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
|
|
|
39
38
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
40
39
|
return actionData ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
41
40
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
42
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
41
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
43
42
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
44
43
|
} : {}, {
|
|
45
|
-
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
44
|
+
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
46
45
|
iconSize: props.iconSize
|
|
47
46
|
} : {}),
|
|
48
47
|
onClick: onClick,
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
._zulpu2gc{gap:var(--ds-space-100,8px)}._16jlkb7n{flex-grow:1}
|
|
1
|
+
._16jlkb7n{flex-grow:1}
|
|
3
2
|
._18u01ivi{margin-left:calc(var(--container-gap-left)*-1)}
|
|
4
3
|
._1bsb129b{width:calc(100% + var(--container-gap-left) + var(--container-gap-right))}
|
|
5
|
-
._1bsb1osq{width:100%}
|
|
6
|
-
._1e0c11p5{display:grid}
|
|
7
4
|
._1e0c1txw{display:flex}
|
|
8
5
|
._2hwxc10g{margin-right:calc(var(--container-gap-right)*-1)}
|
|
9
6
|
._2lx21bp4{flex-direction:column}
|
|
10
|
-
._vchhusvi{box-sizing:border-box}
|
|
11
|
-
._yv0e1ris{grid-template-columns:max-content}
|
|
7
|
+
._vchhusvi{box-sizing:border-box}
|
|
@@ -6,15 +6,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
import { useCallback, useMemo, useState } from 'react';
|
|
7
7
|
import { di } from 'react-magnetic-di';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
10
9
|
import { ActionName, SmartLinkSize } from '../../../../../constants';
|
|
11
10
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
12
11
|
import * as Actions from '../../actions';
|
|
13
12
|
import { ActionFooter } from './action-footer';
|
|
14
|
-
import AskRovoSectionHeader from './ask-rovo-section-header';
|
|
15
13
|
var ignoreContainerPaddingStyles = null;
|
|
16
|
-
var inlineActionNudgePillWrapperStyles = null;
|
|
17
|
-
var inlineActionNudgeColumnStyles = null;
|
|
18
14
|
var DEFAULT_SORT_ORDER = ['PreviewAction', 'CopyLinkAction', 'AISummaryAction'];
|
|
19
15
|
var sort = function sort(a, b) {
|
|
20
16
|
var idxA = DEFAULT_SORT_ORDER.indexOf(a);
|
|
@@ -57,10 +53,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
57
53
|
isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn;
|
|
58
54
|
var context = useFlexibleUiContext();
|
|
59
55
|
var ui = useFlexibleUiOptionContext();
|
|
60
|
-
var isRovoChatActionAvailable =
|
|
61
|
-
|
|
62
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
63
|
-
var isInlineActionNudgeExperiment = fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
56
|
+
var isRovoChatActionAvailable = isAny3pRovoActionsExperimentOn && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction]) !== undefined : undefined;
|
|
64
57
|
var _useState = useState(),
|
|
65
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
66
59
|
message = _useState2[0],
|
|
@@ -84,7 +77,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
84
77
|
if (!(context !== null && context !== void 0 && context.actions)) {
|
|
85
78
|
return;
|
|
86
79
|
}
|
|
87
|
-
var arr = fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
80
|
+
var arr = fg('platform_sl_3p_auth_rovo_action_kill_switch') ? isRovoChatActionAvailable ? [ActionName.RovoChatAction] : Object.keys(context.actions).filter(function (name) {
|
|
88
81
|
return name !== ActionName.RovoChatAction;
|
|
89
82
|
}) : Object.keys(context.actions);
|
|
90
83
|
arr.sort(sort);
|
|
@@ -105,7 +98,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
105
98
|
size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
|
|
106
99
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
107
100
|
,
|
|
108
|
-
style:
|
|
101
|
+
style: padding ? {
|
|
109
102
|
paddingInline: padding
|
|
110
103
|
} : undefined,
|
|
111
104
|
hideTooltip: isLoading
|
|
@@ -114,25 +107,10 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
114
107
|
return arr.map(function (name) {
|
|
115
108
|
return renderAction(name);
|
|
116
109
|
});
|
|
117
|
-
}, [context === null || context === void 0 ? void 0 : context.actions, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, _onClick
|
|
118
|
-
var showRovoSectionHeader = isInlineActionNudgeExperiment && isRovoChatActionAvailable;
|
|
110
|
+
}, [context === null || context === void 0 ? void 0 : context.actions, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, _onClick]);
|
|
119
111
|
if (!actions) {
|
|
120
112
|
return null;
|
|
121
113
|
}
|
|
122
|
-
if (isInlineActionNudgeExperiment && isRovoChatActionAvailable) {
|
|
123
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
124
|
-
ref: blockRef,
|
|
125
|
-
"data-testid": testId,
|
|
126
|
-
className: ax(["_1e0c1txw _2lx21bp4 _vchhusvi _1bsb1osq"])
|
|
127
|
-
}, showRovoSectionHeader && /*#__PURE__*/React.createElement(AskRovoSectionHeader, {
|
|
128
|
-
testId: testId ? "".concat(testId, "-rovo-section-header") : undefined
|
|
129
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
130
|
-
className: ax(["_zulpu2gc _1e0c11p5 _yv0e1ris"])
|
|
131
|
-
}, actions), /*#__PURE__*/React.createElement(ActionFooter, {
|
|
132
|
-
message: message,
|
|
133
|
-
testId: testId
|
|
134
|
-
}));
|
|
135
|
-
}
|
|
136
114
|
return /*#__PURE__*/React.createElement("div", {
|
|
137
115
|
ref: blockRef,
|
|
138
116
|
"data-testid": testId
|
package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
._18u01ivi{margin-left:calc(var(--container-gap-left)*-1)}
|
|
11
11
|
._18u01wug{margin-left:auto}
|
|
12
12
|
._19p4ze3t *{padding-right:var(--ds-space-0,0)}
|
|
13
|
-
._19pkutpp{margin-top:var(--ds-space-150,9pt)}
|
|
14
13
|
._1bah1y6m{justify-content:flex-start}
|
|
15
14
|
._1bsb129b{width:calc(100% + var(--container-gap-left) + var(--container-gap-right))}
|
|
16
15
|
._1e0c1txw{display:flex}
|
|
@@ -6,8 +6,6 @@ import "./index.compiled.css";
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
9
|
import { ActionName } from '../../../../../constants';
|
|
12
10
|
import { useFlexibleCardContext } from '../../../../../state/flexible-ui-context';
|
|
13
11
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -20,7 +18,6 @@ import Block from '../block';
|
|
|
20
18
|
*/
|
|
21
19
|
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [ActionName.RovoChatAction];
|
|
22
20
|
var ignoreContainerMarginStyles = null;
|
|
23
|
-
var inlineActionNudgeFooterMarginStyles = null;
|
|
24
21
|
var elevatedFooterStyles = null;
|
|
25
22
|
var providerStyles = null;
|
|
26
23
|
var actionsStyles = null;
|
|
@@ -66,7 +63,7 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
66
63
|
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
67
64
|
size: size,
|
|
68
65
|
testId: "".concat(testId, "-resolved-view"),
|
|
69
|
-
className: ax(["_18zrpxbi _1rjcutpp _vchhusvi _1bsb129b _18u01ivi _2hwxc10g _otyr1ya9 _4t3ioahv", "_zulpu2gc _x3doj0fz _bfhkhfxm _mrkb1mok _1o0z1mok"
|
|
66
|
+
className: ax(["_18zrpxbi _1rjcutpp _vchhusvi _1bsb129b _18u01ivi _2hwxc10g _otyr1ya9 _4t3ioahv", "_zulpu2gc _x3doj0fz _bfhkhfxm _mrkb1mok _1o0z1mok"])
|
|
70
67
|
}), !hideProvider && /*#__PURE__*/React.createElement("div", {
|
|
71
68
|
className: ax(["_4t3i1ejb _1e0c1txw _4cvr1h6o _1bah1y6m _vchhusvi _16jlkb7n"])
|
|
72
69
|
}, /*#__PURE__*/React.createElement(Provider, {
|
|
@@ -51,7 +51,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
51
51
|
isPreviewPanelAvailable = _useSmartLinkContext.isPreviewPanelAvailable,
|
|
52
52
|
openPreviewPanel = _useSmartLinkContext.openPreviewPanel,
|
|
53
53
|
product = _useSmartLinkContext.product;
|
|
54
|
-
var rovoConfig = fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
54
|
+
var rovoConfig = fg('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
55
55
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
56
56
|
useRovoConfig() : undefined;
|
|
57
57
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
@@ -80,7 +80,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
80
80
|
origin: origin,
|
|
81
81
|
renderers: renderers,
|
|
82
82
|
resolve: resolve
|
|
83
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
83
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
84
84
|
product: product,
|
|
85
85
|
rovoConfig: rovoConfig
|
|
86
86
|
} : undefined), {}, {
|
|
@@ -13,7 +13,6 @@ 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';
|
|
17
16
|
import useRovoConfig from '../../../state/hooks/use-rovo-config';
|
|
18
17
|
import { useSmartCardState } from '../../../state/store';
|
|
19
18
|
import { isSpecialEvent } from '../../../utils';
|
|
@@ -236,9 +235,8 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
236
235
|
flexibleCardProps: flexibleCardProps
|
|
237
236
|
});
|
|
238
237
|
}
|
|
239
|
-
var is3PInlinePostAuthActionsEnabled = fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
240
238
|
if (isResolved) {
|
|
241
|
-
return /*#__PURE__*/React.createElement(HoverCardResolvedView, _extends({}, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
239
|
+
return /*#__PURE__*/React.createElement(HoverCardResolvedView, _extends({}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
242
240
|
actionOptions: actionOptions,
|
|
243
241
|
showRovoResolvedView: showRovoResolvedView
|
|
244
242
|
} : undefined, {
|
|
@@ -289,9 +287,8 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
289
287
|
flexibleCardProps: flexibleCardProps
|
|
290
288
|
});
|
|
291
289
|
}
|
|
292
|
-
var is3PInlinePostAuthActionsEnabled = fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
293
290
|
if (cardState.status === 'resolved') {
|
|
294
|
-
return /*#__PURE__*/React.createElement(HoverCardResolvedView, _extends({}, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
291
|
+
return /*#__PURE__*/React.createElement(HoverCardResolvedView, _extends({}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
295
292
|
actionOptions: actionOptions,
|
|
296
293
|
showRovoResolvedView: showRovoResolvedView
|
|
297
294
|
} : undefined, {
|
|
@@ -317,8 +314,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
317
314
|
};
|
|
318
315
|
var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(props) {
|
|
319
316
|
var cardState = props.cardState,
|
|
320
|
-
actionOptions = props.actionOptions
|
|
321
|
-
url = props.url;
|
|
317
|
+
actionOptions = props.actionOptions;
|
|
322
318
|
var rovoConfig = useRovoConfig();
|
|
323
319
|
var isResolved = useIsResolvedView(props);
|
|
324
320
|
var showPreauthBetterHovercard = useIsShowPreauthBetterHovercard(props);
|
|
@@ -329,22 +325,19 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
|
|
|
329
325
|
actionOptions: actionOptions
|
|
330
326
|
}) !== undefined;
|
|
331
327
|
}, [actionOptions, cardState.details, rovoConfig, isResolved]);
|
|
332
|
-
var _useInlineActionNudge = useInlineActionNudgeExperiment(url, true, actionOptions),
|
|
333
|
-
rovoActionsCtaShown = _useInlineActionNudge.isEnabled;
|
|
334
328
|
var data = useMemo(function () {
|
|
335
329
|
var viewVariant = 'default';
|
|
336
|
-
if (showRovoResolvedView &&
|
|
330
|
+
if (showRovoResolvedView && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true)) {
|
|
337
331
|
viewVariant = 'rovo-resolved-view';
|
|
338
332
|
} else if (showPreauthBetterHovercard) {
|
|
339
333
|
viewVariant = 'rovo-unauthorised-view';
|
|
340
334
|
}
|
|
341
335
|
return {
|
|
342
336
|
attributes: {
|
|
343
|
-
viewVariant: viewVariant
|
|
344
|
-
rovoActionsCtaShown: rovoActionsCtaShown
|
|
337
|
+
viewVariant: viewVariant
|
|
345
338
|
}
|
|
346
339
|
};
|
|
347
|
-
}, [showRovoResolvedView, showPreauthBetterHovercard
|
|
340
|
+
}, [showRovoResolvedView, showPreauthBetterHovercard]);
|
|
348
341
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
349
342
|
data: data
|
|
350
343
|
}, /*#__PURE__*/React.createElement(HoverCardContent, _extends({}, props, {
|
|
@@ -355,7 +348,6 @@ var _default_1 = componentWithCondition(function () {
|
|
|
355
348
|
// We need to read both of them to sutisfy some of the tests that expect both to be checked.
|
|
356
349
|
var flagA = fg('platform_sl_3p_preauth_better_hovercard_killswitch');
|
|
357
350
|
var flagB = fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
358
|
-
|
|
359
|
-
return flagA || flagB || flagC;
|
|
351
|
+
return flagA || flagB;
|
|
360
352
|
}, HoverCardContentWithViewVariant, HoverCardContent);
|
|
361
353
|
export default _default_1;
|
|
@@ -9,7 +9,6 @@ import { useAnalyticsEvents } from '../../../../../common/analytics/generated/us
|
|
|
9
9
|
import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
|
|
10
10
|
import { succeedUfoExperience } from '../../../../../state/analytics';
|
|
11
11
|
import useAISummaryAction from '../../../../../state/hooks/use-ai-summary-action';
|
|
12
|
-
import useInlineActionNudgeExperiment from '../../../../../state/hooks/use-inline-action-nudge-experiment';
|
|
13
12
|
import FlexibleCard from '../../../../FlexibleCard';
|
|
14
13
|
import { ActionBlock, AIFooterBlock, AISummaryBlock, ResolvedHoverCardFooterBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
|
|
15
14
|
import { getMetadata } from '../../../utils';
|
|
@@ -20,8 +19,7 @@ var snippetBlockCss = null;
|
|
|
20
19
|
var actionBlockCss = null;
|
|
21
20
|
var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
22
21
|
var _cardState$details;
|
|
23
|
-
var
|
|
24
|
-
cardState = _ref.cardState,
|
|
22
|
+
var cardState = _ref.cardState,
|
|
25
23
|
extensionKey = _ref.extensionKey,
|
|
26
24
|
flexibleCardProps = _ref.flexibleCardProps,
|
|
27
25
|
isAISummaryEnabled = _ref.isAISummaryEnabled,
|
|
@@ -31,14 +29,9 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
31
29
|
id = _ref.id;
|
|
32
30
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
33
31
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
34
|
-
var _useInlineActionNudge = useInlineActionNudgeExperiment(flexibleCardProps.url, true, actionOptions),
|
|
35
|
-
InlineActionNudgeExperimentValue = _useInlineActionNudge.isEnabled;
|
|
36
|
-
|
|
37
32
|
// We want to fire exposure event only for those cases when user otherwise can see the experiment which would be controlled
|
|
38
33
|
// by all the other condition defined above as a result of what was defined in actionOptions as well as in CardContext.
|
|
39
34
|
var is3PAuthRovoActionsExperimentOn = showRovoResolvedView && expValEquals('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
40
|
-
var is3PInlinePostAuthActionsExperimentOn = showRovoResolvedView && InlineActionNudgeExperimentValue;
|
|
41
|
-
var isAny3pRovoActionsExperimentOn = is3PAuthRovoActionsExperimentOn || is3PInlinePostAuthActionsExperimentOn;
|
|
42
35
|
useEffect(function () {
|
|
43
36
|
// Since this hover view is only rendered on resolved status,
|
|
44
37
|
// there is no need to check for statuses.
|
|
@@ -86,7 +79,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
86
79
|
}), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
|
|
87
80
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
88
81
|
placeholder: snippet,
|
|
89
|
-
isAny3pRovoActionsExperimentOn:
|
|
82
|
+
isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn
|
|
90
83
|
}) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, {
|
|
91
84
|
testId: "hidden-snippet",
|
|
92
85
|
onRender: onSnippetRender,
|
|
@@ -96,9 +89,9 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
96
89
|
}), /*#__PURE__*/React.createElement(ActionBlock, {
|
|
97
90
|
onClick: onActionClick,
|
|
98
91
|
spaceInline: "space.100",
|
|
99
|
-
isAny3pRovoActionsExperimentOn:
|
|
92
|
+
isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn,
|
|
100
93
|
className: ax(["_n3td1b66"])
|
|
101
|
-
}),
|
|
94
|
+
}), is3PAuthRovoActionsExperimentOn ? /*#__PURE__*/React.createElement(ResolvedHoverCardFooterBlock, {
|
|
102
95
|
onActionClick: onActionClick
|
|
103
96
|
}) : /*#__PURE__*/React.createElement(AIFooterBlock, null));
|
|
104
97
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { fg } from "@atlaskit/platform-feature-flags";
|
|
3
2
|
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
4
|
-
import useInlineActionNudgeExperiment from '../../../state/hooks/use-inline-action-nudge-experiment';
|
|
5
3
|
import useInlineTailoredActionExperiment from '../../../state/hooks/use-inline-tailored-action-experiment';
|
|
6
4
|
import { HoverCard } from '../../HoverCard';
|
|
7
|
-
import {
|
|
5
|
+
import { InlineRovoActionButton } from '../common/rovo-actions-cta';
|
|
8
6
|
import { Frame } from '../Frame';
|
|
9
7
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
10
8
|
import { renderLozenge } from './renderLozenge';
|
|
@@ -81,8 +79,6 @@ export function InlineCardResolvedViewFunctionalWithRovoActions(_ref2) {
|
|
|
81
79
|
type = _ref2.type,
|
|
82
80
|
hideIconLoadingSkeleton = _ref2.hideIconLoadingSkeleton,
|
|
83
81
|
lozenge = _ref2.lozenge;
|
|
84
|
-
var _useInlineActionNudge = useInlineActionNudgeExperiment(link, showHoverPreview, actionOptions),
|
|
85
|
-
isEnabled = _useInlineActionNudge.isEnabled;
|
|
86
82
|
var _useInlineTailoredAct = useInlineTailoredActionExperiment(link, showHoverPreview, actionOptions),
|
|
87
83
|
isInlineTailoredRovoActionEnabled = _useInlineTailoredAct.isEnabled;
|
|
88
84
|
|
|
@@ -103,9 +99,7 @@ export function InlineCardResolvedViewFunctionalWithRovoActions(_ref2) {
|
|
|
103
99
|
titleTextColor: titleTextColor,
|
|
104
100
|
type: type,
|
|
105
101
|
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
106
|
-
}), renderLozenge(lozenge),
|
|
107
|
-
testId: "".concat(testId, "-rovo-actions-cta")
|
|
108
|
-
}), isInlineTailoredRovoActionEnabled && /*#__PURE__*/React.createElement(InlineRovoActionButton, {
|
|
102
|
+
}), renderLozenge(lozenge), isInlineTailoredRovoActionEnabled && /*#__PURE__*/React.createElement(InlineRovoActionButton, {
|
|
109
103
|
testId: "".concat(testId, "-rovo-actions-cta"),
|
|
110
104
|
url: link
|
|
111
105
|
}));
|
|
@@ -121,4 +115,4 @@ export function InlineCardResolvedViewFunctionalWithRovoActions(_ref2) {
|
|
|
121
115
|
}
|
|
122
116
|
|
|
123
117
|
// Todo: replace with platform_sl_3p_auth_inline_tailored_cta_killswitch after cleanup of rovogrowth-640-inline-action-nudge-fg
|
|
124
|
-
export var InlineCardResolvedViewFunctional = componentWithFG('
|
|
118
|
+
export var InlineCardResolvedViewFunctional = componentWithFG('platform_sl_3p_auth_inline_tailored_cta_killswitch', InlineCardResolvedViewFunctionalWithRovoActions, InlineCardResolvedViewBase);
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
var PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "44.23.
|
|
15
|
+
packageVersion: "44.23.1",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -28,9 +28,7 @@ var AISummary = function AISummary(_ref) {
|
|
|
28
28
|
}
|
|
29
29
|
var is3pExperimentEnabled =
|
|
30
30
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
31
|
-
fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true)
|
|
32
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
33
|
-
fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
31
|
+
fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
34
32
|
return /*#__PURE__*/React.createElement(Markdown, {
|
|
35
33
|
"data-testid": testId
|
|
36
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -3,7 +3,7 @@ import { type FlexibleUiActionName } from '../../../../../constants';
|
|
|
3
3
|
import type { BlockProps } from '../types';
|
|
4
4
|
export type ActionBlockProps = {
|
|
5
5
|
/**
|
|
6
|
-
* Whether platform_sl_3p_auth_rovo_action
|
|
6
|
+
* Whether the platform_sl_3p_auth_rovo_action experiment value is ON for current runtime
|
|
7
7
|
*/
|
|
8
8
|
isAny3pRovoActionsExperimentOn?: boolean;
|
|
9
9
|
/**
|
|
@@ -6,8 +6,8 @@ export type AISummaryBlockProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
aiSummaryMinHeight?: number;
|
|
8
8
|
/**
|
|
9
|
-
* Whether platform_sl_3p_auth_rovo_action
|
|
10
|
-
|
|
9
|
+
* Whether the platform_sl_3p_auth_rovo_action experiment value is ON for current runtime
|
|
10
|
+
*/
|
|
11
11
|
isAny3pRovoActionsExperimentOn?: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Placeholder to show when summary is not available
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type HoverCardResolvedProps } from './types';
|
|
2
|
-
declare const HoverCardResolvedView: ({
|
|
2
|
+
declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, showRovoResolvedView, titleBlockProps, id, }: HoverCardResolvedProps) => JSX.Element;
|
|
3
3
|
export default HoverCardResolvedView;
|
|
@@ -3,7 +3,7 @@ import { type FlexibleUiActionName } from '../../../../../constants';
|
|
|
3
3
|
import type { BlockProps } from '../types';
|
|
4
4
|
export type ActionBlockProps = {
|
|
5
5
|
/**
|
|
6
|
-
* Whether platform_sl_3p_auth_rovo_action
|
|
6
|
+
* Whether the platform_sl_3p_auth_rovo_action experiment value is ON for current runtime
|
|
7
7
|
*/
|
|
8
8
|
isAny3pRovoActionsExperimentOn?: boolean;
|
|
9
9
|
/**
|
|
@@ -6,8 +6,8 @@ export type AISummaryBlockProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
aiSummaryMinHeight?: number;
|
|
8
8
|
/**
|
|
9
|
-
* Whether platform_sl_3p_auth_rovo_action
|
|
10
|
-
|
|
9
|
+
* Whether the platform_sl_3p_auth_rovo_action experiment value is ON for current runtime
|
|
10
|
+
*/
|
|
11
11
|
isAny3pRovoActionsExperimentOn?: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* Placeholder to show when summary is not available
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type HoverCardResolvedProps } from './types';
|
|
2
|
-
declare const HoverCardResolvedView: ({
|
|
2
|
+
declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, showRovoResolvedView, titleBlockProps, id, }: HoverCardResolvedProps) => JSX.Element;
|
|
3
3
|
export default HoverCardResolvedView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "44.23.
|
|
3
|
+
"version": "44.23.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -253,9 +253,6 @@
|
|
|
253
253
|
"smart-card-inline-resolved-view-refactor": {
|
|
254
254
|
"type": "boolean"
|
|
255
255
|
},
|
|
256
|
-
"rovogrowth-640-inline-action-nudge-fg": {
|
|
257
|
-
"type": "boolean"
|
|
258
|
-
},
|
|
259
256
|
"platform_sl_3p_auth_rovo_block_card_kill_switch": {
|
|
260
257
|
"type": "boolean"
|
|
261
258
|
},
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
10
|
-
var _rovo = require("../../../utils/rovo");
|
|
11
|
-
var _helpers = require("../../helpers");
|
|
12
|
-
var _store = require("../../store");
|
|
13
|
-
var _useRovoConfig2 = _interopRequireDefault(require("../use-rovo-config"));
|
|
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
|
-
var NOT_ENABLED_RESULT = {
|
|
16
|
-
isEnabled: false
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Returns whether the rovogrowth-640-inline-action-nudge-exp experiment
|
|
21
|
-
* is enabled for the current user and link context.
|
|
22
|
-
*
|
|
23
|
-
* All eligibility criteria are consolidated here:
|
|
24
|
-
* 1. Rovo chat must be enabled for the tenant.
|
|
25
|
-
* 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
|
|
26
|
-
* 3. The link must support the RovoActions feature.
|
|
27
|
-
* 4. The extension key must be one of the supported options.
|
|
28
|
-
* 5. The experiment value must be true (via tmp-editor-statsig).
|
|
29
|
-
*
|
|
30
|
-
* The extension key is derived from the card store via the resolved URL,
|
|
31
|
-
* so callers don't need to thread it as a prop.
|
|
32
|
-
*/
|
|
33
|
-
var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url, showHoverPreview, actionOptions) {
|
|
34
|
-
var _actionOptions$rovoCh, _actionOptions$rovoCh2;
|
|
35
|
-
var _useRovoConfig = (0, _useRovoConfig2.default)(),
|
|
36
|
-
rovoConfig = _useRovoConfig.rovoOptions;
|
|
37
|
-
var isRovoChatEnabled = (0, _rovo.getIsRovoChatEnabled)(rovoConfig);
|
|
38
|
-
var cardState = (0, _store.useSmartCardState)(url !== null && url !== void 0 ? url : '');
|
|
39
|
-
var extensionKey = (0, _helpers.getExtensionKey)(cardState.details);
|
|
40
|
-
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
|
-
return (0, _react.useMemo)(function () {
|
|
42
|
-
if (!isRovoChatEnabled || !showHoverPreview || !url || !isRovoChatActionOptedIn) {
|
|
43
|
-
return NOT_ENABLED_RESULT;
|
|
44
|
-
}
|
|
45
|
-
if (!extensionKey || !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
|
|
46
|
-
return NOT_ENABLED_RESULT;
|
|
47
|
-
}
|
|
48
|
-
var isEnabled = (0, _expValEquals.expValEquals)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
49
|
-
return {
|
|
50
|
-
isEnabled: isEnabled
|
|
51
|
-
};
|
|
52
|
-
}, [isRovoChatEnabled, extensionKey, showHoverPreview, url, isRovoChatActionOptedIn]);
|
|
53
|
-
};
|
|
54
|
-
var _default = exports.default = useInlineActionNudgeExperiment;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
-
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
-
._zulputpp{gap:var(--ds-space-150,9pt)}
|
|
4
|
-
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
5
|
-
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
6
|
-
._1bsb1osq{width:100%}
|
|
7
|
-
._1e0c1txw{display:flex}
|
|
8
|
-
._1wpz1fhb{align-self:stretch}
|
|
9
|
-
._2lx21bp4{flex-direction:column}
|
|
10
|
-
._4cvr1h6o{align-items:center}
|
|
11
|
-
._4t3it94y{height:1px}
|
|
12
|
-
._bfhk1l7x{background-color:var(--ds-border,#0b120e24)}
|
|
13
|
-
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
14
|
-
._otyrutpp{margin-bottom:var(--ds-space-150,9pt)}
|
|
15
|
-
._syazazsu{color:var(--ds-text-subtle,#505258)}
|