@atlaskit/smart-card 44.23.1 → 44.23.3
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 +15 -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/utils/click-helpers.js +30 -1
- package/dist/cjs/view/CardWithUrl/component.js +109 -45
- 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 +31 -16
- 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/utils/click-helpers.js +29 -0
- package/dist/es2019/view/CardWithUrl/component.js +111 -47
- 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 +31 -17
- 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/utils/click-helpers.js +29 -0
- package/dist/esm/view/CardWithUrl/component.js +110 -46
- 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 +31 -16
- 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/utils/click-helpers.d.ts +20 -0
- 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/utils/click-helpers.d.ts +20 -0
- 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
|
@@ -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.2",
|
|
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
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type KeyboardEvent, type MouseEvent } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* Returns true for genuine middle-clicks (button === 1).
|
|
3
4
|
* Filters out Windows right-clicks, which fire onAuxClick with button === 2
|
|
@@ -6,3 +7,22 @@
|
|
|
6
7
|
export declare const isAuxClick: (e: {
|
|
7
8
|
button: number;
|
|
8
9
|
}) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Extracts `href` and `target` from the anchor element that is the event's `currentTarget`.
|
|
12
|
+
*
|
|
13
|
+
* Smart Link click handlers are attached to multiple card renderers (InlineCard, BlockCard,
|
|
14
|
+
* EmbedCard, FlexibleCard). When the handler needs to manually open a link — for example,
|
|
15
|
+
* when native anchor navigation has been prevented — it uses this helper to read the
|
|
16
|
+
* anchor's resolved URL and intended target from the event rather than re-deriving them.
|
|
17
|
+
*
|
|
18
|
+
* Returns `{ href: undefined, target: '_self' }` when `currentTarget` is not an anchor
|
|
19
|
+
* element (e.g. a button or wrapper div), so callers can safely fall back to a default target.
|
|
20
|
+
*
|
|
21
|
+
* @param event - A React mouse or keyboard event whose `currentTarget` may be an anchor.
|
|
22
|
+
* @returns The resolved absolute `href` and `target` attribute of the anchor, or safe
|
|
23
|
+
* defaults if `currentTarget` is not an anchor.
|
|
24
|
+
*/
|
|
25
|
+
export declare const getAnchorAttributesFromEvent: (event: MouseEvent | KeyboardEvent) => {
|
|
26
|
+
href?: string;
|
|
27
|
+
target: string;
|
|
28
|
+
};
|
|
@@ -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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type KeyboardEvent, type MouseEvent } from 'react';
|
|
1
2
|
/**
|
|
2
3
|
* Returns true for genuine middle-clicks (button === 1).
|
|
3
4
|
* Filters out Windows right-clicks, which fire onAuxClick with button === 2
|
|
@@ -6,3 +7,22 @@
|
|
|
6
7
|
export declare const isAuxClick: (e: {
|
|
7
8
|
button: number;
|
|
8
9
|
}) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Extracts `href` and `target` from the anchor element that is the event's `currentTarget`.
|
|
12
|
+
*
|
|
13
|
+
* Smart Link click handlers are attached to multiple card renderers (InlineCard, BlockCard,
|
|
14
|
+
* EmbedCard, FlexibleCard). When the handler needs to manually open a link — for example,
|
|
15
|
+
* when native anchor navigation has been prevented — it uses this helper to read the
|
|
16
|
+
* anchor's resolved URL and intended target from the event rather than re-deriving them.
|
|
17
|
+
*
|
|
18
|
+
* Returns `{ href: undefined, target: '_self' }` when `currentTarget` is not an anchor
|
|
19
|
+
* element (e.g. a button or wrapper div), so callers can safely fall back to a default target.
|
|
20
|
+
*
|
|
21
|
+
* @param event - A React mouse or keyboard event whose `currentTarget` may be an anchor.
|
|
22
|
+
* @returns The resolved absolute `href` and `target` attribute of the anchor, or safe
|
|
23
|
+
* defaults if `currentTarget` is not an anchor.
|
|
24
|
+
*/
|
|
25
|
+
export declare const getAnchorAttributesFromEvent: (event: MouseEvent | KeyboardEvent) => {
|
|
26
|
+
href?: string;
|
|
27
|
+
target: string;
|
|
28
|
+
};
|
|
@@ -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.3",
|
|
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)}
|
package/dist/cjs/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/* ask-rovo-section-header.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports.default = void 0;
|
|
10
|
-
require("./ask-rovo-section-header.compiled.css");
|
|
11
|
-
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _runtime = require("@compiled/react/runtime");
|
|
13
|
-
var _reactIntl = require("react-intl");
|
|
14
|
-
var _messages = require("../../../../../messages");
|
|
15
|
-
var _rovoHexLogo = _interopRequireDefault(require("../../../assets/rovo-hex-logo"));
|
|
16
|
-
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); }
|
|
17
|
-
var sectionHeaderStyles = null;
|
|
18
|
-
var sectionHeaderDividerStyles = null;
|
|
19
|
-
var sectionHeaderRowStyles = null;
|
|
20
|
-
var sectionHeaderLabelStyles = null;
|
|
21
|
-
/**
|
|
22
|
-
* "Ask Rovo" section header rendered above the prompt action pill buttons in
|
|
23
|
-
* the rovogrowth-640-inline-action-nudge-exp pill variant.
|
|
24
|
-
*
|
|
25
|
-
* Renders a full-width 1px divider followed by a row containing the colourful
|
|
26
|
-
* Rovo hex logo and the "Ask Rovo" label.
|
|
27
|
-
*/
|
|
28
|
-
var AskRovoSectionHeader = function AskRovoSectionHeader(_ref) {
|
|
29
|
-
var testId = _ref.testId;
|
|
30
|
-
var intl = (0, _reactIntl.useIntl)();
|
|
31
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
"data-testid": testId,
|
|
33
|
-
className: (0, _runtime.ax)(["_zulputpp _1e0c1txw _2lx21bp4 _otyrutpp _18u0v77o _1bsb1osq _1wpz1fhb"])
|
|
34
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
role: "separator",
|
|
36
|
-
"aria-orientation": "horizontal",
|
|
37
|
-
className: (0, _runtime.ax)(["_4t3it94y _1bsb1osq _bfhk1l7x"])
|
|
38
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className: (0, _runtime.ax)(["_zulp1b66 _1e0c1txw _4cvr1h6o _19bv1b66"])
|
|
40
|
-
}, /*#__PURE__*/React.createElement(_rovoHexLogo.default, null), /*#__PURE__*/React.createElement("span", {
|
|
41
|
-
className: (0, _runtime.ax)(["_11c8wadc _syazazsu _k48p1wq8"])
|
|
42
|
-
}, intl.formatMessage(_messages.messages.rovo_chat_action_section_header))));
|
|
43
|
-
};
|
|
44
|
-
var _default = exports.default = AskRovoSectionHeader;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
|
-
import { getIsRovoChatEnabled } from '../../../utils/rovo';
|
|
4
|
-
import { getExtensionKey } from '../../helpers';
|
|
5
|
-
import { useSmartCardState } from '../../store';
|
|
6
|
-
import useRovoConfig from '../use-rovo-config';
|
|
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
|
-
const NOT_ENABLED_RESULT = {
|
|
9
|
-
isEnabled: false
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Returns whether the rovogrowth-640-inline-action-nudge-exp experiment
|
|
14
|
-
* is enabled for the current user and link context.
|
|
15
|
-
*
|
|
16
|
-
* All eligibility criteria are consolidated here:
|
|
17
|
-
* 1. Rovo chat must be enabled for the tenant.
|
|
18
|
-
* 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
|
|
19
|
-
* 3. The link must support the RovoActions feature.
|
|
20
|
-
* 4. The extension key must be one of the supported options.
|
|
21
|
-
* 5. The experiment value must be true (via tmp-editor-statsig).
|
|
22
|
-
*
|
|
23
|
-
* The extension key is derived from the card store via the resolved URL,
|
|
24
|
-
* so callers don't need to thread it as a prop.
|
|
25
|
-
*/
|
|
26
|
-
const useInlineActionNudgeExperiment = (url, showHoverPreview, actionOptions) => {
|
|
27
|
-
var _actionOptions$rovoCh, _actionOptions$rovoCh2;
|
|
28
|
-
const {
|
|
29
|
-
rovoOptions: rovoConfig
|
|
30
|
-
} = useRovoConfig();
|
|
31
|
-
const isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
|
|
32
|
-
const cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
|
|
33
|
-
const extensionKey = getExtensionKey(cardState.details);
|
|
34
|
-
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;
|
|
35
|
-
return useMemo(() => {
|
|
36
|
-
if (!isRovoChatEnabled || !showHoverPreview || !url || !isRovoChatActionOptedIn) {
|
|
37
|
-
return NOT_ENABLED_RESULT;
|
|
38
|
-
}
|
|
39
|
-
if (!extensionKey || !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
|
|
40
|
-
return NOT_ENABLED_RESULT;
|
|
41
|
-
}
|
|
42
|
-
const isEnabled = expValEquals('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
43
|
-
return {
|
|
44
|
-
isEnabled
|
|
45
|
-
};
|
|
46
|
-
}, [isRovoChatEnabled, extensionKey, showHoverPreview, url, isRovoChatActionOptedIn]);
|
|
47
|
-
};
|
|
48
|
-
export 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)}
|
package/dist/es2019/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* ask-rovo-section-header.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
-
import "./ask-rovo-section-header.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useIntl } from 'react-intl';
|
|
6
|
-
import { messages } from '../../../../../messages';
|
|
7
|
-
import RovoHexLogo from '../../../assets/rovo-hex-logo';
|
|
8
|
-
const sectionHeaderStyles = null;
|
|
9
|
-
const sectionHeaderDividerStyles = null;
|
|
10
|
-
const sectionHeaderRowStyles = null;
|
|
11
|
-
const sectionHeaderLabelStyles = null;
|
|
12
|
-
/**
|
|
13
|
-
* "Ask Rovo" section header rendered above the prompt action pill buttons in
|
|
14
|
-
* the rovogrowth-640-inline-action-nudge-exp pill variant.
|
|
15
|
-
*
|
|
16
|
-
* Renders a full-width 1px divider followed by a row containing the colourful
|
|
17
|
-
* Rovo hex logo and the "Ask Rovo" label.
|
|
18
|
-
*/
|
|
19
|
-
const AskRovoSectionHeader = ({
|
|
20
|
-
testId
|
|
21
|
-
}) => {
|
|
22
|
-
const intl = useIntl();
|
|
23
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
"data-testid": testId,
|
|
25
|
-
className: ax(["_zulputpp _1e0c1txw _2lx21bp4 _otyrutpp _18u0v77o _1bsb1osq _1wpz1fhb"])
|
|
26
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
27
|
-
role: "separator",
|
|
28
|
-
"aria-orientation": "horizontal",
|
|
29
|
-
className: ax(["_4t3it94y _1bsb1osq _bfhk1l7x"])
|
|
30
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
31
|
-
className: ax(["_zulp1b66 _1e0c1txw _4cvr1h6o _19bv1b66"])
|
|
32
|
-
}, /*#__PURE__*/React.createElement(RovoHexLogo, null), /*#__PURE__*/React.createElement("span", {
|
|
33
|
-
className: ax(["_11c8wadc _syazazsu _k48p1wq8"])
|
|
34
|
-
}, intl.formatMessage(messages.rovo_chat_action_section_header))));
|
|
35
|
-
};
|
|
36
|
-
export default AskRovoSectionHeader;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
|
-
import { getIsRovoChatEnabled } from '../../../utils/rovo';
|
|
4
|
-
import { getExtensionKey } from '../../helpers';
|
|
5
|
-
import { useSmartCardState } from '../../store';
|
|
6
|
-
import useRovoConfig from '../use-rovo-config';
|
|
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
|
-
var NOT_ENABLED_RESULT = {
|
|
9
|
-
isEnabled: false
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Returns whether the rovogrowth-640-inline-action-nudge-exp experiment
|
|
14
|
-
* is enabled for the current user and link context.
|
|
15
|
-
*
|
|
16
|
-
* All eligibility criteria are consolidated here:
|
|
17
|
-
* 1. Rovo chat must be enabled for the tenant.
|
|
18
|
-
* 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
|
|
19
|
-
* 3. The link must support the RovoActions feature.
|
|
20
|
-
* 4. The extension key must be one of the supported options.
|
|
21
|
-
* 5. The experiment value must be true (via tmp-editor-statsig).
|
|
22
|
-
*
|
|
23
|
-
* The extension key is derived from the card store via the resolved URL,
|
|
24
|
-
* so callers don't need to thread it as a prop.
|
|
25
|
-
*/
|
|
26
|
-
var useInlineActionNudgeExperiment = function useInlineActionNudgeExperiment(url, showHoverPreview, actionOptions) {
|
|
27
|
-
var _actionOptions$rovoCh, _actionOptions$rovoCh2;
|
|
28
|
-
var _useRovoConfig = useRovoConfig(),
|
|
29
|
-
rovoConfig = _useRovoConfig.rovoOptions;
|
|
30
|
-
var isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
|
|
31
|
-
var cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
|
|
32
|
-
var extensionKey = getExtensionKey(cardState.details);
|
|
33
|
-
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
|
-
return useMemo(function () {
|
|
35
|
-
if (!isRovoChatEnabled || !showHoverPreview || !url || !isRovoChatActionOptedIn) {
|
|
36
|
-
return NOT_ENABLED_RESULT;
|
|
37
|
-
}
|
|
38
|
-
if (!extensionKey || !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
|
|
39
|
-
return NOT_ENABLED_RESULT;
|
|
40
|
-
}
|
|
41
|
-
var isEnabled = expValEquals('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
42
|
-
return {
|
|
43
|
-
isEnabled: isEnabled
|
|
44
|
-
};
|
|
45
|
-
}, [isRovoChatEnabled, extensionKey, showHoverPreview, url, isRovoChatActionOptedIn]);
|
|
46
|
-
};
|
|
47
|
-
export 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)}
|
package/dist/esm/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/* ask-rovo-section-header.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
-
import "./ask-rovo-section-header.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useIntl } from 'react-intl';
|
|
6
|
-
import { messages } from '../../../../../messages';
|
|
7
|
-
import RovoHexLogo from '../../../assets/rovo-hex-logo';
|
|
8
|
-
var sectionHeaderStyles = null;
|
|
9
|
-
var sectionHeaderDividerStyles = null;
|
|
10
|
-
var sectionHeaderRowStyles = null;
|
|
11
|
-
var sectionHeaderLabelStyles = null;
|
|
12
|
-
/**
|
|
13
|
-
* "Ask Rovo" section header rendered above the prompt action pill buttons in
|
|
14
|
-
* the rovogrowth-640-inline-action-nudge-exp pill variant.
|
|
15
|
-
*
|
|
16
|
-
* Renders a full-width 1px divider followed by a row containing the colourful
|
|
17
|
-
* Rovo hex logo and the "Ask Rovo" label.
|
|
18
|
-
*/
|
|
19
|
-
var AskRovoSectionHeader = function AskRovoSectionHeader(_ref) {
|
|
20
|
-
var testId = _ref.testId;
|
|
21
|
-
var intl = useIntl();
|
|
22
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
-
"data-testid": testId,
|
|
24
|
-
className: ax(["_zulputpp _1e0c1txw _2lx21bp4 _otyrutpp _18u0v77o _1bsb1osq _1wpz1fhb"])
|
|
25
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
26
|
-
role: "separator",
|
|
27
|
-
"aria-orientation": "horizontal",
|
|
28
|
-
className: ax(["_4t3it94y _1bsb1osq _bfhk1l7x"])
|
|
29
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: ax(["_zulp1b66 _1e0c1txw _4cvr1h6o _19bv1b66"])
|
|
31
|
-
}, /*#__PURE__*/React.createElement(RovoHexLogo, null), /*#__PURE__*/React.createElement("span", {
|
|
32
|
-
className: ax(["_11c8wadc _syazazsu _k48p1wq8"])
|
|
33
|
-
}, intl.formatMessage(messages.rovo_chat_action_section_header))));
|
|
34
|
-
};
|
|
35
|
-
export default AskRovoSectionHeader;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { CardActionOptions } from '../../../view/Card/types';
|
|
2
|
-
export interface InlineActionNudgeExperiment {
|
|
3
|
-
/**
|
|
4
|
-
* True when the user is in the treatment cohort and should see the
|
|
5
|
-
* inline action nudge UI. All treatment surfaces should gate on this.
|
|
6
|
-
*/
|
|
7
|
-
isEnabled: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Returns whether the rovogrowth-640-inline-action-nudge-exp experiment
|
|
11
|
-
* is enabled for the current user and link context.
|
|
12
|
-
*
|
|
13
|
-
* All eligibility criteria are consolidated here:
|
|
14
|
-
* 1. Rovo chat must be enabled for the tenant.
|
|
15
|
-
* 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
|
|
16
|
-
* 3. The link must support the RovoActions feature.
|
|
17
|
-
* 4. The extension key must be one of the supported options.
|
|
18
|
-
* 5. The experiment value must be true (via tmp-editor-statsig).
|
|
19
|
-
*
|
|
20
|
-
* The extension key is derived from the card store via the resolved URL,
|
|
21
|
-
* so callers don't need to thread it as a prop.
|
|
22
|
-
*/
|
|
23
|
-
declare const useInlineActionNudgeExperiment: (url?: string, showHoverPreview?: boolean, actionOptions?: CardActionOptions) => InlineActionNudgeExperiment;
|
|
24
|
-
export default useInlineActionNudgeExperiment;
|
package/dist/types/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface RovoSectionHeaderProps {
|
|
2
|
-
testId?: string;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* "Ask Rovo" section header rendered above the prompt action pill buttons in
|
|
6
|
-
* the rovogrowth-640-inline-action-nudge-exp pill variant.
|
|
7
|
-
*
|
|
8
|
-
* Renders a full-width 1px divider followed by a row containing the colourful
|
|
9
|
-
* Rovo hex logo and the "Ask Rovo" label.
|
|
10
|
-
*/
|
|
11
|
-
declare const AskRovoSectionHeader: ({ testId }: RovoSectionHeaderProps) => JSX.Element;
|
|
12
|
-
export default AskRovoSectionHeader;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { CardActionOptions } from '../../../view/Card/types';
|
|
2
|
-
export interface InlineActionNudgeExperiment {
|
|
3
|
-
/**
|
|
4
|
-
* True when the user is in the treatment cohort and should see the
|
|
5
|
-
* inline action nudge UI. All treatment surfaces should gate on this.
|
|
6
|
-
*/
|
|
7
|
-
isEnabled: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Returns whether the rovogrowth-640-inline-action-nudge-exp experiment
|
|
11
|
-
* is enabled for the current user and link context.
|
|
12
|
-
*
|
|
13
|
-
* All eligibility criteria are consolidated here:
|
|
14
|
-
* 1. Rovo chat must be enabled for the tenant.
|
|
15
|
-
* 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
|
|
16
|
-
* 3. The link must support the RovoActions feature.
|
|
17
|
-
* 4. The extension key must be one of the supported options.
|
|
18
|
-
* 5. The experiment value must be true (via tmp-editor-statsig).
|
|
19
|
-
*
|
|
20
|
-
* The extension key is derived from the card store via the resolved URL,
|
|
21
|
-
* so callers don't need to thread it as a prop.
|
|
22
|
-
*/
|
|
23
|
-
declare const useInlineActionNudgeExperiment: (url?: string, showHoverPreview?: boolean, actionOptions?: CardActionOptions) => InlineActionNudgeExperiment;
|
|
24
|
-
export default useInlineActionNudgeExperiment;
|