@atlaskit/smart-card 46.22.3 → 46.23.1
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 +24 -0
- package/analytics.spec.yaml +6 -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 +11 -1
- 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 +3 -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/utils/is-rovo-chat-action-visualize-enabled.js +0 -43
- 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/utils/is-rovo-chat-action-visualize-enabled.js +0 -34
- 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/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
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _reactIntl = require("react-intl");
|
|
16
|
+
var _aiGenerativeRemix = _interopRequireDefault(require("@atlaskit/icon-lab/core/ai-generative-remix"));
|
|
17
|
+
var _usePlugins2 = require("@atlaskit/link-provider/use-plugins");
|
|
18
|
+
var _constants = require("../../../../../constants");
|
|
19
|
+
var _messages = require("../../../../../messages");
|
|
20
|
+
var _useFlexibleUiContext = require("../../../../../state/flexible-ui-context/useFlexibleUiContext");
|
|
21
|
+
var _useInvokeClientAction = _interopRequireDefault(require("../../../../../state/hooks/use-invoke-client-action"));
|
|
22
|
+
var _useRemixActionExposure = require("../../../../../utils/use-remix-action-exposure");
|
|
23
|
+
var _action = _interopRequireDefault(require("../action"));
|
|
24
|
+
var _excluded = ["onClick"];
|
|
25
|
+
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); }
|
|
26
|
+
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; }
|
|
27
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
|
+
var RemixAction = function RemixAction(_ref) {
|
|
29
|
+
var _context$actions;
|
|
30
|
+
var onClickCallback = _ref.onClick,
|
|
31
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
|
+
var intl = (0, _reactIntl.useIntl)();
|
|
33
|
+
var context = (0, _useFlexibleUiContext.useFlexibleUiContext)();
|
|
34
|
+
var _usePlugins = (0, _usePlugins2.usePlugins)(),
|
|
35
|
+
remix = _usePlugins.remix;
|
|
36
|
+
var invoke = (0, _useInvokeClientAction.default)({});
|
|
37
|
+
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.InternalActionName.RemixAction];
|
|
38
|
+
var actionMessage = intl.formatMessage(_messages.messages.rovo_prompt_button_remix);
|
|
39
|
+
var isRemixVisible = Boolean(data && remix);
|
|
40
|
+
(0, _useRemixActionExposure.useRemixActionExposure)(isRemixVisible);
|
|
41
|
+
var onClick = (0, _react.useCallback)(function () {
|
|
42
|
+
if (data !== null && data !== void 0 && data.invokeAction && remix) {
|
|
43
|
+
var url = data.url;
|
|
44
|
+
invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
|
|
45
|
+
actionFn: function () {
|
|
46
|
+
var _actionFn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
47
|
+
return _regenerator.default.wrap(function (_context) {
|
|
48
|
+
while (1) switch (_context.prev = _context.next) {
|
|
49
|
+
case 0:
|
|
50
|
+
return _context.abrupt("return", remix.open({
|
|
51
|
+
url: url
|
|
52
|
+
}));
|
|
53
|
+
case 1:
|
|
54
|
+
case "end":
|
|
55
|
+
return _context.stop();
|
|
56
|
+
}
|
|
57
|
+
}, _callee);
|
|
58
|
+
}));
|
|
59
|
+
function actionFn() {
|
|
60
|
+
return _actionFn.apply(this, arguments);
|
|
61
|
+
}
|
|
62
|
+
return actionFn;
|
|
63
|
+
}()
|
|
64
|
+
}));
|
|
65
|
+
onClickCallback === null || onClickCallback === void 0 || onClickCallback();
|
|
66
|
+
}
|
|
67
|
+
}, [data, invoke, onClickCallback, remix]);
|
|
68
|
+
return isRemixVisible ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
69
|
+
ariaLabel: actionMessage,
|
|
70
|
+
content: actionMessage,
|
|
71
|
+
icon: /*#__PURE__*/_react.default.createElement(_aiGenerativeRemix.default, {
|
|
72
|
+
color: "currentColor",
|
|
73
|
+
label: "",
|
|
74
|
+
size: props.iconSize
|
|
75
|
+
}),
|
|
76
|
+
onClick: onClick,
|
|
77
|
+
testId: "smart-action-remix-action",
|
|
78
|
+
tooltipMessage: actionMessage
|
|
79
|
+
}, props)) : null;
|
|
80
|
+
};
|
|
81
|
+
var _default = exports.default = RemixAction;
|
|
@@ -27,6 +27,7 @@ var _downloadAction = _interopRequireDefault(require("../../actions/download-act
|
|
|
27
27
|
var _editAction = _interopRequireDefault(require("../../actions/edit-action"));
|
|
28
28
|
var _followAction = _interopRequireDefault(require("../../actions/follow-action"));
|
|
29
29
|
var _previewAction = _interopRequireDefault(require("../../actions/preview-action"));
|
|
30
|
+
var _remixAction = _interopRequireDefault(require("../../actions/remix-action"));
|
|
30
31
|
var _rovoChatAction = _interopRequireDefault(require("../../actions/rovo-chat-action"));
|
|
31
32
|
var _viewRelatedLinksAction = _interopRequireDefault(require("../../actions/view-related-links-action"));
|
|
32
33
|
var _actionFooter = require("./action-footer");
|
|
@@ -34,7 +35,7 @@ var _getPrimitivesPaddingSpaceBySize = require("./getPrimitivesPaddingSpaceBySiz
|
|
|
34
35
|
var _Actions;
|
|
35
36
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
36
37
|
var ignoreContainerPaddingStyles = null;
|
|
37
|
-
var Actions = (_Actions = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_Actions, _constants.ActionName.AutomationAction, _automationAction.default), _constants.ActionName.CopyLinkAction, _copyLinkAction.default), _constants.ActionName.CustomAction, _action.default), _constants.ActionName.DeleteAction, _deleteAction.default), _constants.ActionName.DownloadAction, _downloadAction.default), _constants.ActionName.EditAction, _editAction.default), _constants.ActionName.FollowAction, _followAction.default), _constants.ActionName.PreviewAction, _previewAction.default), _constants.ActionName.RovoChatAction, _rovoChatAction.default), _constants.InternalActionName.AISummaryAction, _aiSummaryAction.default), (0, _defineProperty2.default)((0, _defineProperty2.default)(_Actions, _constants.InternalActionName.UnresolvedAction, _customUnresolvedAction.default), _constants.InternalActionName.ViewRelatedLinksAction, _viewRelatedLinksAction.default));
|
|
38
|
+
var Actions = (_Actions = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_Actions, _constants.ActionName.AutomationAction, _automationAction.default), _constants.ActionName.CopyLinkAction, _copyLinkAction.default), _constants.ActionName.CustomAction, _action.default), _constants.ActionName.DeleteAction, _deleteAction.default), _constants.ActionName.DownloadAction, _downloadAction.default), _constants.ActionName.EditAction, _editAction.default), _constants.ActionName.FollowAction, _followAction.default), _constants.ActionName.PreviewAction, _previewAction.default), _constants.ActionName.RovoChatAction, _rovoChatAction.default), _constants.InternalActionName.AISummaryAction, _aiSummaryAction.default), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_Actions, _constants.InternalActionName.RemixAction, _remixAction.default), _constants.InternalActionName.UnresolvedAction, _customUnresolvedAction.default), _constants.InternalActionName.ViewRelatedLinksAction, _viewRelatedLinksAction.default));
|
|
38
39
|
var DEFAULT_SORT_ORDER = ['PreviewAction', 'CopyLinkAction', 'AISummaryAction'];
|
|
39
40
|
var sort = function sort(a, b) {
|
|
40
41
|
var idxA = DEFAULT_SORT_ORDER.indexOf(a);
|
|
@@ -81,7 +82,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
81
82
|
return;
|
|
82
83
|
}
|
|
83
84
|
var arr = Object.keys(context.actions).filter(function (name) {
|
|
84
|
-
return name !== _constants.ActionName.RovoChatAction;
|
|
85
|
+
return name !== _constants.ActionName.RovoChatAction && name !== _constants.InternalActionName.RemixAction;
|
|
85
86
|
});
|
|
86
87
|
arr.sort(sort);
|
|
87
88
|
var renderAction = function renderAction(name) {
|
package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var _downloadAction = _interopRequireDefault(require("../../../actions/download-
|
|
|
21
21
|
var _editAction = _interopRequireDefault(require("../../../actions/edit-action"));
|
|
22
22
|
var _followAction = _interopRequireDefault(require("../../../actions/follow-action"));
|
|
23
23
|
var _previewAction = _interopRequireDefault(require("../../../actions/preview-action"));
|
|
24
|
+
var _remixAction = _interopRequireDefault(require("../../../actions/remix-action"));
|
|
24
25
|
var _rovoChatAction = _interopRequireDefault(require("../../../actions/rovo-chat-action"));
|
|
25
26
|
var _viewRelatedLinksAction = _interopRequireDefault(require("../../../actions/view-related-links-action"));
|
|
26
27
|
var _excluded = ["name", "hideContent", "hideIcon", "onClick", "isDisabled"];
|
|
@@ -28,7 +29,7 @@ var _Actions;
|
|
|
28
29
|
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); }
|
|
29
30
|
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; }
|
|
30
31
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
31
|
-
var Actions = (_Actions = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_Actions, _constants.ActionName.AutomationAction, _automationAction.default), _constants.ActionName.CopyLinkAction, _copyLinkAction.default), _constants.ActionName.CustomAction, _action.default), _constants.ActionName.DeleteAction, _deleteAction.default), _constants.ActionName.DownloadAction, _downloadAction.default), _constants.ActionName.EditAction, _editAction.default), _constants.ActionName.FollowAction, _followAction.default), _constants.ActionName.PreviewAction, _previewAction.default), _constants.ActionName.RovoChatAction, _rovoChatAction.default), _constants.InternalActionName.AISummaryAction, _aiSummaryAction.default), (0, _defineProperty2.default)((0, _defineProperty2.default)(_Actions, _constants.InternalActionName.UnresolvedAction, _customUnresolvedAction.default), _constants.InternalActionName.ViewRelatedLinksAction, _viewRelatedLinksAction.default));
|
|
32
|
+
var Actions = (_Actions = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_Actions, _constants.ActionName.AutomationAction, _automationAction.default), _constants.ActionName.CopyLinkAction, _copyLinkAction.default), _constants.ActionName.CustomAction, _action.default), _constants.ActionName.DeleteAction, _deleteAction.default), _constants.ActionName.DownloadAction, _downloadAction.default), _constants.ActionName.EditAction, _editAction.default), _constants.ActionName.FollowAction, _followAction.default), _constants.ActionName.PreviewAction, _previewAction.default), _constants.ActionName.RovoChatAction, _rovoChatAction.default), _constants.InternalActionName.AISummaryAction, _aiSummaryAction.default), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_Actions, _constants.InternalActionName.RemixAction, _remixAction.default), _constants.InternalActionName.UnresolvedAction, _customUnresolvedAction.default), _constants.InternalActionName.ViewRelatedLinksAction, _viewRelatedLinksAction.default));
|
|
32
33
|
var ActionGroupItem = function ActionGroupItem(_ref) {
|
|
33
34
|
var item = _ref.item,
|
|
34
35
|
size = _ref.size,
|
|
@@ -72,6 +72,8 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
72
72
|
appearance = _ref.appearance,
|
|
73
73
|
_ref$visibleButtonsNu = _ref.visibleButtonsNum,
|
|
74
74
|
visibleButtonsNum = _ref$visibleButtonsNu === void 0 ? 2 : _ref$visibleButtonsNu,
|
|
75
|
+
_ref$showRemainingAct = _ref.showRemainingActionsInOverflow,
|
|
76
|
+
showRemainingActionsInOverflow = _ref$showRemainingAct === void 0 ? false : _ref$showRemainingAct,
|
|
75
77
|
onDropdownOpenChange = _ref.onDropdownOpenChange,
|
|
76
78
|
_ref$containerWidth = _ref.containerWidth,
|
|
77
79
|
containerWidth = _ref$containerWidth === void 0 ? Infinity : _ref$containerWidth;
|
|
@@ -145,6 +147,8 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
145
147
|
}]);
|
|
146
148
|
} else if (isRovoActionsEnabled && containerWidth < REDUCED_ACTIONS_SIZE) {
|
|
147
149
|
actionItems = renderableActionItems;
|
|
150
|
+
} else if (isRovoActionsEnabled && showRemainingActionsInOverflow) {
|
|
151
|
+
actionItems = renderableActionItems.slice(visibleButtonsNum - 1);
|
|
148
152
|
} else {
|
|
149
153
|
actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
150
154
|
}
|
|
@@ -178,7 +182,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
178
182
|
}, renderActionItems(actionItems, size, appearance, true, onActionItemClick));
|
|
179
183
|
}
|
|
180
184
|
return null;
|
|
181
|
-
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum, isRovoActionsEnabled, containerWidth]);
|
|
185
|
+
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, showRemainingActionsInOverflow, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum, isRovoActionsEnabled, containerWidth]);
|
|
182
186
|
return renderableActionItems.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
183
187
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
184
188
|
className: (0, _runtime.ax)(["_1e0c116y _dzc21h6o _1ilq1i6y", "actions-button-group"]),
|
|
@@ -14,6 +14,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _userAgent = require("@atlaskit/linking-common/user-agent");
|
|
17
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
18
|
var _widthObserver = require("@atlaskit/width-detector/width-observer");
|
|
18
19
|
var _constants = require("../../../../../../constants");
|
|
19
20
|
var _useFlexibleUiContext = require("../../../../../../state/flexible-ui-context/useFlexibleUiContext");
|
|
@@ -28,7 +29,7 @@ var safariStyles = null;
|
|
|
28
29
|
var providerStyles = null;
|
|
29
30
|
var rovoActionStyles = null;
|
|
30
31
|
var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
31
|
-
var _context$actions;
|
|
32
|
+
var _context$actions, _context$actions2;
|
|
32
33
|
var actions = props.actions,
|
|
33
34
|
testId = props.testId,
|
|
34
35
|
onActionMenuOpenChange = props.onActionMenuOpenChange,
|
|
@@ -43,6 +44,9 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
43
44
|
return action.name === 'RovoChatAction';
|
|
44
45
|
}));
|
|
45
46
|
}, [rovoChatAction, actions]);
|
|
47
|
+
var hasExtraActionSlot = isRovoActionsEnabled && !!(context !== null && context !== void 0 && (_context$actions2 = context.actions) !== null && _context$actions2 !== void 0 && _context$actions2[_constants.InternalActionName.RemixAction]) && !!(actions !== null && actions !== void 0 && actions.some(function (action) {
|
|
48
|
+
return action.name === _constants.InternalActionName.RemixAction;
|
|
49
|
+
})) && (0, _fg.fg)('platform_sl_3p_auth_visualize_killswitch');
|
|
46
50
|
var hasPreview = isRovoActionsEnabled && !!(context !== null && context !== void 0 && context.preview) && !isPreviewBlockErrored;
|
|
47
51
|
var hasActions = (0, _react.useMemo)(function () {
|
|
48
52
|
var _filterActionItems;
|
|
@@ -84,12 +88,15 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
84
88
|
}, !!rovoChatAction && (rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product) === 'CONFLUENCE' && /*#__PURE__*/React.createElement(_widthObserver.WidthObserver, {
|
|
85
89
|
setWidth: setContainerWidth,
|
|
86
90
|
offscreen: true
|
|
87
|
-
}), /*#__PURE__*/React.createElement(_actionGroup.default, {
|
|
91
|
+
}), /*#__PURE__*/React.createElement(_actionGroup.default, (0, _extends2.default)({}, (0, _fg.fg)('platform_sl_3p_auth_visualize_killswitch') ? {
|
|
92
|
+
visibleButtonsNum: hasExtraActionSlot ? 3 : undefined,
|
|
93
|
+
showRemainingActionsInOverflow: hasExtraActionSlot
|
|
94
|
+
} : undefined, {
|
|
88
95
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
89
96
|
items: actions,
|
|
90
97
|
appearance: isRovoActionsEnabled ? 'subtle' : 'default',
|
|
91
98
|
size: isRovoActionsEnabled ? _constants.SmartLinkSize.Small : size,
|
|
92
99
|
containerWidth: isRovoActionsEnabled ? containerWidth : undefined
|
|
93
|
-
})) : null);
|
|
100
|
+
}))) : null);
|
|
94
101
|
};
|
|
95
102
|
var _default = exports.default = FooterBlockResolvedView;
|
|
@@ -33,7 +33,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
33
33
|
/**
|
|
34
34
|
* Allowed footer actions for HoverCard, in display order. Fetched from context.
|
|
35
35
|
*/
|
|
36
|
-
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [_constants.ActionName.RovoChatAction];
|
|
36
|
+
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [_constants.ActionName.RovoChatAction, _constants.InternalActionName.RemixAction];
|
|
37
37
|
var Actions = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.ActionName.AutomationAction, _automationAction.default), _constants.ActionName.CopyLinkAction, _copyLinkAction.default), _constants.ActionName.DownloadAction, _downloadAction.default), _constants.ActionName.FollowAction, _followAction.default), _constants.ActionName.PreviewAction, _previewAction.default), _constants.ActionName.RovoChatAction, _rovoChatAction.default), _constants.InternalActionName.AISummaryAction, _aiSummaryAction.default), _constants.InternalActionName.UnresolvedAction, _customUnresolvedAction.default), _constants.InternalActionName.ViewRelatedLinksAction, _viewRelatedLinksAction.default);
|
|
38
38
|
var ignoreContainerMarginStyles = null;
|
|
39
39
|
var elevatedFooterStyles = null;
|
|
@@ -9,6 +9,7 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _usePlugins2 = require("@atlaskit/link-provider/use-plugins");
|
|
12
13
|
var _useSmartLinkContext2 = require("@atlaskit/link-provider/use-smart-link-context");
|
|
13
14
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
15
|
var _loadHold = _interopRequireDefault(require("@atlaskit/react-ufo/load-hold"));
|
|
@@ -65,6 +66,8 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
65
66
|
openPreviewPanel = _useSmartLinkContext.openPreviewPanel,
|
|
66
67
|
product = _useSmartLinkContext.product;
|
|
67
68
|
var rovoConfig = (0, _useRovoConfig.default)();
|
|
69
|
+
var _usePlugins = (0, _usePlugins2.usePlugins)(),
|
|
70
|
+
remix = _usePlugins.remix;
|
|
68
71
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
69
72
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
70
73
|
var cardType = cardState.status,
|
|
@@ -85,7 +88,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
85
88
|
}, [placeholderData, status]);
|
|
86
89
|
var placeHolderStatus = placeholderCardState ? placeholderCardState.status : undefined;
|
|
87
90
|
var context = (0, _react.useMemo)(function () {
|
|
88
|
-
return (0, _getContextByStatus.getContextByStatus)(_objectSpread(_objectSpread({
|
|
91
|
+
return (0, _getContextByStatus.getContextByStatus)(_objectSpread(_objectSpread(_objectSpread({
|
|
89
92
|
aiSummaryConfig: aiSummaryConfig,
|
|
90
93
|
appearance: appearance,
|
|
91
94
|
fireEvent: fireEvent,
|
|
@@ -99,7 +102,10 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
99
102
|
renderers: renderers,
|
|
100
103
|
resolve: resolve,
|
|
101
104
|
product: product,
|
|
102
|
-
rovoConfig: rovoConfig
|
|
105
|
+
rovoConfig: rovoConfig
|
|
106
|
+
}, (0, _fg.fg)('platform_sl_3p_auth_visualize_killswitch') ? {
|
|
107
|
+
remix: remix
|
|
108
|
+
} : undefined), {}, {
|
|
103
109
|
actionOptions: actionOptions,
|
|
104
110
|
status: placeholderCardState ? placeHolderStatus : status,
|
|
105
111
|
url: url,
|
|
@@ -110,7 +116,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
110
116
|
openPreviewPanel: openPreviewPanel,
|
|
111
117
|
transformUrl: transformUrl
|
|
112
118
|
}));
|
|
113
|
-
}, [aiSummaryConfig, appearance, actionOptions, details, id, isPreviewPanelAvailable, isPreviewRestricted, onAuthorize, onClick, onAuxClick, onContextMenu, openPreviewPanel, origin, placeholderCardState, placeHolderStatus, product, renderers, resolve, rovoConfig, status, transformUrl, url, fireEvent]);
|
|
119
|
+
}, [aiSummaryConfig, appearance, actionOptions, details, id, isPreviewPanelAvailable, isPreviewRestricted, onAuthorize, onClick, onAuxClick, onContextMenu, openPreviewPanel, origin, placeholderCardState, placeHolderStatus, product, renderers, resolve, rovoConfig, remix, status, transformUrl, url, fireEvent]);
|
|
114
120
|
var flexibleCardContext = (0, _react.useMemo)(function () {
|
|
115
121
|
return {
|
|
116
122
|
data: context,
|
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.InlineCardResolvedViewFunctional = InlineCardResolvedViewFunctional;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
9
10
|
var _useInlineTailoredActions = _interopRequireDefault(require("../../../state/hooks/use-inline-tailored-actions"));
|
|
10
11
|
var _HoverCard = require("../../HoverCard");
|
|
12
|
+
var _inlineCardAction = require("../common/inline-card-action");
|
|
11
13
|
var _rovoActionsCta = require("../common/rovo-actions-cta");
|
|
12
14
|
var _Frame = require("../Frame");
|
|
13
15
|
var _IconAndTitleLayout = require("../IconAndTitleLayout");
|
|
@@ -55,7 +57,13 @@ function InlineCardResolvedViewFunctional(_ref) {
|
|
|
55
57
|
titleTextColor: titleTextColor,
|
|
56
58
|
type: type,
|
|
57
59
|
hideIconLoadingSkeleton: hideIconLoadingSkeleton
|
|
58
|
-
}), (0, _renderLozenge.renderLozenge)(lozenge),
|
|
60
|
+
}), (0, _renderLozenge.renderLozenge)(lozenge), (0, _fg.fg)('platform_sl_3p_auth_visualize_killswitch') ? /*#__PURE__*/_react.default.createElement(_inlineCardAction.InlineCardAction, {
|
|
61
|
+
id: id,
|
|
62
|
+
testId: testId,
|
|
63
|
+
url: link,
|
|
64
|
+
actionOptions: actionOptions,
|
|
65
|
+
showHoverPreview: showHoverPreview
|
|
66
|
+
}) : isInlineTailoredRovoActionEnabled && /*#__PURE__*/_react.default.createElement(_rovoActionsCta.InlineRovoActionButton, {
|
|
59
67
|
testId: "".concat(testId, "-rovo-actions-cta"),
|
|
60
68
|
url: link,
|
|
61
69
|
actionOptions: actionOptions
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.InlineCardAction = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _usePlugins2 = require("@atlaskit/link-provider/use-plugins");
|
|
13
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
|
+
var _extractRemixAction = _interopRequireDefault(require("../../../../extractors/flexible/actions/extract-remix-action"));
|
|
15
|
+
var _useInlineTailoredActions = _interopRequireDefault(require("../../../../state/hooks/use-inline-tailored-actions"));
|
|
16
|
+
var _store = require("../../../../state/store");
|
|
17
|
+
var _remixAction = _interopRequireDefault(require("../remix-action"));
|
|
18
|
+
var _rovoActionsCta = require("../rovo-actions-cta");
|
|
19
|
+
var _excluded = ["testId"];
|
|
20
|
+
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); }
|
|
21
|
+
var InlineChatAction = function InlineChatAction(_ref) {
|
|
22
|
+
var actionOptions = _ref.actionOptions,
|
|
23
|
+
showHoverPreview = _ref.showHoverPreview,
|
|
24
|
+
testId = _ref.testId,
|
|
25
|
+
url = _ref.url;
|
|
26
|
+
var _useInlineTailoredAct = (0, _useInlineTailoredActions.default)(url, showHoverPreview, actionOptions),
|
|
27
|
+
isEnabled = _useInlineTailoredAct.isEnabled;
|
|
28
|
+
return isEnabled ? /*#__PURE__*/_react.default.createElement(_rovoActionsCta.InlineRovoActionButton, {
|
|
29
|
+
actionOptions: actionOptions,
|
|
30
|
+
testId: "".concat(testId, "-rovo-actions-cta"),
|
|
31
|
+
url: url
|
|
32
|
+
}) : null;
|
|
33
|
+
};
|
|
34
|
+
var InlineCardActionWithRemix = function InlineCardActionWithRemix(props) {
|
|
35
|
+
var actionOptions = props.actionOptions,
|
|
36
|
+
id = props.id,
|
|
37
|
+
testId = props.testId,
|
|
38
|
+
url = props.url;
|
|
39
|
+
var _usePlugins = (0, _usePlugins2.usePlugins)(),
|
|
40
|
+
remix = _usePlugins.remix;
|
|
41
|
+
var _useSmartCardState = (0, _store.useSmartCardState)(url !== null && url !== void 0 ? url : ''),
|
|
42
|
+
details = _useSmartCardState.details;
|
|
43
|
+
var data = (0, _react.useMemo)(function () {
|
|
44
|
+
return details ? (0, _extractRemixAction.default)({
|
|
45
|
+
response: details,
|
|
46
|
+
url: url,
|
|
47
|
+
actionOptions: actionOptions,
|
|
48
|
+
remix: remix,
|
|
49
|
+
appearance: 'inline',
|
|
50
|
+
id: id
|
|
51
|
+
}) : undefined;
|
|
52
|
+
}, [details, url, actionOptions, remix, id]);
|
|
53
|
+
|
|
54
|
+
// Inline cards have one action slot. Eligible Remix takes priority over chat.
|
|
55
|
+
return data && remix ? /*#__PURE__*/_react.default.createElement(_remixAction.default, {
|
|
56
|
+
data: data,
|
|
57
|
+
remix: remix,
|
|
58
|
+
testId: "".concat(testId, "-remix-action")
|
|
59
|
+
}) : /*#__PURE__*/_react.default.createElement(InlineChatAction, props);
|
|
60
|
+
};
|
|
61
|
+
var InlineCardAction = exports.InlineCardAction = function InlineCardAction(_ref2) {
|
|
62
|
+
var _ref2$testId = _ref2.testId,
|
|
63
|
+
testId = _ref2$testId === void 0 ? 'inline-card' : _ref2$testId,
|
|
64
|
+
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
65
|
+
return (0, _fg.fg)('platform_sl_3p_auth_visualize_killswitch') ? /*#__PURE__*/_react.default.createElement(InlineCardActionWithRemix, (0, _extends2.default)({}, props, {
|
|
66
|
+
testId: testId
|
|
67
|
+
})) : /*#__PURE__*/_react.default.createElement(InlineChatAction, (0, _extends2.default)({}, props, {
|
|
68
|
+
testId: testId
|
|
69
|
+
}));
|
|
70
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v3.0.4 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
require("./index.compiled.css");
|
|
10
|
+
var _runtime = require("@compiled/react/runtime");
|
|
11
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
var _reactIntl = require("react-intl");
|
|
16
|
+
var _aiGenerativeRemix = _interopRequireDefault(require("@atlaskit/icon-lab/core/ai-generative-remix"));
|
|
17
|
+
var _box = require("@atlaskit/primitives/compiled/box");
|
|
18
|
+
var _text = require("@atlaskit/primitives/compiled/text");
|
|
19
|
+
var _messages = require("../../../../messages");
|
|
20
|
+
var _useInvokeClientAction = _interopRequireDefault(require("../../../../state/hooks/use-invoke-client-action"));
|
|
21
|
+
var _useRemixActionExposure = require("../../../../utils/use-remix-action-exposure");
|
|
22
|
+
var _actionButton = require("../action-button");
|
|
23
|
+
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; }
|
|
24
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
|
+
var styles = {
|
|
26
|
+
text: "_19bv12x7 _1e0c116y _4cvr1h6o _s7n4nkob _19pk1i6y"
|
|
27
|
+
};
|
|
28
|
+
var InlineRemixAction = function InlineRemixAction(_ref) {
|
|
29
|
+
var data = _ref.data,
|
|
30
|
+
remix = _ref.remix,
|
|
31
|
+
_ref$testId = _ref.testId,
|
|
32
|
+
testId = _ref$testId === void 0 ? 'inline-remix-action' : _ref$testId;
|
|
33
|
+
var intl = (0, _reactIntl.useIntl)();
|
|
34
|
+
var invoke = (0, _useInvokeClientAction.default)({});
|
|
35
|
+
var label = intl.formatMessage(_messages.messages.rovo_prompt_button_remix);
|
|
36
|
+
(0, _useRemixActionExposure.useRemixActionExposure)(true);
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
|
|
38
|
+
"aria-label": label,
|
|
39
|
+
testId: testId,
|
|
40
|
+
onClick: function onClick(event) {
|
|
41
|
+
event.preventDefault();
|
|
42
|
+
event.stopPropagation();
|
|
43
|
+
var anchorElement = event.currentTarget;
|
|
44
|
+
void invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
|
|
45
|
+
actionFn: function () {
|
|
46
|
+
var _actionFn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
47
|
+
return _regenerator.default.wrap(function (_context) {
|
|
48
|
+
while (1) switch (_context.prev = _context.next) {
|
|
49
|
+
case 0:
|
|
50
|
+
return _context.abrupt("return", remix.open({
|
|
51
|
+
anchorElement: anchorElement,
|
|
52
|
+
url: data.url
|
|
53
|
+
}));
|
|
54
|
+
case 1:
|
|
55
|
+
case "end":
|
|
56
|
+
return _context.stop();
|
|
57
|
+
}
|
|
58
|
+
}, _callee);
|
|
59
|
+
}));
|
|
60
|
+
function actionFn() {
|
|
61
|
+
return _actionFn.apply(this, arguments);
|
|
62
|
+
}
|
|
63
|
+
return actionFn;
|
|
64
|
+
}()
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_aiGenerativeRemix.default, {
|
|
68
|
+
label: "",
|
|
69
|
+
size: "small"
|
|
70
|
+
}), /*#__PURE__*/_react.default.createElement(_box.Box, {
|
|
71
|
+
as: "span",
|
|
72
|
+
xcss: styles.text
|
|
73
|
+
}, /*#__PURE__*/_react.default.createElement(_text.Text, {
|
|
74
|
+
size: "small"
|
|
75
|
+
}, label)));
|
|
76
|
+
};
|
|
77
|
+
var _default = exports.default = InlineRemixAction;
|
|
@@ -24,7 +24,6 @@ var _useInvokeClientAction = _interopRequireDefault(require("../../../../state/h
|
|
|
24
24
|
var _useRovoChat3 = _interopRequireDefault(require("../../../../state/hooks/use-rovo-chat"));
|
|
25
25
|
var _useRovoConfig = _interopRequireDefault(require("../../../../state/hooks/use-rovo-config"));
|
|
26
26
|
var _store = require("../../../../state/store");
|
|
27
|
-
var _isRovoChatActionVisualizeEnabled = require("../../../../utils/is-rovo-chat-action-visualize-enabled");
|
|
28
27
|
var _rovoChatUtils = require("../../../common/rovo-chat-utils");
|
|
29
28
|
var _actionButton = require("../action-button");
|
|
30
29
|
var _async = require("../one-click-chat-spotlight/async");
|
|
@@ -66,14 +65,6 @@ var InlineRovoActionButtonLegacy = function InlineRovoActionButtonLegacy(_ref) {
|
|
|
66
65
|
switch (extensionKey) {
|
|
67
66
|
case 'google-object-provider':
|
|
68
67
|
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')) {
|
|
69
|
-
// Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
|
|
70
|
-
if (rovoChatAction && (0, _isRovoChatActionVisualizeEnabled.isRovoChatActionVisualizeEnabled)({
|
|
71
|
-
extensionKey: extensionKey,
|
|
72
|
-
product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
|
|
73
|
-
response: cardState.details
|
|
74
|
-
})) {
|
|
75
|
-
return _rovoChatUtils.RovoChatPromptKey.VISUALIZE;
|
|
76
|
-
}
|
|
77
68
|
return;
|
|
78
69
|
}
|
|
79
70
|
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')) {
|
|
@@ -162,14 +153,6 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
|
|
|
162
153
|
var promptKey = (0, _react.useMemo)(function () {
|
|
163
154
|
var _cardState$details3, _cardState$details4;
|
|
164
155
|
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')) {
|
|
165
|
-
// Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
|
|
166
|
-
if (rovoChatAction && (0, _isRovoChatActionVisualizeEnabled.isRovoChatActionVisualizeEnabled)({
|
|
167
|
-
extensionKey: extensionKey,
|
|
168
|
-
product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
|
|
169
|
-
response: cardState.details
|
|
170
|
-
})) {
|
|
171
|
-
return _rovoChatUtils.RovoChatPromptKey.VISUALIZE;
|
|
172
|
-
}
|
|
173
156
|
return;
|
|
174
157
|
}
|
|
175
158
|
switch (extensionKey) {
|
|
@@ -230,7 +213,7 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
|
|
|
230
213
|
event.preventDefault();
|
|
231
214
|
event.stopPropagation();
|
|
232
215
|
invokePrompt();
|
|
233
|
-
}, [invokePrompt]);
|
|
216
|
+
}, [invokePrompt, promptKey]);
|
|
234
217
|
var button = promptData && content ? /*#__PURE__*/_react.default.createElement(_actionButton.ActionButton, {
|
|
235
218
|
onClick: handleClick,
|
|
236
219
|
testId: testId
|
|
@@ -239,12 +222,6 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
|
|
|
239
222
|
}, /*#__PURE__*/_react.default.createElement(_text.Text, {
|
|
240
223
|
size: "small"
|
|
241
224
|
}, content))) : null;
|
|
242
|
-
|
|
243
|
-
// Visualize is not part of the spotlight: its copy is generic ("See takeaways") and Sheets
|
|
244
|
-
// links are excluded from the spotlight experiment, so render the plain button.
|
|
245
|
-
if (promptKey === _rovoChatUtils.RovoChatPromptKey.VISUALIZE) {
|
|
246
|
-
return button;
|
|
247
|
-
}
|
|
248
225
|
return button && isRovoChatEnabled && rovoChatAction !== null && rovoChatAction !== void 0 && rovoChatAction.invokeAction ? /*#__PURE__*/_react.default.createElement(_async.OneClickChatSpotlightLoader, {
|
|
249
226
|
key: url,
|
|
250
227
|
url: url,
|
|
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
19
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
20
20
|
var PACKAGE_DATA = {
|
|
21
21
|
packageName: "@atlaskit/smart-card",
|
|
22
|
-
packageVersion: "46.
|
|
22
|
+
packageVersion: "46.23.0",
|
|
23
23
|
componentName: 'linkUrl'
|
|
24
24
|
};
|
|
25
25
|
var LinkUrl = function LinkUrl(_ref) {
|
|
@@ -5,12 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.getPromptAction = exports.RovoChatPromptKey = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _aiSearch = _interopRequireDefault(require("@atlaskit/icon-lab/core/ai-search"));
|
|
11
10
|
var _aiChat = _interopRequireDefault(require("@atlaskit/icon/core/ai-chat"));
|
|
12
11
|
var _aiGenerativeTextSummary = _interopRequireDefault(require("@atlaskit/icon/core/ai-generative-text-summary"));
|
|
13
|
-
var _chartBar = _interopRequireDefault(require("@atlaskit/icon/core/chart-bar"));
|
|
14
12
|
var _rovoChat = _interopRequireDefault(require("@atlaskit/icon/core/rovo-chat"));
|
|
15
13
|
var _icon = require("@atlaskit/logo/rovo/icon");
|
|
16
14
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
@@ -19,8 +17,6 @@ var _messages = require("../../../messages");
|
|
|
19
17
|
var _aiChapterIcon = _interopRequireDefault(require("../../FlexibleCard/assets/ai-chapter-icon"));
|
|
20
18
|
var _aiSearchIcon = _interopRequireDefault(require("../../FlexibleCard/assets/ai-search-icon"));
|
|
21
19
|
var _htmlToAdf = _interopRequireDefault(require("../../FlexibleCard/components/actions/rovo-chat-action/html-to-adf"));
|
|
22
|
-
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; }
|
|
23
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
20
|
var RovoChatPromptKey = exports.RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
|
|
25
21
|
RovoChatPromptKey["SUMMARIZE_LINK"] = "summarize-link";
|
|
26
22
|
RovoChatPromptKey["KEY_HIGHLIGHTS"] = "key-highlights";
|
|
@@ -37,7 +33,6 @@ var RovoChatPromptKey = exports.RovoChatPromptKey = /*#__PURE__*/function (RovoC
|
|
|
37
33
|
RovoChatPromptKey["EXPLAIN_CODE"] = "explain-code";
|
|
38
34
|
RovoChatPromptKey["CATCH_UP"] = "catch-up";
|
|
39
35
|
RovoChatPromptKey["SALESFORCE_PREP"] = "salesforce-prep";
|
|
40
|
-
RovoChatPromptKey["VISUALIZE"] = "visualize";
|
|
41
36
|
return RovoChatPromptKey;
|
|
42
37
|
}({});
|
|
43
38
|
var getContext = function getContext(intl, product) {
|
|
@@ -380,28 +375,5 @@ var getPromptAction = exports.getPromptAction = function getPromptAction(_ref) {
|
|
|
380
375
|
size: iconSize
|
|
381
376
|
})
|
|
382
377
|
};
|
|
383
|
-
case RovoChatPromptKey.VISUALIZE:
|
|
384
|
-
var label_visualize = intl.formatMessage(_messages.messages.rovo_prompt_button_visualize);
|
|
385
|
-
var html_visualize = intl.formatMessage(_messages.messages.rovo_prompt_message_visualize, {
|
|
386
|
-
url: url
|
|
387
|
-
}, {
|
|
388
|
-
ignoreTag: true
|
|
389
|
-
});
|
|
390
|
-
var visualizeIconProps = _objectSpread({
|
|
391
|
-
label: label_visualize,
|
|
392
|
-
size: iconSize
|
|
393
|
-
}, cardAppearance === _constants.CardDisplay.HoverCardPreview ? {
|
|
394
|
-
spacing: 'spacious'
|
|
395
|
-
} : {});
|
|
396
|
-
return {
|
|
397
|
-
content: label_visualize,
|
|
398
|
-
tooltipMessage: label_visualize,
|
|
399
|
-
data: {
|
|
400
|
-
name: label_visualize,
|
|
401
|
-
dialogues: [],
|
|
402
|
-
prompt: (0, _htmlToAdf.default)(html_visualize)
|
|
403
|
-
},
|
|
404
|
-
icon: /*#__PURE__*/_react.default.createElement(_chartBar.default, visualizeIconProps)
|
|
405
|
-
};
|
|
406
378
|
}
|
|
407
379
|
};
|
|
@@ -4,27 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getRovoPostAuthPromptKeys = void 0;
|
|
7
|
-
var _isRovoChatActionVisualizeEnabled = require("../../../utils/is-rovo-chat-action-visualize-enabled");
|
|
8
7
|
var _rovoChatUtils = require("../rovo-chat-utils");
|
|
9
8
|
var getRovoPostAuthPromptKeys = exports.getRovoPostAuthPromptKeys = function getRovoPostAuthPromptKeys(_ref) {
|
|
10
|
-
var extensionKey = _ref.extensionKey
|
|
11
|
-
_ref$isRovoChatAction = _ref.isRovoChatActionShown,
|
|
12
|
-
isRovoChatActionShown = _ref$isRovoChatAction === void 0 ? false : _ref$isRovoChatAction,
|
|
13
|
-
product = _ref.product,
|
|
14
|
-
response = _ref.response;
|
|
9
|
+
var extensionKey = _ref.extensionKey;
|
|
15
10
|
var defaultPrompts = [_rovoChatUtils.RovoChatPromptKey.KEY_HIGHLIGHTS];
|
|
16
11
|
if (extensionKey === 'github-object-provider' || extensionKey === 'gitlab-object-provider') {
|
|
17
12
|
return [_rovoChatUtils.RovoChatPromptKey.EXPLAIN_CODE].concat(defaultPrompts);
|
|
18
13
|
}
|
|
19
|
-
if (isRovoChatActionShown && (0, _isRovoChatActionVisualizeEnabled.isRovoChatActionVisualizeEnabled)({
|
|
20
|
-
extensionKey: extensionKey,
|
|
21
|
-
product: product,
|
|
22
|
-
response: response
|
|
23
|
-
})) {
|
|
24
|
-
// Visualize goes first (PM decision). The embed Rovo actions footer hides every prompt after
|
|
25
|
-
// the first below 320px (HIDE_SECONDARY_ACTIONS_WIDTH), so this keeps Visualize visible on
|
|
26
|
-
// narrow embeds whenever exposure fires.
|
|
27
|
-
return [_rovoChatUtils.RovoChatPromptKey.VISUALIZE, _rovoChatUtils.RovoChatPromptKey.SUMMARIZE_DOCUMENT].concat(defaultPrompts);
|
|
28
|
-
}
|
|
29
14
|
return [_rovoChatUtils.RovoChatPromptKey.SUMMARIZE_DOCUMENT].concat(defaultPrompts);
|
|
30
15
|
};
|