@atlaskit/smart-card 46.22.2 → 46.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/analytics.spec.yaml +23 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/cjs/constants.js +2 -0
- package/dist/cjs/extractors/flexible/actions/extract-remix-action.js +53 -0
- package/dist/cjs/extractors/flexible/actions/index.js +11 -2
- package/dist/cjs/extractors/flexible/index.js +7 -3
- package/dist/cjs/messages.js +4 -9
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/is-remix-action-enabled.js +48 -0
- package/dist/cjs/utils/use-remix-action-exposure.js +16 -0
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +18 -13
- package/dist/cjs/view/EmbedCard/components/rovo-actions-footer/index.js +58 -10
- package/dist/cjs/view/EmbedCard/index.js +2 -0
- package/dist/cjs/view/EmbedCard/views/ResolvedView.js +23 -7
- package/dist/cjs/view/FlexibleCard/components/actions/remix-action/index.js +81 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +5 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +10 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/index.js +9 -3
- package/dist/cjs/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +9 -1
- package/dist/cjs/view/InlineCard/common/inline-card-action/index.js +70 -0
- package/dist/cjs/view/InlineCard/common/remix-action/index.compiled.css +5 -0
- package/dist/cjs/view/InlineCard/common/remix-action/index.js +77 -0
- package/dist/cjs/view/InlineCard/common/rovo-actions-cta/index.js +1 -24
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/rovo-chat-utils/index.js +0 -28
- package/dist/cjs/view/common/rovo-post-auth-prompts/index.js +1 -16
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/es2019/constants.js +2 -0
- package/dist/es2019/extractors/flexible/actions/extract-remix-action.js +48 -0
- package/dist/es2019/extractors/flexible/actions/index.js +12 -0
- package/dist/es2019/extractors/flexible/index.js +4 -0
- package/dist/es2019/messages.js +4 -9
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/is-remix-action-enabled.js +39 -0
- package/dist/es2019/utils/use-remix-action-exposure.js +11 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +19 -14
- package/dist/es2019/view/EmbedCard/components/rovo-actions-footer/index.js +43 -11
- package/dist/es2019/view/EmbedCard/index.js +2 -0
- package/dist/es2019/view/EmbedCard/views/ResolvedView.js +22 -7
- package/dist/es2019/view/FlexibleCard/components/actions/remix-action/index.js +54 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +4 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +9 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/index.js +8 -1
- package/dist/es2019/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +9 -1
- package/dist/es2019/view/InlineCard/common/inline-card-action/index.js +61 -0
- package/dist/es2019/view/InlineCard/common/remix-action/index.compiled.css +5 -0
- package/dist/es2019/view/InlineCard/common/remix-action/index.js +50 -0
- package/dist/es2019/view/InlineCard/common/rovo-actions-cta/index.js +1 -24
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/rovo-chat-utils/index.js +0 -26
- package/dist/es2019/view/common/rovo-post-auth-prompts/index.js +1 -15
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
- package/dist/esm/constants.js +2 -0
- package/dist/esm/extractors/flexible/actions/extract-remix-action.js +47 -0
- package/dist/esm/extractors/flexible/actions/index.js +11 -2
- package/dist/esm/extractors/flexible/index.js +7 -3
- package/dist/esm/messages.js +4 -9
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/is-remix-action-enabled.js +42 -0
- package/dist/esm/utils/use-remix-action-exposure.js +11 -0
- package/dist/esm/view/BlockCard/views/ResolvedView.js +19 -14
- package/dist/esm/view/EmbedCard/components/rovo-actions-footer/index.js +59 -11
- package/dist/esm/view/EmbedCard/index.js +2 -0
- package/dist/esm/view/EmbedCard/views/ResolvedView.js +23 -7
- package/dist/esm/view/FlexibleCard/components/actions/remix-action/index.js +72 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +5 -1
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +11 -4
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/index.js +9 -3
- package/dist/esm/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +9 -1
- package/dist/esm/view/InlineCard/common/inline-card-action/index.js +61 -0
- package/dist/esm/view/InlineCard/common/remix-action/index.compiled.css +5 -0
- package/dist/esm/view/InlineCard/common/remix-action/index.js +70 -0
- package/dist/esm/view/InlineCard/common/rovo-actions-cta/index.js +1 -24
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/rovo-chat-utils/index.js +0 -28
- package/dist/esm/view/common/rovo-post-auth-prompts/index.js +1 -16
- package/dist/types/common/analytics/generated/analytics.types.d.ts +17 -2
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/extractors/flexible/actions/extract-remix-action.d.ts +15 -0
- package/dist/types/extractors/flexible/actions/index.d.ts +3 -1
- package/dist/types/extractors/flexible/index.d.ts +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +5 -0
- package/dist/types/state/hooks/use-invoke-client-action/types.d.ts +1 -1
- package/dist/types/utils/is-remix-action-enabled.d.ts +15 -0
- package/dist/types/utils/use-remix-action-exposure.d.ts +2 -0
- package/dist/types/view/Card/types.d.ts +10 -1
- package/dist/types/view/EmbedCard/components/rovo-actions-footer/index.d.ts +5 -4
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/remix-action/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +8 -2
- package/dist/types/view/FlexibleCard/types.d.ts +2 -1
- package/dist/types/view/InlineCard/common/inline-card-action/index.d.ts +11 -0
- package/dist/types/view/InlineCard/common/remix-action/index.d.ts +9 -0
- package/dist/types/view/common/rovo-chat-utils/index.d.ts +1 -2
- package/dist/types/view/common/rovo-post-auth-prompts/index.d.ts +1 -10
- package/package.json +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-forbidden-view--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-not-found-default--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-forbidden-view-with-default-legacy-icon--default.png +0 -3
- package/dist/cjs/utils/is-rovo-chat-action-visualize-enabled.js +0 -43
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-forbidden-view--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-not-found-default--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-forbidden-view-with-default-legacy-icon--default.png +0 -3
- package/dist/es2019/utils/is-rovo-chat-action-visualize-enabled.js +0 -34
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-forbidden-view--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-not-found-default--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-forbidden-view-with-default-legacy-icon--default.png +0 -3
- package/dist/esm/utils/is-rovo-chat-action-visualize-enabled.js +0 -37
- package/dist/types/utils/is-rovo-chat-action-visualize-enabled.d.ts +0 -18
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → block-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → embed-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → inline-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
- /package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → block-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
- /package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → embed-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
- /package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → inline-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
- /package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → block-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
- /package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → embed-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
- /package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → inline-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
|
@@ -24,7 +24,7 @@ import Block from '../block';
|
|
|
24
24
|
/**
|
|
25
25
|
* Allowed footer actions for HoverCard, in display order. Fetched from context.
|
|
26
26
|
*/
|
|
27
|
-
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [ActionName.RovoChatAction];
|
|
27
|
+
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [ActionName.RovoChatAction, InternalActionName.RemixAction];
|
|
28
28
|
var Actions = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, ActionName.AutomationAction, AutomationAction), ActionName.CopyLinkAction, CopyLinkAction), ActionName.DownloadAction, DownloadAction), ActionName.FollowAction, FollowAction), ActionName.PreviewAction, PreviewAction), ActionName.RovoChatAction, RovoChatAction), InternalActionName.AISummaryAction, AISummaryAction), InternalActionName.UnresolvedAction, CustomUnresolvedAction), InternalActionName.ViewRelatedLinksAction, ViewRelatedLinksAction);
|
|
29
29
|
var ignoreContainerMarginStyles = null;
|
|
30
30
|
var elevatedFooterStyles = null;
|
|
@@ -3,6 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
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; }
|
|
5
5
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
6
|
+
import { usePlugins } from '@atlaskit/link-provider/use-plugins';
|
|
6
7
|
import { useSmartLinkContext } from '@atlaskit/link-provider/use-smart-link-context';
|
|
7
8
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
9
|
import UFOHoldLoad from '@atlaskit/react-ufo/load-hold';
|
|
@@ -56,6 +57,8 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
56
57
|
openPreviewPanel = _useSmartLinkContext.openPreviewPanel,
|
|
57
58
|
product = _useSmartLinkContext.product;
|
|
58
59
|
var rovoConfig = useRovoConfig();
|
|
60
|
+
var _usePlugins = usePlugins(),
|
|
61
|
+
remix = _usePlugins.remix;
|
|
59
62
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
60
63
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
61
64
|
var cardType = cardState.status,
|
|
@@ -76,7 +79,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
76
79
|
}, [placeholderData, status]);
|
|
77
80
|
var placeHolderStatus = placeholderCardState ? placeholderCardState.status : undefined;
|
|
78
81
|
var context = useMemo(function () {
|
|
79
|
-
return getContextByStatus(_objectSpread(_objectSpread({
|
|
82
|
+
return getContextByStatus(_objectSpread(_objectSpread(_objectSpread({
|
|
80
83
|
aiSummaryConfig: aiSummaryConfig,
|
|
81
84
|
appearance: appearance,
|
|
82
85
|
fireEvent: fireEvent,
|
|
@@ -90,7 +93,10 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
90
93
|
renderers: renderers,
|
|
91
94
|
resolve: resolve,
|
|
92
95
|
product: product,
|
|
93
|
-
rovoConfig: rovoConfig
|
|
96
|
+
rovoConfig: rovoConfig
|
|
97
|
+
}, fg('platform_sl_3p_auth_visualize_killswitch') ? {
|
|
98
|
+
remix: remix
|
|
99
|
+
} : undefined), {}, {
|
|
94
100
|
actionOptions: actionOptions,
|
|
95
101
|
status: placeholderCardState ? placeHolderStatus : status,
|
|
96
102
|
url: url,
|
|
@@ -101,7 +107,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
101
107
|
openPreviewPanel: openPreviewPanel,
|
|
102
108
|
transformUrl: transformUrl
|
|
103
109
|
}));
|
|
104
|
-
}, [aiSummaryConfig, appearance, actionOptions, details, id, isPreviewPanelAvailable, isPreviewRestricted, onAuthorize, onClick, onAuxClick, onContextMenu, openPreviewPanel, origin, placeholderCardState, placeHolderStatus, product, renderers, resolve, rovoConfig, status, transformUrl, url, fireEvent]);
|
|
110
|
+
}, [aiSummaryConfig, appearance, actionOptions, details, id, isPreviewPanelAvailable, isPreviewRestricted, onAuthorize, onClick, onAuxClick, onContextMenu, openPreviewPanel, origin, placeholderCardState, placeHolderStatus, product, renderers, resolve, rovoConfig, remix, status, transformUrl, url, fireEvent]);
|
|
105
111
|
var flexibleCardContext = useMemo(function () {
|
|
106
112
|
return {
|
|
107
113
|
data: context,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
3
|
import useInlineTailoredAction from '../../../state/hooks/use-inline-tailored-actions';
|
|
3
4
|
import { HoverCard } from '../../HoverCard';
|
|
5
|
+
import { InlineCardAction } from '../common/inline-card-action';
|
|
4
6
|
import { InlineRovoActionButton } from '../common/rovo-actions-cta';
|
|
5
7
|
import { Frame } from '../Frame';
|
|
6
8
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
@@ -48,7 +50,13 @@ export function InlineCardResolvedViewFunctional(_ref) {
|
|
|
48
50
|
titleTextColor: titleTextColor,
|
|
49
51
|
type: type,
|
|
50
52
|
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
51
|
-
}), renderLozenge(lozenge),
|
|
53
|
+
}), renderLozenge(lozenge), fg('platform_sl_3p_auth_visualize_killswitch') ? /*#__PURE__*/React.createElement(InlineCardAction, {
|
|
54
|
+
id: id,
|
|
55
|
+
testId: testId,
|
|
56
|
+
url: link,
|
|
57
|
+
actionOptions: actionOptions,
|
|
58
|
+
showHoverPreview: showHoverPreview
|
|
59
|
+
}) : isInlineTailoredRovoActionEnabled && /*#__PURE__*/React.createElement(InlineRovoActionButton, {
|
|
52
60
|
testId: "".concat(testId, "-rovo-actions-cta"),
|
|
53
61
|
url: link,
|
|
54
62
|
actionOptions: actionOptions
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["testId"];
|
|
4
|
+
import React, { useMemo } from 'react';
|
|
5
|
+
import { usePlugins } from '@atlaskit/link-provider/use-plugins';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
|
+
import extractRemixAction from '../../../../extractors/flexible/actions/extract-remix-action';
|
|
8
|
+
import useInlineTailoredAction from '../../../../state/hooks/use-inline-tailored-actions';
|
|
9
|
+
import { useSmartCardState } from '../../../../state/store';
|
|
10
|
+
import InlineRemixAction from '../remix-action';
|
|
11
|
+
import { InlineRovoActionButton } from '../rovo-actions-cta';
|
|
12
|
+
var InlineChatAction = function InlineChatAction(_ref) {
|
|
13
|
+
var actionOptions = _ref.actionOptions,
|
|
14
|
+
showHoverPreview = _ref.showHoverPreview,
|
|
15
|
+
testId = _ref.testId,
|
|
16
|
+
url = _ref.url;
|
|
17
|
+
var _useInlineTailoredAct = useInlineTailoredAction(url, showHoverPreview, actionOptions),
|
|
18
|
+
isEnabled = _useInlineTailoredAct.isEnabled;
|
|
19
|
+
return isEnabled ? /*#__PURE__*/React.createElement(InlineRovoActionButton, {
|
|
20
|
+
actionOptions: actionOptions,
|
|
21
|
+
testId: "".concat(testId, "-rovo-actions-cta"),
|
|
22
|
+
url: url
|
|
23
|
+
}) : null;
|
|
24
|
+
};
|
|
25
|
+
var InlineCardActionWithRemix = function InlineCardActionWithRemix(props) {
|
|
26
|
+
var actionOptions = props.actionOptions,
|
|
27
|
+
id = props.id,
|
|
28
|
+
testId = props.testId,
|
|
29
|
+
url = props.url;
|
|
30
|
+
var _usePlugins = usePlugins(),
|
|
31
|
+
remix = _usePlugins.remix;
|
|
32
|
+
var _useSmartCardState = useSmartCardState(url !== null && url !== void 0 ? url : ''),
|
|
33
|
+
details = _useSmartCardState.details;
|
|
34
|
+
var data = useMemo(function () {
|
|
35
|
+
return details ? extractRemixAction({
|
|
36
|
+
response: details,
|
|
37
|
+
url: url,
|
|
38
|
+
actionOptions: actionOptions,
|
|
39
|
+
remix: remix,
|
|
40
|
+
appearance: 'inline',
|
|
41
|
+
id: id
|
|
42
|
+
}) : undefined;
|
|
43
|
+
}, [details, url, actionOptions, remix, id]);
|
|
44
|
+
|
|
45
|
+
// Inline cards have one action slot. Eligible Remix takes priority over chat.
|
|
46
|
+
return data && remix ? /*#__PURE__*/React.createElement(InlineRemixAction, {
|
|
47
|
+
data: data,
|
|
48
|
+
remix: remix,
|
|
49
|
+
testId: "".concat(testId, "-remix-action")
|
|
50
|
+
}) : /*#__PURE__*/React.createElement(InlineChatAction, props);
|
|
51
|
+
};
|
|
52
|
+
export var InlineCardAction = function InlineCardAction(_ref2) {
|
|
53
|
+
var _ref2$testId = _ref2.testId,
|
|
54
|
+
testId = _ref2$testId === void 0 ? 'inline-card' : _ref2$testId,
|
|
55
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
56
|
+
return fg('platform_sl_3p_auth_visualize_killswitch') ? /*#__PURE__*/React.createElement(InlineCardActionWithRemix, _extends({}, props, {
|
|
57
|
+
testId: testId
|
|
58
|
+
})) : /*#__PURE__*/React.createElement(InlineChatAction, _extends({}, props, {
|
|
59
|
+
testId: testId
|
|
60
|
+
}));
|
|
61
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import "./index.compiled.css";
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
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
|
+
import React from 'react';
|
|
10
|
+
import { useIntl } from 'react-intl';
|
|
11
|
+
import RemixIcon from '@atlaskit/icon-lab/core/ai-generative-remix';
|
|
12
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
13
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
14
|
+
import { messages } from '../../../../messages';
|
|
15
|
+
import useInvokeClientAction from '../../../../state/hooks/use-invoke-client-action';
|
|
16
|
+
import { useRemixActionExposure } from '../../../../utils/use-remix-action-exposure';
|
|
17
|
+
import { ActionButton } from '../action-button';
|
|
18
|
+
var styles = {
|
|
19
|
+
text: "_19bv12x7 _1e0c116y _4cvr1h6o _s7n4nkob _19pk1i6y"
|
|
20
|
+
};
|
|
21
|
+
var InlineRemixAction = function InlineRemixAction(_ref) {
|
|
22
|
+
var data = _ref.data,
|
|
23
|
+
remix = _ref.remix,
|
|
24
|
+
_ref$testId = _ref.testId,
|
|
25
|
+
testId = _ref$testId === void 0 ? 'inline-remix-action' : _ref$testId;
|
|
26
|
+
var intl = useIntl();
|
|
27
|
+
var invoke = useInvokeClientAction({});
|
|
28
|
+
var label = intl.formatMessage(messages.rovo_prompt_button_remix);
|
|
29
|
+
useRemixActionExposure(true);
|
|
30
|
+
return /*#__PURE__*/React.createElement(ActionButton, {
|
|
31
|
+
"aria-label": label,
|
|
32
|
+
testId: testId,
|
|
33
|
+
onClick: function onClick(event) {
|
|
34
|
+
event.preventDefault();
|
|
35
|
+
event.stopPropagation();
|
|
36
|
+
var anchorElement = event.currentTarget;
|
|
37
|
+
void invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
|
|
38
|
+
actionFn: function () {
|
|
39
|
+
var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
40
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
41
|
+
while (1) switch (_context.prev = _context.next) {
|
|
42
|
+
case 0:
|
|
43
|
+
return _context.abrupt("return", remix.open({
|
|
44
|
+
anchorElement: anchorElement,
|
|
45
|
+
url: data.url
|
|
46
|
+
}));
|
|
47
|
+
case 1:
|
|
48
|
+
case "end":
|
|
49
|
+
return _context.stop();
|
|
50
|
+
}
|
|
51
|
+
}, _callee);
|
|
52
|
+
}));
|
|
53
|
+
function actionFn() {
|
|
54
|
+
return _actionFn.apply(this, arguments);
|
|
55
|
+
}
|
|
56
|
+
return actionFn;
|
|
57
|
+
}()
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
}, /*#__PURE__*/React.createElement(RemixIcon, {
|
|
61
|
+
label: "",
|
|
62
|
+
size: "small"
|
|
63
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
64
|
+
as: "span",
|
|
65
|
+
xcss: styles.text
|
|
66
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
67
|
+
size: "small"
|
|
68
|
+
}, label)));
|
|
69
|
+
};
|
|
70
|
+
export default InlineRemixAction;
|
|
@@ -18,7 +18,6 @@ import useInvokeClientAction from '../../../../state/hooks/use-invoke-client-act
|
|
|
18
18
|
import useRovoChat from '../../../../state/hooks/use-rovo-chat';
|
|
19
19
|
import useRovoConfig from '../../../../state/hooks/use-rovo-config';
|
|
20
20
|
import { useSmartCardState } from '../../../../state/store';
|
|
21
|
-
import { isRovoChatActionVisualizeEnabled } from '../../../../utils/is-rovo-chat-action-visualize-enabled';
|
|
22
21
|
import { getPromptAction, RovoChatPromptKey } from '../../../common/rovo-chat-utils';
|
|
23
22
|
import { ActionButton } from '../action-button';
|
|
24
23
|
import { OneClickChatSpotlightLoader } from '../one-click-chat-spotlight/async';
|
|
@@ -57,14 +56,6 @@ var InlineRovoActionButtonLegacy = function InlineRovoActionButtonLegacy(_ref) {
|
|
|
57
56
|
switch (extensionKey) {
|
|
58
57
|
case 'google-object-provider':
|
|
59
58
|
if ((_cardState$details = cardState.details) !== null && _cardState$details !== void 0 && (_cardState$details = _cardState$details.data) !== null && _cardState$details !== void 0 && (_cardState$details = _cardState$details['@type']) !== null && _cardState$details !== void 0 && _cardState$details.includes('schema:SpreadsheetDigitalDocument')) {
|
|
60
|
-
// Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
|
|
61
|
-
if (rovoChatAction && isRovoChatActionVisualizeEnabled({
|
|
62
|
-
extensionKey: extensionKey,
|
|
63
|
-
product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
|
|
64
|
-
response: cardState.details
|
|
65
|
-
})) {
|
|
66
|
-
return RovoChatPromptKey.VISUALIZE;
|
|
67
|
-
}
|
|
68
59
|
return;
|
|
69
60
|
}
|
|
70
61
|
if ((_cardState$details2 = cardState.details) !== null && _cardState$details2 !== void 0 && (_cardState$details2 = _cardState$details2.data) !== null && _cardState$details2 !== void 0 && (_cardState$details2 = _cardState$details2['@type']) !== null && _cardState$details2 !== void 0 && _cardState$details2.includes('schema:PresentationDigitalDocument')) {
|
|
@@ -153,14 +144,6 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
|
|
|
153
144
|
var promptKey = useMemo(function () {
|
|
154
145
|
var _cardState$details3, _cardState$details4;
|
|
155
146
|
if (extensionKey === 'google-object-provider' && (_cardState$details3 = cardState.details) !== null && _cardState$details3 !== void 0 && (_cardState$details3 = _cardState$details3.data) !== null && _cardState$details3 !== void 0 && (_cardState$details3 = _cardState$details3['@type']) !== null && _cardState$details3 !== void 0 && _cardState$details3.includes('schema:SpreadsheetDigitalDocument')) {
|
|
156
|
-
// Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
|
|
157
|
-
if (rovoChatAction && isRovoChatActionVisualizeEnabled({
|
|
158
|
-
extensionKey: extensionKey,
|
|
159
|
-
product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
|
|
160
|
-
response: cardState.details
|
|
161
|
-
})) {
|
|
162
|
-
return RovoChatPromptKey.VISUALIZE;
|
|
163
|
-
}
|
|
164
147
|
return;
|
|
165
148
|
}
|
|
166
149
|
switch (extensionKey) {
|
|
@@ -221,7 +204,7 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
|
|
|
221
204
|
event.preventDefault();
|
|
222
205
|
event.stopPropagation();
|
|
223
206
|
invokePrompt();
|
|
224
|
-
}, [invokePrompt]);
|
|
207
|
+
}, [invokePrompt, promptKey]);
|
|
225
208
|
var button = promptData && content ? /*#__PURE__*/React.createElement(ActionButton, {
|
|
226
209
|
onClick: handleClick,
|
|
227
210
|
testId: testId
|
|
@@ -230,12 +213,6 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
|
|
|
230
213
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
231
214
|
size: "small"
|
|
232
215
|
}, content))) : null;
|
|
233
|
-
|
|
234
|
-
// Visualize is not part of the spotlight: its copy is generic ("See takeaways") and Sheets
|
|
235
|
-
// links are excluded from the spotlight experiment, so render the plain button.
|
|
236
|
-
if (promptKey === RovoChatPromptKey.VISUALIZE) {
|
|
237
|
-
return button;
|
|
238
|
-
}
|
|
239
216
|
return button && isRovoChatEnabled && rovoChatAction !== null && rovoChatAction !== void 0 && rovoChatAction.invokeAction ? /*#__PURE__*/React.createElement(OneClickChatSpotlightLoader, {
|
|
240
217
|
key: url,
|
|
241
218
|
url: url,
|
|
@@ -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: "46.22.
|
|
15
|
+
packageVersion: "46.22.3",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
1
|
import React from 'react';
|
|
5
2
|
import AiSearchIcon from '@atlaskit/icon-lab/core/ai-search';
|
|
6
3
|
import AiChatIcon from '@atlaskit/icon/core/ai-chat';
|
|
7
4
|
import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
|
|
8
|
-
import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
|
|
9
5
|
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
10
6
|
import { RovoIcon } from '@atlaskit/logo/rovo/icon';
|
|
11
7
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
@@ -30,7 +26,6 @@ export var RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
|
|
|
30
26
|
RovoChatPromptKey["EXPLAIN_CODE"] = "explain-code";
|
|
31
27
|
RovoChatPromptKey["CATCH_UP"] = "catch-up";
|
|
32
28
|
RovoChatPromptKey["SALESFORCE_PREP"] = "salesforce-prep";
|
|
33
|
-
RovoChatPromptKey["VISUALIZE"] = "visualize";
|
|
34
29
|
return RovoChatPromptKey;
|
|
35
30
|
}({});
|
|
36
31
|
var getContext = function getContext(intl, product) {
|
|
@@ -373,28 +368,5 @@ export var getPromptAction = function getPromptAction(_ref) {
|
|
|
373
368
|
size: iconSize
|
|
374
369
|
})
|
|
375
370
|
};
|
|
376
|
-
case RovoChatPromptKey.VISUALIZE:
|
|
377
|
-
var label_visualize = intl.formatMessage(messages.rovo_prompt_button_visualize);
|
|
378
|
-
var html_visualize = intl.formatMessage(messages.rovo_prompt_message_visualize, {
|
|
379
|
-
url: url
|
|
380
|
-
}, {
|
|
381
|
-
ignoreTag: true
|
|
382
|
-
});
|
|
383
|
-
var visualizeIconProps = _objectSpread({
|
|
384
|
-
label: label_visualize,
|
|
385
|
-
size: iconSize
|
|
386
|
-
}, cardAppearance === CardDisplay.HoverCardPreview ? {
|
|
387
|
-
spacing: 'spacious'
|
|
388
|
-
} : {});
|
|
389
|
-
return {
|
|
390
|
-
content: label_visualize,
|
|
391
|
-
tooltipMessage: label_visualize,
|
|
392
|
-
data: {
|
|
393
|
-
name: label_visualize,
|
|
394
|
-
dialogues: [],
|
|
395
|
-
prompt: htmlToAdf(html_visualize)
|
|
396
|
-
},
|
|
397
|
-
icon: /*#__PURE__*/React.createElement(ChartBarIcon, visualizeIconProps)
|
|
398
|
-
};
|
|
399
371
|
}
|
|
400
372
|
};
|
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
import { isRovoChatActionVisualizeEnabled } from '../../../utils/is-rovo-chat-action-visualize-enabled';
|
|
2
1
|
import { RovoChatPromptKey } from '../rovo-chat-utils';
|
|
3
2
|
export var getRovoPostAuthPromptKeys = function getRovoPostAuthPromptKeys(_ref) {
|
|
4
|
-
var extensionKey = _ref.extensionKey
|
|
5
|
-
_ref$isRovoChatAction = _ref.isRovoChatActionShown,
|
|
6
|
-
isRovoChatActionShown = _ref$isRovoChatAction === void 0 ? false : _ref$isRovoChatAction,
|
|
7
|
-
product = _ref.product,
|
|
8
|
-
response = _ref.response;
|
|
3
|
+
var extensionKey = _ref.extensionKey;
|
|
9
4
|
var defaultPrompts = [RovoChatPromptKey.KEY_HIGHLIGHTS];
|
|
10
5
|
if (extensionKey === 'github-object-provider' || extensionKey === 'gitlab-object-provider') {
|
|
11
6
|
return [RovoChatPromptKey.EXPLAIN_CODE].concat(defaultPrompts);
|
|
12
7
|
}
|
|
13
|
-
if (isRovoChatActionShown && isRovoChatActionVisualizeEnabled({
|
|
14
|
-
extensionKey: extensionKey,
|
|
15
|
-
product: product,
|
|
16
|
-
response: response
|
|
17
|
-
})) {
|
|
18
|
-
// Visualize goes first (PM decision). The embed Rovo actions footer hides every prompt after
|
|
19
|
-
// the first below 320px (HIDE_SECONDARY_ACTIONS_WIDTH), so this keeps Visualize visible on
|
|
20
|
-
// narrow embeds whenever exposure fires.
|
|
21
|
-
return [RovoChatPromptKey.VISUALIZE, RovoChatPromptKey.SUMMARIZE_DOCUMENT].concat(defaultPrompts);
|
|
22
|
-
}
|
|
23
8
|
return [RovoChatPromptKey.SUMMARIZE_DOCUMENT].concat(defaultPrompts);
|
|
24
9
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::a05096f79880ea0ccdaf8dd61aef67eb>>
|
|
7
7
|
* @codegenCommand afm workspace @atlassian/analytics-tooling analytics:codegen smart-card
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataContextType = {
|
|
@@ -86,6 +86,13 @@ export type ButtonClickedRovoChatPromptAttributesType = {
|
|
|
86
86
|
prompt?: string | null;
|
|
87
87
|
interactionSource?: 'spotlightCta' | 'inlineAction' | null;
|
|
88
88
|
};
|
|
89
|
+
export type ButtonClickedRemixAttributesType = {
|
|
90
|
+
actionType?: string | null;
|
|
91
|
+
id?: string | null;
|
|
92
|
+
definitionId?: string | null;
|
|
93
|
+
display?: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url' | null;
|
|
94
|
+
resourceType?: string | null;
|
|
95
|
+
};
|
|
89
96
|
export type ButtonClickedCopySummaryAttributesType = {};
|
|
90
97
|
export type SummaryViewedAttributesType = {
|
|
91
98
|
fromCache?: boolean | null;
|
|
@@ -135,7 +142,12 @@ export type SmartLinkIframeFocusedAttributesType = {
|
|
|
135
142
|
export type ApplicationAccountConnectedAttributesType = {
|
|
136
143
|
definitionId?: string | null;
|
|
137
144
|
};
|
|
138
|
-
export type ApplicationAccountAuthStartedAttributesType = {
|
|
145
|
+
export type ApplicationAccountAuthStartedAttributesType = {
|
|
146
|
+
journeyId?: string | null;
|
|
147
|
+
attemptId?: string | null;
|
|
148
|
+
retryOfAttemptId?: string | null;
|
|
149
|
+
fromStage?: string | null;
|
|
150
|
+
};
|
|
139
151
|
export type SmartLinkQuickActionStartedAttributesType = {
|
|
140
152
|
smartLinkActionType: 'FollowEntityAction' | 'GetStatusTransitionsAction' | 'StatusUpdateAction' | 'UnfollowEntityAction' | 'StatusUpdate';
|
|
141
153
|
};
|
|
@@ -319,6 +331,9 @@ export type AnalyticsEventAttributes = {
|
|
|
319
331
|
/**
|
|
320
332
|
* Fired when sending prompt to RovoChat via click */
|
|
321
333
|
'ui.button.clicked.rovoChatPrompt': ButtonClickedRovoChatPromptAttributesType;
|
|
334
|
+
/**
|
|
335
|
+
* Fired when Remix is opened via click */
|
|
336
|
+
'ui.button.clicked.remix': ButtonClickedRemixAttributesType;
|
|
322
337
|
/**
|
|
323
338
|
* fired when the copy ai summary button is clicked */
|
|
324
339
|
'ui.button.clicked.copySummary': ButtonClickedCopySummaryAttributesType;
|
|
@@ -143,6 +143,7 @@ export declare enum ActionName {
|
|
|
143
143
|
}
|
|
144
144
|
export declare enum InternalActionName {
|
|
145
145
|
AISummaryAction = "AISummaryAction",
|
|
146
|
+
RemixAction = "RemixAction",
|
|
146
147
|
UnresolvedAction = "UnresolvedAction",
|
|
147
148
|
ViewRelatedLinksAction = "ViewRelatedLinksAction"
|
|
148
149
|
}
|
|
@@ -235,6 +236,7 @@ export declare enum CardAction {
|
|
|
235
236
|
DownloadAction = "DownloadAction",
|
|
236
237
|
FollowAction = "FollowAction",
|
|
237
238
|
PreviewAction = "PreviewAction",
|
|
239
|
+
RemixAction = "RemixAction",
|
|
238
240
|
RovoChatAction = "RovoChatAction",
|
|
239
241
|
ViewAction = "ViewAction"
|
|
240
242
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
|
|
2
|
+
import type { LinkProviderRemixPlugin } from '@atlaskit/link-provider/types';
|
|
3
|
+
import type { RemixActionData } from '../../../state/flexible-ui-context/types';
|
|
4
|
+
import { type InternalCardActionOptions as CardActionOptions } from '../../../view/Card/types';
|
|
5
|
+
import type { FlexibleCardProps } from '../../../view/FlexibleCard/types';
|
|
6
|
+
type ExtractRemixActionParam = {
|
|
7
|
+
actionOptions?: CardActionOptions;
|
|
8
|
+
appearance?: FlexibleCardProps['appearance'];
|
|
9
|
+
id?: string;
|
|
10
|
+
remix?: LinkProviderRemixPlugin;
|
|
11
|
+
response: JsonLd.Response;
|
|
12
|
+
url?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const extractRemixAction: ({ actionOptions, appearance, id, remix, response, url, }: ExtractRemixActionParam) => RemixActionData | undefined;
|
|
15
|
+
export default extractRemixAction;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
|
|
2
|
+
import type { LinkProviderRemixPlugin } from '@atlaskit/link-provider/types';
|
|
2
3
|
import type { ProductType } from '@atlaskit/linking-common/types';
|
|
3
4
|
import { type FireEventFunction } from '../../../common/analytics/types';
|
|
4
5
|
import { type FlexibleUiActions } from '../../../state/flexible-ui-context/types';
|
|
@@ -30,9 +31,10 @@ export type ExtractActionsParam = {
|
|
|
30
31
|
}) => void;
|
|
31
32
|
origin?: AnalyticsOrigin;
|
|
32
33
|
product?: ProductType;
|
|
34
|
+
remix?: LinkProviderRemixPlugin;
|
|
33
35
|
response: JsonLd.Response;
|
|
34
36
|
rovoConfig?: RovoConfig;
|
|
35
37
|
transformUrl?: TransformUrlFn;
|
|
36
38
|
url?: string;
|
|
37
39
|
};
|
|
38
|
-
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, product, response, rovoConfig, transformUrl, url, isPreviewPanelAvailable, isPreviewRestricted, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
40
|
+
export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, product, remix, response, rovoConfig, transformUrl, url, isPreviewPanelAvailable, isPreviewRestricted, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
|
|
2
2
|
import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
|
|
3
|
-
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, onAuxClick, onContextMenu, origin, product, resolve, rovoConfig, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, isPreviewRestricted, openPreviewPanel, transformUrl, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
3
|
+
declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, onAuxClick, onContextMenu, origin, product, resolve, rovoConfig, remix, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, isPreviewRestricted, openPreviewPanel, transformUrl, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
|
|
4
4
|
export default extractFlexibleUiContext;
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type MessageDescriptor } from 'react-intl';
|
|
2
2
|
export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
|
|
3
|
-
export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_message_summarize' | 'rovo_prompt_button_ask_rovo_anything' | 'rovo_prompt_message_ask_rovo_anything' | 'rovo_prompt_button_highlight_relevant_content' | 'rovo_prompt_message_highlight_relevant_content' | 'rovo_prompt_button_identify_key_trends' | 'rovo_prompt_message_identify_key_trends' | 'rovo_prompt_button_identify_key_points' | 'rovo_prompt_message_identify_key_points' | 'rovo_prompt_button_find_open_questions' | 'rovo_prompt_message_find_open_questions' | 'rovo_prompt_button_key_highlights' | 'rovo_prompt_message_key_highlights' | 'rovo_prompt_message_summarize_document' | 'rovo_prompt_message_summarize_presentation' | 'rovo_prompt_button_explain_code' | 'rovo_prompt_message_explain_code' | 'rovo_prompt_button_catch_up' | 'rovo_prompt_message_catch_up' | 'rovo_prompt_button_salesforce_prep' | 'rovo_prompt_message_salesforce_prep' | '
|
|
3
|
+
export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_message_summarize' | 'rovo_prompt_button_ask_rovo_anything' | 'rovo_prompt_message_ask_rovo_anything' | 'rovo_prompt_button_highlight_relevant_content' | 'rovo_prompt_message_highlight_relevant_content' | 'rovo_prompt_button_identify_key_trends' | 'rovo_prompt_message_identify_key_trends' | 'rovo_prompt_button_identify_key_points' | 'rovo_prompt_message_identify_key_points' | 'rovo_prompt_button_find_open_questions' | 'rovo_prompt_message_find_open_questions' | 'rovo_prompt_button_key_highlights' | 'rovo_prompt_message_key_highlights' | 'rovo_prompt_message_summarize_document' | 'rovo_prompt_message_summarize_presentation' | 'rovo_prompt_button_explain_code' | 'rovo_prompt_message_explain_code' | 'rovo_prompt_button_catch_up' | 'rovo_prompt_message_catch_up' | 'rovo_prompt_button_salesforce_prep' | 'rovo_prompt_message_salesforce_prep' | 'rovo_prompt_button_remix';
|
|
4
4
|
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summary_error_generic_rebrand' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action_rebrand' | 'ai_summary_action_description' | 'ai_summary_action_description_rebrand' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_link_account_success_flag_description' | 'connect_link_account_success_flag_title' | 'connect_link_account_success_flag_title_default' | 'connect_unauthorised_account_action' | 'connect_3p_account' | 'connect_inline_provider_to_update' | 'connect_inline_social_proof' | 'connect_inline_to_update' | 'social_proof_inline_cta_tag_high_with_context' | 'social_proof_inline_cta_tag_high_no_context' | 'social_proof_inline_cta_tag_low_with_context' | 'social_proof_inline_cta_tag_low_no_context' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_with_title' | 'preview_modal' | 'preview_modal_with_title' | 'preview_panel' | 'preview_panel_with_title' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewInProvider' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_clear_link_names' | 'rovo_unauthorised_feature_understand_linked_docs' | 'rovo_unauthorised_feature_go_deeper_smart_suggestions' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | 'rovo_chat_action_section_header' | 'rovo_prompt_button_summarize_this' | 'rovo_prompt_button_ask_a_specific_question' | 'rovo_prompt_button_show_me_whats_relevant' | RovoChatActionMessageKey | 'pre_auth_block_social_proof_not_low' | 'pre_auth_block_social_proof_low';
|
|
5
5
|
type Messages = {
|
|
6
6
|
[K in MessageKey]: MessageDescriptor;
|
|
@@ -299,6 +299,7 @@ export type FlexibleUiActions = {
|
|
|
299
299
|
[ActionName.PreviewAction]?: PreviewActionData;
|
|
300
300
|
[ActionName.RovoChatAction]?: RovoChatActionData;
|
|
301
301
|
[InternalActionName.AISummaryAction]?: AISummaryActionData;
|
|
302
|
+
[InternalActionName.RemixAction]?: RemixActionData;
|
|
302
303
|
[InternalActionName.UnresolvedAction]?: UnresolvedActionData;
|
|
303
304
|
[InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
|
|
304
305
|
};
|
|
@@ -330,6 +331,10 @@ export type RovoChatActionData = {
|
|
|
330
331
|
product?: ProductType;
|
|
331
332
|
url?: string;
|
|
332
333
|
};
|
|
334
|
+
export type RemixActionData = {
|
|
335
|
+
invokeAction: Omit<InvokeClientActionProps, 'actionFn' | 'prompt'>;
|
|
336
|
+
url: string;
|
|
337
|
+
};
|
|
333
338
|
export type UnresolvedActionData = RetryOptions;
|
|
334
339
|
export type ViewRelatedLinksActionData = {
|
|
335
340
|
ari: string;
|
|
@@ -7,7 +7,7 @@ export type UseInvokeClientActionProps = {
|
|
|
7
7
|
*/
|
|
8
8
|
fireEvent?: FireEventFunction;
|
|
9
9
|
};
|
|
10
|
-
export type InvokeClientActionSubjectId = 'copyLink' | 'downloadDocument' | 'invokePreviewScreen' | 'rovoChatPrompt' | 'shortcutGoToLink';
|
|
10
|
+
export type InvokeClientActionSubjectId = 'copyLink' | 'downloadDocument' | 'invokePreviewScreen' | 'remix' | 'rovoChatPrompt' | 'shortcutGoToLink';
|
|
11
11
|
type InvokeRovoChatClientActionProps = {
|
|
12
12
|
interactionSource?: RovoInteractionSource;
|
|
13
13
|
prompt?: string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
|
|
2
|
+
import type { LinkProviderRemixPlugin } from '@atlaskit/link-provider/types';
|
|
3
|
+
type IsRemixActionEnabledOptions = {
|
|
4
|
+
extensionKey?: string;
|
|
5
|
+
/** The `remix` link provider plugin, from `usePlugins`. */
|
|
6
|
+
remix?: LinkProviderRemixPlugin;
|
|
7
|
+
response?: JsonLd.Response;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Whether the Remix action is offered for a resolved link.
|
|
11
|
+
*
|
|
12
|
+
* This check does not record exposure. The rendered Remix control owns exposure.
|
|
13
|
+
*/
|
|
14
|
+
export declare const isRemixActionEnabled: ({ extensionKey, remix, response, }: IsRemixActionEnabledOptions) => boolean;
|
|
15
|
+
export {};
|
|
@@ -57,7 +57,16 @@ export type CardActionVisibilityOptions = {
|
|
|
57
57
|
* This can be used for experiment before the prop become public API after experiment is successful.
|
|
58
58
|
* Warning: Internal prop can be changed/refactored anytime without notice.
|
|
59
59
|
*/
|
|
60
|
-
export type InternalCardActionOptions = CardActionOptions & {
|
|
60
|
+
export type InternalCardActionOptions = CardActionOptions & {
|
|
61
|
+
/**
|
|
62
|
+
* Remix action opens Google Sheets links in Remix.
|
|
63
|
+
*
|
|
64
|
+
* This is an internal experiment feature and maybe removed any given time.
|
|
65
|
+
*/
|
|
66
|
+
remixAction?: {
|
|
67
|
+
optIn: boolean;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
61
70
|
interface ActionProps {
|
|
62
71
|
/**
|
|
63
72
|
* Configure visibility of actions available.
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import type { RovoChatActionData } from '../../../../state/flexible-ui-context/types';
|
|
7
|
-
import { RovoChatPromptKey } from '../../../common/rovo-chat-utils';
|
|
6
|
+
import type { RovoChatActionData, RemixActionData } from '../../../../state/flexible-ui-context/types';
|
|
7
|
+
import { type RovoChatPromptKey } from '../../../common/rovo-chat-utils';
|
|
8
8
|
type EmbedRovoActionsFooterProps = {
|
|
9
|
-
actionData
|
|
9
|
+
actionData?: RovoChatActionData;
|
|
10
10
|
prompts: RovoChatPromptKey[];
|
|
11
|
+
remixActionData?: RemixActionData;
|
|
11
12
|
testId?: string;
|
|
12
13
|
};
|
|
13
|
-
declare const EmbedRovoActionsFooter: ({ actionData, prompts, testId, }: EmbedRovoActionsFooterProps) => React.JSX.Element | null;
|
|
14
|
+
declare const EmbedRovoActionsFooter: ({ actionData, remixActionData, prompts, testId, }: EmbedRovoActionsFooterProps) => React.JSX.Element | null;
|
|
14
15
|
export default EmbedRovoActionsFooter;
|
|
@@ -22,6 +22,8 @@ export interface EmbedCardResolvedViewProps {
|
|
|
22
22
|
frameStyle?: FrameStyle;
|
|
23
23
|
/** For image icons in the title, whether to hide the loading skeleton while the image is loading. */
|
|
24
24
|
hideIconLoadingSkeleton?: boolean;
|
|
25
|
+
/** The ID used to correlate Smart Link analytics events. */
|
|
26
|
+
id?: string;
|
|
25
27
|
inheritDimensions?: boolean;
|
|
26
28
|
/** A flag that determines whether the card is selected in edit mode. */
|
|
27
29
|
isSelected?: boolean;
|
|
@@ -10,5 +10,5 @@ import { type ActionGroupProps } from './types';
|
|
|
10
10
|
* @param {ActionGroupProps} ActionGroupProps
|
|
11
11
|
* @see Action
|
|
12
12
|
*/
|
|
13
|
-
declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, onDropdownOpenChange, containerWidth, }: ActionGroupProps) => JSX.Element | null;
|
|
13
|
+
declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, showRemainingActionsInOverflow, onDropdownOpenChange, containerWidth, }: ActionGroupProps) => JSX.Element | null;
|
|
14
14
|
export default ActionGroup;
|
|
@@ -23,6 +23,10 @@ export type ActionGroupProps = {
|
|
|
23
23
|
* Called when the action dropdown menu (if present) is open/closed.
|
|
24
24
|
*/
|
|
25
25
|
onDropdownOpenChange?: (isOpen: boolean) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Include every action beyond the inline slots in the overflow menu.
|
|
28
|
+
*/
|
|
29
|
+
showRemainingActionsInOverflow?: boolean;
|
|
26
30
|
/**
|
|
27
31
|
* Determines the default size of the actions within the Action Group.
|
|
28
32
|
*/
|