@atlaskit/smart-card 44.23.1 → 44.23.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-with-google-rovo-chat-action--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-entity-support--default.png +2 -2
- package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +2 -4
- package/dist/cjs/extractors/flexible/actions/index.js +1 -1
- package/dist/cjs/extractors/flexible/index.js +1 -1
- package/dist/cjs/state/hooks/use-rovo-chat/index.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +0 -9
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +7 -28
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -10
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +0 -7
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.compiled.css +2 -6
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +4 -26
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +0 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/index.js +2 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +7 -15
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +4 -11
- package/dist/cjs/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +2 -8
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/index.js +1 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-entity-support--default.png +2 -2
- package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +2 -4
- package/dist/es2019/extractors/flexible/actions/index.js +1 -1
- package/dist/es2019/extractors/flexible/index.js +1 -1
- package/dist/es2019/state/hooks/use-rovo-chat/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +3 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +0 -9
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +7 -28
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -10
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +0 -7
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.compiled.css +2 -6
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +4 -26
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +0 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/index.js +2 -2
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +7 -16
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +3 -11
- package/dist/es2019/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +3 -10
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/index.js +1 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-view-with-rovo-actions-cta-treatment---default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-entity-support--default.png +2 -2
- package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +2 -4
- package/dist/esm/extractors/flexible/actions/index.js +1 -1
- package/dist/esm/extractors/flexible/index.js +1 -1
- package/dist/esm/state/hooks/use-rovo-chat/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +3 -3
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +0 -9
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +7 -28
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +1 -10
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +0 -7
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.compiled.css +2 -6
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +4 -26
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css +0 -1
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -4
- package/dist/esm/view/FlexibleCard/index.js +2 -2
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +7 -15
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +4 -11
- package/dist/esm/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +3 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/index.js +1 -3
- package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -2
- package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -2
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
- package/package.json +1 -4
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +0 -3
- package/dist/cjs/state/hooks/use-inline-action-nudge-experiment/index.js +0 -54
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +0 -15
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +0 -44
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +0 -3
- package/dist/es2019/state/hooks/use-inline-action-nudge-experiment/index.js +0 -48
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +0 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +0 -36
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +0 -3
- package/dist/esm/state/hooks/use-inline-action-nudge-experiment/index.js +0 -47
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +0 -15
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +0 -35
- package/dist/types/state/hooks/use-inline-action-nudge-experiment/index.d.ts +0 -24
- package/dist/types/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.d.ts +0 -12
- package/dist/types-ts4.5/state/hooks/use-inline-action-nudge-experiment/index.d.ts +0 -24
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.d.ts +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 44.23.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4b9e6f370d855`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b9e6f370d855) -
|
|
8
|
+
Remove feature flag and experiment
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 44.23.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:13d8e863b7dcc6b41eef967c98a4e961078c5442a20e9d14ce373567ec6ea6f9
|
|
3
|
+
size 12894
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:79dfaed74e187a22da54cdf220a9f681e089542858ba84b0ffeb7e77b787f626
|
|
3
|
+
size 2111
|
|
@@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _linkExtractors = require("@atlaskit/link-extractors");
|
|
8
8
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
10
9
|
var _constants = require("../../../constants");
|
|
11
10
|
var _helpers = require("../../../state/helpers");
|
|
12
11
|
var _useBlockCardRovoActionExperiment = require("../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
13
12
|
var _canShowAction = require("../../../utils/actions/can-show-action");
|
|
14
13
|
var _rovo = require("../../../utils/rovo");
|
|
15
|
-
// For
|
|
14
|
+
// For block card experiment (NAVX-4814)
|
|
16
15
|
var ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
|
|
17
16
|
var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
18
17
|
var _rovoConfig$product, _actionOptions$rovoCh;
|
|
@@ -33,9 +32,8 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
|
33
32
|
var isGoogleProvider = extensionKey === 'google-object-provider';
|
|
34
33
|
var is3PBlockExperimentEnabled = (0, _useBlockCardRovoActionExperiment.isBlockCardRovoActionExperimentEnabled)((_rovoConfig$product = rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product) !== null && _rovoConfig$product !== void 0 ? _rovoConfig$product : product);
|
|
35
34
|
var is3PAuthRovoActionEnabled = isGoogleProvider && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
36
|
-
var is3PInlinePostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
37
35
|
var is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && is3PBlockExperimentEnabled;
|
|
38
|
-
var isSupportedFeature =
|
|
36
|
+
var isSupportedFeature = is3PAuthRovoActionEnabled || is3PBlockPostAuthActionsEnabled;
|
|
39
37
|
var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
40
38
|
var url = (0, _linkExtractors.extractSmartLinkUrl)(response);
|
|
41
39
|
return isSupportedFeature && isOptIn ? {
|
|
@@ -50,7 +50,7 @@ var extractFlexibleCardActions = exports.extractFlexibleCardActions = function e
|
|
|
50
50
|
response: response,
|
|
51
51
|
isPreviewPanelAvailable: isPreviewPanelAvailable,
|
|
52
52
|
openPreviewPanel: openPreviewPanel
|
|
53
|
-
})), _constants.ActionName.AutomationAction, (0, _extractAutomationAction.extractAutomationAction)(response)), _constants.InternalActionName.AISummaryAction, (0, _extractAiSummaryAction.extractAISummaryAction)(response, url, actionOptions, aiSummaryConfig)), (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
53
|
+
})), _constants.ActionName.AutomationAction, (0, _extractAutomationAction.extractAutomationAction)(response)), _constants.InternalActionName.AISummaryAction, (0, _extractAiSummaryAction.extractAISummaryAction)(response, url, actionOptions, aiSummaryConfig)), (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? (0, _defineProperty2.default)({}, _constants.ActionName.RovoChatAction, (0, _extractRovoChatAction.default)({
|
|
54
54
|
actionOptions: actionOptions,
|
|
55
55
|
appearance: appearance,
|
|
56
56
|
id: id,
|
|
@@ -56,7 +56,7 @@ var extractFlexibleUiContext = function extractFlexibleUiContext() {
|
|
|
56
56
|
fireEvent: fireEvent,
|
|
57
57
|
id: id,
|
|
58
58
|
origin: origin
|
|
59
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
59
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
60
60
|
product: product,
|
|
61
61
|
rovoConfig: rovoConfig
|
|
62
62
|
} : undefined), {}, {
|
|
@@ -36,7 +36,7 @@ var useRovoChat = function useRovoChat() {
|
|
|
36
36
|
agentId: undefined
|
|
37
37
|
}),
|
|
38
38
|
openChat: true,
|
|
39
|
-
openChatMode: isJiraProduct && (
|
|
39
|
+
openChatMode: isJiraProduct && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_block_jira_kill_switch') ? 'mini-modal' : 'sidebar'
|
|
40
40
|
},
|
|
41
41
|
onAcknowledgeTimeout: function onAcknowledgeTimeout() {
|
|
42
42
|
// NAVX-3599: Add analytics event
|
|
@@ -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: "44.23.
|
|
14
|
+
packageVersion: "44.23.1" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -19,7 +19,6 @@ var _constants = require("../../constants");
|
|
|
19
19
|
var _state = require("../../state");
|
|
20
20
|
var _analytics = require("../../state/analytics");
|
|
21
21
|
var _helpers = require("../../state/helpers");
|
|
22
|
-
var _useInlineActionNudgeExperiment = _interopRequireDefault(require("../../state/hooks/use-inline-action-nudge-experiment"));
|
|
23
22
|
var _useSmartLinkCrossProductUrlWrapper = require("../../state/hooks/use-smart-link-cross-product-url-wrapper");
|
|
24
23
|
var _modal = require("../../state/modal");
|
|
25
24
|
var _utils = require("../../utils");
|
|
@@ -101,8 +100,9 @@ function Component(_ref) {
|
|
|
101
100
|
actionOptions: actionOptionsProp,
|
|
102
101
|
platform: platform
|
|
103
102
|
});
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
|
|
104
|
+
// TODO: [ZS] Add new experiment flag to determine if the Rovo Actions CTA should be shown
|
|
105
|
+
var rovoActionsCtaShown = false;
|
|
106
106
|
var fire3PClickEvent = (0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics') ?
|
|
107
107
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
108
108
|
(0, _useSmartLinkEvents.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI) : undefined;
|
|
@@ -1,25 +1,16 @@
|
|
|
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
|
-
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
3
|
-
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
4
|
-
._1dqonqa1{border-style:solid}
|
|
5
|
-
._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
|
|
6
2
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
7
|
-
._19bvv77o{padding-left:var(--ds-space-025,2px)}
|
|
8
3
|
._1bah1h6o{justify-content:center}
|
|
9
4
|
._1bsb1osq{width:100%}
|
|
10
5
|
._1bsb1tcg{width:24px}
|
|
11
6
|
._1e0c116y{display:inline-flex}
|
|
12
|
-
._1o9zidpf{flex-shrink:0}
|
|
13
7
|
._4cvr1h6o{align-items:center}
|
|
14
8
|
._4t3i1tcg{height:24px}
|
|
15
9
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
16
10
|
._ca0q1b66{padding-top:var(--ds-space-050,4px)}
|
|
17
|
-
._kqswh2mm{position:relative}
|
|
18
11
|
._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
|
|
19
|
-
._o5721q9c{white-space:nowrap}
|
|
20
12
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
21
13
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
22
|
-
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
23
14
|
._1ah31i6y:focus-visible{outline-offset:var(--ds-space-negative-025,-2px)}
|
|
24
15
|
._irr31dpa:hover{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
|
|
25
16
|
._1di6fcek:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)}
|
package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -17,21 +17,15 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
17
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
18
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
19
19
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
20
|
-
var _constants = require("../../../../../../constants");
|
|
21
|
-
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
22
20
|
var _utils = require("../../../utils");
|
|
23
21
|
var _actionIcon = _interopRequireDefault(require("../action-icon"));
|
|
24
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); }
|
|
25
23
|
var styles = {
|
|
26
24
|
button: "_bfhksm61 _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66 _1bsb1osq _1ah31i6y _irr31dpa _1di6fcek",
|
|
27
|
-
pillButton: "_2rko1qi0 _189ee4h9 _1dqonqa1 _1h6d1l7x _kqswh2mm _bfhksm61 _u5f3u2gc _19bvv77o _1bsb1osq _1ah31i6y _irr31dpa _1di6fcek",
|
|
28
25
|
content: "_11c8wadc _syazi7uo",
|
|
29
|
-
pillContent: "_11c8wadc _syazi7uo _o5721q9c",
|
|
30
26
|
spinner: "_1bsb1tcg _4t3i1tcg _1e0c116y _4cvr1h6o _1bah1h6o"
|
|
31
27
|
};
|
|
32
|
-
var pillIconWrapperStyles = null;
|
|
33
28
|
var ActionButton = function ActionButton(_ref) {
|
|
34
|
-
var _flexibleUiContext$ac;
|
|
35
29
|
var content = _ref.content,
|
|
36
30
|
iconOption = _ref.icon,
|
|
37
31
|
isDisabled = _ref.isDisabled,
|
|
@@ -51,20 +45,7 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
51
45
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
52
46
|
var is3pExperimentEnabled =
|
|
53
47
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
54
|
-
(0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true)
|
|
55
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
56
|
-
(0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* NOTE: We only apply the pill variant when there's text label
|
|
60
|
-
* (textual `content`). Icon-only stack-item buttons (e.g. the link/expand
|
|
61
|
-
* icons in the hover card footer) are also rendered with `as="stack-item"`
|
|
62
|
-
* but pass `content=""` and should keep their original borderless styling.
|
|
63
|
-
*/
|
|
64
|
-
var hasTextualContent = typeof content === 'string' ? content.trim().length > 0 : Boolean(content);
|
|
65
|
-
var flexibleUiContext = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
66
|
-
var isInRovoActionStack = !!(flexibleUiContext !== null && flexibleUiContext !== void 0 && (_flexibleUiContext$ac = flexibleUiContext.actions) !== null && _flexibleUiContext$ac !== void 0 && _flexibleUiContext$ac[_constants.ActionName.RovoChatAction]);
|
|
67
|
-
var isInlineActionNudgeExperiment = hasTextualContent && isInRovoActionStack && (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
48
|
+
(0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
68
49
|
var icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(_actionIcon.default, {
|
|
69
50
|
icon: is3pExperimentEnabled ? /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
70
51
|
xcss: styles.spinner
|
|
@@ -76,23 +57,21 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
76
57
|
})
|
|
77
58
|
}) : iconOption;
|
|
78
59
|
return /*#__PURE__*/React.createElement(_compiled.Pressable, (0, _extends2.default)({
|
|
79
|
-
xcss: (0, _css.cx)(
|
|
60
|
+
xcss: (0, _css.cx)(styles.button)
|
|
80
61
|
}, tooltipProps, {
|
|
81
62
|
onClick: onClick,
|
|
82
63
|
testId: testId
|
|
83
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
84
65
|
,
|
|
85
66
|
style: style
|
|
86
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
67
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
87
68
|
'aria-label': ariaLabel
|
|
88
69
|
} : {}), /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
89
70
|
alignBlock: "center",
|
|
90
|
-
grow:
|
|
91
|
-
space:
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
}, icon) : icon, /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
95
|
-
xcss: (0, _css.cx)(isInlineActionNudgeExperiment ? styles.pillContent : styles.content)
|
|
71
|
+
grow: "fill",
|
|
72
|
+
space: space
|
|
73
|
+
}, icon, /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
74
|
+
xcss: (0, _css.cx)(styles.content)
|
|
96
75
|
}, content)));
|
|
97
76
|
};
|
|
98
77
|
var _default = exports.default = ActionButton;
|
|
@@ -8,31 +8,22 @@ exports.default = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
13
11
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
|
-
var _constants = require("../../../../../../constants");
|
|
15
|
-
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
16
12
|
var _actionButton = _interopRequireDefault(require("./action-button"));
|
|
17
13
|
var _excluded = ["content", "tooltipMessage", "tooltipOnHide", "hideTooltipOnMouseDown", "hideTooltip"];
|
|
18
14
|
var ActionStackItem = function ActionStackItem(_ref) {
|
|
19
|
-
var _flexibleUiContext$ac;
|
|
20
15
|
var content = _ref.content,
|
|
21
16
|
tooltipMessage = _ref.tooltipMessage,
|
|
22
17
|
tooltipOnHide = _ref.tooltipOnHide,
|
|
23
18
|
hideTooltipOnMouseDown = _ref.hideTooltipOnMouseDown,
|
|
24
19
|
hideTooltip = _ref.hideTooltip,
|
|
25
20
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
26
|
-
var flexibleUiContext = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
27
|
-
var isRovoAction = !!(flexibleUiContext !== null && flexibleUiContext !== void 0 && (_flexibleUiContext$ac = flexibleUiContext.actions) !== null && _flexibleUiContext$ac !== void 0 && _flexibleUiContext$ac[_constants.ActionName.RovoChatAction]);
|
|
28
|
-
var isRovoPillVariant = isRovoAction && (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
29
21
|
return hideTooltip ? /*#__PURE__*/_react.default.createElement(_actionButton.default, (0, _extends2.default)({}, props, {
|
|
30
22
|
content: content
|
|
31
23
|
})) : /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
32
24
|
content: tooltipMessage || content,
|
|
33
25
|
onHide: tooltipOnHide,
|
|
34
|
-
hideTooltipOnMouseDown: hideTooltipOnMouseDown
|
|
35
|
-
position: isRovoPillVariant ? 'right' : undefined
|
|
26
|
+
hideTooltipOnMouseDown: hideTooltipOnMouseDown
|
|
36
27
|
}, function (tooltipProps) {
|
|
37
28
|
return /*#__PURE__*/_react.default.createElement(_actionButton.default, (0, _extends2.default)({}, props, {
|
|
38
29
|
content: content,
|
package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js
CHANGED
|
@@ -13,7 +13,6 @@ var _reactIntl = require("react-intl");
|
|
|
13
13
|
var _rovo = _interopRequireDefault(require("@atlaskit/icon-lab/core/rovo"));
|
|
14
14
|
var _atlassianIntelligence = _interopRequireDefault(require("@atlaskit/icon/core/atlassian-intelligence"));
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
17
16
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
18
17
|
var _messages = require("../../../../../messages");
|
|
19
18
|
var _useBlockCardRovoActionExperiment = require("../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
@@ -54,7 +53,7 @@ function AISummariseAction(_ref) {
|
|
|
54
53
|
spacing: "spacious",
|
|
55
54
|
color: "currentColor",
|
|
56
55
|
label: "Summarise with AI"
|
|
57
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
56
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
58
57
|
size: props.iconSize
|
|
59
58
|
} : {})),
|
|
60
59
|
onClick: handleActionClick,
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
14
13
|
var _useAiSummaryAction = _interopRequireDefault(require("../../../../../state/hooks/use-ai-summary-action"));
|
|
15
14
|
var _aiSummariseAction = require("./ai-summarise-action");
|
|
16
15
|
var _copySummaryAction = require("./copy-summary-action");
|
|
@@ -28,7 +27,7 @@ var AISummaryActionComponent = exports.AISummaryActionComponent = function AISum
|
|
|
28
27
|
(0, _react.useEffect)(function () {
|
|
29
28
|
onLoadingChange === null || onLoadingChange === void 0 || onLoadingChange(status === 'loading');
|
|
30
29
|
}, [onLoadingChange, status]);
|
|
31
|
-
return status === 'done' ? (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
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, {
|
|
32
31
|
summary: content,
|
|
33
32
|
testId: testId
|
|
34
33
|
})) : /*#__PURE__*/_react.default.createElement(_copySummaryAction.CopySummaryAction, (0, _extends2.default)({}, props, {
|
|
@@ -12,7 +12,6 @@ var _reactIntl = require("react-intl");
|
|
|
12
12
|
var _automation = _interopRequireDefault(require("@atlaskit/icon/core/automation"));
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
16
15
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
17
16
|
var _constants = require("../../../../../constants");
|
|
18
17
|
var _messages = require("../../../../../messages");
|
|
@@ -89,7 +88,7 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
89
88
|
spacing: "spacious",
|
|
90
89
|
color: "currentColor",
|
|
91
90
|
label: automationActionIconLabel
|
|
92
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
91
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
93
92
|
size: props.iconSize
|
|
94
93
|
} : {})),
|
|
95
94
|
testId: "smart-action-automation-action",
|
|
@@ -16,7 +16,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
16
16
|
var _reactIntl = require("react-intl");
|
|
17
17
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/link"));
|
|
18
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
20
19
|
var _constants = require("../../../../../constants");
|
|
21
20
|
var _messages = require("../../../../../messages");
|
|
22
21
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
@@ -73,7 +72,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
73
72
|
color: "currentColor",
|
|
74
73
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
75
74
|
spacing: "spacious"
|
|
76
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
75
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
77
76
|
size: props.iconSize
|
|
78
77
|
} : {})),
|
|
79
78
|
onClick: onClick,
|
|
@@ -12,7 +12,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
16
15
|
var _constants = require("../../../../../constants");
|
|
17
16
|
var _messages = require("../../../../../messages");
|
|
18
17
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
@@ -87,7 +86,7 @@ var FollowAction = function FollowAction(props) {
|
|
|
87
86
|
};
|
|
88
87
|
return /*#__PURE__*/_react.default.createElement(_serverAction.default, (0, _extends2.default)({
|
|
89
88
|
content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, label)
|
|
90
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
89
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
91
90
|
ariaLabel: intl.formatMessage(label)
|
|
92
91
|
} : {}, {
|
|
93
92
|
icon: followIcon,
|
|
@@ -14,7 +14,6 @@ var _growDiagonal = _interopRequireDefault(require("@atlaskit/icon/core/grow-dia
|
|
|
14
14
|
var _panelRight = _interopRequireDefault(require("@atlaskit/icon/core/panel-right"));
|
|
15
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
18
17
|
var _constants = require("../../../../../constants");
|
|
19
18
|
var _messages = require("../../../../../messages");
|
|
20
19
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
@@ -47,7 +46,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
47
46
|
color: "currentColor",
|
|
48
47
|
spacing: "spacious",
|
|
49
48
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
50
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
49
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
51
50
|
size: props.iconSize
|
|
52
51
|
} : {}));
|
|
53
52
|
}
|
|
@@ -55,7 +54,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
55
54
|
color: "currentColor",
|
|
56
55
|
spacing: "spacious",
|
|
57
56
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
58
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
57
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
59
58
|
size: props.iconSize
|
|
60
59
|
} : {}));
|
|
61
60
|
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
@@ -13,7 +13,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
13
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
15
|
var _reactIntl = require("react-intl");
|
|
16
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
17
16
|
var _constants = require("../../../../../constants");
|
|
18
17
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
19
18
|
var _useInvokeClientAction = _interopRequireDefault(require("../../../../../state/hooks/use-invoke-client-action"));
|
|
@@ -25,9 +24,6 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
25
24
|
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
25
|
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
26
|
var GOOGLE_PROMPTS = [_rovoChatUtils.RovoChatPromptKey.RECOMMEND_OTHER_SOURCES, _rovoChatUtils.RovoChatPromptKey.SHOW_OTHER_MENTIONS, _rovoChatUtils.RovoChatPromptKey.SUGGEST_IMPROVEMENT];
|
|
28
|
-
var GENERIC_3P_PROMPTS = [
|
|
29
|
-
// For rovogrowth-640-inline-action-nudge-exp only
|
|
30
|
-
_rovoChatUtils.RovoChatPromptKey.SHOW_ME_WHATS_RELEVANT, _rovoChatUtils.RovoChatPromptKey.SUMMARIZE_THIS_FOR_ME, _rovoChatUtils.RovoChatPromptKey.ASK_A_SPECIFIC_QUESTION];
|
|
31
27
|
var DEFAULT_PROMPTS = GOOGLE_PROMPTS;
|
|
32
28
|
var RovoChatAction = function RovoChatAction(_ref) {
|
|
33
29
|
var _context$actions;
|
|
@@ -46,9 +42,6 @@ var RovoChatAction = function RovoChatAction(_ref) {
|
|
|
46
42
|
if (prompts) {
|
|
47
43
|
return prompts;
|
|
48
44
|
}
|
|
49
|
-
if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true)) {
|
|
50
|
-
return GENERIC_3P_PROMPTS;
|
|
51
|
-
}
|
|
52
45
|
return DEFAULT_PROMPTS;
|
|
53
46
|
}, [prompts]);
|
|
54
47
|
var invoke = (0, _useInvokeClientAction.default)({});
|
|
@@ -11,7 +11,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactIntl = require("react-intl");
|
|
13
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
15
14
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
16
15
|
var _messages = require("../../../../../messages");
|
|
17
16
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
@@ -50,10 +49,10 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
|
|
|
50
49
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
51
50
|
return actionData ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
52
51
|
content: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.related_links_view_related_links)
|
|
53
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
52
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
54
53
|
tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntl.FormattedMessage, _messages.messages.related_links_view_related_links)
|
|
55
54
|
} : {}, {
|
|
56
|
-
icon: /*#__PURE__*/_react.default.createElement(_relatedLinksActionIcon.default, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
55
|
+
icon: /*#__PURE__*/_react.default.createElement(_relatedLinksActionIcon.default, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
57
56
|
iconSize: props.iconSize
|
|
58
57
|
} : {}),
|
|
59
58
|
onClick: onClick,
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
._zulpu2gc{gap:var(--ds-space-100,8px)}._16jlkb7n{flex-grow:1}
|
|
1
|
+
._16jlkb7n{flex-grow:1}
|
|
3
2
|
._18u01ivi{margin-left:calc(var(--container-gap-left)*-1)}
|
|
4
3
|
._1bsb129b{width:calc(100% + var(--container-gap-left) + var(--container-gap-right))}
|
|
5
|
-
._1bsb1osq{width:100%}
|
|
6
|
-
._1e0c11p5{display:grid}
|
|
7
4
|
._1e0c1txw{display:flex}
|
|
8
5
|
._2hwxc10g{margin-right:calc(var(--container-gap-right)*-1)}
|
|
9
6
|
._2lx21bp4{flex-direction:column}
|
|
10
|
-
._vchhusvi{box-sizing:border-box}
|
|
11
|
-
._yv0e1ris{grid-template-columns:max-content}
|
|
7
|
+
._vchhusvi{box-sizing:border-box}
|
|
@@ -14,16 +14,12 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
15
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
16
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
18
17
|
var _constants = require("../../../../../constants");
|
|
19
18
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
20
19
|
var Actions = _interopRequireWildcard(require("../../actions"));
|
|
21
20
|
var _actionFooter = require("./action-footer");
|
|
22
|
-
var _askRovoSectionHeader = _interopRequireDefault(require("./ask-rovo-section-header"));
|
|
23
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); }
|
|
24
22
|
var ignoreContainerPaddingStyles = null;
|
|
25
|
-
var inlineActionNudgePillWrapperStyles = null;
|
|
26
|
-
var inlineActionNudgeColumnStyles = null;
|
|
27
23
|
var DEFAULT_SORT_ORDER = ['PreviewAction', 'CopyLinkAction', 'AISummaryAction'];
|
|
28
24
|
var sort = function sort(a, b) {
|
|
29
25
|
var idxA = DEFAULT_SORT_ORDER.indexOf(a);
|
|
@@ -66,10 +62,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
66
62
|
isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn;
|
|
67
63
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
68
64
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
69
|
-
var isRovoChatActionAvailable =
|
|
70
|
-
|
|
71
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
72
|
-
var isInlineActionNudgeExperiment = (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
65
|
+
var isRovoChatActionAvailable = isAny3pRovoActionsExperimentOn && (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.ActionName.RovoChatAction]) !== undefined : undefined;
|
|
73
66
|
var _useState = (0, _react.useState)(),
|
|
74
67
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
75
68
|
message = _useState2[0],
|
|
@@ -93,7 +86,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
93
86
|
if (!(context !== null && context !== void 0 && context.actions)) {
|
|
94
87
|
return;
|
|
95
88
|
}
|
|
96
|
-
var arr = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
89
|
+
var arr = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? isRovoChatActionAvailable ? [_constants.ActionName.RovoChatAction] : Object.keys(context.actions).filter(function (name) {
|
|
97
90
|
return name !== _constants.ActionName.RovoChatAction;
|
|
98
91
|
}) : Object.keys(context.actions);
|
|
99
92
|
arr.sort(sort);
|
|
@@ -114,7 +107,7 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
114
107
|
size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
|
|
115
108
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
116
109
|
,
|
|
117
|
-
style:
|
|
110
|
+
style: padding ? {
|
|
118
111
|
paddingInline: padding
|
|
119
112
|
} : undefined,
|
|
120
113
|
hideTooltip: isLoading
|
|
@@ -123,25 +116,10 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
123
116
|
return arr.map(function (name) {
|
|
124
117
|
return renderAction(name);
|
|
125
118
|
});
|
|
126
|
-
}, [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
|
|
127
|
-
var showRovoSectionHeader = isInlineActionNudgeExperiment && isRovoChatActionAvailable;
|
|
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]);
|
|
128
120
|
if (!actions) {
|
|
129
121
|
return null;
|
|
130
122
|
}
|
|
131
|
-
if (isInlineActionNudgeExperiment && isRovoChatActionAvailable) {
|
|
132
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
133
|
-
ref: blockRef,
|
|
134
|
-
"data-testid": testId,
|
|
135
|
-
className: (0, _runtime.ax)(["_1e0c1txw _2lx21bp4 _vchhusvi _1bsb1osq"])
|
|
136
|
-
}, showRovoSectionHeader && /*#__PURE__*/React.createElement(_askRovoSectionHeader.default, {
|
|
137
|
-
testId: testId ? "".concat(testId, "-rovo-section-header") : undefined
|
|
138
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
139
|
-
className: (0, _runtime.ax)(["_zulpu2gc _1e0c11p5 _yv0e1ris"])
|
|
140
|
-
}, actions), /*#__PURE__*/React.createElement(_actionFooter.ActionFooter, {
|
|
141
|
-
message: message,
|
|
142
|
-
testId: testId
|
|
143
|
-
}));
|
|
144
|
-
}
|
|
145
123
|
return /*#__PURE__*/React.createElement("div", {
|
|
146
124
|
ref: blockRef,
|
|
147
125
|
"data-testid": testId
|
package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.compiled.css
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
._18u01ivi{margin-left:calc(var(--container-gap-left)*-1)}
|
|
11
11
|
._18u01wug{margin-left:auto}
|
|
12
12
|
._19p4ze3t *{padding-right:var(--ds-space-0,0)}
|
|
13
|
-
._19pkutpp{margin-top:var(--ds-space-150,9pt)}
|
|
14
13
|
._1bah1y6m{justify-content:flex-start}
|
|
15
14
|
._1bsb129b{width:calc(100% + var(--container-gap-left) + var(--container-gap-right))}
|
|
16
15
|
._1e0c1txw{display:flex}
|
|
@@ -13,8 +13,6 @@ var React = _react;
|
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
|
-
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
18
16
|
var _constants = require("../../../../../constants");
|
|
19
17
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
20
18
|
var Actions = _interopRequireWildcard(require("../../actions"));
|
|
@@ -28,7 +26,6 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
28
26
|
*/
|
|
29
27
|
var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [_constants.ActionName.RovoChatAction];
|
|
30
28
|
var ignoreContainerMarginStyles = null;
|
|
31
|
-
var inlineActionNudgeFooterMarginStyles = null;
|
|
32
29
|
var elevatedFooterStyles = null;
|
|
33
30
|
var providerStyles = null;
|
|
34
31
|
var actionsStyles = null;
|
|
@@ -74,7 +71,7 @@ var ResolvedHoverCardFooterBlock = function ResolvedHoverCardFooterBlock(_ref) {
|
|
|
74
71
|
return /*#__PURE__*/React.createElement(_block.default, (0, _extends2.default)({}, props, {
|
|
75
72
|
size: size,
|
|
76
73
|
testId: "".concat(testId, "-resolved-view"),
|
|
77
|
-
className: (0, _runtime.ax)(["_18zrpxbi _1rjcutpp _vchhusvi _1bsb129b _18u01ivi _2hwxc10g _otyr1ya9 _4t3ioahv", "_zulpu2gc _x3doj0fz _bfhkhfxm _mrkb1mok _1o0z1mok"
|
|
74
|
+
className: (0, _runtime.ax)(["_18zrpxbi _1rjcutpp _vchhusvi _1bsb129b _18u01ivi _2hwxc10g _otyr1ya9 _4t3ioahv", "_zulpu2gc _x3doj0fz _bfhkhfxm _mrkb1mok _1o0z1mok"])
|
|
78
75
|
}), !hideProvider && /*#__PURE__*/React.createElement("div", {
|
|
79
76
|
className: (0, _runtime.ax)(["_4t3i1ejb _1e0c1txw _4cvr1h6o _1bah1y6m _vchhusvi _16jlkb7n"])
|
|
80
77
|
}, /*#__PURE__*/React.createElement(_elements.Provider, {
|
|
@@ -60,7 +60,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
60
60
|
isPreviewPanelAvailable = _useSmartLinkContext.isPreviewPanelAvailable,
|
|
61
61
|
openPreviewPanel = _useSmartLinkContext.openPreviewPanel,
|
|
62
62
|
product = _useSmartLinkContext.product;
|
|
63
|
-
var rovoConfig = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
63
|
+
var rovoConfig = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ?
|
|
64
64
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
65
65
|
(0, _useRovoConfig.default)() : undefined;
|
|
66
66
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
@@ -89,7 +89,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
|
|
|
89
89
|
origin: origin,
|
|
90
90
|
renderers: renderers,
|
|
91
91
|
resolve: resolve
|
|
92
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
92
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
93
93
|
product: product,
|
|
94
94
|
rovoConfig: rovoConfig
|
|
95
95
|
} : undefined), {}, {
|