@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
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
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";
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
9
|
import { useCallback, useMemo, useState } from 'react';
|
|
7
10
|
import { di } from 'react-magnetic-di';
|
|
11
|
+
import { FadeIn, StaggeredEntrance } from '@atlaskit/motion';
|
|
8
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
13
|
import { InternalActionName, SmartLinkSize } from '../../../../../constants';
|
|
10
14
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
15
|
+
import useAISummaryAction from '../../../../../state/hooks/use-ai-summary-action';
|
|
11
16
|
import * as Actions from '../../actions';
|
|
12
17
|
import { ActionFooter } from './action-footer';
|
|
13
18
|
var ignoreContainerPaddingStyles = null;
|
|
@@ -53,6 +58,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
53
58
|
is3PAuthRovoActionsExperimentOn = _ref.is3PAuthRovoActionsExperimentOn;
|
|
54
59
|
var context = useFlexibleUiContext();
|
|
55
60
|
var ui = useFlexibleUiOptionContext();
|
|
61
|
+
var url = context === null || context === void 0 ? void 0 : context.url;
|
|
56
62
|
var isRovoChatActionAvailable = is3PAuthRovoActionsExperimentOn && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.RovoChatAction]) !== undefined : undefined;
|
|
57
63
|
var _useState = useState(),
|
|
58
64
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -81,9 +87,15 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
81
87
|
return name !== InternalActionName.RovoChatAction;
|
|
82
88
|
}) : Object.keys(context.actions);
|
|
83
89
|
arr.sort(sort);
|
|
84
|
-
|
|
90
|
+
var renderAction = function renderAction(name, motionStyle) {
|
|
85
91
|
var Action = name in Actions ? Actions[name] : undefined;
|
|
86
|
-
|
|
92
|
+
if (!Action) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
var style = padding || motionStyle ? _objectSpread(_objectSpread({}, motionStyle || {}), padding && {
|
|
96
|
+
paddingInline: padding
|
|
97
|
+
}) : undefined;
|
|
98
|
+
return /*#__PURE__*/React.createElement(Action, {
|
|
87
99
|
as: "stack-item",
|
|
88
100
|
spaceInline: spaceInline,
|
|
89
101
|
key: name,
|
|
@@ -95,14 +107,39 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
95
107
|
size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
|
|
96
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/no-unsafe-design-token-usage
|
|
97
109
|
,
|
|
98
|
-
style:
|
|
99
|
-
paddingInline: padding
|
|
100
|
-
},
|
|
110
|
+
style: style,
|
|
101
111
|
hideTooltip: isLoading
|
|
102
|
-
})
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
return isRovoChatActionAvailable && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? /*#__PURE__*/React.createElement(StaggeredEntrance, {
|
|
115
|
+
columns: 1
|
|
116
|
+
}, arr.map(function (name, index) {
|
|
117
|
+
return /*#__PURE__*/React.createElement(FadeIn, {
|
|
118
|
+
duration: 'large',
|
|
119
|
+
key: index
|
|
120
|
+
}, function (motion) {
|
|
121
|
+
return renderAction(name, motion.style);
|
|
122
|
+
});
|
|
123
|
+
})) : arr.map(function (name) {
|
|
124
|
+
return renderAction(name);
|
|
103
125
|
});
|
|
104
|
-
}, [context === null || context === void 0 ? void 0 : context.actions, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, _onClick
|
|
105
|
-
|
|
126
|
+
}, [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]);
|
|
127
|
+
if (!fg('platform_sl_3p_auth_rovo_action_kill_switch') || !isRovoChatActionAvailable && actions || !url) {
|
|
128
|
+
return actions ? /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
ref: blockRef,
|
|
130
|
+
"data-testid": testId
|
|
131
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
132
|
+
,
|
|
133
|
+
className: ax(["_1e0c1txw _2lx21bp4 _vchhusvi _16jlkb7n _1bsb129b _18u01ivi _2hwxc10g", className])
|
|
134
|
+
}, actions, /*#__PURE__*/React.createElement(ActionFooter, {
|
|
135
|
+
message: message,
|
|
136
|
+
testId: testId
|
|
137
|
+
})) : null;
|
|
138
|
+
}
|
|
139
|
+
var aiSummaryConfig = fg('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
140
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
141
|
+
useAISummaryAction(url) : undefined;
|
|
142
|
+
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", {
|
|
106
143
|
ref: blockRef,
|
|
107
144
|
"data-testid": testId
|
|
108
145
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -80,6 +80,9 @@ export var RovoSummaryBlockResolvedView = function RovoSummaryBlockResolvedView(
|
|
|
80
80
|
summariseUrl();
|
|
81
81
|
}, [status, summariseUrl]);
|
|
82
82
|
var minHeight = isSummarisedOnMountRef.current ? 0 : aiSummaryMinHeight;
|
|
83
|
+
if (status === 'error') {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
83
86
|
if (!showAISummary) {
|
|
84
87
|
return /*#__PURE__*/React.createElement(Inline, {
|
|
85
88
|
testId: "".concat(testId, "-placeholder"),
|
package/dist/esm/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)}
|
|
@@ -6,7 +6,7 @@ import "./index.compiled.css";
|
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
|
-
import {
|
|
9
|
+
import { InternalActionName } from '../../../../../constants';
|
|
10
10
|
import { useFlexibleCardContext } from '../../../../../state/flexible-ui-context';
|
|
11
11
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
12
12
|
import * as Actions from '../../actions';
|
|
@@ -16,7 +16,7 @@ import Block from '../block';
|
|
|
16
16
|
* Allowed footer actions for HoverCard, in display order. Fetched from context.
|
|
17
17
|
* @featureGate platform_sl_3p_auth_rovo_action_kill_switch
|
|
18
18
|
*/
|
|
19
|
-
var
|
|
19
|
+
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [InternalActionName.AISummaryAction, InternalActionName.RovoChatAction];
|
|
20
20
|
var ignoreContainerMarginStyles = null;
|
|
21
21
|
var elevatedFooterStyles = null;
|
|
22
22
|
var providerStyles = null;
|
|
@@ -44,7 +44,7 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
44
44
|
}
|
|
45
45
|
var arr = Object.keys(context.actions);
|
|
46
46
|
arr = arr.filter(function (name) {
|
|
47
|
-
return
|
|
47
|
+
return !HIDDEN_HOVER_CARD_FOOTER_ACTIONS.includes(name);
|
|
48
48
|
});
|
|
49
49
|
return arr.map(function (name) {
|
|
50
50
|
var Action = name in Actions ? Actions[name] : undefined;
|
|
@@ -56,7 +56,8 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
56
56
|
onClick: function onClick() {
|
|
57
57
|
return onActionClick === null || onActionClick === void 0 ? void 0 : onActionClick(name);
|
|
58
58
|
},
|
|
59
|
-
size: size
|
|
59
|
+
size: size,
|
|
60
|
+
iconSize: 'small'
|
|
60
61
|
}) : null;
|
|
61
62
|
});
|
|
62
63
|
}, [context === null || context === void 0 ? void 0 : context.actions, onActionClick, testId, size]);
|
|
@@ -68,11 +69,10 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
68
69
|
className: ax(["_4t3i1ejb _1e0c1txw _4cvr1h6o _1bah1y6m _vchhusvi _16jlkb7n"])
|
|
69
70
|
}, /*#__PURE__*/React.createElement(Provider, {
|
|
70
71
|
appearance: "subtle",
|
|
71
|
-
testId: "".concat(testId, "-provider")
|
|
72
|
-
iconSize: "large"
|
|
72
|
+
testId: "".concat(testId, "-provider")
|
|
73
73
|
})), actions.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
74
74
|
"data-testid": "".concat(testId, "-actions"),
|
|
75
|
-
className: ax(["_zulpidpf _1e0c1txw _18u01wug _4cvr1h6o _vchhusvi _7386ze3t
|
|
75
|
+
className: ax(["_zulpidpf _1e0c1txw _18u01wug _4cvr1h6o _vchhusvi _7386ze3t _1xdd12b0 _17zize3t _19p4ze3t _6zimze3t _f9lhze3t _rvy9ze3t _ue4dze3t _zgrbze3t _10cuze3t _6syfze3t _3hv7ze3t"])
|
|
76
76
|
}, actions) : null);
|
|
77
77
|
};
|
|
78
78
|
export default ResolvedHoverCardFooterBlock;
|
package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.compiled.css
CHANGED
|
@@ -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}
|
|
@@ -6,20 +6,17 @@ 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';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
|
-
import { IconType
|
|
10
|
+
import { IconType } from '../../../../../../constants';
|
|
12
11
|
import { messages } from '../../../../../../messages';
|
|
13
|
-
import {
|
|
12
|
+
import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
14
13
|
import AtlaskitIcon from '../../../common/atlaskit-icon';
|
|
15
14
|
import ImageIcon from '../../../common/image-icon';
|
|
16
15
|
import { withOverrideCss } from '../../../common/with-override-css';
|
|
17
16
|
import { getFormattedMessage } from '../../../utils';
|
|
18
17
|
var styles = {
|
|
19
18
|
container: "_zulp1b66 _1e0c116y _4cvr1h6o _1ul91ns9",
|
|
20
|
-
containerLarge: "_zulpu2gc _1e0c116y _4cvr1h6o _1ul91ns9",
|
|
21
19
|
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",
|
|
22
|
-
iconLarge: "_4t3i1tcg _bna71tcg _1xjx1tcg _17521tcg _1bsb1tcg _mezj1tcg _e2oo1tcg _w8l51tcg",
|
|
23
20
|
text: "_11c8wadc"
|
|
24
21
|
};
|
|
25
22
|
var colorMap = {
|
|
@@ -79,40 +76,13 @@ var BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
79
76
|
_ref$testId = _ref.testId,
|
|
80
77
|
testId = _ref$testId === void 0 ? 'smart-element-badge' : _ref$testId,
|
|
81
78
|
url = _ref.url,
|
|
82
|
-
color = _ref.color
|
|
83
|
-
_ref$iconSize = _ref.iconSize,
|
|
84
|
-
iconSize = _ref$iconSize === void 0 ? 'default' : _ref$iconSize;
|
|
79
|
+
color = _ref.color;
|
|
85
80
|
var ui = useFlexibleUiOptionContext();
|
|
86
81
|
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
87
82
|
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
88
83
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
89
84
|
return null;
|
|
90
85
|
}
|
|
91
|
-
if (iconSize === 'large' && fg('platform_sl_3p_auth_rovo_action_kill_switch')) {
|
|
92
|
-
var _context$actions;
|
|
93
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
94
|
-
var context = useFlexibleUiContext();
|
|
95
|
-
if (context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[InternalActionName.RovoChatAction]) {
|
|
96
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
97
|
-
"data-smart-element": name,
|
|
98
|
-
"data-smart-element-badge": true,
|
|
99
|
-
"data-testid": testId,
|
|
100
|
-
ref: ref,
|
|
101
|
-
style: {
|
|
102
|
-
color: color
|
|
103
|
-
},
|
|
104
|
-
className: ax([styles.containerLarge, colorMap[appearance]])
|
|
105
|
-
}, !hideIcon && /*#__PURE__*/React.createElement(Box, {
|
|
106
|
-
as: "span",
|
|
107
|
-
testId: "".concat(testId, "-large-icon-wrapper"),
|
|
108
|
-
xcss: styles.icon && styles.iconLarge
|
|
109
|
-
}, badgeIcon), /*#__PURE__*/React.createElement(Box, {
|
|
110
|
-
as: "span",
|
|
111
|
-
testId: "".concat(testId, "-label"),
|
|
112
|
-
xcss: styles.text
|
|
113
|
-
}, formattedMessageOrLabel));
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
86
|
return /*#__PURE__*/React.createElement("span", {
|
|
117
87
|
"data-smart-element": name,
|
|
118
88
|
"data-smart-element-badge": true,
|
|
@@ -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: "43.
|
|
18
|
+
packageVersion: "43.27.1",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|
package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TriggerProps } from '@atlaskit/tooltip';
|
|
2
2
|
import type { ActionStackItemProps } from './types';
|
|
3
|
-
declare const ActionButton: ({ content, icon: iconOption, isDisabled, isLoading, onClick: onClickCallback, size, space: spaceOption, testId, tooltipProps, style, }: ActionStackItemProps & {
|
|
3
|
+
declare const ActionButton: ({ content, icon: iconOption, isDisabled, isLoading, onClick: onClickCallback, size, space: spaceOption, testId, tooltipProps, style, ariaLabel }: ActionStackItemProps & {
|
|
4
4
|
tooltipProps?: TriggerProps;
|
|
5
5
|
}) => JSX.Element;
|
|
6
6
|
export default ActionButton;
|
|
@@ -55,6 +55,10 @@ export type ActionProps = {
|
|
|
55
55
|
* Determines where the icon should be rendered if text is provided.
|
|
56
56
|
*/
|
|
57
57
|
iconPosition?: 'before' | 'after';
|
|
58
|
+
/**
|
|
59
|
+
* Determines the size of the icon.
|
|
60
|
+
*/
|
|
61
|
+
iconSize?: 'small' | 'medium';
|
|
58
62
|
/**
|
|
59
63
|
* Determines whether the button displays as disabled.
|
|
60
64
|
*/
|
|
@@ -6,5 +6,5 @@ type AISummaryBlockResolvedViewProps = AISummaryBlockProps & {
|
|
|
6
6
|
url: string;
|
|
7
7
|
};
|
|
8
8
|
declare const AISummaryBlockResolvedView: (props: AISummaryBlockResolvedViewProps) => JSX.Element;
|
|
9
|
-
export declare const RovoSummaryBlockResolvedView: (props: AISummaryBlockResolvedViewProps) => JSX.Element;
|
|
9
|
+
export declare const RovoSummaryBlockResolvedView: (props: AISummaryBlockResolvedViewProps) => JSX.Element | null;
|
|
10
10
|
export default AISummaryBlockResolvedView;
|
package/dist/types/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts
CHANGED
|
@@ -29,10 +29,6 @@ export type BaseBadgeElementProps = ElementProps & {
|
|
|
29
29
|
* then the badge icon will fallback to the URL provided.
|
|
30
30
|
*/
|
|
31
31
|
icon?: IconType;
|
|
32
|
-
/**
|
|
33
|
-
* The size of the icon to display.
|
|
34
|
-
*/
|
|
35
|
-
iconSize?: 'default' | 'large';
|
|
36
32
|
/**
|
|
37
33
|
* The text to display for the badge.
|
|
38
34
|
*/
|
|
@@ -66,10 +62,6 @@ declare const _default: (props: ElementProps & {
|
|
|
66
62
|
* then the badge icon will fallback to the URL provided.
|
|
67
63
|
*/
|
|
68
64
|
icon?: IconType;
|
|
69
|
-
/**
|
|
70
|
-
* The size of the icon to display.
|
|
71
|
-
*/
|
|
72
|
-
iconSize?: "default" | "large";
|
|
73
65
|
/**
|
|
74
66
|
* The text to display for the badge.
|
|
75
67
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TriggerProps } from '@atlaskit/tooltip';
|
|
2
2
|
import type { ActionStackItemProps } from './types';
|
|
3
|
-
declare const ActionButton: ({ content, icon: iconOption, isDisabled, isLoading, onClick: onClickCallback, size, space: spaceOption, testId, tooltipProps, style, }: ActionStackItemProps & {
|
|
3
|
+
declare const ActionButton: ({ content, icon: iconOption, isDisabled, isLoading, onClick: onClickCallback, size, space: spaceOption, testId, tooltipProps, style, ariaLabel }: ActionStackItemProps & {
|
|
4
4
|
tooltipProps?: TriggerProps;
|
|
5
5
|
}) => JSX.Element;
|
|
6
6
|
export default ActionButton;
|
|
@@ -55,6 +55,10 @@ export type ActionProps = {
|
|
|
55
55
|
* Determines where the icon should be rendered if text is provided.
|
|
56
56
|
*/
|
|
57
57
|
iconPosition?: 'before' | 'after';
|
|
58
|
+
/**
|
|
59
|
+
* Determines the size of the icon.
|
|
60
|
+
*/
|
|
61
|
+
iconSize?: 'small' | 'medium';
|
|
58
62
|
/**
|
|
59
63
|
* Determines whether the button displays as disabled.
|
|
60
64
|
*/
|
package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ type AISummaryBlockResolvedViewProps = AISummaryBlockProps & {
|
|
|
6
6
|
url: string;
|
|
7
7
|
};
|
|
8
8
|
declare const AISummaryBlockResolvedView: (props: AISummaryBlockResolvedViewProps) => JSX.Element;
|
|
9
|
-
export declare const RovoSummaryBlockResolvedView: (props: AISummaryBlockResolvedViewProps) => JSX.Element;
|
|
9
|
+
export declare const RovoSummaryBlockResolvedView: (props: AISummaryBlockResolvedViewProps) => JSX.Element | null;
|
|
10
10
|
export default AISummaryBlockResolvedView;
|
package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts
CHANGED
|
@@ -29,10 +29,6 @@ export type BaseBadgeElementProps = ElementProps & {
|
|
|
29
29
|
* then the badge icon will fallback to the URL provided.
|
|
30
30
|
*/
|
|
31
31
|
icon?: IconType;
|
|
32
|
-
/**
|
|
33
|
-
* The size of the icon to display.
|
|
34
|
-
*/
|
|
35
|
-
iconSize?: 'default' | 'large';
|
|
36
32
|
/**
|
|
37
33
|
* The text to display for the badge.
|
|
38
34
|
*/
|
|
@@ -66,10 +62,6 @@ declare const _default: (props: ElementProps & {
|
|
|
66
62
|
* then the badge icon will fallback to the URL provided.
|
|
67
63
|
*/
|
|
68
64
|
icon?: IconType;
|
|
69
|
-
/**
|
|
70
|
-
* The size of the icon to display.
|
|
71
|
-
*/
|
|
72
|
-
iconSize?: "default" | "large";
|
|
73
65
|
/**
|
|
74
66
|
* The text to display for the badge.
|
|
75
67
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "43.27.
|
|
3
|
+
"version": "43.27.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"@atlaskit/lozenge": "^13.5.0",
|
|
61
61
|
"@atlaskit/menu": "^8.4.0",
|
|
62
62
|
"@atlaskit/modal-dialog": "^14.11.0",
|
|
63
|
+
"@atlaskit/motion": "^5.4.0",
|
|
63
64
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
64
65
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
65
66
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
"@atlaskit/textfield": "^8.2.0",
|
|
75
76
|
"@atlaskit/theme": "^22.0.0",
|
|
76
77
|
"@atlaskit/tile": "^1.0.0",
|
|
77
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
78
|
+
"@atlaskit/tmp-editor-statsig": "^44.1.0",
|
|
78
79
|
"@atlaskit/tokens": "^11.1.0",
|
|
79
80
|
"@atlaskit/tooltip": "^21.0.0",
|
|
80
81
|
"@atlaskit/ufo": "^0.4.0",
|