@atlaskit/smart-card 43.27.0 → 43.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +2 -1
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +5 -2
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +6 -1
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +9 -5
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +8 -2
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +45 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +6 -6
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.compiled.css +0 -9
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +1 -31
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +5 -2
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -2
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +7 -2
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +9 -5
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +5 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +40 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +7 -7
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.compiled.css +0 -9
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +3 -32
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +5 -2
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +7 -2
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +9 -5
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +8 -2
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +45 -8
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +7 -7
- package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.compiled.css +0 -9
- package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +3 -33
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.d.ts +3 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +0 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.d.ts +3 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +0 -8
- package/package.json +3 -2
|
@@ -30,18 +30,22 @@ const PreviewAction = ({
|
|
|
30
30
|
const actionIcon = useCallback(() => {
|
|
31
31
|
// Only use panel icon if experiment is enabled and hasPreviewPanel is true
|
|
32
32
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
33
|
-
return /*#__PURE__*/React.createElement(PanelRightIcon, {
|
|
33
|
+
return /*#__PURE__*/React.createElement(PanelRightIcon, _extends({
|
|
34
34
|
color: "currentColor",
|
|
35
35
|
spacing: "spacious",
|
|
36
36
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
37
|
-
})
|
|
37
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
38
|
+
size: props.iconSize
|
|
39
|
+
} : {}));
|
|
38
40
|
}
|
|
39
|
-
return /*#__PURE__*/React.createElement(MediaServicesActualSizeIcon, {
|
|
41
|
+
return /*#__PURE__*/React.createElement(MediaServicesActualSizeIcon, _extends({
|
|
40
42
|
color: "currentColor",
|
|
41
43
|
spacing: "spacious",
|
|
42
44
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
46
|
+
size: props.iconSize
|
|
47
|
+
} : {}));
|
|
48
|
+
}, [hasPreviewPanel, props.iconSize]);
|
|
45
49
|
const actionLabel = useCallback(() => {
|
|
46
50
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
47
51
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { lazy, useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
5
6
|
import { messages } from '../../../../../messages';
|
|
6
7
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -32,8 +33,13 @@ const ViewRelatedLinksAction = ({
|
|
|
32
33
|
onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback();
|
|
33
34
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
34
35
|
return actionData ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
35
|
-
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
36
|
-
|
|
36
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
37
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
38
|
+
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
39
|
+
} : {}, {
|
|
40
|
+
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
41
|
+
iconSize: props.iconSize
|
|
42
|
+
} : {}),
|
|
37
43
|
onClick: onClick,
|
|
38
44
|
testId: "smart-action-view-related-links-action",
|
|
39
45
|
ariaLabel: "View most recent pages or content types coming from or found on this link"
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ClockIcon from '@atlaskit/icon/core/clock';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
const RelatedLinksActionIcon = (
|
|
4
|
+
const RelatedLinksActionIcon = ({
|
|
5
|
+
iconSize
|
|
6
|
+
}) => /*#__PURE__*/React.createElement(ClockIcon, {
|
|
5
7
|
color: "currentColor",
|
|
6
8
|
spacing: "spacious",
|
|
7
|
-
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'View related links...'
|
|
9
|
+
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'View related links...',
|
|
10
|
+
size: iconSize
|
|
8
11
|
});
|
|
9
12
|
export default RelatedLinksActionIcon;
|
|
@@ -4,9 +4,11 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useCallback, useMemo, useState } from 'react';
|
|
6
6
|
import { di } from 'react-magnetic-di';
|
|
7
|
+
import { FadeIn, StaggeredEntrance } from '@atlaskit/motion';
|
|
7
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { InternalActionName, SmartLinkSize } from '../../../../../constants';
|
|
9
10
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
11
|
+
import useAISummaryAction from '../../../../../state/hooks/use-ai-summary-action';
|
|
10
12
|
import * as Actions from '../../actions';
|
|
11
13
|
import { ActionFooter } from './action-footer';
|
|
12
14
|
const ignoreContainerPaddingStyles = null;
|
|
@@ -52,6 +54,7 @@ const ActionBlock = ({
|
|
|
52
54
|
var _context$actions;
|
|
53
55
|
const context = useFlexibleUiContext();
|
|
54
56
|
const ui = useFlexibleUiOptionContext();
|
|
57
|
+
const url = context === null || context === void 0 ? void 0 : context.url;
|
|
55
58
|
const isRovoChatActionAvailable = is3PAuthRovoActionsExperimentOn && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.RovoChatAction]) !== undefined : undefined;
|
|
56
59
|
const [message, setMessage] = useState();
|
|
57
60
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -72,9 +75,18 @@ const ActionBlock = ({
|
|
|
72
75
|
}
|
|
73
76
|
const arr = fg('platform_sl_3p_auth_rovo_action_kill_switch') ? is3PAuthRovoActionsExperimentOn && isRovoChatActionAvailable ? [InternalActionName.RovoChatAction] : Object.keys(context.actions).filter(name => name !== InternalActionName.RovoChatAction) : Object.keys(context.actions);
|
|
74
77
|
arr.sort(sort);
|
|
75
|
-
|
|
78
|
+
const renderAction = (name, motionStyle) => {
|
|
76
79
|
const Action = name in Actions ? Actions[name] : undefined;
|
|
77
|
-
|
|
80
|
+
if (!Action) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const style = padding || motionStyle ? {
|
|
84
|
+
...(motionStyle || {}),
|
|
85
|
+
...(padding && {
|
|
86
|
+
paddingInline: padding
|
|
87
|
+
})
|
|
88
|
+
} : undefined;
|
|
89
|
+
return /*#__PURE__*/React.createElement(Action, {
|
|
78
90
|
as: "stack-item",
|
|
79
91
|
spaceInline: spaceInline,
|
|
80
92
|
key: name,
|
|
@@ -84,14 +96,33 @@ const ActionBlock = ({
|
|
|
84
96
|
size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
|
|
85
97
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/no-unsafe-design-token-usage
|
|
86
98
|
,
|
|
87
|
-
style:
|
|
88
|
-
paddingInline: padding
|
|
89
|
-
},
|
|
99
|
+
style: style,
|
|
90
100
|
hideTooltip: isLoading
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
return isRovoChatActionAvailable && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? /*#__PURE__*/React.createElement(StaggeredEntrance, {
|
|
104
|
+
columns: 1
|
|
105
|
+
}, arr.map((name, index) => /*#__PURE__*/React.createElement(FadeIn, {
|
|
106
|
+
duration: 'large',
|
|
107
|
+
key: index
|
|
108
|
+
}, motion => renderAction(name, motion.style)))) : arr.map(name => renderAction(name));
|
|
109
|
+
}, [context === null || context === void 0 ? void 0 : context.actions, is3PAuthRovoActionsExperimentOn, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, onClick]);
|
|
110
|
+
if (!fg('platform_sl_3p_auth_rovo_action_kill_switch') || !isRovoChatActionAvailable && actions || !url) {
|
|
111
|
+
return actions ? /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
ref: blockRef,
|
|
113
|
+
"data-testid": testId
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
115
|
+
,
|
|
116
|
+
className: ax(["_1e0c1txw _2lx21bp4 _vchhusvi _16jlkb7n _1bsb129b _18u01ivi _2hwxc10g", className])
|
|
117
|
+
}, actions, /*#__PURE__*/React.createElement(ActionFooter, {
|
|
118
|
+
message: message,
|
|
119
|
+
testId: testId
|
|
120
|
+
})) : null;
|
|
121
|
+
}
|
|
122
|
+
const aiSummaryConfig = fg('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
123
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
124
|
+
useAISummaryAction(url) : undefined;
|
|
125
|
+
return actions && ((aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.state.status) === 'done' || (aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.state.status) === 'error') ? /*#__PURE__*/React.createElement("div", {
|
|
95
126
|
ref: blockRef,
|
|
96
127
|
"data-testid": testId
|
|
97
128
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -86,6 +86,9 @@ export const RovoSummaryBlockResolvedView = props => {
|
|
|
86
86
|
summariseUrl();
|
|
87
87
|
}, [status, summariseUrl]);
|
|
88
88
|
const minHeight = isSummarisedOnMountRef.current ? 0 : aiSummaryMinHeight;
|
|
89
|
+
if (status === 'error') {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
89
92
|
if (!showAISummary) {
|
|
90
93
|
return /*#__PURE__*/React.createElement(Inline, {
|
|
91
94
|
testId: `${testId}-placeholder`,
|
package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css
CHANGED
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
._4t3ioahv{height:var(--ds-space-600,3pc)}
|
|
22
22
|
._6syfze3t *{row-gap:var(--ds-space-0,0)}
|
|
23
23
|
._6zimze3t *{padding-top:var(--ds-space-0,0)}
|
|
24
|
-
._7hiu1ejb *{max-height:var(--ds-space-300,24px)}
|
|
25
24
|
._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
|
|
26
25
|
._f9lhze3t *{padding-bottom:var(--ds-space-0,0)}
|
|
27
26
|
._mrkb1mok{border-bottom-left-radius:var(--ds-radius-large,8px)}
|
|
@@ -29,4 +28,5 @@
|
|
|
29
28
|
._rvy9ze3t *{margin-top:var(--ds-space-0,0)}
|
|
30
29
|
._ue4dze3t *{margin-bottom:var(--ds-space-0,0)}
|
|
31
30
|
._vchhusvi{box-sizing:border-box}
|
|
32
|
-
._zgrbze3t *{margin-left:var(--ds-space-0,0)}
|
|
31
|
+
._zgrbze3t *{margin-left:var(--ds-space-0,0)}
|
|
32
|
+
._1xdd12b0 :hover{border-radius:var(--ds-radius-small,4px)}
|
|
@@ -4,7 +4,7 @@ import "./index.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { InternalActionName } from '../../../../../constants';
|
|
8
8
|
import { useFlexibleCardContext } from '../../../../../state/flexible-ui-context';
|
|
9
9
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
10
10
|
import * as Actions from '../../actions';
|
|
@@ -14,7 +14,7 @@ import Block from '../block';
|
|
|
14
14
|
* Allowed footer actions for HoverCard, in display order. Fetched from context.
|
|
15
15
|
* @featureGate platform_sl_3p_auth_rovo_action_kill_switch
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
17
|
+
const HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [InternalActionName.AISummaryAction, InternalActionName.RovoChatAction];
|
|
18
18
|
const ignoreContainerMarginStyles = null;
|
|
19
19
|
const elevatedFooterStyles = null;
|
|
20
20
|
const providerStyles = null;
|
|
@@ -41,7 +41,7 @@ const ResolvedHoverCardFooterBlock = ({
|
|
|
41
41
|
return [];
|
|
42
42
|
}
|
|
43
43
|
let arr = Object.keys(context.actions);
|
|
44
|
-
arr = arr.filter(name =>
|
|
44
|
+
arr = arr.filter(name => !HIDDEN_HOVER_CARD_FOOTER_ACTIONS.includes(name));
|
|
45
45
|
return arr.map(name => {
|
|
46
46
|
const Action = name in Actions ? Actions[name] : undefined;
|
|
47
47
|
return Action ? /*#__PURE__*/React.createElement(Action, {
|
|
@@ -50,7 +50,8 @@ const ResolvedHoverCardFooterBlock = ({
|
|
|
50
50
|
content: "",
|
|
51
51
|
testId: `${testId}-${name}`,
|
|
52
52
|
onClick: () => onActionClick === null || onActionClick === void 0 ? void 0 : onActionClick(name),
|
|
53
|
-
size: size
|
|
53
|
+
size: size,
|
|
54
|
+
iconSize: 'small'
|
|
54
55
|
}) : null;
|
|
55
56
|
});
|
|
56
57
|
}, [context === null || context === void 0 ? void 0 : context.actions, onActionClick, testId, size]);
|
|
@@ -62,11 +63,10 @@ const ResolvedHoverCardFooterBlock = ({
|
|
|
62
63
|
className: ax(["_4t3i1ejb _1e0c1txw _4cvr1h6o _1bah1y6m _vchhusvi _16jlkb7n"])
|
|
63
64
|
}, /*#__PURE__*/React.createElement(Provider, {
|
|
64
65
|
appearance: "subtle",
|
|
65
|
-
testId: `${testId}-provider
|
|
66
|
-
iconSize: "large"
|
|
66
|
+
testId: `${testId}-provider`
|
|
67
67
|
})), actions.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
68
68
|
"data-testid": `${testId}-actions`,
|
|
69
|
-
className: ax(["_zulpidpf _1e0c1txw _18u01wug _4cvr1h6o _vchhusvi _7386ze3t
|
|
69
|
+
className: ax(["_zulpidpf _1e0c1txw _18u01wug _4cvr1h6o _vchhusvi _7386ze3t _1xdd12b0 _17zize3t _19p4ze3t _6zimze3t _f9lhze3t _rvy9ze3t _ue4dze3t _zgrbze3t _10cuze3t _6syfze3t _3hv7ze3t"])
|
|
70
70
|
}, actions) : null);
|
|
71
71
|
};
|
|
72
72
|
export default ResolvedHoverCardFooterBlock;
|
|
@@ -1,38 +1,30 @@
|
|
|
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
2
|
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
|
-
._zulpu2gc{gap:var(--ds-space-100,8px)}
|
|
4
3
|
._14bqze3t img{padding-top:var(--ds-space-0,0)}
|
|
5
|
-
._17521tcg svg{height:24px}
|
|
6
4
|
._17527vkz svg{height:1pc}
|
|
7
5
|
._19bvze3t{padding-left:var(--ds-space-0,0)}
|
|
8
6
|
._1b94116y span{display:inline-flex}
|
|
9
|
-
._1bsb1tcg{width:24px}
|
|
10
7
|
._1bsb7vkz{width:1pc}
|
|
11
8
|
._1e0c116y{display:inline-flex}
|
|
12
9
|
._1ii7116y svg{display:inline-flex}
|
|
13
10
|
._1m2uze3t span{padding-bottom:var(--ds-space-0,0)}
|
|
14
11
|
._1oh2ze3t span{padding-top:var(--ds-space-0,0)}
|
|
15
12
|
._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
|
|
16
|
-
._1xjx1tcg span{height:24px}
|
|
17
13
|
._1xjx7vkz span{height:1pc}
|
|
18
14
|
._1xr1ze3t img{padding-left:var(--ds-space-0,0)}
|
|
19
15
|
._1ym6ze3t img{padding-bottom:var(--ds-space-0,0)}
|
|
20
16
|
._3tceze3t img{padding-right:var(--ds-space-0,0)}
|
|
21
17
|
._4cvr1h6o{align-items:center}
|
|
22
|
-
._4t3i1tcg{height:24px}
|
|
23
18
|
._4t3i7vkz{height:1pc}
|
|
24
19
|
._5jw9ze3t svg{padding-bottom:var(--ds-space-0,0)}
|
|
25
20
|
._7wy9ze3t svg{padding-left:var(--ds-space-0,0)}
|
|
26
21
|
._99ztze3t span{padding-right:var(--ds-space-0,0)}
|
|
27
22
|
._9n9oze3t span{padding-left:var(--ds-space-0,0)}
|
|
28
|
-
._bna71tcg img{height:24px}
|
|
29
23
|
._bna77vkz img{height:1pc}
|
|
30
24
|
._ca0qze3t{padding-top:var(--ds-space-0,0)}
|
|
31
|
-
._e2oo1tcg span{width:24px}
|
|
32
25
|
._e2oo7vkz span{width:1pc}
|
|
33
26
|
._e4kmnkob span{vertical-align:middle}
|
|
34
27
|
._i2i3ze3t svg{padding-top:var(--ds-space-0,0)}
|
|
35
|
-
._mezj1tcg img{width:24px}
|
|
36
28
|
._mezj7vkz img{width:1pc}
|
|
37
29
|
._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
|
|
38
30
|
._rtqbnkob img{vertical-align:middle}
|
|
@@ -42,6 +34,5 @@
|
|
|
42
34
|
._u5f3ze3t{padding-right:var(--ds-space-0,0)}
|
|
43
35
|
._uhasze3t svg{padding-right:var(--ds-space-0,0)}
|
|
44
36
|
._v4pn116y img{display:inline-flex}
|
|
45
|
-
._w8l51tcg svg{width:24px}
|
|
46
37
|
._w8l57vkz svg{width:1pc}
|
|
47
38
|
._z239nkob svg{vertical-align:middle}
|
package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js
CHANGED
|
@@ -3,20 +3,17 @@
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { IconType
|
|
7
|
+
import { IconType } from '../../../../../../constants';
|
|
9
8
|
import { messages } from '../../../../../../messages';
|
|
10
|
-
import {
|
|
9
|
+
import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
11
10
|
import AtlaskitIcon from '../../../common/atlaskit-icon';
|
|
12
11
|
import ImageIcon from '../../../common/image-icon';
|
|
13
12
|
import { withOverrideCss } from '../../../common/with-override-css';
|
|
14
13
|
import { getFormattedMessage } from '../../../utils';
|
|
15
14
|
const styles = {
|
|
16
15
|
container: "_zulp1b66 _1e0c116y _4cvr1h6o _1ul91ns9",
|
|
17
|
-
containerLarge: "_zulpu2gc _1e0c116y _4cvr1h6o _1ul91ns9",
|
|
18
16
|
icon: "_1e0c116y _v4pn116y _1b94116y _1ii7116y _4t3i7vkz _bna77vkz _1xjx7vkz _17527vkz _ca0qze3t _14bqze3t _1oh2ze3t _i2i3ze3t _u5f3ze3t _3tceze3t _99ztze3t _uhasze3t _n3tdze3t _1ym6ze3t _1m2uze3t _5jw9ze3t _19bvze3t _1xr1ze3t _9n9oze3t _7wy9ze3t _1bsb7vkz _mezj7vkz _e2oo7vkz _w8l57vkz _s7n4nkob _rtqbnkob _e4kmnkob _z239nkob",
|
|
19
|
-
iconLarge: "_4t3i1tcg _bna71tcg _1xjx1tcg _17521tcg _1bsb1tcg _mezj1tcg _e2oo1tcg _w8l51tcg",
|
|
20
17
|
text: "_11c8wadc"
|
|
21
18
|
};
|
|
22
19
|
const colorMap = {
|
|
@@ -85,8 +82,7 @@ const BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(({
|
|
|
85
82
|
name,
|
|
86
83
|
testId = 'smart-element-badge',
|
|
87
84
|
url,
|
|
88
|
-
color
|
|
89
|
-
iconSize = 'default'
|
|
85
|
+
color
|
|
90
86
|
}, ref) => {
|
|
91
87
|
const ui = useFlexibleUiOptionContext();
|
|
92
88
|
const formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
@@ -94,31 +90,6 @@ const BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(({
|
|
|
94
90
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
95
91
|
return null;
|
|
96
92
|
}
|
|
97
|
-
if (iconSize === 'large' && fg('platform_sl_3p_auth_rovo_action_kill_switch')) {
|
|
98
|
-
var _context$actions;
|
|
99
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
100
|
-
const context = useFlexibleUiContext();
|
|
101
|
-
if (context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[InternalActionName.RovoChatAction]) {
|
|
102
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
103
|
-
"data-smart-element": name,
|
|
104
|
-
"data-smart-element-badge": true,
|
|
105
|
-
"data-testid": testId,
|
|
106
|
-
ref: ref,
|
|
107
|
-
style: {
|
|
108
|
-
color
|
|
109
|
-
},
|
|
110
|
-
className: ax([styles.containerLarge, colorMap[appearance]])
|
|
111
|
-
}, !hideIcon && /*#__PURE__*/React.createElement(Box, {
|
|
112
|
-
as: "span",
|
|
113
|
-
testId: `${testId}-large-icon-wrapper`,
|
|
114
|
-
xcss: styles.icon && styles.iconLarge
|
|
115
|
-
}, badgeIcon), /*#__PURE__*/React.createElement(Box, {
|
|
116
|
-
as: "span",
|
|
117
|
-
testId: `${testId}-label`,
|
|
118
|
-
xcss: styles.text
|
|
119
|
-
}, formattedMessageOrLabel));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
93
|
return /*#__PURE__*/React.createElement("span", {
|
|
123
94
|
"data-smart-element": name,
|
|
124
95
|
"data-smart-element-badge": true,
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
const PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "43.
|
|
15
|
+
packageVersion: "43.27.1",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:9432898199d088d4dfad39d42c547dabb35a31c9e27669e0759c21e4d2d4d319
|
|
3
|
+
size 33033
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "43.
|
|
7
|
+
packageVersion: "43.27.1"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback } from 'react';
|
|
7
7
|
import { cx } from '@atlaskit/css';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled';
|
|
9
10
|
import Spinner from '@atlaskit/spinner';
|
|
10
11
|
import { getPrimitivesInlineSpaceBySize } from '../../../utils';
|
|
@@ -23,7 +24,8 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
23
24
|
spaceOption = _ref.space,
|
|
24
25
|
testId = _ref.testId,
|
|
25
26
|
tooltipProps = _ref.tooltipProps,
|
|
26
|
-
style = _ref.style
|
|
27
|
+
style = _ref.style,
|
|
28
|
+
ariaLabel = _ref.ariaLabel;
|
|
27
29
|
var space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : getPrimitivesInlineSpaceBySize(size);
|
|
28
30
|
var onClick = useCallback(function () {
|
|
29
31
|
if (!isDisabled && !isLoading && onClickCallback) {
|
|
@@ -43,7 +45,9 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
43
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
44
46
|
,
|
|
45
47
|
style: style
|
|
46
|
-
}
|
|
48
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
49
|
+
"aria-label": ariaLabel
|
|
50
|
+
} : {}), /*#__PURE__*/React.createElement(Inline, {
|
|
47
51
|
alignBlock: "center",
|
|
48
52
|
grow: "fill",
|
|
49
53
|
space: space
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { lazy, useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import AutomationIcon from '@atlaskit/icon/core/automation';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
6
7
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
7
8
|
import { ActionName } from '../../../../../constants';
|
|
@@ -70,11 +71,13 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
70
71
|
var automationActionIconLabel = formatMessage(messages.automation_action_icon_label);
|
|
71
72
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Action, _extends({
|
|
72
73
|
content: automationActionTitle,
|
|
73
|
-
icon: /*#__PURE__*/React.createElement(AutomationIcon, {
|
|
74
|
+
icon: /*#__PURE__*/React.createElement(AutomationIcon, _extends({
|
|
74
75
|
spacing: "spacious",
|
|
75
76
|
color: "currentColor",
|
|
76
77
|
label: automationActionIconLabel
|
|
77
|
-
})
|
|
78
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
79
|
+
size: props.iconSize
|
|
80
|
+
} : {})),
|
|
78
81
|
testId: "smart-action-automation-action",
|
|
79
82
|
tooltipMessage: automationActionTooltip
|
|
80
83
|
}, props, {
|
|
@@ -57,11 +57,13 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
57
57
|
}, [data, invoke, onClickCallback]);
|
|
58
58
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
59
59
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.copy_url_to_clipboard),
|
|
60
|
-
icon: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
60
|
+
icon: /*#__PURE__*/React.createElement(LinkIcon, _extends({
|
|
61
61
|
color: "currentColor",
|
|
62
62
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
63
63
|
spacing: "spacious"
|
|
64
|
-
})
|
|
64
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
65
|
+
size: props.iconSize
|
|
66
|
+
} : {})),
|
|
65
67
|
onClick: onClick,
|
|
66
68
|
testId: "smart-action-copy-link-action",
|
|
67
69
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage),
|
|
@@ -2,8 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["value", "isProject"];
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
6
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { ActionName } from '../../../../../constants';
|
|
8
9
|
import { messages } from '../../../../../messages';
|
|
9
10
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -38,6 +39,7 @@ var getIcon = function getIcon(stackIconType) {
|
|
|
38
39
|
var FollowAction = function FollowAction(props) {
|
|
39
40
|
var _context$actions;
|
|
40
41
|
var context = useFlexibleUiContext();
|
|
42
|
+
var intl = useIntl();
|
|
41
43
|
var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.FollowAction];
|
|
42
44
|
if (!context || !actionData) {
|
|
43
45
|
return null;
|
|
@@ -70,7 +72,10 @@ var FollowAction = function FollowAction(props) {
|
|
|
70
72
|
});
|
|
71
73
|
};
|
|
72
74
|
return /*#__PURE__*/React.createElement(ServerAction, _extends({
|
|
73
|
-
content: /*#__PURE__*/React.createElement(FormattedMessage, label)
|
|
75
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, label)
|
|
76
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
77
|
+
ariaLabel: intl.formatMessage(label)
|
|
78
|
+
} : {}, {
|
|
74
79
|
icon: followIcon,
|
|
75
80
|
testId: "smart-action-follow-action",
|
|
76
81
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage)
|
|
@@ -31,18 +31,22 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
31
31
|
var actionIcon = useCallback(function () {
|
|
32
32
|
// Only use panel icon if experiment is enabled and hasPreviewPanel is true
|
|
33
33
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
34
|
-
return /*#__PURE__*/React.createElement(PanelRightIcon, {
|
|
34
|
+
return /*#__PURE__*/React.createElement(PanelRightIcon, _extends({
|
|
35
35
|
color: "currentColor",
|
|
36
36
|
spacing: "spacious",
|
|
37
37
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
38
|
-
})
|
|
38
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
39
|
+
size: props.iconSize
|
|
40
|
+
} : {}));
|
|
39
41
|
}
|
|
40
|
-
return /*#__PURE__*/React.createElement(MediaServicesActualSizeIcon, {
|
|
42
|
+
return /*#__PURE__*/React.createElement(MediaServicesActualSizeIcon, _extends({
|
|
41
43
|
color: "currentColor",
|
|
42
44
|
spacing: "spacious",
|
|
43
45
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
47
|
+
size: props.iconSize
|
|
48
|
+
} : {}));
|
|
49
|
+
}, [hasPreviewPanel, props.iconSize]);
|
|
46
50
|
var actionLabel = useCallback(function () {
|
|
47
51
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
48
52
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
@@ -3,6 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
var _excluded = ["onClick"];
|
|
4
4
|
import React, { lazy, useCallback } from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
7
8
|
import { messages } from '../../../../../messages';
|
|
8
9
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -36,8 +37,13 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
|
|
|
36
37
|
onClickCallback === null || onClickCallback === void 0 || onClickCallback();
|
|
37
38
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
38
39
|
return actionData ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
39
|
-
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
40
|
-
|
|
40
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
41
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
42
|
+
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
43
|
+
} : {}, {
|
|
44
|
+
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
45
|
+
iconSize: props.iconSize
|
|
46
|
+
} : {}),
|
|
41
47
|
onClick: onClick,
|
|
42
48
|
testId: "smart-action-view-related-links-action",
|
|
43
49
|
ariaLabel: "View most recent pages or content types coming from or found on this link"
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import ClockIcon from '@atlaskit/icon/core/clock';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
var RelatedLinksActionIcon = function RelatedLinksActionIcon() {
|
|
4
|
+
var RelatedLinksActionIcon = function RelatedLinksActionIcon(_ref) {
|
|
5
|
+
var iconSize = _ref.iconSize;
|
|
5
6
|
return /*#__PURE__*/React.createElement(ClockIcon, {
|
|
6
7
|
color: "currentColor",
|
|
7
8
|
spacing: "spacious",
|
|
8
|
-
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'View related links...'
|
|
9
|
+
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'View related links...',
|
|
10
|
+
size: iconSize
|
|
9
11
|
});
|
|
10
12
|
};
|
|
11
13
|
export default RelatedLinksActionIcon;
|