@atlaskit/smart-card 44.23.0 → 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 +16 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- 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__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- 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/common/icon/extractIconFromDocument.js +6 -14
- 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/index.js +23 -75
- 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/components/common/atlaskit-icon/index.js +34 -36
- 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-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- 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__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- 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/common/icon/extractIconFromDocument.js +6 -14
- 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/index.js +3 -26
- 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/components/common/atlaskit-icon/index.js +34 -36
- 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-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- 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__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-false-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-false.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/icon-element-variations/icon-element-all-variations-with-experiments--default--platform-sl-3p-preauth-better-hovercard-killswitch-true-platform-sl-3p-preauth-better-hovercard-true.png +2 -2
- 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/common/icon/extractIconFromDocument.js +6 -14
- 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/index.js +23 -63
- 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/components/common/atlaskit-icon/index.js +34 -36
- 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 +5 -8
- 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
|
@@ -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
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import DocumentFilledIcon from '@atlaskit/icon/core/file';
|
|
3
3
|
import { isConfluenceGenerator } from '@atlaskit/link-extractors';
|
|
4
|
-
import BlogIconObject from '@atlaskit/object/blog';
|
|
5
|
-
import LiveDocumentIconObject from '@atlaskit/object/page-live-doc';
|
|
6
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
5
|
import { getIconForFileType } from '../../../utils';
|
|
8
6
|
import { prioritiseIcon } from './prioritiseIcon';
|
|
@@ -47,12 +45,9 @@ const documentTypeToIcon = (type, opts) => {
|
|
|
47
45
|
switch (type) {
|
|
48
46
|
case 'schema:BlogPosting':
|
|
49
47
|
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
testId: "blog-icon"
|
|
54
|
-
});
|
|
55
|
-
}
|
|
48
|
+
// Intentionally keep this icon on a synchronous require()-based path.
|
|
49
|
+
// This icon must be present in SSR markup so hydration does not cause a
|
|
50
|
+
// visible empty-state-then-pop-in transition for Smart Links.
|
|
56
51
|
const BlogIconWrapped = getBlogIconWrapped();
|
|
57
52
|
return /*#__PURE__*/React.createElement(BlogIconWrapped, {
|
|
58
53
|
label: documentLabel(opts, 'blog'),
|
|
@@ -113,12 +108,9 @@ const documentTypeToIcon = (type, opts) => {
|
|
|
113
108
|
const digitalDocumentToIcon = opts => {
|
|
114
109
|
var _opts$provider;
|
|
115
110
|
if ((_opts$provider = opts.provider) !== null && _opts$provider !== void 0 && _opts$provider.id && isConfluenceGenerator(opts.provider.id)) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
testId: "live-doc-icon"
|
|
120
|
-
});
|
|
121
|
-
}
|
|
111
|
+
// Intentionally keep this icon on a synchronous require()-based path.
|
|
112
|
+
// This icon must be present in SSR markup so hydration does not cause a
|
|
113
|
+
// visible empty-state-then-pop-in transition for Smart Links.
|
|
122
114
|
const LiveDocumentIconWrapped = getLiveDocumentIconWrapped();
|
|
123
115
|
return /*#__PURE__*/React.createElement(LiveDocumentIconWrapped, {
|
|
124
116
|
label: documentLabel(opts, 'live document'),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { extractSmartLinkUrl } from '@atlaskit/link-extractors';
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
3
|
import { ActionName, CardAction } from '../../../constants';
|
|
5
4
|
import { getDefinitionId, getExtensionKey, getResourceType } from '../../../state/helpers';
|
|
6
5
|
import { isBlockCardRovoActionExperimentEnabled } from '../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
7
6
|
import { canShowAction } from '../../../utils/actions/can-show-action';
|
|
8
7
|
import { getIsRovoChatEnabled } from '../../../utils/rovo';
|
|
9
|
-
// For
|
|
8
|
+
// For block card experiment (NAVX-4814)
|
|
10
9
|
const 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']);
|
|
11
10
|
const extractRovoChatAction = ({
|
|
12
11
|
actionOptions,
|
|
@@ -28,9 +27,8 @@ const extractRovoChatAction = ({
|
|
|
28
27
|
const isGoogleProvider = extensionKey === 'google-object-provider';
|
|
29
28
|
const is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled((_rovoConfig$product = rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product) !== null && _rovoConfig$product !== void 0 ? _rovoConfig$product : product);
|
|
30
29
|
const is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
31
|
-
const is3PInlinePostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
32
30
|
const is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && is3PBlockExperimentEnabled;
|
|
33
|
-
const isSupportedFeature =
|
|
31
|
+
const isSupportedFeature = is3PAuthRovoActionEnabled || is3PBlockPostAuthActionsEnabled;
|
|
34
32
|
const isOptIn = (actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
35
33
|
const url = extractSmartLinkUrl(response);
|
|
36
34
|
return isSupportedFeature && isOptIn ? {
|
|
@@ -48,7 +48,7 @@ export const extractFlexibleCardActions = ({
|
|
|
48
48
|
}),
|
|
49
49
|
[ActionName.AutomationAction]: extractAutomationAction(response),
|
|
50
50
|
[InternalActionName.AISummaryAction]: extractAISummaryAction(response, url, actionOptions, aiSummaryConfig),
|
|
51
|
-
...(fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
51
|
+
...(fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
52
52
|
[ActionName.RovoChatAction]: extractRovoChatAction({
|
|
53
53
|
actionOptions,
|
|
54
54
|
appearance,
|
|
@@ -44,7 +44,7 @@ const extractFlexibleUiContext = ({
|
|
|
44
44
|
fireEvent,
|
|
45
45
|
id,
|
|
46
46
|
origin,
|
|
47
|
-
...(fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
47
|
+
...(fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
48
48
|
product,
|
|
49
49
|
rovoConfig
|
|
50
50
|
} : undefined),
|
|
@@ -28,7 +28,7 @@ const useRovoChat = () => {
|
|
|
28
28
|
agentId: undefined
|
|
29
29
|
},
|
|
30
30
|
openChat: true,
|
|
31
|
-
openChatMode: isJiraProduct &&
|
|
31
|
+
openChatMode: isJiraProduct && fg('platform_sl_3p_auth_rovo_block_jira_kill_switch') ? 'mini-modal' : 'sidebar'
|
|
32
32
|
},
|
|
33
33
|
onAcknowledgeTimeout: () => {
|
|
34
34
|
// NAVX-3599: Add analytics event
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card" || '',
|
|
5
|
-
packageVersion: "44.
|
|
5
|
+
packageVersion: "44.23.1" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -186,32 +186,9 @@ export const getLazyIcons = () => {
|
|
|
186
186
|
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphSketch" */'@atlaskit/icon-file-type/glyph/sketch/16'),
|
|
187
187
|
large: () => import( /* webpackChunkName: "@atlaskit-internal_glyphSketch" */'@atlaskit/icon-file-type/glyph/sketch/24')
|
|
188
188
|
},
|
|
189
|
-
//
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphBlog" */'@atlaskit/object/blog'),
|
|
193
|
-
large: () => import( /* webpackChunkName: "@atlaskit-internal_glyphBlog" */'@atlaskit/object/tile/blog').then(module => ({
|
|
194
|
-
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
195
|
-
size: "small"
|
|
196
|
-
}))
|
|
197
|
-
}))
|
|
198
|
-
},
|
|
199
|
-
[IconType.LiveDocument]: {
|
|
200
|
-
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphPageLiveDoc" */'@atlaskit/object/page-live-doc'),
|
|
201
|
-
large: () => import( /* webpackChunkName: "@atlaskit-internal_glyphPageLiveDoc" */'@atlaskit/object/tile/page-live-doc').then(module => ({
|
|
202
|
-
default: props => /*#__PURE__*/React.createElement(module.default, _extends({}, props, {
|
|
203
|
-
size: "small"
|
|
204
|
-
}))
|
|
205
|
-
}))
|
|
206
|
-
}
|
|
207
|
-
} : {
|
|
208
|
-
[IconType.Blog]: {
|
|
209
|
-
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphBlock" */'../common/ui/icons/blog-icon')
|
|
210
|
-
},
|
|
211
|
-
[IconType.LiveDocument]: {
|
|
212
|
-
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphPageLiveDoc" */'../common/ui/icons/live-document-icon')
|
|
213
|
-
}
|
|
214
|
-
}),
|
|
189
|
+
// Keep blog/live-document out of the lazy map on purpose.
|
|
190
|
+
// These icons should be present in SSR markup so hydration does not cause
|
|
191
|
+
// a visible empty-state-then-pop-in transition in Smart Link consumers.
|
|
215
192
|
[IconType.Branch]: {
|
|
216
193
|
default: () => import( /* webpackChunkName: "@atlaskit-internal_glyphBranch" */'@atlaskit/object/branch'),
|
|
217
194
|
large: () => import( /* webpackChunkName: "@atlaskit-internal_glyphBranch" */'@atlaskit/object/tile/branch').then(module => ({
|
|
@@ -10,7 +10,6 @@ import { CardDisplay } from '../../constants';
|
|
|
10
10
|
import { useSmartLink } from '../../state';
|
|
11
11
|
import { succeedUfoExperience } from '../../state/analytics';
|
|
12
12
|
import { getClickUrl, getDefinitionId, getExtensionKey, getFirstPartyIdentifier, getObjectAri, getObjectIconUrl, getObjectName, getResourceType, getServices, getThirdPartyARI, isFinalState } from '../../state/helpers';
|
|
13
|
-
import useInlineActionNudgeExperiment from '../../state/hooks/use-inline-action-nudge-experiment';
|
|
14
13
|
import { useSmartLinkCrossProductUrlWrapperGated } from '../../state/hooks/use-smart-link-cross-product-url-wrapper';
|
|
15
14
|
import { SmartLinkModalProvider } from '../../state/modal';
|
|
16
15
|
import { isSpecialClick, isSpecialEvent, isSpecialKey } from '../../utils';
|
|
@@ -91,9 +90,9 @@ function Component({
|
|
|
91
90
|
actionOptions: actionOptionsProp,
|
|
92
91
|
platform
|
|
93
92
|
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
|
|
94
|
+
// TODO: [ZS] Add new experiment flag to determine if the Rovo Actions CTA should be shown
|
|
95
|
+
const rovoActionsCtaShown = false;
|
|
97
96
|
const fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
|
|
98
97
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
99
98
|
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/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -9,18 +9,13 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
9
9
|
import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled';
|
|
10
10
|
import Spinner from '@atlaskit/spinner';
|
|
11
11
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
12
|
-
import { ActionName } from '../../../../../../constants';
|
|
13
|
-
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
14
12
|
import { getPrimitivesInlineSpaceBySize } from '../../../utils';
|
|
15
13
|
import ActionIcon from '../action-icon';
|
|
16
14
|
const styles = {
|
|
17
15
|
button: "_bfhksm61 _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66 _1bsb1osq _1ah31i6y _irr31dpa _1di6fcek",
|
|
18
|
-
pillButton: "_2rko1qi0 _189ee4h9 _1dqonqa1 _1h6d1l7x _kqswh2mm _bfhksm61 _u5f3u2gc _19bvv77o _1bsb1osq _1ah31i6y _irr31dpa _1di6fcek",
|
|
19
16
|
content: "_11c8wadc _syazi7uo",
|
|
20
|
-
pillContent: "_11c8wadc _syazi7uo _o5721q9c",
|
|
21
17
|
spinner: "_1bsb1tcg _4t3i1tcg _1e0c116y _4cvr1h6o _1bah1h6o"
|
|
22
18
|
};
|
|
23
|
-
const pillIconWrapperStyles = null;
|
|
24
19
|
const ActionButton = ({
|
|
25
20
|
content,
|
|
26
21
|
icon: iconOption,
|
|
@@ -34,7 +29,6 @@ const ActionButton = ({
|
|
|
34
29
|
style,
|
|
35
30
|
ariaLabel
|
|
36
31
|
}) => {
|
|
37
|
-
var _flexibleUiContext$ac;
|
|
38
32
|
const space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : getPrimitivesInlineSpaceBySize(size);
|
|
39
33
|
const onClick = useCallback(() => {
|
|
40
34
|
if (!isDisabled && !isLoading && onClickCallback) {
|
|
@@ -43,20 +37,7 @@ const ActionButton = ({
|
|
|
43
37
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
44
38
|
const is3pExperimentEnabled =
|
|
45
39
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
46
|
-
fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true)
|
|
47
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
48
|
-
fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* NOTE: We only apply the pill variant when there's text label
|
|
52
|
-
* (textual `content`). Icon-only stack-item buttons (e.g. the link/expand
|
|
53
|
-
* icons in the hover card footer) are also rendered with `as="stack-item"`
|
|
54
|
-
* but pass `content=""` and should keep their original borderless styling.
|
|
55
|
-
*/
|
|
56
|
-
const hasTextualContent = typeof content === 'string' ? content.trim().length > 0 : Boolean(content);
|
|
57
|
-
const flexibleUiContext = useFlexibleUiContext();
|
|
58
|
-
const isInRovoActionStack = !!(flexibleUiContext !== null && flexibleUiContext !== void 0 && (_flexibleUiContext$ac = flexibleUiContext.actions) !== null && _flexibleUiContext$ac !== void 0 && _flexibleUiContext$ac[ActionName.RovoChatAction]);
|
|
59
|
-
const isInlineActionNudgeExperiment = hasTextualContent && isInRovoActionStack && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
40
|
+
fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
60
41
|
const icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(ActionIcon, {
|
|
61
42
|
icon: is3pExperimentEnabled ? /*#__PURE__*/React.createElement(Box, {
|
|
62
43
|
xcss: styles.spinner
|
|
@@ -68,23 +49,21 @@ const ActionButton = ({
|
|
|
68
49
|
})
|
|
69
50
|
}) : iconOption;
|
|
70
51
|
return /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
71
|
-
xcss: cx(
|
|
52
|
+
xcss: cx(styles.button)
|
|
72
53
|
}, tooltipProps, {
|
|
73
54
|
onClick: onClick,
|
|
74
55
|
testId: testId
|
|
75
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
76
57
|
,
|
|
77
58
|
style: style
|
|
78
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
59
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
79
60
|
'aria-label': ariaLabel
|
|
80
61
|
} : {}), /*#__PURE__*/React.createElement(Inline, {
|
|
81
62
|
alignBlock: "center",
|
|
82
|
-
grow:
|
|
83
|
-
space:
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
}, icon) : icon, /*#__PURE__*/React.createElement(Box, {
|
|
87
|
-
xcss: cx(isInlineActionNudgeExperiment ? styles.pillContent : styles.content)
|
|
63
|
+
grow: "fill",
|
|
64
|
+
space: space
|
|
65
|
+
}, icon, /*#__PURE__*/React.createElement(Box, {
|
|
66
|
+
xcss: cx(styles.content)
|
|
88
67
|
}, content)));
|
|
89
68
|
};
|
|
90
69
|
export default ActionButton;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
|
-
import { ActionName } from '../../../../../../constants';
|
|
7
|
-
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
8
4
|
import ActionButton from './action-button';
|
|
9
5
|
const ActionStackItem = ({
|
|
10
6
|
content,
|
|
@@ -14,17 +10,12 @@ const ActionStackItem = ({
|
|
|
14
10
|
hideTooltip,
|
|
15
11
|
...props
|
|
16
12
|
}) => {
|
|
17
|
-
var _flexibleUiContext$ac;
|
|
18
|
-
const flexibleUiContext = useFlexibleUiContext();
|
|
19
|
-
const isRovoAction = !!(flexibleUiContext !== null && flexibleUiContext !== void 0 && (_flexibleUiContext$ac = flexibleUiContext.actions) !== null && _flexibleUiContext$ac !== void 0 && _flexibleUiContext$ac[ActionName.RovoChatAction]);
|
|
20
|
-
const isRovoPillVariant = isRovoAction && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
21
13
|
return hideTooltip ? /*#__PURE__*/React.createElement(ActionButton, _extends({}, props, {
|
|
22
14
|
content: content
|
|
23
15
|
})) : /*#__PURE__*/React.createElement(Tooltip, {
|
|
24
16
|
content: tooltipMessage || content,
|
|
25
17
|
onHide: tooltipOnHide,
|
|
26
|
-
hideTooltipOnMouseDown: hideTooltipOnMouseDown
|
|
27
|
-
position: isRovoPillVariant ? 'right' : undefined
|
|
18
|
+
hideTooltipOnMouseDown: hideTooltipOnMouseDown
|
|
28
19
|
}, tooltipProps => /*#__PURE__*/React.createElement(ActionButton, _extends({}, props, {
|
|
29
20
|
content: content,
|
|
30
21
|
tooltipProps: tooltipProps
|
package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js
CHANGED
|
@@ -4,7 +4,6 @@ import { FormattedMessage } from 'react-intl';
|
|
|
4
4
|
import RovoIcon from '@atlaskit/icon-lab/core/rovo';
|
|
5
5
|
import AiIcon from '@atlaskit/icon/core/atlassian-intelligence';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
7
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
9
8
|
import { messages } from '../../../../../messages';
|
|
10
9
|
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
@@ -45,7 +44,7 @@ export function AISummariseAction({
|
|
|
45
44
|
spacing: "spacious",
|
|
46
45
|
color: "currentColor",
|
|
47
46
|
label: "Summarise with AI"
|
|
48
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
47
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
49
48
|
size: props.iconSize
|
|
50
49
|
} : {})),
|
|
51
50
|
onClick: handleActionClick,
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import { di } from 'react-magnetic-di';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
6
5
|
import useAISummaryAction from '../../../../../state/hooks/use-ai-summary-action';
|
|
7
6
|
import { AISummariseAction } from './ai-summarise-action';
|
|
8
7
|
import { CopySummaryAction, CopySummaryActionNew } from './copy-summary-action';
|
|
@@ -22,7 +21,7 @@ export const AISummaryActionComponent = props => {
|
|
|
22
21
|
useEffect(() => {
|
|
23
22
|
onLoadingChange === null || onLoadingChange === void 0 ? void 0 : onLoadingChange(status === 'loading');
|
|
24
23
|
}, [onLoadingChange, status]);
|
|
25
|
-
return status === 'done' ? fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
24
|
+
return status === 'done' ? fg('platform_sl_3p_auth_rovo_action_kill_switch') ? /*#__PURE__*/React.createElement(CopySummaryActionNew, _extends({}, props, {
|
|
26
25
|
summary: content,
|
|
27
26
|
testId: testId
|
|
28
27
|
})) : /*#__PURE__*/React.createElement(CopySummaryAction, _extends({}, props, {
|
|
@@ -4,7 +4,6 @@ import { FormattedMessage, useIntl } from 'react-intl';
|
|
|
4
4
|
import AutomationIcon from '@atlaskit/icon/core/automation';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
6
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
7
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
9
8
|
import { ActionName } from '../../../../../constants';
|
|
10
9
|
import { messages } from '../../../../../messages';
|
|
@@ -79,7 +78,7 @@ const AutomationAction = props => {
|
|
|
79
78
|
spacing: "spacious",
|
|
80
79
|
color: "currentColor",
|
|
81
80
|
label: automationActionIconLabel
|
|
82
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
81
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
83
82
|
size: props.iconSize
|
|
84
83
|
} : {})),
|
|
85
84
|
testId: "smart-action-automation-action",
|
|
@@ -3,7 +3,6 @@ import React, { useCallback, useState } from 'react';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
4
|
import LinkIcon from '@atlaskit/icon/core/link';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
6
|
import { ActionName } from '../../../../../constants';
|
|
8
7
|
import { messages } from '../../../../../messages';
|
|
9
8
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -39,7 +38,7 @@ const CopyLinkAction = ({
|
|
|
39
38
|
color: "currentColor",
|
|
40
39
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
41
40
|
spacing: "spacious"
|
|
42
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
41
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
43
42
|
size: props.iconSize
|
|
44
43
|
} : {})),
|
|
45
44
|
onClick: onClick,
|
|
@@ -3,7 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
4
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
6
|
import { ActionName } from '../../../../../constants';
|
|
8
7
|
import { messages } from '../../../../../messages';
|
|
9
8
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -70,7 +69,7 @@ const FollowAction = props => {
|
|
|
70
69
|
};
|
|
71
70
|
return /*#__PURE__*/React.createElement(ServerAction, _extends({
|
|
72
71
|
content: /*#__PURE__*/React.createElement(FormattedMessage, label)
|
|
73
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
72
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
74
73
|
ariaLabel: intl.formatMessage(label)
|
|
75
74
|
} : {}, {
|
|
76
75
|
icon: followIcon,
|
|
@@ -5,7 +5,6 @@ import MediaServicesActualSizeIcon from '@atlaskit/icon/core/grow-diagonal';
|
|
|
5
5
|
import PanelRightIcon from '@atlaskit/icon/core/panel-right';
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
8
|
import { ActionName } from '../../../../../constants';
|
|
10
9
|
import { messages } from '../../../../../messages';
|
|
11
10
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -37,7 +36,7 @@ const PreviewAction = ({
|
|
|
37
36
|
color: "currentColor",
|
|
38
37
|
spacing: "spacious",
|
|
39
38
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
40
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
39
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
41
40
|
size: props.iconSize
|
|
42
41
|
} : {}));
|
|
43
42
|
}
|
|
@@ -45,7 +44,7 @@ const PreviewAction = ({
|
|
|
45
44
|
color: "currentColor",
|
|
46
45
|
spacing: "spacious",
|
|
47
46
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
48
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled
|
|
47
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled ? {
|
|
49
48
|
size: props.iconSize
|
|
50
49
|
} : {}));
|
|
51
50
|
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useMemo } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
4
|
import { ActionName } from '../../../../../constants';
|
|
6
5
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
7
6
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
@@ -9,9 +8,6 @@ import useRovoChat from '../../../../../state/hooks/use-rovo-chat';
|
|
|
9
8
|
import { getPromptAction, RovoChatPromptKey } from "../../../../common/rovo-chat-utils";
|
|
10
9
|
import Action from '../action';
|
|
11
10
|
const GOOGLE_PROMPTS = [RovoChatPromptKey.RECOMMEND_OTHER_SOURCES, RovoChatPromptKey.SHOW_OTHER_MENTIONS, RovoChatPromptKey.SUGGEST_IMPROVEMENT];
|
|
12
|
-
const GENERIC_3P_PROMPTS = [
|
|
13
|
-
// For rovogrowth-640-inline-action-nudge-exp only
|
|
14
|
-
RovoChatPromptKey.SHOW_ME_WHATS_RELEVANT, RovoChatPromptKey.SUMMARIZE_THIS_FOR_ME, RovoChatPromptKey.ASK_A_SPECIFIC_QUESTION];
|
|
15
11
|
const DEFAULT_PROMPTS = GOOGLE_PROMPTS;
|
|
16
12
|
const RovoChatAction = ({
|
|
17
13
|
onClick: onClickCallback,
|
|
@@ -31,9 +27,6 @@ const RovoChatAction = ({
|
|
|
31
27
|
if (prompts) {
|
|
32
28
|
return prompts;
|
|
33
29
|
}
|
|
34
|
-
if (expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true)) {
|
|
35
|
-
return GENERIC_3P_PROMPTS;
|
|
36
|
-
}
|
|
37
30
|
return DEFAULT_PROMPTS;
|
|
38
31
|
}, [prompts]);
|
|
39
32
|
const invoke = useInvokeClientAction({});
|
|
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { lazy, useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
6
5
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
7
6
|
import { messages } from '../../../../../messages';
|
|
8
7
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -35,10 +34,10 @@ const ViewRelatedLinksAction = ({
|
|
|
35
34
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
36
35
|
return actionData ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
37
36
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
38
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
37
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
39
38
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
40
39
|
} : {}, {
|
|
41
|
-
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
40
|
+
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
|
|
42
41
|
iconSize: props.iconSize
|
|
43
42
|
} : {}),
|
|
44
43
|
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}
|
|
@@ -5,15 +5,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import { useCallback, useMemo, useState } from 'react';
|
|
6
6
|
import { di } from 'react-magnetic-di';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
8
|
import { ActionName, SmartLinkSize } from '../../../../../constants';
|
|
10
9
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
11
10
|
import * as Actions from '../../actions';
|
|
12
11
|
import { ActionFooter } from './action-footer';
|
|
13
|
-
import AskRovoSectionHeader from './ask-rovo-section-header';
|
|
14
12
|
const ignoreContainerPaddingStyles = null;
|
|
15
|
-
const inlineActionNudgePillWrapperStyles = null;
|
|
16
|
-
const inlineActionNudgeColumnStyles = null;
|
|
17
13
|
const DEFAULT_SORT_ORDER = ['PreviewAction', 'CopyLinkAction', 'AISummaryAction'];
|
|
18
14
|
const sort = (a, b) => {
|
|
19
15
|
let idxA = DEFAULT_SORT_ORDER.indexOf(a);
|
|
@@ -56,10 +52,7 @@ const ActionBlock = ({
|
|
|
56
52
|
var _context$actions;
|
|
57
53
|
const context = useFlexibleUiContext();
|
|
58
54
|
const ui = useFlexibleUiOptionContext();
|
|
59
|
-
const isRovoChatActionAvailable =
|
|
60
|
-
|
|
61
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
62
|
-
const isInlineActionNudgeExperiment = fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
55
|
+
const isRovoChatActionAvailable = isAny3pRovoActionsExperimentOn && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction]) !== undefined : undefined;
|
|
63
56
|
const [message, setMessage] = useState();
|
|
64
57
|
const [isLoading, setIsLoading] = useState(false);
|
|
65
58
|
const onLoadingChange = useCallback(isLoading => {
|
|
@@ -77,7 +70,7 @@ const ActionBlock = ({
|
|
|
77
70
|
if (!(context !== null && context !== void 0 && context.actions)) {
|
|
78
71
|
return;
|
|
79
72
|
}
|
|
80
|
-
const arr = fg('platform_sl_3p_auth_rovo_action_kill_switch')
|
|
73
|
+
const arr = fg('platform_sl_3p_auth_rovo_action_kill_switch') ? isRovoChatActionAvailable ? [ActionName.RovoChatAction] : Object.keys(context.actions).filter(name => name !== ActionName.RovoChatAction) : Object.keys(context.actions);
|
|
81
74
|
arr.sort(sort);
|
|
82
75
|
const renderAction = name => {
|
|
83
76
|
const Action = name in Actions ? Actions[name] : undefined;
|
|
@@ -94,32 +87,17 @@ const ActionBlock = ({
|
|
|
94
87
|
size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
|
|
95
88
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
96
89
|
,
|
|
97
|
-
style:
|
|
90
|
+
style: padding ? {
|
|
98
91
|
paddingInline: padding
|
|
99
92
|
} : undefined,
|
|
100
93
|
hideTooltip: isLoading
|
|
101
94
|
});
|
|
102
95
|
};
|
|
103
96
|
return arr.map(name => renderAction(name));
|
|
104
|
-
}, [context === null || context === void 0 ? void 0 : context.actions, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, onClick
|
|
105
|
-
const showRovoSectionHeader = isInlineActionNudgeExperiment && isRovoChatActionAvailable;
|
|
97
|
+
}, [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]);
|
|
106
98
|
if (!actions) {
|
|
107
99
|
return null;
|
|
108
100
|
}
|
|
109
|
-
if (isInlineActionNudgeExperiment && isRovoChatActionAvailable) {
|
|
110
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
111
|
-
ref: blockRef,
|
|
112
|
-
"data-testid": testId,
|
|
113
|
-
className: ax(["_1e0c1txw _2lx21bp4 _vchhusvi _1bsb1osq"])
|
|
114
|
-
}, showRovoSectionHeader && /*#__PURE__*/React.createElement(AskRovoSectionHeader, {
|
|
115
|
-
testId: testId ? `${testId}-rovo-section-header` : undefined
|
|
116
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
className: ax(["_zulpu2gc _1e0c11p5 _yv0e1ris"])
|
|
118
|
-
}, actions), /*#__PURE__*/React.createElement(ActionFooter, {
|
|
119
|
-
message: message,
|
|
120
|
-
testId: testId
|
|
121
|
-
}));
|
|
122
|
-
}
|
|
123
101
|
return /*#__PURE__*/React.createElement("div", {
|
|
124
102
|
ref: blockRef,
|
|
125
103
|
"data-testid": testId
|
package/dist/es2019/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}
|
|
@@ -4,8 +4,6 @@ import "./index.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
7
|
import { ActionName } from '../../../../../constants';
|
|
10
8
|
import { useFlexibleCardContext } from '../../../../../state/flexible-ui-context';
|
|
11
9
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
@@ -18,7 +16,6 @@ import Block from '../block';
|
|
|
18
16
|
*/
|
|
19
17
|
const HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [ActionName.RovoChatAction];
|
|
20
18
|
const ignoreContainerMarginStyles = null;
|
|
21
|
-
const inlineActionNudgeFooterMarginStyles = null;
|
|
22
19
|
const elevatedFooterStyles = null;
|
|
23
20
|
const providerStyles = null;
|
|
24
21
|
const actionsStyles = null;
|
|
@@ -60,7 +57,7 @@ const ResolvedHoverCardFooterBlock = ({
|
|
|
60
57
|
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
61
58
|
size: size,
|
|
62
59
|
testId: `${testId}-resolved-view`,
|
|
63
|
-
className: ax(["_18zrpxbi _1rjcutpp _vchhusvi _1bsb129b _18u01ivi _2hwxc10g _otyr1ya9 _4t3ioahv", "_zulpu2gc _x3doj0fz _bfhkhfxm _mrkb1mok _1o0z1mok"
|
|
60
|
+
className: ax(["_18zrpxbi _1rjcutpp _vchhusvi _1bsb129b _18u01ivi _2hwxc10g _otyr1ya9 _4t3ioahv", "_zulpu2gc _x3doj0fz _bfhkhfxm _mrkb1mok _1o0z1mok"])
|
|
64
61
|
}), !hideProvider && /*#__PURE__*/React.createElement("div", {
|
|
65
62
|
className: ax(["_4t3i1ejb _1e0c1txw _4cvr1h6o _1bah1y6m _vchhusvi _16jlkb7n"])
|
|
66
63
|
}, /*#__PURE__*/React.createElement(Provider, {
|