@atlaskit/smart-card 43.27.1 → 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 +8 -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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.27.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9b9ffb59d1419`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b9ffb59d1419) -
|
|
8
|
+
[ux] NAVX-3600 aligning new hovercard for rovo experiment with figma designs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 43.27.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -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
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "43.27.
|
|
14
|
+
packageVersion: "43.27.1"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -13,6 +13,7 @@ var React = _react;
|
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _css = require("@atlaskit/css");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
18
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
18
19
|
var _utils = require("../../../utils");
|
|
@@ -32,7 +33,8 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
32
33
|
spaceOption = _ref.space,
|
|
33
34
|
testId = _ref.testId,
|
|
34
35
|
tooltipProps = _ref.tooltipProps,
|
|
35
|
-
style = _ref.style
|
|
36
|
+
style = _ref.style,
|
|
37
|
+
ariaLabel = _ref.ariaLabel;
|
|
36
38
|
var space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : (0, _utils.getPrimitivesInlineSpaceBySize)(size);
|
|
37
39
|
var onClick = (0, _react.useCallback)(function () {
|
|
38
40
|
if (!isDisabled && !isLoading && onClickCallback) {
|
|
@@ -52,7 +54,9 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
52
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
53
55
|
,
|
|
54
56
|
style: style
|
|
55
|
-
}
|
|
57
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
58
|
+
"aria-label": ariaLabel
|
|
59
|
+
} : {}), /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
56
60
|
alignBlock: "center",
|
|
57
61
|
grow: "fill",
|
|
58
62
|
space: space
|
|
@@ -10,6 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactIntlNext = require("react-intl-next");
|
|
12
12
|
var _automation = _interopRequireDefault(require("@atlaskit/icon/core/automation"));
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
15
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
15
16
|
var _constants = require("../../../../../constants");
|
|
@@ -81,11 +82,13 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
81
82
|
var automationActionIconLabel = formatMessage(_messages.messages.automation_action_icon_label);
|
|
82
83
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
83
84
|
content: automationActionTitle,
|
|
84
|
-
icon: /*#__PURE__*/_react.default.createElement(_automation.default, {
|
|
85
|
+
icon: /*#__PURE__*/_react.default.createElement(_automation.default, (0, _extends2.default)({
|
|
85
86
|
spacing: "spacious",
|
|
86
87
|
color: "currentColor",
|
|
87
88
|
label: automationActionIconLabel
|
|
88
|
-
})
|
|
89
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
90
|
+
size: props.iconSize
|
|
91
|
+
} : {})),
|
|
89
92
|
testId: "smart-action-automation-action",
|
|
90
93
|
tooltipMessage: automationActionTooltip
|
|
91
94
|
}, props, {
|
|
@@ -66,11 +66,13 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
66
66
|
}, [data, invoke, onClickCallback]);
|
|
67
67
|
return data ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
68
68
|
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.copy_url_to_clipboard),
|
|
69
|
-
icon: /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
69
|
+
icon: /*#__PURE__*/_react.default.createElement(_link.default, (0, _extends2.default)({
|
|
70
70
|
color: "currentColor",
|
|
71
71
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
72
72
|
spacing: "spacious"
|
|
73
|
-
})
|
|
73
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
74
|
+
size: props.iconSize
|
|
75
|
+
} : {})),
|
|
74
76
|
onClick: onClick,
|
|
75
77
|
testId: "smart-action-copy-link-action",
|
|
76
78
|
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, tooltipMessage),
|
|
@@ -11,6 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _constants = require("../../../../../constants");
|
|
15
16
|
var _messages = require("../../../../../messages");
|
|
16
17
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
@@ -51,6 +52,7 @@ var getIcon = function getIcon(stackIconType) {
|
|
|
51
52
|
var FollowAction = function FollowAction(props) {
|
|
52
53
|
var _context$actions;
|
|
53
54
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
55
|
+
var intl = (0, _reactIntlNext.useIntl)();
|
|
54
56
|
var actionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.FollowAction];
|
|
55
57
|
if (!context || !actionData) {
|
|
56
58
|
return null;
|
|
@@ -83,7 +85,10 @@ var FollowAction = function FollowAction(props) {
|
|
|
83
85
|
});
|
|
84
86
|
};
|
|
85
87
|
return /*#__PURE__*/_react.default.createElement(_serverAction.default, (0, _extends2.default)({
|
|
86
|
-
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, label)
|
|
88
|
+
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, label)
|
|
89
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
90
|
+
ariaLabel: intl.formatMessage(label)
|
|
91
|
+
} : {}, {
|
|
87
92
|
icon: followIcon,
|
|
88
93
|
testId: "smart-action-follow-action",
|
|
89
94
|
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, tooltipMessage)
|
|
@@ -40,18 +40,22 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
40
40
|
var actionIcon = (0, _react.useCallback)(function () {
|
|
41
41
|
// Only use panel icon if experiment is enabled and hasPreviewPanel is true
|
|
42
42
|
if ((0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement(_panelRight.default, {
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_panelRight.default, (0, _extends2.default)({
|
|
44
44
|
color: "currentColor",
|
|
45
45
|
spacing: "spacious",
|
|
46
46
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
47
|
-
})
|
|
47
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
48
|
+
size: props.iconSize
|
|
49
|
+
} : {}));
|
|
48
50
|
}
|
|
49
|
-
return /*#__PURE__*/_react.default.createElement(_growDiagonal.default, {
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_growDiagonal.default, (0, _extends2.default)({
|
|
50
52
|
color: "currentColor",
|
|
51
53
|
spacing: "spacious",
|
|
52
54
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
56
|
+
size: props.iconSize
|
|
57
|
+
} : {}));
|
|
58
|
+
}, [hasPreviewPanel, props.iconSize]);
|
|
55
59
|
var actionLabel = (0, _react.useCallback)(function () {
|
|
56
60
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
57
61
|
if ((0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
@@ -10,6 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
14
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
14
15
|
var _messages = require("../../../../../messages");
|
|
15
16
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
@@ -47,8 +48,13 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
|
|
|
47
48
|
onClickCallback === null || onClickCallback === void 0 || onClickCallback();
|
|
48
49
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
49
50
|
return actionData ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
50
|
-
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_view_related_links)
|
|
51
|
-
|
|
51
|
+
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_view_related_links)
|
|
52
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
53
|
+
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_view_related_links)
|
|
54
|
+
} : {}, {
|
|
55
|
+
icon: /*#__PURE__*/_react.default.createElement(_relatedLinksActionIcon.default, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
56
|
+
iconSize: props.iconSize
|
|
57
|
+
} : {}),
|
|
52
58
|
onClick: onClick,
|
|
53
59
|
testId: "smart-action-view-related-links-action",
|
|
54
60
|
ariaLabel: "View most recent pages or content types coming from or found on this link"
|
|
@@ -8,11 +8,13 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _clock = _interopRequireDefault(require("@atlaskit/icon/core/clock"));
|
|
10
10
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
-
var RelatedLinksActionIcon = function RelatedLinksActionIcon() {
|
|
11
|
+
var RelatedLinksActionIcon = function RelatedLinksActionIcon(_ref) {
|
|
12
|
+
var iconSize = _ref.iconSize;
|
|
12
13
|
return /*#__PURE__*/_react.default.createElement(_clock.default, {
|
|
13
14
|
color: "currentColor",
|
|
14
15
|
spacing: "spacious",
|
|
15
|
-
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'View related links...'
|
|
16
|
+
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'View related links...',
|
|
17
|
+
size: iconSize
|
|
16
18
|
});
|
|
17
19
|
};
|
|
18
20
|
var _default = exports.default = RelatedLinksActionIcon;
|
|
@@ -11,14 +11,19 @@ require("./index.compiled.css");
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
16
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
17
|
+
var _motion = require("@atlaskit/motion");
|
|
16
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
19
|
var _constants = require("../../../../../constants");
|
|
18
20
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
21
|
+
var _useAiSummaryAction = _interopRequireDefault(require("../../../../../state/hooks/use-ai-summary-action"));
|
|
19
22
|
var Actions = _interopRequireWildcard(require("../../actions"));
|
|
20
23
|
var _actionFooter = require("./action-footer");
|
|
21
24
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
|
+
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; }
|
|
26
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
27
|
var ignoreContainerPaddingStyles = null;
|
|
23
28
|
var DEFAULT_SORT_ORDER = ['PreviewAction', 'CopyLinkAction', 'AISummaryAction'];
|
|
24
29
|
var sort = function sort(a, b) {
|
|
@@ -62,6 +67,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
62
67
|
is3PAuthRovoActionsExperimentOn = _ref.is3PAuthRovoActionsExperimentOn;
|
|
63
68
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
64
69
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
70
|
+
var url = context === null || context === void 0 ? void 0 : context.url;
|
|
65
71
|
var isRovoChatActionAvailable = is3PAuthRovoActionsExperimentOn && (0, _platformFeatureFlags.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[_constants.InternalActionName.RovoChatAction]) !== undefined : undefined;
|
|
66
72
|
var _useState = (0, _react.useState)(),
|
|
67
73
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -90,9 +96,15 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
90
96
|
return name !== _constants.InternalActionName.RovoChatAction;
|
|
91
97
|
}) : Object.keys(context.actions);
|
|
92
98
|
arr.sort(sort);
|
|
93
|
-
|
|
99
|
+
var renderAction = function renderAction(name, motionStyle) {
|
|
94
100
|
var Action = name in Actions ? Actions[name] : undefined;
|
|
95
|
-
|
|
101
|
+
if (!Action) {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
var style = padding || motionStyle ? _objectSpread(_objectSpread({}, motionStyle || {}), padding && {
|
|
105
|
+
paddingInline: padding
|
|
106
|
+
}) : undefined;
|
|
107
|
+
return /*#__PURE__*/React.createElement(Action, {
|
|
96
108
|
as: "stack-item",
|
|
97
109
|
spaceInline: spaceInline,
|
|
98
110
|
key: name,
|
|
@@ -104,14 +116,39 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
104
116
|
size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
|
|
105
117
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/no-unsafe-design-token-usage
|
|
106
118
|
,
|
|
107
|
-
style:
|
|
108
|
-
paddingInline: padding
|
|
109
|
-
},
|
|
119
|
+
style: style,
|
|
110
120
|
hideTooltip: isLoading
|
|
111
|
-
})
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
return isRovoChatActionAvailable && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? /*#__PURE__*/React.createElement(_motion.StaggeredEntrance, {
|
|
124
|
+
columns: 1
|
|
125
|
+
}, arr.map(function (name, index) {
|
|
126
|
+
return /*#__PURE__*/React.createElement(_motion.FadeIn, {
|
|
127
|
+
duration: 'large',
|
|
128
|
+
key: index
|
|
129
|
+
}, function (motion) {
|
|
130
|
+
return renderAction(name, motion.style);
|
|
131
|
+
});
|
|
132
|
+
})) : arr.map(function (name) {
|
|
133
|
+
return renderAction(name);
|
|
112
134
|
});
|
|
113
|
-
}, [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
|
|
114
|
-
|
|
135
|
+
}, [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]);
|
|
136
|
+
if (!(0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || !isRovoChatActionAvailable && actions || !url) {
|
|
137
|
+
return actions ? /*#__PURE__*/React.createElement("div", {
|
|
138
|
+
ref: blockRef,
|
|
139
|
+
"data-testid": testId
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
141
|
+
,
|
|
142
|
+
className: (0, _runtime.ax)(["_1e0c1txw _2lx21bp4 _vchhusvi _16jlkb7n _1bsb129b _18u01ivi _2hwxc10g", className])
|
|
143
|
+
}, actions, /*#__PURE__*/React.createElement(_actionFooter.ActionFooter, {
|
|
144
|
+
message: message,
|
|
145
|
+
testId: testId
|
|
146
|
+
})) : null;
|
|
147
|
+
}
|
|
148
|
+
var aiSummaryConfig = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
149
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
150
|
+
(0, _useAiSummaryAction.default)(url) : undefined;
|
|
151
|
+
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", {
|
|
115
152
|
ref: blockRef,
|
|
116
153
|
"data-testid": testId
|
|
117
154
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
@@ -89,6 +89,9 @@ var RovoSummaryBlockResolvedView = exports.RovoSummaryBlockResolvedView = functi
|
|
|
89
89
|
summariseUrl();
|
|
90
90
|
}, [status, summariseUrl]);
|
|
91
91
|
var minHeight = isSummarisedOnMountRef.current ? 0 : aiSummaryMinHeight;
|
|
92
|
+
if (status === 'error') {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
92
95
|
if (!showAISummary) {
|
|
93
96
|
return /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
94
97
|
testId: "".concat(testId, "-placeholder"),
|
package/dist/cjs/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)}
|
|
@@ -24,7 +24,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
24
24
|
* Allowed footer actions for HoverCard, in display order. Fetched from context.
|
|
25
25
|
* @featureGate platform_sl_3p_auth_rovo_action_kill_switch
|
|
26
26
|
*/
|
|
27
|
-
var
|
|
27
|
+
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [_constants.InternalActionName.AISummaryAction, _constants.InternalActionName.RovoChatAction];
|
|
28
28
|
var ignoreContainerMarginStyles = null;
|
|
29
29
|
var elevatedFooterStyles = null;
|
|
30
30
|
var providerStyles = null;
|
|
@@ -52,7 +52,7 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
52
52
|
}
|
|
53
53
|
var arr = Object.keys(context.actions);
|
|
54
54
|
arr = arr.filter(function (name) {
|
|
55
|
-
return
|
|
55
|
+
return !HIDDEN_HOVER_CARD_FOOTER_ACTIONS.includes(name);
|
|
56
56
|
});
|
|
57
57
|
return arr.map(function (name) {
|
|
58
58
|
var Action = name in Actions ? Actions[name] : undefined;
|
|
@@ -64,7 +64,8 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
64
64
|
onClick: function onClick() {
|
|
65
65
|
return onActionClick === null || onActionClick === void 0 ? void 0 : onActionClick(name);
|
|
66
66
|
},
|
|
67
|
-
size: size
|
|
67
|
+
size: size,
|
|
68
|
+
iconSize: 'small'
|
|
68
69
|
}) : null;
|
|
69
70
|
});
|
|
70
71
|
}, [context === null || context === void 0 ? void 0 : context.actions, onActionClick, testId, size]);
|
|
@@ -76,11 +77,10 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
76
77
|
className: (0, _runtime.ax)(["_4t3i1ejb _1e0c1txw _4cvr1h6o _1bah1y6m _vchhusvi _16jlkb7n"])
|
|
77
78
|
}, /*#__PURE__*/React.createElement(_elements.Provider, {
|
|
78
79
|
appearance: "subtle",
|
|
79
|
-
testId: "".concat(testId, "-provider")
|
|
80
|
-
iconSize: "large"
|
|
80
|
+
testId: "".concat(testId, "-provider")
|
|
81
81
|
})), actions.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
82
82
|
"data-testid": "".concat(testId, "-actions"),
|
|
83
|
-
className: (0, _runtime.ax)(["_zulpidpf _1e0c1txw _18u01wug _4cvr1h6o _vchhusvi _7386ze3t
|
|
83
|
+
className: (0, _runtime.ax)(["_zulpidpf _1e0c1txw _18u01wug _4cvr1h6o _vchhusvi _7386ze3t _1xdd12b0 _17zize3t _19p4ze3t _6zimze3t _f9lhze3t _rvy9ze3t _ue4dze3t _zgrbze3t _10cuze3t _6syfze3t _3hv7ze3t"])
|
|
84
84
|
}, actions) : null);
|
|
85
85
|
};
|
|
86
86
|
var _default = exports.default = ResolvedHoverCardFooterBlock;
|
package/dist/cjs/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}
|
|
@@ -11,7 +11,6 @@ require("./index.compiled.css");
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
15
|
var _constants = require("../../../../../../constants");
|
|
17
16
|
var _messages = require("../../../../../../messages");
|
|
@@ -25,9 +24,7 @@ var _messageMapper;
|
|
|
25
24
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
26
25
|
var styles = {
|
|
27
26
|
container: "_zulp1b66 _1e0c116y _4cvr1h6o _1ul91ns9",
|
|
28
|
-
containerLarge: "_zulpu2gc _1e0c116y _4cvr1h6o _1ul91ns9",
|
|
29
27
|
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",
|
|
30
|
-
iconLarge: "_4t3i1tcg _bna71tcg _1xjx1tcg _17521tcg _1bsb1tcg _mezj1tcg _e2oo1tcg _w8l51tcg",
|
|
31
28
|
text: "_11c8wadc"
|
|
32
29
|
};
|
|
33
30
|
var colorMap = {
|
|
@@ -87,40 +84,13 @@ var BaseBadgeRefreshNew = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
87
84
|
_ref$testId = _ref.testId,
|
|
88
85
|
testId = _ref$testId === void 0 ? 'smart-element-badge' : _ref$testId,
|
|
89
86
|
url = _ref.url,
|
|
90
|
-
color = _ref.color
|
|
91
|
-
_ref$iconSize = _ref.iconSize,
|
|
92
|
-
iconSize = _ref$iconSize === void 0 ? 'default' : _ref$iconSize;
|
|
87
|
+
color = _ref.color;
|
|
93
88
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
94
89
|
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
95
90
|
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
96
91
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
97
92
|
return null;
|
|
98
93
|
}
|
|
99
|
-
if (iconSize === 'large' && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')) {
|
|
100
|
-
var _context$actions;
|
|
101
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
102
|
-
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
103
|
-
if (context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[_constants.InternalActionName.RovoChatAction]) {
|
|
104
|
-
return /*#__PURE__*/_react.default.createElement("span", {
|
|
105
|
-
"data-smart-element": name,
|
|
106
|
-
"data-smart-element-badge": true,
|
|
107
|
-
"data-testid": testId,
|
|
108
|
-
ref: ref,
|
|
109
|
-
style: {
|
|
110
|
-
color: color
|
|
111
|
-
},
|
|
112
|
-
className: (0, _runtime.ax)([styles.containerLarge, colorMap[appearance]])
|
|
113
|
-
}, !hideIcon && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
114
|
-
as: "span",
|
|
115
|
-
testId: "".concat(testId, "-large-icon-wrapper"),
|
|
116
|
-
xcss: styles.icon && styles.iconLarge
|
|
117
|
-
}, badgeIcon), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
118
|
-
as: "span",
|
|
119
|
-
testId: "".concat(testId, "-label"),
|
|
120
|
-
xcss: styles.text
|
|
121
|
-
}, formattedMessageOrLabel));
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
94
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
125
95
|
"data-smart-element": name,
|
|
126
96
|
"data-smart-element-badge": true,
|
|
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
22
22
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
23
23
|
var PACKAGE_DATA = {
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "43.27.
|
|
25
|
+
packageVersion: "43.27.1",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.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
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "43.27.
|
|
5
|
+
packageVersion: "43.27.1"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
package/dist/es2019/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 @@ const ActionButton = ({
|
|
|
23
24
|
space: spaceOption,
|
|
24
25
|
testId,
|
|
25
26
|
tooltipProps,
|
|
26
|
-
style
|
|
27
|
+
style,
|
|
28
|
+
ariaLabel
|
|
27
29
|
}) => {
|
|
28
30
|
const space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : getPrimitivesInlineSpaceBySize(size);
|
|
29
31
|
const onClick = useCallback(() => {
|
|
@@ -44,7 +46,9 @@ const ActionButton = ({
|
|
|
44
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
45
47
|
,
|
|
46
48
|
style: style
|
|
47
|
-
}
|
|
49
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
50
|
+
"aria-label": ariaLabel
|
|
51
|
+
} : {}), /*#__PURE__*/React.createElement(Inline, {
|
|
48
52
|
alignBlock: "center",
|
|
49
53
|
grow: "fill",
|
|
50
54
|
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';
|
|
@@ -71,11 +72,13 @@ const AutomationAction = props => {
|
|
|
71
72
|
const automationActionIconLabel = formatMessage(messages.automation_action_icon_label);
|
|
72
73
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Action, _extends({
|
|
73
74
|
content: automationActionTitle,
|
|
74
|
-
icon: /*#__PURE__*/React.createElement(AutomationIcon, {
|
|
75
|
+
icon: /*#__PURE__*/React.createElement(AutomationIcon, _extends({
|
|
75
76
|
spacing: "spacious",
|
|
76
77
|
color: "currentColor",
|
|
77
78
|
label: automationActionIconLabel
|
|
78
|
-
})
|
|
79
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
80
|
+
size: props.iconSize
|
|
81
|
+
} : {})),
|
|
79
82
|
testId: "smart-action-automation-action",
|
|
80
83
|
tooltipMessage: automationActionTooltip
|
|
81
84
|
}, props, {
|
|
@@ -32,11 +32,13 @@ const CopyLinkAction = ({
|
|
|
32
32
|
}, [data, invoke, onClickCallback]);
|
|
33
33
|
return data ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
34
34
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.copy_url_to_clipboard),
|
|
35
|
-
icon: /*#__PURE__*/React.createElement(LinkIcon, {
|
|
35
|
+
icon: /*#__PURE__*/React.createElement(LinkIcon, _extends({
|
|
36
36
|
color: "currentColor",
|
|
37
37
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
38
38
|
spacing: "spacious"
|
|
39
|
-
})
|
|
39
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
40
|
+
size: props.iconSize
|
|
41
|
+
} : {})),
|
|
40
42
|
onClick: onClick,
|
|
41
43
|
testId: "smart-action-copy-link-action",
|
|
42
44
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage),
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
3
|
+
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { ActionName } from '../../../../../constants';
|
|
6
7
|
import { messages } from '../../../../../messages';
|
|
7
8
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -30,6 +31,7 @@ const getIcon = stackIconType => {
|
|
|
30
31
|
const FollowAction = props => {
|
|
31
32
|
var _context$actions;
|
|
32
33
|
const context = useFlexibleUiContext();
|
|
34
|
+
const intl = useIntl();
|
|
33
35
|
const actionData = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.FollowAction];
|
|
34
36
|
if (!context || !actionData) {
|
|
35
37
|
return null;
|
|
@@ -66,7 +68,10 @@ const FollowAction = props => {
|
|
|
66
68
|
});
|
|
67
69
|
};
|
|
68
70
|
return /*#__PURE__*/React.createElement(ServerAction, _extends({
|
|
69
|
-
content: /*#__PURE__*/React.createElement(FormattedMessage, label)
|
|
71
|
+
content: /*#__PURE__*/React.createElement(FormattedMessage, label)
|
|
72
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
73
|
+
ariaLabel: intl.formatMessage(label)
|
|
74
|
+
} : {}, {
|
|
70
75
|
icon: followIcon,
|
|
71
76
|
testId: "smart-action-follow-action",
|
|
72
77
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage)
|