@atlaskit/smart-card 43.31.5 → 43.31.7
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 +13 -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.compiled.css +5 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +5 -2
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +5 -1
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +50 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +6 -38
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +14 -33
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +43 -37
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -4
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +4 -8
- 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.compiled.css +5 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +5 -2
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +6 -2
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +31 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +6 -34
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +11 -29
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +44 -38
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -4
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +4 -8
- 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.compiled.css +5 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +9 -2
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +5 -2
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +6 -2
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +47 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +6 -38
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +13 -32
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +44 -38
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -4
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +4 -8
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.d.ts +3 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +2 -10
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +4 -7
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +2 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +4 -7
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -1
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.31.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`cb48dc37bffa1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cb48dc37bffa1) -
|
|
8
|
+
[ux] Remove auto generate AI summary for platform_sl_3p_auth_rovo_action experiment
|
|
9
|
+
|
|
10
|
+
## 43.31.6
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 43.31.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:e1e36e1aa7f05bb230d6a7c63bbe6e7538b66e2f912f9eb7068e1a5880ddde9a
|
|
3
|
+
size 27485
|
|
@@ -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.31.
|
|
14
|
+
packageVersion: "43.31.6"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,11 @@
|
|
|
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
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
3
|
+
._1bah1h6o{justify-content:center}
|
|
3
4
|
._1bsb1osq{width:100%}
|
|
5
|
+
._1bsb1tcg{width:24px}
|
|
6
|
+
._1e0c116y{display:inline-flex}
|
|
7
|
+
._4cvr1h6o{align-items:center}
|
|
8
|
+
._4t3i1tcg{height:24px}
|
|
4
9
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
5
10
|
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
6
11
|
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -16,12 +16,14 @@ var _css = require("@atlaskit/css");
|
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
18
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
19
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
19
20
|
var _utils = require("../../../utils");
|
|
20
21
|
var _actionIcon = _interopRequireDefault(require("../action-icon"));
|
|
21
22
|
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); }
|
|
22
23
|
var styles = {
|
|
23
24
|
button: "_bfhksm61 _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66 _1bsb1osq _1ah31i6y _irr31dpa _1di6fcek",
|
|
24
|
-
content: "_11c8wadc _syazi7uo"
|
|
25
|
+
content: "_11c8wadc _syazi7uo",
|
|
26
|
+
spinner: "_1bsb1tcg _4t3i1tcg _1e0c116y _4cvr1h6o _1bah1h6o"
|
|
25
27
|
};
|
|
26
28
|
var ActionButton = function ActionButton(_ref) {
|
|
27
29
|
var content = _ref.content,
|
|
@@ -42,7 +44,12 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
42
44
|
}
|
|
43
45
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
44
46
|
var icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(_actionIcon.default, {
|
|
45
|
-
icon: /*#__PURE__*/React.createElement(
|
|
47
|
+
icon: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
48
|
+
xcss: styles.spinner
|
|
49
|
+
}, /*#__PURE__*/React.createElement(_spinner.default, {
|
|
50
|
+
size: 16,
|
|
51
|
+
testId: "".concat(testId, "-loading")
|
|
52
|
+
})) : /*#__PURE__*/React.createElement(_spinner.default, {
|
|
46
53
|
testId: "".concat(testId, "-loading")
|
|
47
54
|
})
|
|
48
55
|
}) : iconOption;
|
package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js
CHANGED
|
@@ -11,6 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactIntlNext = require("react-intl-next");
|
|
13
13
|
var _atlassianIntelligence = _interopRequireDefault(require("@atlaskit/icon/core/atlassian-intelligence"));
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
15
16
|
var _messages = require("../../../../../messages");
|
|
16
17
|
var _action = _interopRequireDefault(require("../action"));
|
|
@@ -44,11 +45,13 @@ function AISummariseAction(_ref) {
|
|
|
44
45
|
}, [fireEvent, onClickCallback, onCompleted, summariseUrl]);
|
|
45
46
|
return /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
46
47
|
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.ai_summary_action),
|
|
47
|
-
icon: /*#__PURE__*/_react.default.createElement(_atlassianIntelligence.default, {
|
|
48
|
+
icon: /*#__PURE__*/_react.default.createElement(_atlassianIntelligence.default, (0, _extends2.default)({
|
|
48
49
|
spacing: "spacious",
|
|
49
50
|
color: "currentColor",
|
|
50
51
|
label: "Summarise with AI"
|
|
51
|
-
})
|
|
52
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
53
|
+
size: props.iconSize
|
|
54
|
+
} : {})),
|
|
52
55
|
onClick: handleActionClick,
|
|
53
56
|
testId: "".concat(testId, "-summarise-action"),
|
|
54
57
|
isLoading: status === 'loading',
|
|
@@ -9,6 +9,7 @@ exports.AISummaryActionComponent = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _useAiSummaryAction = _interopRequireDefault(require("../../../../../state/hooks/use-ai-summary-action"));
|
|
13
14
|
var _aiSummariseAction = require("./ai-summarise-action");
|
|
14
15
|
var _copySummaryAction = require("./copy-summary-action");
|
|
@@ -26,7 +27,10 @@ var AISummaryActionComponent = exports.AISummaryActionComponent = function AISum
|
|
|
26
27
|
(0, _react.useEffect)(function () {
|
|
27
28
|
onLoadingChange === null || onLoadingChange === void 0 || onLoadingChange(status === 'loading');
|
|
28
29
|
}, [onLoadingChange, status]);
|
|
29
|
-
return status === 'done' ? /*#__PURE__*/_react.default.createElement(_copySummaryAction.
|
|
30
|
+
return status === 'done' ? (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? /*#__PURE__*/_react.default.createElement(_copySummaryAction.CopySummaryActionNew, (0, _extends2.default)({}, props, {
|
|
31
|
+
summary: content,
|
|
32
|
+
testId: testId
|
|
33
|
+
})) : /*#__PURE__*/_react.default.createElement(_copySummaryAction.CopySummaryAction, (0, _extends2.default)({}, props, {
|
|
30
34
|
testId: testId,
|
|
31
35
|
content: content
|
|
32
36
|
})) : /*#__PURE__*/_react.default.createElement(_aiSummariseAction.AISummariseAction, (0, _extends2.default)({}, props, {
|
package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.CopySummaryAction = CopySummaryAction;
|
|
9
|
+
exports.CopySummaryActionNew = CopySummaryActionNew;
|
|
9
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -14,10 +15,11 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
14
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
16
|
var _reactIntlNext = require("react-intl-next");
|
|
16
17
|
var _copy = _interopRequireDefault(require("@atlaskit/icon/core/copy"));
|
|
17
|
-
var
|
|
18
|
+
var _useAnalyticsEvents3 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
18
19
|
var _messages = require("../../../../../messages");
|
|
19
20
|
var _action = _interopRequireDefault(require("../action"));
|
|
20
|
-
var _excluded = ["url", "onClick", "testId", "content"]
|
|
21
|
+
var _excluded = ["url", "onClick", "testId", "content"],
|
|
22
|
+
_excluded2 = ["url", "onClick", "summary", "testId"];
|
|
21
23
|
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); }
|
|
22
24
|
function CopySummaryAction(_ref) {
|
|
23
25
|
var url = _ref.url,
|
|
@@ -25,7 +27,7 @@ function CopySummaryAction(_ref) {
|
|
|
25
27
|
testId = _ref.testId,
|
|
26
28
|
content = _ref.content,
|
|
27
29
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
28
|
-
var _useAnalyticsEvents = (0,
|
|
30
|
+
var _useAnalyticsEvents = (0, _useAnalyticsEvents3.useAnalyticsEvents)(),
|
|
29
31
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
30
32
|
var _useState = (0, _react.useState)(_messages.messages.copy_summary_action_description),
|
|
31
33
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -61,4 +63,49 @@ function CopySummaryAction(_ref) {
|
|
|
61
63
|
return setTooltipMessage(_messages.messages.copy_summary_action_description);
|
|
62
64
|
}
|
|
63
65
|
}, props));
|
|
66
|
+
}
|
|
67
|
+
function CopySummaryActionNew(_ref3) {
|
|
68
|
+
var url = _ref3.url,
|
|
69
|
+
onClickCallback = _ref3.onClick,
|
|
70
|
+
_ref3$summary = _ref3.summary,
|
|
71
|
+
summary = _ref3$summary === void 0 ? '' : _ref3$summary,
|
|
72
|
+
testId = _ref3.testId,
|
|
73
|
+
props = (0, _objectWithoutProperties2.default)(_ref3, _excluded2);
|
|
74
|
+
var _useAnalyticsEvents2 = (0, _useAnalyticsEvents3.useAnalyticsEvents)(),
|
|
75
|
+
fireEvent = _useAnalyticsEvents2.fireEvent;
|
|
76
|
+
var _useState3 = (0, _react.useState)(_messages.messages.copy_summary_action_description),
|
|
77
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
78
|
+
tooltipMessage = _useState4[0],
|
|
79
|
+
setTooltipMessage = _useState4[1];
|
|
80
|
+
var handleCopySummaryClick = (0, _react.useCallback)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
81
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
82
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
fireEvent('ui.button.clicked.copySummary', {});
|
|
85
|
+
_context2.next = 3;
|
|
86
|
+
return navigator.clipboard.writeText(summary);
|
|
87
|
+
case 3:
|
|
88
|
+
setTooltipMessage(_messages.messages.copied_summary_action_description);
|
|
89
|
+
onClickCallback === null || onClickCallback === void 0 || onClickCallback();
|
|
90
|
+
case 5:
|
|
91
|
+
case "end":
|
|
92
|
+
return _context2.stop();
|
|
93
|
+
}
|
|
94
|
+
}, _callee2);
|
|
95
|
+
})), [fireEvent, onClickCallback, summary]);
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
97
|
+
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.copy_summary_action),
|
|
98
|
+
icon: /*#__PURE__*/_react.default.createElement(_copy.default, {
|
|
99
|
+
color: "currentColor",
|
|
100
|
+
spacing: "spacious",
|
|
101
|
+
label: "Copy Summary",
|
|
102
|
+
size: props.iconSize
|
|
103
|
+
}),
|
|
104
|
+
onClick: handleCopySummaryClick,
|
|
105
|
+
testId: "".concat(testId, "-copy-summary-action"),
|
|
106
|
+
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, tooltipMessage),
|
|
107
|
+
tooltipOnHide: function tooltipOnHide() {
|
|
108
|
+
return setTooltipMessage(_messages.messages.copy_summary_action_description);
|
|
109
|
+
}
|
|
110
|
+
}, props));
|
|
64
111
|
}
|
|
@@ -11,19 +11,14 @@ 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"));
|
|
15
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
15
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
17
|
-
var _motion = require("@atlaskit/motion");
|
|
18
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
17
|
var _constants = require("../../../../../constants");
|
|
20
18
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
21
|
-
var _useAiSummaryAction = _interopRequireDefault(require("../../../../../state/hooks/use-ai-summary-action"));
|
|
22
19
|
var Actions = _interopRequireWildcard(require("../../actions"));
|
|
23
20
|
var _actionFooter = require("./action-footer");
|
|
24
21
|
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; }
|
|
27
22
|
var ignoreContainerPaddingStyles = null;
|
|
28
23
|
var DEFAULT_SORT_ORDER = ['PreviewAction', 'CopyLinkAction', 'AISummaryAction'];
|
|
29
24
|
var sort = function sort(a, b) {
|
|
@@ -67,7 +62,6 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
67
62
|
is3PAuthRovoActionsExperimentOn = _ref.is3PAuthRovoActionsExperimentOn;
|
|
68
63
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
69
64
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
70
|
-
var url = context === null || context === void 0 ? void 0 : context.url;
|
|
71
65
|
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;
|
|
72
66
|
var _useState = (0, _react.useState)(),
|
|
73
67
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -96,14 +90,11 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
96
90
|
return name !== _constants.InternalActionName.RovoChatAction;
|
|
97
91
|
}) : Object.keys(context.actions);
|
|
98
92
|
arr.sort(sort);
|
|
99
|
-
var renderAction = function renderAction(name
|
|
93
|
+
var renderAction = function renderAction(name) {
|
|
100
94
|
var Action = name in Actions ? Actions[name] : undefined;
|
|
101
95
|
if (!Action) {
|
|
102
96
|
return null;
|
|
103
97
|
}
|
|
104
|
-
var style = padding || motionStyle ? _objectSpread(_objectSpread({}, motionStyle || {}), padding && {
|
|
105
|
-
paddingInline: padding
|
|
106
|
-
}) : undefined;
|
|
107
98
|
return /*#__PURE__*/React.createElement(Action, {
|
|
108
99
|
as: "stack-item",
|
|
109
100
|
spaceInline: spaceInline,
|
|
@@ -114,41 +105,18 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
114
105
|
onError: onError,
|
|
115
106
|
onLoadingChange: onLoadingChange,
|
|
116
107
|
size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
|
|
117
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
118
109
|
,
|
|
119
|
-
style:
|
|
110
|
+
style: padding && {
|
|
111
|
+
paddingInline: padding
|
|
112
|
+
},
|
|
120
113
|
hideTooltip: isLoading
|
|
121
114
|
});
|
|
122
115
|
};
|
|
123
|
-
return
|
|
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) {
|
|
116
|
+
return arr.map(function (name) {
|
|
133
117
|
return renderAction(name);
|
|
134
118
|
});
|
|
135
119
|
}, [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]);
|
|
136
|
-
var aiSummaryConfig = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
137
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
138
|
-
(0, _useAiSummaryAction.default)(url !== null && url !== void 0 ? url : '') : undefined;
|
|
139
|
-
if ((0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')) {
|
|
140
|
-
var shouldShowActions = !isRovoChatActionAvailable || isRovoChatActionAvailable && ((aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.state.status) === 'done' || (aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.state.status) === 'error');
|
|
141
|
-
return actions && shouldShowActions ? /*#__PURE__*/React.createElement("div", {
|
|
142
|
-
ref: blockRef,
|
|
143
|
-
"data-testid": testId
|
|
144
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
145
|
-
,
|
|
146
|
-
className: (0, _runtime.ax)(["_1e0c1txw _2lx21bp4 _vchhusvi _16jlkb7n _1bsb129b _18u01ivi _2hwxc10g", className])
|
|
147
|
-
}, actions, /*#__PURE__*/React.createElement(_actionFooter.ActionFooter, {
|
|
148
|
-
message: message,
|
|
149
|
-
testId: testId
|
|
150
|
-
})) : null;
|
|
151
|
-
}
|
|
152
120
|
return actions ? /*#__PURE__*/React.createElement("div", {
|
|
153
121
|
ref: blockRef,
|
|
154
122
|
"data-testid": testId
|
|
@@ -5,15 +5,14 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _constants = require("../../../../../constants");
|
|
13
13
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
14
14
|
var _resolved = _interopRequireWildcard(require("./resolved"));
|
|
15
|
-
var _excluded = ["testId"]
|
|
16
|
-
_excluded2 = ["testId", "url"];
|
|
15
|
+
var _excluded = ["is3PAuthRovoActionsExperimentOn", "testId"];
|
|
17
16
|
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); }
|
|
18
17
|
/**
|
|
19
18
|
* Represents an AISummaryBlock, designed to summarising link resource
|
|
@@ -23,8 +22,9 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
23
22
|
* @see Block
|
|
24
23
|
*/
|
|
25
24
|
var AISummaryBlock = function AISummaryBlock(_ref) {
|
|
26
|
-
var _context$actions, _props$
|
|
27
|
-
var
|
|
25
|
+
var _context$actions, _props$size2, _cardContext$ui2;
|
|
26
|
+
var is3PAuthRovoActionsExperimentOn = _ref.is3PAuthRovoActionsExperimentOn,
|
|
27
|
+
_ref$testId = _ref.testId,
|
|
28
28
|
testId = _ref$testId === void 0 ? 'smart-ai-summary-block' : _ref$testId,
|
|
29
29
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
30
30
|
var cardContext = (0, _flexibleUiContext.useFlexibleCardContext)();
|
|
@@ -36,37 +36,18 @@ var AISummaryBlock = function AISummaryBlock(_ref) {
|
|
|
36
36
|
if (!(actionData !== null && actionData !== void 0 && actionData.url)) {
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Represents an AISummaryBlock, designed to summarising link resource
|
|
48
|
-
* content using AI.
|
|
49
|
-
* @public
|
|
50
|
-
* @param {RovoSummaryBlockProps} RovoSummaryBlock
|
|
51
|
-
* @see Block
|
|
52
|
-
*/
|
|
53
|
-
var RovoSummaryBlock = exports.RovoSummaryBlock = function RovoSummaryBlock(_ref2) {
|
|
54
|
-
var _props$size2, _cardContext$ui2;
|
|
55
|
-
var _ref2$testId = _ref2.testId,
|
|
56
|
-
testId = _ref2$testId === void 0 ? 'smart-ai-summary-block' : _ref2$testId,
|
|
57
|
-
url = _ref2.url,
|
|
58
|
-
props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
59
|
-
var cardContext = (0, _flexibleUiContext.useFlexibleCardContext)();
|
|
60
|
-
if ((cardContext === null || cardContext === void 0 ? void 0 : cardContext.status) !== _constants.SmartLinkStatus.Resolved) {
|
|
61
|
-
return null;
|
|
39
|
+
if (is3PAuthRovoActionsExperimentOn) {
|
|
40
|
+
var _props$size, _cardContext$ui;
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_resolved.RovoSummaryBlockResolvedView, (0, _extends2.default)({}, props, {
|
|
42
|
+
size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : cardContext === null || cardContext === void 0 || (_cardContext$ui = cardContext.ui) === null || _cardContext$ui === void 0 ? void 0 : _cardContext$ui.size,
|
|
43
|
+
testId: testId,
|
|
44
|
+
url: actionData.url
|
|
45
|
+
}));
|
|
62
46
|
}
|
|
63
|
-
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
return /*#__PURE__*/_react.default.createElement(_resolved.RovoSummaryBlockResolvedView, (0, _extends2.default)({}, props, {
|
|
47
|
+
return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, props, {
|
|
67
48
|
size: (_props$size2 = props.size) !== null && _props$size2 !== void 0 ? _props$size2 : cardContext === null || cardContext === void 0 || (_cardContext$ui2 = cardContext.ui) === null || _cardContext$ui2 === void 0 ? void 0 : _cardContext$ui2.size,
|
|
68
49
|
testId: testId,
|
|
69
|
-
url: url
|
|
50
|
+
url: actionData.url
|
|
70
51
|
}));
|
|
71
52
|
};
|
|
72
53
|
var _default = exports.default = AISummaryBlock;
|
|
@@ -71,29 +71,51 @@ var RovoSummaryBlockResolvedView = exports.RovoSummaryBlockResolvedView = functi
|
|
|
71
71
|
var testId = props.testId,
|
|
72
72
|
_props$aiSummaryMinHe2 = props.aiSummaryMinHeight,
|
|
73
73
|
aiSummaryMinHeight = _props$aiSummaryMinHe2 === void 0 ? 0 : _props$aiSummaryMinHe2,
|
|
74
|
+
placeholder = props.placeholder,
|
|
74
75
|
url = props.url;
|
|
75
76
|
var _useAISummaryAction2 = (0, _useAiSummaryAction.default)(url),
|
|
76
77
|
_useAISummaryAction2$ = _useAISummaryAction2.state,
|
|
77
78
|
content = _useAISummaryAction2$.content,
|
|
78
|
-
status = _useAISummaryAction2$.status
|
|
79
|
-
summariseUrl = _useAISummaryAction2.summariseUrl;
|
|
80
|
-
var showAISummary = status === 'done' ||
|
|
81
|
-
// We want to display the AI Summary component only when there is content available during the loading process.
|
|
82
|
-
status === 'loading' && !!content;
|
|
79
|
+
status = _useAISummaryAction2$.status;
|
|
83
80
|
var isSummarisedOnMountRef = (0, _react.useRef)(status === 'done');
|
|
84
|
-
(0, _react.useEffect)(function () {
|
|
85
|
-
if (status !== 'ready' || isSummarisedOnMountRef.current) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
isSummarisedOnMountRef.current = true;
|
|
89
|
-
summariseUrl();
|
|
90
|
-
}, [status, summariseUrl]);
|
|
91
81
|
var minHeight = isSummarisedOnMountRef.current ? 0 : aiSummaryMinHeight;
|
|
92
82
|
if (status === 'error') {
|
|
93
83
|
return null;
|
|
94
84
|
}
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
|
|
86
|
+
// Show summary when there is content to display
|
|
87
|
+
if (content && content !== '') {
|
|
88
|
+
return /*#__PURE__*/React.createElement(_block.default, (0, _extends2.default)({}, props, {
|
|
89
|
+
direction: _constants.SmartLinkDirection.Vertical,
|
|
90
|
+
testId: "".concat(testId, "-resolved-view"),
|
|
91
|
+
className: (0, _runtime.ax)(["_1reoewfl _18m9ewfl"])
|
|
92
|
+
}), /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
93
|
+
xcss: newStyles.summaryWrapper
|
|
94
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
95
|
+
className: (0, _runtime.ax)([newStyles.iconWrapper])
|
|
96
|
+
}, /*#__PURE__*/React.createElement(_logo.RovoIcon, {
|
|
97
|
+
shouldUseHexLogo: true,
|
|
98
|
+
size: "xxsmall"
|
|
99
|
+
})), status === 'done' && /*#__PURE__*/React.createElement(_aiEventSummaryViewed.default, {
|
|
100
|
+
fromCache: isSummarisedOnMountRef.current
|
|
101
|
+
}), /*#__PURE__*/React.createElement(_motionWrapper.default, {
|
|
102
|
+
minHeight: minHeight,
|
|
103
|
+
show: true,
|
|
104
|
+
showTransition: !isSummarisedOnMountRef.current
|
|
105
|
+
}, /*#__PURE__*/React.createElement(_aiSummary.default, {
|
|
106
|
+
testId: "".concat(testId, "-ai-summary"),
|
|
107
|
+
minHeight: minHeight,
|
|
108
|
+
content: content
|
|
109
|
+
}), status === 'done' && /*#__PURE__*/React.createElement(_aiFooter.default, null))));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Show loading state on initial request where content hasn't returned yet.
|
|
113
|
+
if (status === 'loading') {
|
|
114
|
+
return /*#__PURE__*/React.createElement(_motionWrapper.default, {
|
|
115
|
+
minHeight: minHeight,
|
|
116
|
+
show: true,
|
|
117
|
+
showTransition: true
|
|
118
|
+
}, /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
97
119
|
testId: "".concat(testId, "-placeholder"),
|
|
98
120
|
xcss: newStyles.placeholderWrapper
|
|
99
121
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -108,29 +130,13 @@ var RovoSummaryBlockResolvedView = exports.RovoSummaryBlockResolvedView = functi
|
|
|
108
130
|
xcss: newStyles.ellipsesContainer
|
|
109
131
|
}, /*#__PURE__*/React.createElement(_ellipses.EllipsesAnimation, {
|
|
110
132
|
isAnimated: true
|
|
111
|
-
})));
|
|
133
|
+
}))));
|
|
112
134
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
120
|
-
className: (0, _runtime.ax)([newStyles.iconWrapper])
|
|
121
|
-
}, /*#__PURE__*/React.createElement(_logo.RovoIcon, {
|
|
122
|
-
shouldUseHexLogo: true,
|
|
123
|
-
size: 'xxsmall'
|
|
124
|
-
})), status === 'done' && /*#__PURE__*/React.createElement(_aiEventSummaryViewed.default, {
|
|
125
|
-
fromCache: isSummarisedOnMountRef.current
|
|
126
|
-
}), /*#__PURE__*/React.createElement(_motionWrapper.default, {
|
|
127
|
-
minHeight: minHeight,
|
|
128
|
-
show: showAISummary,
|
|
129
|
-
showTransition: !isSummarisedOnMountRef.current
|
|
130
|
-
}, /*#__PURE__*/React.createElement(_aiSummary.default, {
|
|
131
|
-
testId: "".concat(testId, "-ai-summary"),
|
|
132
|
-
minHeight: minHeight,
|
|
133
|
-
content: content
|
|
134
|
-
}), status === 'done' && /*#__PURE__*/React.createElement(_aiFooter.default, null))));
|
|
135
|
+
|
|
136
|
+
// Otherwise, show placeholder if provided
|
|
137
|
+
if (placeholder) {
|
|
138
|
+
return /*#__PURE__*/React.createElement(_react.Fragment, null, placeholder);
|
|
139
|
+
}
|
|
140
|
+
return null;
|
|
135
141
|
};
|
|
136
142
|
var _default = exports.default = AISummaryBlockResolvedView;
|
|
@@ -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 HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [_constants.InternalActionName.
|
|
27
|
+
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [_constants.InternalActionName.RovoChatAction];
|
|
28
28
|
var ignoreContainerMarginStyles = null;
|
|
29
29
|
var elevatedFooterStyles = null;
|
|
30
30
|
var providerStyles = null;
|
|
@@ -253,8 +253,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
253
253
|
flexibleCardProps: flexibleCardProps,
|
|
254
254
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
255
255
|
onActionClick: onActionClick,
|
|
256
|
-
titleBlockProps: titleBlockProps
|
|
257
|
-
url: url
|
|
256
|
+
titleBlockProps: titleBlockProps
|
|
258
257
|
}));
|
|
259
258
|
}
|
|
260
259
|
return null;
|
|
@@ -306,8 +305,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
|
|
|
306
305
|
flexibleCardProps: flexibleCardProps,
|
|
307
306
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
308
307
|
onActionClick: onActionClick,
|
|
309
|
-
titleBlockProps: titleBlockProps
|
|
310
|
-
url: url
|
|
308
|
+
titleBlockProps: titleBlockProps
|
|
311
309
|
}));
|
|
312
310
|
}
|
|
313
311
|
return null;
|
|
@@ -19,7 +19,6 @@ var _analytics = require("../../../../../state/analytics");
|
|
|
19
19
|
var _useAiSummaryAction = _interopRequireDefault(require("../../../../../state/hooks/use-ai-summary-action"));
|
|
20
20
|
var _FlexibleCard = _interopRequireDefault(require("../../../../FlexibleCard"));
|
|
21
21
|
var _blocks = require("../../../../FlexibleCard/components/blocks");
|
|
22
|
-
var _aiSummaryBlock = require("../../../../FlexibleCard/components/blocks/ai-summary-block");
|
|
23
22
|
var _utils = require("../../../utils");
|
|
24
23
|
var _ImagePreview = _interopRequireDefault(require("../../ImagePreview"));
|
|
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); }
|
|
@@ -36,8 +35,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
36
35
|
onActionClick = _ref.onActionClick,
|
|
37
36
|
showRovoResolvedView = _ref.showRovoResolvedView,
|
|
38
37
|
titleBlockProps = _ref.titleBlockProps,
|
|
39
|
-
id = _ref.id
|
|
40
|
-
url = _ref.url;
|
|
38
|
+
id = _ref.id;
|
|
41
39
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
42
40
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
43
41
|
|
|
@@ -88,12 +86,10 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
|
|
|
88
86
|
secondary: secondary,
|
|
89
87
|
maxLines: 1,
|
|
90
88
|
size: _constants.SmartLinkSize.Medium
|
|
91
|
-
}),
|
|
89
|
+
}), isAISummaryEnabled ? /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, {
|
|
92
90
|
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
aiSummaryMinHeight: aiSummaryMinHeight,
|
|
96
|
-
placeholder: snippet
|
|
91
|
+
placeholder: snippet,
|
|
92
|
+
is3PAuthRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn
|
|
97
93
|
}) : snippet, /*#__PURE__*/_react.default.createElement(_blocks.SnippetBlock, {
|
|
98
94
|
testId: "hidden-snippet",
|
|
99
95
|
onRender: onSnippetRender,
|
|
@@ -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.31.
|
|
25
|
+
packageVersion: "43.31.6",
|
|
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:e1e36e1aa7f05bb230d6a7c63bbe6e7538b66e2f912f9eb7068e1a5880ddde9a
|
|
3
|
+
size 27485
|
|
@@ -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.31.
|
|
5
|
+
packageVersion: "43.31.6"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,11 @@
|
|
|
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
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
3
|
+
._1bah1h6o{justify-content:center}
|
|
3
4
|
._1bsb1osq{width:100%}
|
|
5
|
+
._1bsb1tcg{width:24px}
|
|
6
|
+
._1e0c116y{display:inline-flex}
|
|
7
|
+
._4cvr1h6o{align-items:center}
|
|
8
|
+
._4t3i1tcg{height:24px}
|
|
4
9
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
5
10
|
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
6
11
|
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -8,11 +8,13 @@ import { cx } from '@atlaskit/css';
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled';
|
|
10
10
|
import Spinner from '@atlaskit/spinner';
|
|
11
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
12
|
import { getPrimitivesInlineSpaceBySize } from '../../../utils';
|
|
12
13
|
import ActionIcon from '../action-icon';
|
|
13
14
|
const styles = {
|
|
14
15
|
button: "_bfhksm61 _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66 _1bsb1osq _1ah31i6y _irr31dpa _1di6fcek",
|
|
15
|
-
content: "_11c8wadc _syazi7uo"
|
|
16
|
+
content: "_11c8wadc _syazi7uo",
|
|
17
|
+
spinner: "_1bsb1tcg _4t3i1tcg _1e0c116y _4cvr1h6o _1bah1h6o"
|
|
16
18
|
};
|
|
17
19
|
const ActionButton = ({
|
|
18
20
|
content,
|
|
@@ -34,7 +36,12 @@ const ActionButton = ({
|
|
|
34
36
|
}
|
|
35
37
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
36
38
|
const icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(ActionIcon, {
|
|
37
|
-
icon: /*#__PURE__*/React.createElement(
|
|
39
|
+
icon: expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true) && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? /*#__PURE__*/React.createElement(Box, {
|
|
40
|
+
xcss: styles.spinner
|
|
41
|
+
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
42
|
+
size: 16,
|
|
43
|
+
testId: `${testId}-loading`
|
|
44
|
+
})) : /*#__PURE__*/React.createElement(Spinner, {
|
|
38
45
|
testId: `${testId}-loading`
|
|
39
46
|
})
|
|
40
47
|
}) : iconOption;
|