@atlaskit/smart-card 44.23.1 → 44.23.3
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 +15 -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/utils/click-helpers.js +30 -1
- package/dist/cjs/view/CardWithUrl/component.js +109 -45
- 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 +31 -16
- 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/utils/click-helpers.js +29 -0
- package/dist/es2019/view/CardWithUrl/component.js +111 -47
- 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 +31 -17
- 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/utils/click-helpers.js +29 -0
- package/dist/esm/view/CardWithUrl/component.js +110 -46
- 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 +31 -16
- 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/utils/click-helpers.d.ts +20 -0
- 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/utils/click-helpers.d.ts +20 -0
- 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,20 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 44.23.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6cb1e43229040`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6cb1e43229040) -
|
|
8
|
+
Append url with cross-product analytics params on link click
|
|
9
|
+
|
|
10
|
+
## 44.23.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`4b9e6f370d855`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b9e6f370d855) -
|
|
15
|
+
Remove feature flag and experiment
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 44.23.1
|
|
4
19
|
|
|
5
20
|
### 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.2" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isAuxClick = void 0;
|
|
6
|
+
exports.isAuxClick = exports.getAnchorAttributesFromEvent = void 0;
|
|
7
7
|
/**
|
|
8
8
|
* Returns true for genuine middle-clicks (button === 1).
|
|
9
9
|
* Filters out Windows right-clicks, which fire onAuxClick with button === 2
|
|
@@ -11,4 +11,33 @@ exports.isAuxClick = void 0;
|
|
|
11
11
|
*/
|
|
12
12
|
var isAuxClick = exports.isAuxClick = function isAuxClick(e) {
|
|
13
13
|
return e.button === 1;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Extracts `href` and `target` from the anchor element that is the event's `currentTarget`.
|
|
18
|
+
*
|
|
19
|
+
* Smart Link click handlers are attached to multiple card renderers (InlineCard, BlockCard,
|
|
20
|
+
* EmbedCard, FlexibleCard). When the handler needs to manually open a link — for example,
|
|
21
|
+
* when native anchor navigation has been prevented — it uses this helper to read the
|
|
22
|
+
* anchor's resolved URL and intended target from the event rather than re-deriving them.
|
|
23
|
+
*
|
|
24
|
+
* Returns `{ href: undefined, target: '_self' }` when `currentTarget` is not an anchor
|
|
25
|
+
* element (e.g. a button or wrapper div), so callers can safely fall back to a default target.
|
|
26
|
+
*
|
|
27
|
+
* @param event - A React mouse or keyboard event whose `currentTarget` may be an anchor.
|
|
28
|
+
* @returns The resolved absolute `href` and `target` attribute of the anchor, or safe
|
|
29
|
+
* defaults if `currentTarget` is not an anchor.
|
|
30
|
+
*/
|
|
31
|
+
var getAnchorAttributesFromEvent = exports.getAnchorAttributesFromEvent = function getAnchorAttributesFromEvent(event) {
|
|
32
|
+
var currentTarget = event.currentTarget;
|
|
33
|
+
if (!(currentTarget instanceof HTMLAnchorElement)) {
|
|
34
|
+
return {
|
|
35
|
+
href: undefined,
|
|
36
|
+
target: '_self'
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
href: currentTarget.href,
|
|
41
|
+
target: currentTarget.target || '_self'
|
|
42
|
+
};
|
|
14
43
|
};
|
|
@@ -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");
|
|
@@ -94,15 +93,16 @@ function Component(_ref) {
|
|
|
94
93
|
var services = (0, _helpers.getServices)(state.details);
|
|
95
94
|
var thirdPartyARI = (0, _helpers.getThirdPartyARI)(state.details);
|
|
96
95
|
var firstPartyIdentifier = (0, _helpers.getFirstPartyIdentifier)();
|
|
97
|
-
var
|
|
96
|
+
var appendCrossProductAnalyticsParams = (0, _useSmartLinkCrossProductUrlWrapper.useSmartLinkCrossProductUrlWrapperGated)({
|
|
98
97
|
details: state.details
|
|
99
98
|
});
|
|
100
99
|
var actionOptions = (0, _combineActionOptions.combineActionOptions)({
|
|
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;
|
|
@@ -127,56 +127,120 @@ function Component(_ref) {
|
|
|
127
127
|
var isDisablePreviewPanel = disablePreviewPanel && (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true, {
|
|
128
128
|
exposure: true
|
|
129
129
|
});
|
|
130
|
+
if ((0, _platformFeatureFlags.fg)('platform_smartlink_xpc_url_wrapping')) {
|
|
131
|
+
var _appendCrossProductAn;
|
|
132
|
+
// FIXME: InlineCard, BlockCard and EmbedCard call event.preventDefault() internally
|
|
133
|
+
// before the event bubbles up to this handler. This forces us to snapshot
|
|
134
|
+
// event.defaultPrevented before calling onClick to detect whether the consumer
|
|
135
|
+
// specifically prevented navigation. Ideally those components should not call
|
|
136
|
+
// preventDefault so this workaround can be removed.
|
|
137
|
+
var isEventDefaultPrevented = event.defaultPrevented;
|
|
138
|
+
var canOpenPreviewPanel = !isModifierKeyPressed && ari && name && openPreviewPanel && (isPreviewPanelAvailable === null || isPreviewPanelAvailable === void 0 ? void 0 : isPreviewPanelAvailable({
|
|
139
|
+
ari: ari
|
|
140
|
+
})) && !isDisablePreviewPanel;
|
|
130
141
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
});
|
|
153
|
-
return;
|
|
154
|
-
} else if (!onClick && !isFlexibleUi) {
|
|
155
|
-
var clickUrl = (0, _helpers.getClickUrl)(url, state.details);
|
|
142
|
+
// Preview panel takes priority over link navigation when available.
|
|
143
|
+
if (canOpenPreviewPanel) {
|
|
144
|
+
var _extractSmartLinkEmbe;
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
event.stopPropagation();
|
|
147
|
+
openPreviewPanel({
|
|
148
|
+
url: url,
|
|
149
|
+
ari: ari,
|
|
150
|
+
name: name,
|
|
151
|
+
iconUrl: (0, _helpers.getObjectIconUrl)(state.details),
|
|
152
|
+
panelData: {
|
|
153
|
+
embedUrl: (0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') ? (_extractSmartLinkEmbe = (0, _linkExtractors.extractSmartLinkEmbed)(state.details)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src : undefined
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
(0, _click.fireLinkClickedEvent)(createAnalyticsEvent)(event, {
|
|
157
|
+
attributes: {
|
|
158
|
+
clickOutcome: 'previewPanel'
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
156
163
|
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
var target = (0, _utils.isSpecialEvent)(event) ? '_blank' : '_self';
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
// For FlexibleCard, read target from the clicked anchor element (e.g. _blank for links
|
|
165
|
+
// rendered with explicit target). For classic cards, default to _self
|
|
166
|
+
var _getAnchorAttributesF = (0, _clickHelpers.getAnchorAttributesFromEvent)(event),
|
|
167
|
+
anchorTarget = _getAnchorAttributesF.target;
|
|
168
|
+
var target = (0, _utils.isSpecialEvent)(event) ? '_blank' : isFlexibleUi ? anchorTarget : '_self';
|
|
169
|
+
|
|
170
|
+
// FIXME: preferredUrl should be rendered in the DOM anchor href instead of derived at click time
|
|
171
|
+
var preferredUrl = (0, _helpers.getClickUrl)(url, state.details);
|
|
172
|
+
var destinationUrl = (_appendCrossProductAn = appendCrossProductAnalyticsParams(preferredUrl)) !== null && _appendCrossProductAn !== void 0 ? _appendCrossProductAn : preferredUrl;
|
|
173
|
+
|
|
174
|
+
// FIXME: Consumer that handle click even themselves via callback won't have the decorated URL
|
|
175
|
+
onClick === null || onClick === void 0 || onClick(event);
|
|
176
|
+
|
|
177
|
+
// Check if the event is prevented via onClick callback
|
|
178
|
+
var consumerPreventedNavigation = event.defaultPrevented && !isEventDefaultPrevented;
|
|
179
|
+
|
|
180
|
+
// Classic cards (InlineCard, BlockCard, EmbedCard) rely on their own anchor navigation
|
|
181
|
+
// when onClick is provided, so this handler should not open the link for them.
|
|
182
|
+
// FlexibleCard's anchor is prevented from native navigation, so this handler always
|
|
183
|
+
// opens the link for FlexibleCard unless the consumer's onClick called preventDefault.
|
|
184
|
+
var shouldOpenLink = isFlexibleUi || !onClick;
|
|
185
|
+
var doOpenLink = shouldOpenLink && !consumerPreventedNavigation;
|
|
186
|
+
if (doOpenLink) {
|
|
187
|
+
event.preventDefault();
|
|
188
|
+
window.open(destinationUrl, target);
|
|
167
189
|
}
|
|
168
|
-
|
|
190
|
+
|
|
191
|
+
// Only set clickOutcome when this handler actually opened the link.
|
|
192
|
+
// If a parent onClick handled navigation, fire a generic click event instead.
|
|
193
|
+
(0, _click.fireLinkClickedEvent)(createAnalyticsEvent)(event, doOpenLink ? {
|
|
169
194
|
attributes: {
|
|
170
195
|
clickOutcome: target === '_blank' ? 'clickThroughNewTabOrWindow' : 'clickThrough'
|
|
171
196
|
}
|
|
172
|
-
});
|
|
197
|
+
} : undefined);
|
|
173
198
|
} else {
|
|
174
|
-
|
|
175
|
-
|
|
199
|
+
// If preview panel is available and the user clicked on the link,
|
|
200
|
+
// delegate the click to the preview panel handler
|
|
201
|
+
if (!isModifierKeyPressed && ari && name && openPreviewPanel && isPreviewPanelAvailable !== null && isPreviewPanelAvailable !== void 0 && isPreviewPanelAvailable({
|
|
202
|
+
ari: ari
|
|
203
|
+
}) && !isDisablePreviewPanel) {
|
|
204
|
+
var _extractSmartLinkEmbe2;
|
|
205
|
+
event.preventDefault();
|
|
206
|
+
event.stopPropagation();
|
|
207
|
+
openPreviewPanel({
|
|
208
|
+
url: url,
|
|
209
|
+
ari: ari,
|
|
210
|
+
name: name,
|
|
211
|
+
iconUrl: (0, _helpers.getObjectIconUrl)(state.details),
|
|
212
|
+
panelData: {
|
|
213
|
+
embedUrl: (0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') ? (_extractSmartLinkEmbe2 = (0, _linkExtractors.extractSmartLinkEmbed)(state.details)) === null || _extractSmartLinkEmbe2 === void 0 ? void 0 : _extractSmartLinkEmbe2.src : undefined
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
(0, _click.fireLinkClickedEvent)(createAnalyticsEvent)(event, {
|
|
217
|
+
attributes: {
|
|
218
|
+
clickOutcome: 'previewPanel'
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
return;
|
|
222
|
+
} else if (!onClick && !isFlexibleUi) {
|
|
223
|
+
var clickUrl = (0, _helpers.getClickUrl)(url, state.details);
|
|
224
|
+
|
|
225
|
+
// Ctrl+left click on mac typically doesn't trigger onClick
|
|
226
|
+
// The event could have potentially had `e.preventDefault()` called on it by now
|
|
227
|
+
// event by smart card internally
|
|
228
|
+
// If it has been called then only then can `isSpecialEvent` be true.
|
|
229
|
+
var _target = (0, _utils.isSpecialEvent)(event) ? '_blank' : '_self';
|
|
230
|
+
window.open(clickUrl, _target);
|
|
231
|
+
(0, _click.fireLinkClickedEvent)(createAnalyticsEvent)(event, {
|
|
232
|
+
attributes: {
|
|
233
|
+
clickOutcome: _target === '_blank' ? 'clickThroughNewTabOrWindow' : 'clickThrough'
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
} else {
|
|
237
|
+
if (onClick) {
|
|
238
|
+
onClick(event);
|
|
239
|
+
}
|
|
240
|
+
(0, _click.fireLinkClickedEvent)(createAnalyticsEvent)(event);
|
|
176
241
|
}
|
|
177
|
-
(0, _click.fireLinkClickedEvent)(createAnalyticsEvent)(event);
|
|
178
242
|
}
|
|
179
|
-
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url,
|
|
243
|
+
}, [fireEvent, id, isFlexibleUi, appearance, definitionId, onClick, url, appendCrossProductAnalyticsParams, state.details, ari, name, fire3PClickEvent, shouldFire3PClickEvent, isPreviewPanelAvailable, openPreviewPanel, createAnalyticsEvent, disablePreviewPanel]);
|
|
180
244
|
|
|
181
245
|
// Exposure fires once per eligible mount; click-time reads use no-exposure variant.
|
|
182
246
|
(0, _react.useEffect)(function () {
|
|
@@ -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]);
|