@atlaskit/smart-card 44.3.24 → 44.4.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 +11 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/vrblock-card-resolved-rovo-actions--default.png +3 -0
- package/dist/cjs/messages.js +10 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +17 -11
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +4 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +10 -1
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +41 -26
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +29 -11
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +25 -7
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +6 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/vrblock-card-resolved-rovo-actions--default.png +3 -0
- package/dist/es2019/messages.js +10 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +29 -21
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +4 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +12 -3
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +41 -28
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +29 -12
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +22 -8
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +5 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/vrblock-card-resolved-rovo-actions--default.png +3 -0
- package/dist/esm/messages.js +10 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +18 -12
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +4 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +12 -3
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +42 -27
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +30 -12
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +26 -8
- package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +6 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +6 -1
- 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/footer-block/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +7 -2
- package/dist/types/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +5 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +6 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/footer-block/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +7 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +5 -0
- package/package.json +5 -4
|
@@ -7,7 +7,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
import { useEffect, useMemo, useState } from 'react';
|
|
8
8
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { ActionName, ElementName, SmartLinkPosition } from '../../../constants';
|
|
10
|
+
import { ActionName, CardDisplay, ElementName, SmartLinkPosition } from '../../../constants';
|
|
11
11
|
import extractRovoChatAction from '../../../extractors/flexible/actions/extract-rovo-chat-action';
|
|
12
12
|
import { getExtensionKey } from '../../../state/helpers';
|
|
13
13
|
import useRovoConfig from '../../../state/hooks/use-rovo-config';
|
|
@@ -71,7 +71,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
71
71
|
var prompts = useMemo(function () {
|
|
72
72
|
if (fg('platform_sl_3p_auth_rovo_block_card_kill_switch')) {
|
|
73
73
|
var _cardState$details;
|
|
74
|
-
var defaultPrompts = [RovoChatPromptKey.
|
|
74
|
+
var defaultPrompts = [RovoChatPromptKey.KEY_HIGHLIGHTS];
|
|
75
75
|
var linkType = (_cardState$details = cardState.details) === null || _cardState$details === void 0 || (_cardState$details = _cardState$details.data) === null || _cardState$details === void 0 ? void 0 : _cardState$details['@type'];
|
|
76
76
|
if (extensionKey === 'slack-object-provider') {
|
|
77
77
|
return [RovoChatPromptKey.FIND_OPEN_QUESTIONS].concat(defaultPrompts);
|
|
@@ -87,16 +87,21 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
87
87
|
return [];
|
|
88
88
|
}, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data, extensionKey]);
|
|
89
89
|
var footerActions = useMemo(function () {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
90
|
+
if (showRovoResolvedView && fg('platform_sl_3p_auth_rovo_block_card_kill_switch')) {
|
|
91
|
+
return [{
|
|
92
|
+
name: ActionName.RovoChatAction,
|
|
93
|
+
prompts: prompts,
|
|
94
|
+
iconSize: 'small',
|
|
95
|
+
cardAppearance: CardDisplay.Block
|
|
96
|
+
}, {
|
|
97
|
+
name: ActionName.FollowAction,
|
|
98
|
+
iconSize: 'small'
|
|
99
|
+
}, {
|
|
100
|
+
name: ActionName.DownloadAction,
|
|
101
|
+
iconSize: 'small'
|
|
102
|
+
}];
|
|
103
|
+
}
|
|
104
|
+
return [{
|
|
100
105
|
name: ActionName.FollowAction,
|
|
101
106
|
hideIcon: true
|
|
102
107
|
}, {
|
|
@@ -143,6 +148,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
143
148
|
}
|
|
144
149
|
})) : null, /*#__PURE__*/React.createElement(FooterBlock, {
|
|
145
150
|
actions: footerActions,
|
|
151
|
+
isPreviewBlockErrored: isPreviewBlockErrored,
|
|
146
152
|
className: ax(["_4t3i1k8s _1e0c1txw _1bah1yb4 _4cvresu3 _1wpz1fhb", safari && "_4t3i1osq"])
|
|
147
153
|
}));
|
|
148
154
|
};
|
package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.compiled.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._13bowadc button{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
3
|
._11lv1b66 button{padding-left:var(--ds-space-050,4px)}
|
|
3
4
|
._11lvidpf button{padding-left:0}
|
|
4
5
|
._11lvv77o button{padding-left:var(--ds-space-025,2px)}
|
|
@@ -12,10 +13,13 @@
|
|
|
12
13
|
._1gqnv77o button{padding-bottom:var(--ds-space-025,2px)}
|
|
13
14
|
._1i3bidpf button:active>span{margin-top:0}
|
|
14
15
|
._1l0qidpf button:hover>span{margin-right:0}
|
|
16
|
+
._1q9t1wq8 button{font-weight:var(--ds-font-weight-medium,500)}
|
|
17
|
+
._1rlg1g80 button{flex-wrap:wrap}
|
|
15
18
|
._1vtwidpf button:active>span{margin-left:0}
|
|
16
19
|
._3kh9idpf button:active>span{margin-bottom:0}
|
|
17
20
|
._4wlcidpf button:hover>span{margin-top:0}
|
|
18
21
|
._8pvjidpf button:hover>span{margin-bottom:0}
|
|
22
|
+
._bdn61h6o button{align-content:center}
|
|
19
23
|
._i2vxidpf button:focus>span{margin-bottom:0}
|
|
20
24
|
._ijvwidpf button:focus>span{margin-left:0}
|
|
21
25
|
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
@@ -2,16 +2,21 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { forwardRef, useCallback, useMemo } from 'react';
|
|
5
|
+
import { cx } from '@compiled/react';
|
|
5
6
|
import { LoadingButton } from '@atlaskit/button';
|
|
6
7
|
import Button, { IconButton, LinkButton, LinkIconButton } from '@atlaskit/button/new';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
10
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
|
-
import { SmartLinkSize } from '../../../../../../constants';
|
|
10
|
-
import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
11
|
+
import { ActionName, SmartLinkSize } from '../../../../../../constants';
|
|
12
|
+
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
11
13
|
import { withOverrideCss } from '../../../common/with-override-css';
|
|
12
14
|
import { sizeToButtonSpacing } from '../../../utils';
|
|
13
15
|
var IconOnlyLarge = null;
|
|
14
16
|
var SizeSmall = null;
|
|
17
|
+
var styles = {
|
|
18
|
+
textSmall: "_13bowadc _1q9t1wq8 _1rlg1g80 _bdn61h6o"
|
|
19
|
+
};
|
|
15
20
|
var SizeSmallIconOnly = null;
|
|
16
21
|
var SizeSmallNotIconOnly = null;
|
|
17
22
|
var IconButtonAppearanceMap = {
|
|
@@ -36,6 +41,7 @@ var tooltipOptions = {
|
|
|
36
41
|
hideTooltipOnClick: true
|
|
37
42
|
};
|
|
38
43
|
var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
44
|
+
var _context$actions;
|
|
39
45
|
var _ref$appearance = _ref.appearance,
|
|
40
46
|
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
41
47
|
content = _ref.content,
|
|
@@ -50,6 +56,8 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50
56
|
href = _ref.href,
|
|
51
57
|
ariaLabel = _ref.ariaLabel;
|
|
52
58
|
var iconOnly = !content;
|
|
59
|
+
var context = useFlexibleUiContext();
|
|
60
|
+
var isRovoSupported = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
|
|
53
61
|
var onButtonClick = useCallback(function (handler) {
|
|
54
62
|
return function (e) {
|
|
55
63
|
e.preventDefault();
|
|
@@ -132,7 +140,8 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
132
140
|
}, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
|
|
133
141
|
return /*#__PURE__*/React.createElement(Box, {
|
|
134
142
|
testId: "".concat(testId, "-button-wrapper"),
|
|
135
|
-
ref: ref
|
|
143
|
+
ref: ref,
|
|
144
|
+
xcss: cx(isRovoSupported && size === SmartLinkSize.Small && styles.textSmall)
|
|
136
145
|
}, button);
|
|
137
146
|
});
|
|
138
147
|
var ActionButtonRefreshWithOverrideCss = withOverrideCss(ActionButtonRefresh);
|
package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js
CHANGED
|
@@ -40,7 +40,7 @@ export function AISummariseAction(_ref) {
|
|
|
40
40
|
spacing: "spacious",
|
|
41
41
|
color: "currentColor",
|
|
42
42
|
label: "Summarise with AI"
|
|
43
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
43
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? {
|
|
44
44
|
size: props.iconSize
|
|
45
45
|
} : {})),
|
|
46
46
|
onClick: handleActionClick,
|
|
@@ -75,7 +75,7 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
75
75
|
spacing: "spacious",
|
|
76
76
|
color: "currentColor",
|
|
77
77
|
label: automationActionIconLabel
|
|
78
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
78
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? {
|
|
79
79
|
size: props.iconSize
|
|
80
80
|
} : {})),
|
|
81
81
|
testId: "smart-action-automation-action",
|
|
@@ -61,7 +61,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
61
61
|
color: "currentColor",
|
|
62
62
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
63
63
|
spacing: "spacious"
|
|
64
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
64
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? {
|
|
65
65
|
size: props.iconSize
|
|
66
66
|
} : {})),
|
|
67
67
|
onClick: onClick,
|
|
@@ -35,7 +35,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
35
35
|
color: "currentColor",
|
|
36
36
|
spacing: "spacious",
|
|
37
37
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
38
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
38
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? {
|
|
39
39
|
size: props.iconSize
|
|
40
40
|
} : {}));
|
|
41
41
|
}
|
|
@@ -43,7 +43,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
43
43
|
color: "currentColor",
|
|
44
44
|
spacing: "spacious",
|
|
45
45
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
46
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
46
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? {
|
|
47
47
|
size: props.iconSize
|
|
48
48
|
} : {}));
|
|
49
49
|
}, [hasPreviewPanel, props.iconSize]);
|
|
@@ -8,12 +8,14 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
8
8
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
9
|
import React, { useCallback, useMemo } from 'react';
|
|
10
10
|
import { useIntl } from 'react-intl';
|
|
11
|
-
import AiGenerativeTextIcon from '@atlaskit/icon-lab/core/ai-generative-text';
|
|
12
11
|
import AiSearchIcon from '@atlaskit/icon-lab/core/ai-search';
|
|
12
|
+
import AiChatIcon from '@atlaskit/icon/core/ai-chat';
|
|
13
13
|
import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
|
|
14
14
|
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
15
|
+
import { RovoIcon } from '@atlaskit/logo';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
17
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
16
|
-
import { ActionName } from '../../../../../constants';
|
|
18
|
+
import { ActionName, CardDisplay } from '../../../../../constants';
|
|
17
19
|
import { messages } from '../../../../../messages';
|
|
18
20
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
19
21
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
@@ -65,6 +67,8 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
65
67
|
var _getContext;
|
|
66
68
|
var url = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
67
69
|
var product = arguments.length > 3 ? arguments[3] : undefined;
|
|
70
|
+
var iconSize = arguments.length > 4 ? arguments[4] : undefined;
|
|
71
|
+
var cardAppearance = arguments.length > 5 ? arguments[5] : undefined;
|
|
68
72
|
var _ref = (_getContext = getContext(intl, product)) !== null && _getContext !== void 0 ? _getContext : {
|
|
69
73
|
contextLong: intl.formatMessage(messages.rovo_prompt_context_generic),
|
|
70
74
|
contextShort: intl.formatMessage(messages.rovo_prompt_context_generic)
|
|
@@ -136,7 +140,10 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
136
140
|
ignoreTag: true
|
|
137
141
|
});
|
|
138
142
|
return {
|
|
139
|
-
icon: /*#__PURE__*/React.createElement(
|
|
143
|
+
icon: cardAppearance === CardDisplay.Block && fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? /*#__PURE__*/React.createElement(AiChatIcon, {
|
|
144
|
+
label: label_summarize,
|
|
145
|
+
size: iconSize
|
|
146
|
+
}) : /*#__PURE__*/React.createElement(AIEditIcon, null),
|
|
140
147
|
content: label_summarize,
|
|
141
148
|
tooltipMessage: label_summarize,
|
|
142
149
|
data: {
|
|
@@ -170,9 +177,9 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
170
177
|
}
|
|
171
178
|
}
|
|
172
179
|
};
|
|
173
|
-
case RovoChatPromptKey.
|
|
174
|
-
var
|
|
175
|
-
var
|
|
180
|
+
case RovoChatPromptKey.HIGHLIGHT_RELEVANT_CONTENT:
|
|
181
|
+
var label_highlight_relevant_content = intl.formatMessage(messages.rovo_prompt_button_highlight_relevant_content);
|
|
182
|
+
var html_highlight_relevant_content = intl.formatMessage(messages.rovo_prompt_message_highlight_relevant_content, {
|
|
176
183
|
context: contextLong,
|
|
177
184
|
url: url
|
|
178
185
|
}, {
|
|
@@ -180,12 +187,12 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
180
187
|
});
|
|
181
188
|
return {
|
|
182
189
|
icon: /*#__PURE__*/React.createElement(AiChapterIcon, null),
|
|
183
|
-
content:
|
|
184
|
-
tooltipMessage:
|
|
190
|
+
content: label_highlight_relevant_content,
|
|
191
|
+
tooltipMessage: label_highlight_relevant_content,
|
|
185
192
|
data: {
|
|
186
|
-
name:
|
|
193
|
+
name: label_highlight_relevant_content,
|
|
187
194
|
dialogues: [],
|
|
188
|
-
prompt: htmlToAdf(
|
|
195
|
+
prompt: htmlToAdf(html_highlight_relevant_content),
|
|
189
196
|
mode: {
|
|
190
197
|
fastModeEnabled: true
|
|
191
198
|
}
|
|
@@ -197,7 +204,11 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
197
204
|
url: url
|
|
198
205
|
});
|
|
199
206
|
return {
|
|
200
|
-
icon: /*#__PURE__*/React.createElement(
|
|
207
|
+
icon: cardAppearance === CardDisplay.Block && fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? /*#__PURE__*/React.createElement(RovoIcon, {
|
|
208
|
+
label: label_ask_rovo_anything,
|
|
209
|
+
size: 'xxsmall',
|
|
210
|
+
shouldUseHexLogo: true
|
|
211
|
+
}) : /*#__PURE__*/React.createElement(AISearchIcon, null),
|
|
201
212
|
content: label_ask_rovo_anything,
|
|
202
213
|
tooltipMessage: label_ask_rovo_anything,
|
|
203
214
|
data: {
|
|
@@ -227,24 +238,25 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
227
238
|
placeholderType: 'generic'
|
|
228
239
|
}
|
|
229
240
|
};
|
|
230
|
-
case RovoChatPromptKey.
|
|
231
|
-
var
|
|
232
|
-
var
|
|
241
|
+
case RovoChatPromptKey.KEY_HIGHLIGHTS:
|
|
242
|
+
var label_key_highlights = intl.formatMessage(messages.rovo_prompt_button_key_highlights);
|
|
243
|
+
var html_key_highlights = intl.formatMessage(messages.rovo_prompt_message_key_highlights, {
|
|
233
244
|
context: contextLong,
|
|
234
245
|
url: url
|
|
235
246
|
}, {
|
|
236
247
|
ignoreTag: true
|
|
237
248
|
});
|
|
238
249
|
return {
|
|
239
|
-
icon: /*#__PURE__*/React.createElement(
|
|
240
|
-
label:
|
|
250
|
+
icon: /*#__PURE__*/React.createElement(AiChatIcon, {
|
|
251
|
+
label: label_key_highlights,
|
|
252
|
+
size: iconSize
|
|
241
253
|
}),
|
|
242
|
-
content:
|
|
243
|
-
tooltipMessage:
|
|
254
|
+
content: label_key_highlights,
|
|
255
|
+
tooltipMessage: label_key_highlights,
|
|
244
256
|
data: {
|
|
245
|
-
name:
|
|
257
|
+
name: label_key_highlights,
|
|
246
258
|
dialogues: [],
|
|
247
|
-
prompt: htmlToAdf(
|
|
259
|
+
prompt: htmlToAdf(html_key_highlights)
|
|
248
260
|
}
|
|
249
261
|
};
|
|
250
262
|
case RovoChatPromptKey.SHOW_ME_WHATS_RELEVANT:
|
|
@@ -275,8 +287,9 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
275
287
|
ignoreTag: true
|
|
276
288
|
});
|
|
277
289
|
return {
|
|
278
|
-
icon: /*#__PURE__*/React.createElement(
|
|
279
|
-
label: label_identify_key_trends
|
|
290
|
+
icon: /*#__PURE__*/React.createElement(AiChatIcon, {
|
|
291
|
+
label: label_identify_key_trends,
|
|
292
|
+
size: iconSize
|
|
280
293
|
}),
|
|
281
294
|
content: label_identify_key_trends,
|
|
282
295
|
tooltipMessage: label_identify_key_trends,
|
|
@@ -294,8 +307,9 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
294
307
|
ignoreTag: true
|
|
295
308
|
});
|
|
296
309
|
return {
|
|
297
|
-
icon: /*#__PURE__*/React.createElement(
|
|
298
|
-
label: label_identify_key_points
|
|
310
|
+
icon: /*#__PURE__*/React.createElement(AiChatIcon, {
|
|
311
|
+
label: label_identify_key_points,
|
|
312
|
+
size: iconSize
|
|
299
313
|
}),
|
|
300
314
|
content: label_identify_key_points,
|
|
301
315
|
tooltipMessage: label_identify_key_points,
|
|
@@ -313,8 +327,9 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
313
327
|
ignoreTag: true
|
|
314
328
|
});
|
|
315
329
|
return {
|
|
316
|
-
icon: /*#__PURE__*/React.createElement(
|
|
317
|
-
label: label_find_open_questions
|
|
330
|
+
icon: /*#__PURE__*/React.createElement(AiChatIcon, {
|
|
331
|
+
label: label_find_open_questions,
|
|
332
|
+
size: iconSize
|
|
318
333
|
}),
|
|
319
334
|
content: label_find_open_questions,
|
|
320
335
|
tooltipMessage: label_find_open_questions,
|
|
@@ -376,7 +391,7 @@ var RovoChatAction = function RovoChatAction(_ref2) {
|
|
|
376
391
|
}, [data === null || data === void 0 ? void 0 : data.invokeAction, invoke, onClickCallback, sendPromptMessage]);
|
|
377
392
|
var promptActions = useMemo(function () {
|
|
378
393
|
return resolvedPrompts.map(function (promptKey, idx) {
|
|
379
|
-
var _ref3 = getPromptAction(promptKey, intl, data === null || data === void 0 ? void 0 : data.url, data === null || data === void 0 ? void 0 : data.product) || {},
|
|
394
|
+
var _ref3 = getPromptAction(promptKey, intl, data === null || data === void 0 ? void 0 : data.url, data === null || data === void 0 ? void 0 : data.product, props.iconSize, props.cardAppearance) || {},
|
|
380
395
|
icon = _ref3.icon,
|
|
381
396
|
content = _ref3.content,
|
|
382
397
|
tooltipMessage = _ref3.tooltipMessage,
|
|
@@ -18,13 +18,16 @@ import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
|
18
18
|
import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
20
|
import Tooltip from '@atlaskit/tooltip';
|
|
21
|
-
import { ActionName, SmartLinkSize } from '../../../../../constants';
|
|
21
|
+
import { ActionName, CardDisplay, SmartLinkSize } from '../../../../../constants';
|
|
22
22
|
import { messages } from '../../../../../messages';
|
|
23
23
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
24
|
+
import { RovoChatPromptKey } from '../../actions/rovo-chat-action';
|
|
24
25
|
import { sizeToButtonSpacing } from '../../utils';
|
|
25
26
|
import { filterActionItems } from '../utils';
|
|
26
27
|
import ActionGroupItem from './action-group-item';
|
|
27
28
|
var styles = null;
|
|
29
|
+
var FULL_ACTIONS_SIZE = 450;
|
|
30
|
+
var REDUCED_ACTIONS_SIZE = 360;
|
|
28
31
|
var renderActionItems = function renderActionItems() {
|
|
29
32
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
30
33
|
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SmartLinkSize.Medium;
|
|
@@ -59,7 +62,9 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
59
62
|
appearance = _ref.appearance,
|
|
60
63
|
_ref$visibleButtonsNu = _ref.visibleButtonsNum,
|
|
61
64
|
visibleButtonsNum = _ref$visibleButtonsNu === void 0 ? 2 : _ref$visibleButtonsNu,
|
|
62
|
-
onDropdownOpenChange = _ref.onDropdownOpenChange
|
|
65
|
+
onDropdownOpenChange = _ref.onDropdownOpenChange,
|
|
66
|
+
_ref$containerWidth = _ref.containerWidth,
|
|
67
|
+
containerWidth = _ref$containerWidth === void 0 ? Infinity : _ref$containerWidth;
|
|
63
68
|
var context = useFlexibleUiContext();
|
|
64
69
|
var ui = useFlexibleUiOptionContext();
|
|
65
70
|
var _useState = useState(false),
|
|
@@ -70,7 +75,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
70
75
|
return filterActionItems(items, context);
|
|
71
76
|
}, [context, items]);
|
|
72
77
|
var isMoreThenTwoItems = renderableActionItems.length > visibleButtonsNum;
|
|
73
|
-
var isRovoActionsEnabled = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]);
|
|
78
|
+
var isRovoActionsEnabled = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
|
|
74
79
|
var onOpenChange = useCallback(function (attrs) {
|
|
75
80
|
setIsOpen(attrs.isOpen);
|
|
76
81
|
if (onDropdownOpenChange) {
|
|
@@ -85,21 +90,34 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
85
90
|
}
|
|
86
91
|
}, [isOpen, onOpenChange]);
|
|
87
92
|
var actionButtons = useMemo(function () {
|
|
88
|
-
if (isRovoActionsEnabled
|
|
89
|
-
var rovoActions = [].concat(_toConsumableArray(renderableActionItems.slice(0, visibleButtonsNum - 1)), [{
|
|
90
|
-
name: ActionName.
|
|
91
|
-
|
|
93
|
+
if (isRovoActionsEnabled) {
|
|
94
|
+
var rovoActions = [].concat(_toConsumableArray(containerWidth >= REDUCED_ACTIONS_SIZE ? renderableActionItems.slice(0, visibleButtonsNum - 1) : []), [{
|
|
95
|
+
name: ActionName.RovoChatAction,
|
|
96
|
+
prompts: [RovoChatPromptKey.ASK_ROVO_ANYTHING],
|
|
97
|
+
iconSize: 'small',
|
|
98
|
+
cardAppearance: CardDisplay.Block,
|
|
99
|
+
hideContent: containerWidth < FULL_ACTIONS_SIZE && containerWidth >= REDUCED_ACTIONS_SIZE
|
|
92
100
|
}, {
|
|
93
101
|
name: ActionName.CopyLinkAction,
|
|
94
|
-
hideContent: true
|
|
102
|
+
hideContent: true,
|
|
103
|
+
iconSize: 'small'
|
|
104
|
+
}, {
|
|
105
|
+
name: ActionName.PreviewAction,
|
|
106
|
+
hideContent: true,
|
|
107
|
+
iconSize: 'small'
|
|
95
108
|
}]);
|
|
96
109
|
return renderActionItems(rovoActions, size, appearance, false, onActionItemClick);
|
|
97
110
|
}
|
|
98
111
|
var actionItems = isMoreThenTwoItems ? renderableActionItems.slice(0, visibleButtonsNum - 1) : renderableActionItems;
|
|
99
112
|
return renderActionItems(actionItems, size, appearance, false, onActionItemClick);
|
|
100
|
-
}, [appearance, isMoreThenTwoItems, onActionItemClick, renderableActionItems, size, visibleButtonsNum,
|
|
113
|
+
}, [appearance, isMoreThenTwoItems, isRovoActionsEnabled, onActionItemClick, renderableActionItems, size, visibleButtonsNum, containerWidth]);
|
|
101
114
|
var moreActionDropdown = useMemo(function () {
|
|
102
|
-
var actionItems
|
|
115
|
+
var actionItems;
|
|
116
|
+
if (isRovoActionsEnabled && containerWidth < REDUCED_ACTIONS_SIZE) {
|
|
117
|
+
actionItems = renderableActionItems;
|
|
118
|
+
} else {
|
|
119
|
+
actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
120
|
+
}
|
|
103
121
|
if (actionItems.length > 0) {
|
|
104
122
|
var spacing = sizeToButtonSpacing[size];
|
|
105
123
|
var moreIcon = /*#__PURE__*/React.createElement(MoreIcon, {
|
|
@@ -119,7 +137,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
119
137
|
testId: "action-group-more-button-tooltip",
|
|
120
138
|
tag: "span"
|
|
121
139
|
}, /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
122
|
-
spacing: spacing,
|
|
140
|
+
spacing: isRovoActionsEnabled && fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? size === SmartLinkSize.XLarge ? 'default' : 'compact' : spacing,
|
|
123
141
|
testId: "action-group-more-button",
|
|
124
142
|
iconBefore: moreIcon,
|
|
125
143
|
ref: triggerRef
|
|
@@ -132,7 +150,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
132
150
|
}, renderActionItems(actionItems, size, appearance, true, onActionItemClick));
|
|
133
151
|
}
|
|
134
152
|
return null;
|
|
135
|
-
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum,
|
|
153
|
+
}, [appearance, isMoreThenTwoItems, isOpen, isRovoActionsEnabled, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum, containerWidth]);
|
|
136
154
|
return renderableActionItems.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
137
155
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
138
156
|
className: ax(["_1e0c116y _dzc21h6o _1ilq1i6y", "actions-button-group"]),
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
4
|
import "./index.compiled.css";
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { useCallback, useMemo } from 'react';
|
|
7
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
7
8
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
8
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { WidthObserver } from '@atlaskit/width-detector';
|
|
9
11
|
import { ActionName, SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../../constants';
|
|
10
12
|
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
11
13
|
import { Provider } from '../../../elements';
|
|
@@ -15,6 +17,8 @@ import ElementGroup from '../../element-group';
|
|
|
15
17
|
import { filterActionItems } from '../../utils';
|
|
16
18
|
var actionGroupStyles = null;
|
|
17
19
|
var safariStyles = null;
|
|
20
|
+
var providerStyles = null;
|
|
21
|
+
var rovoActionStyles = null;
|
|
18
22
|
var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
19
23
|
var _context$actions;
|
|
20
24
|
var actions = props.actions,
|
|
@@ -22,9 +26,11 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
22
26
|
onActionMenuOpenChange = props.onActionMenuOpenChange,
|
|
23
27
|
_props$size = props.size,
|
|
24
28
|
size = _props$size === void 0 ? SmartLinkSize.Medium : _props$size,
|
|
25
|
-
hideProvider = props.hideProvider
|
|
29
|
+
hideProvider = props.hideProvider,
|
|
30
|
+
isPreviewBlockErrored = props.isPreviewBlockErrored;
|
|
26
31
|
var context = useFlexibleUiContext();
|
|
27
|
-
var isRovoSupportedFeature = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]);
|
|
32
|
+
var isRovoSupportedFeature = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
|
|
33
|
+
var hasPreview = isRovoSupportedFeature && !!(context !== null && context !== void 0 && context.preview) && !isPreviewBlockErrored;
|
|
28
34
|
var hasActions = useMemo(function () {
|
|
29
35
|
var _filterActionItems;
|
|
30
36
|
return ((_filterActionItems = filterActionItems(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
|
|
@@ -43,22 +49,34 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
43
49
|
});
|
|
44
50
|
}
|
|
45
51
|
}, [onActionMenuOpenChange]);
|
|
52
|
+
|
|
53
|
+
// WidthObserver fires whenever the footer's available width changes.
|
|
54
|
+
var _useState = useState(undefined),
|
|
55
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
56
|
+
containerWidth = _useState2[0],
|
|
57
|
+
setContainerWidth = _useState2[1];
|
|
46
58
|
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
47
59
|
testId: "".concat(testId, "-resolved-view")
|
|
48
60
|
}), !hideProvider && /*#__PURE__*/React.createElement(Provider, {
|
|
49
61
|
appearance: "subtle",
|
|
50
|
-
testId: "".concat(testId, "-provider")
|
|
62
|
+
testId: "".concat(testId, "-provider"),
|
|
63
|
+
hideLabel: hasPreview,
|
|
64
|
+
className: ax([isRovoSupportedFeature && "_1wpz1h6o"])
|
|
51
65
|
}), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, {
|
|
52
66
|
testId: "smart-element-group-actions",
|
|
53
67
|
align: SmartLinkAlignment.Right,
|
|
54
68
|
direction: SmartLinkDirection.Horizontal,
|
|
55
69
|
width: SmartLinkWidth.Flexible,
|
|
56
|
-
className: ax([size === SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq"])
|
|
57
|
-
}, /*#__PURE__*/React.createElement(
|
|
70
|
+
className: ax([size === SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq", isRovoSupportedFeature && "_kqswh2mm"])
|
|
71
|
+
}, isRovoSupportedFeature && /*#__PURE__*/React.createElement(WidthObserver, {
|
|
72
|
+
setWidth: setContainerWidth,
|
|
73
|
+
offscreen: true
|
|
74
|
+
}), /*#__PURE__*/React.createElement(ActionGroup, {
|
|
58
75
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
59
76
|
items: actions,
|
|
60
|
-
appearance: isRovoSupportedFeature
|
|
61
|
-
size: size
|
|
77
|
+
appearance: isRovoSupportedFeature ? 'subtle' : 'default',
|
|
78
|
+
size: isRovoSupportedFeature ? SmartLinkSize.Small : size,
|
|
79
|
+
containerWidth: isRovoSupportedFeature ? containerWidth : undefined
|
|
62
80
|
})) : null);
|
|
63
81
|
};
|
|
64
82
|
export default FooterBlockResolvedView;
|
|
@@ -6,6 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
7
7
|
|
|
8
8
|
import React, { forwardRef } from 'react';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
11
|
import { IconType } from '../../../../../../constants';
|
|
11
12
|
import { messages } from '../../../../../../messages';
|
|
@@ -76,13 +77,16 @@ var BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
76
77
|
_ref$testId = _ref.testId,
|
|
77
78
|
testId = _ref$testId === void 0 ? 'smart-element-badge' : _ref$testId,
|
|
78
79
|
url = _ref.url,
|
|
79
|
-
color = _ref.color
|
|
80
|
+
color = _ref.color,
|
|
81
|
+
_ref$hideLabel = _ref.hideLabel,
|
|
82
|
+
hideLabel = _ref$hideLabel === void 0 ? false : _ref$hideLabel;
|
|
80
83
|
var ui = useFlexibleUiOptionContext();
|
|
81
84
|
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
82
85
|
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
83
86
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
84
87
|
return null;
|
|
85
88
|
}
|
|
89
|
+
var shouldHideLabel = hideLabel && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
|
|
86
90
|
return /*#__PURE__*/React.createElement("span", {
|
|
87
91
|
"data-smart-element": name,
|
|
88
92
|
"data-smart-element-badge": true,
|
|
@@ -95,7 +99,7 @@ var BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
95
99
|
}, !hideIcon && /*#__PURE__*/React.createElement(Box, {
|
|
96
100
|
as: "span",
|
|
97
101
|
xcss: styles.icon
|
|
98
|
-
}, badgeIcon), /*#__PURE__*/React.createElement(Box, {
|
|
102
|
+
}, badgeIcon), !shouldHideLabel && /*#__PURE__*/React.createElement(Box, {
|
|
99
103
|
as: "span",
|
|
100
104
|
testId: "".concat(testId, "-label"),
|
|
101
105
|
xcss: styles.text
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "44.3.
|
|
18
|
+
packageVersion: "44.3.24",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|
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_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_message_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_message_show_other_mentions' | 'rovo_prompt_button_suggest_improvement' | 'rovo_prompt_message_suggest_improvement' | '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';
|
|
3
|
+
export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_message_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_message_show_other_mentions' | 'rovo_prompt_button_suggest_improvement' | 'rovo_prompt_message_suggest_improvement' | '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';
|
|
4
4
|
export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | '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_unauthorised_account_action' | '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_modal' | 'preview_panel' | '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' | '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;
|
|
5
5
|
type Messages = {
|
|
6
6
|
[K in MessageKey]: MessageDescriptor;
|
|
@@ -2,7 +2,7 @@ import type { ReactChild, ReactNode } from 'react';
|
|
|
2
2
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import type { Appearance } from '@atlaskit/button/types';
|
|
4
4
|
import type { Space } from '@atlaskit/primitives/compiled';
|
|
5
|
-
import type { SmartLinkSize } from '../../../../../constants';
|
|
5
|
+
import type { CardDisplay, SmartLinkSize } from '../../../../../constants';
|
|
6
6
|
export type ActionMessageAppearance = 'error';
|
|
7
7
|
export type ActionMessage = {
|
|
8
8
|
appearance?: ActionMessageAppearance;
|
|
@@ -27,6 +27,11 @@ export type ActionProps = {
|
|
|
27
27
|
* Used to determine whether the Action is in a Dropdown.
|
|
28
28
|
*/
|
|
29
29
|
asDropDownItem?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Used in block card 3P post-auth experiment to show different icons for Rovo actions
|
|
32
|
+
* Should be removed on clean up of platform_sl_3p_auth_rovo_block_card_kill_switch after finalizing which icons to use long term
|
|
33
|
+
*/
|
|
34
|
+
cardAppearance?: CardDisplay;
|
|
30
35
|
/**
|
|
31
36
|
* For compiled css
|
|
32
37
|
*/
|
|
@@ -6,5 +6,5 @@ import { type ActionGroupProps } from './types';
|
|
|
6
6
|
* @param {ActionGroupProps} ActionGroupProps
|
|
7
7
|
* @see Action
|
|
8
8
|
*/
|
|
9
|
-
declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, onDropdownOpenChange, }: ActionGroupProps) => JSX.Element | null;
|
|
9
|
+
declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, onDropdownOpenChange, containerWidth, }: ActionGroupProps) => JSX.Element | null;
|
|
10
10
|
export default ActionGroup;
|
|
@@ -6,6 +6,10 @@ export type ActionGroupProps = {
|
|
|
6
6
|
* Determines the default appearance of the Action Group.
|
|
7
7
|
*/
|
|
8
8
|
appearance?: Appearance;
|
|
9
|
+
/**
|
|
10
|
+
* The measured width of the stable footer container (from FooterBlockResolvedView).
|
|
11
|
+
*/
|
|
12
|
+
containerWidth?: number;
|
|
9
13
|
/**
|
|
10
14
|
* Determines the direction that the actions are rendered. Can be vertical
|
|
11
15
|
* or horizontal.
|