@atlaskit/smart-card 45.6.10 → 45.6.12
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 +17 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-not-found-site-access-exists--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-resolved-icon-variations-resolvedclient-icontesturls---flexible-extractsmartlinkicon-path---default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-accessibility--hidden-action-button-focused--default.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-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-icon-variations-resolvedclient-icontesturls---extracticon-document-non-document-paths---default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-true.png +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-default-icon-and-truncation--default.png +2 -2
- package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +14 -7
- package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
- package/dist/cjs/view/EmbedModal/index.js +29 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +8 -6
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -20
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +4 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/index.compiled.css +0 -1
- package/dist/cjs/view/common/ai-summary/index.js +2 -8
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-not-found-site-access-exists--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-resolved-icon-variations-resolvedclient-icontesturls---flexible-extractsmartlinkicon-path---default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-accessibility--hidden-action-button-focused--default.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-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-icon-variations-resolvedclient-icontesturls---extracticon-document-non-document-paths---default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-true.png +2 -2
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-default-icon-and-truncation--default.png +2 -2
- package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +13 -6
- package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
- package/dist/es2019/view/EmbedModal/index.js +30 -3
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +8 -6
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -23
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +4 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/index.compiled.css +0 -1
- package/dist/es2019/view/common/ai-summary/index.js +2 -8
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-errored-title-block-competitor-prompt--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-not-found-site-access-exists--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-resolved-icon-variations-resolvedclient-icontesturls---flexible-extractsmartlinkicon-path---default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-block-ai-summary/flexuiblockaisummaryready--default.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-accessibility--hidden-action-button-focused--default.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-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-icon-variations-resolvedclient-icontesturls---extracticon-document-non-document-paths---default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-all-card-examples-in-text--default--jfp-magma-platform-lozenge-jump-fix-true.png +2 -2
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-with-default-icon-and-truncation--default.png +2 -2
- package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +1 -3
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedModal/components/link-info/index.js +14 -7
- package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +8 -3
- package/dist/esm/view/EmbedModal/index.js +30 -3
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +8 -6
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -20
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +4 -9
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/index.compiled.css +0 -1
- package/dist/esm/view/common/ai-summary/index.js +2 -8
- package/dist/types/view/EmbedModal/components/link-info/index.d.ts +1 -1
- package/dist/types/view/EmbedModal/components/link-info/link-info-button/index.d.ts +3 -2
- package/dist/types/view/EmbedModal/components/link-info/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +0 -4
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +1 -2
- package/package.json +7 -7
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-resolved-icon-variations-resolvedclient-icontesturls-/342/200/224-flexible-extractsmartlinkicon-path---default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-icon-variations-resolvedclient-icontesturls-/342/200/224-extracticon-document-non-document-paths---default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-resolved-icon-variations-resolvedclient-icontesturls-/342/200/224-flexible-extractsmartlinkicon-path---default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-icon-variations-resolvedclient-icontesturls-/342/200/224-extracticon-document-non-document-paths---default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-resolved-icon-variations-resolvedclient-icontesturls-/342/200/224-flexible-extractsmartlinkicon-path---default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--dfo-fix-preview-dynamic-style-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--dfo-fix-preview-dynamic-style-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--dfo-fix-preview-dynamic-style-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--dfo-fix-preview-dynamic-style-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--dfo-fix-preview-dynamic-style-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--dfo-fix-preview-dynamic-style-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-resolved-icon-variations-resolvedclient-icontesturls-/342/200/224-extracticon-document-non-document-paths---default.png +0 -3
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/{flexible-ui-block-preview-large--default--dfo-fix-preview-dynamic-style-false.png → flexible-ui-block-preview-large--default.png} +0 -0
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/{flexible-ui-block-preview-medium--default--dfo-fix-preview-dynamic-style-false.png → flexible-ui-block-preview-medium--default.png} +0 -0
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/{flexible-ui-block-preview-mixed-padding--default--dfo-fix-preview-dynamic-style-false.png → flexible-ui-block-preview-mixed-padding--default.png} +0 -0
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/{flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-false.png → flexible-ui-block-preview-override-css--default.png} +0 -0
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/{flexible-ui-block-preview-small--default--dfo-fix-preview-dynamic-style-false.png → flexible-ui-block-preview-small--default.png} +0 -0
- /package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/{flexible-ui-block-preview-xlarge--default--dfo-fix-preview-dynamic-style-false.png → flexible-ui-block-preview-xlarge--default.png} +0 -0
- /package/dist/{cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--dfo-fix-preview-dynamic-style-true.png → es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default.png} +0 -0
- /package/dist/{cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--dfo-fix-preview-dynamic-style-true.png → es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default.png} +0 -0
- /package/dist/{cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--dfo-fix-preview-dynamic-style-true.png → es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default.png} +0 -0
- /package/dist/{cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-true.png → es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default.png} +0 -0
- /package/dist/{cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--dfo-fix-preview-dynamic-style-true.png → es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default.png} +0 -0
- /package/dist/{cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--dfo-fix-preview-dynamic-style-true.png → es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default.png} +0 -0
- /package/dist/{es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--dfo-fix-preview-dynamic-style-false.png → esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default.png} +0 -0
- /package/dist/{es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--dfo-fix-preview-dynamic-style-false.png → esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default.png} +0 -0
- /package/dist/{es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--dfo-fix-preview-dynamic-style-false.png → esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default.png} +0 -0
- /package/dist/{es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-false.png → esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default.png} +0 -0
- /package/dist/{es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--dfo-fix-preview-dynamic-style-false.png → esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default.png} +0 -0
- /package/dist/{es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--dfo-fix-preview-dynamic-style-false.png → esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default.png} +0 -0
|
@@ -25,12 +25,10 @@ const extractRovoChatAction = ({
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
const extensionKey = getExtensionKey(response);
|
|
28
|
-
const isGoogleProvider = extensionKey === 'google-object-provider';
|
|
29
28
|
const isInlineExperimentEnabled = fg('platform_sl_3p_auth_inline_tailored_cta_killswitch') && expValEqualsNoExposure('platform_sl_3p_auth_inline_tailored_cta', 'isEnabled', true);
|
|
30
|
-
const is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
31
29
|
const is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && (rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product) === 'CONFLUENCE';
|
|
32
30
|
const is3PEmbedPostAuthActionsEnabled = isEmbedRovoActionsFooterExperimentEnabled === true;
|
|
33
|
-
const isSupportedFeature =
|
|
31
|
+
const isSupportedFeature = is3PBlockPostAuthActionsEnabled || isInlineExperimentEnabled || is3PEmbedPostAuthActionsEnabled;
|
|
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 ? {
|
|
@@ -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: "45.6.
|
|
5
|
+
packageVersion: "45.6.11" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
5
|
import React, { useMemo } from 'react';
|
|
@@ -9,6 +10,7 @@ import VidFullScreenOnIcon from '@atlaskit/icon/core/fullscreen-enter';
|
|
|
9
10
|
import FullscreenExitIcon from '@atlaskit/icon/core/fullscreen-exit';
|
|
10
11
|
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
11
12
|
import { CloseButton, useModal } from '@atlaskit/modal-dialog';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
15
|
import { messages } from '../../../../messages';
|
|
14
16
|
import { Icon } from '../../../common/Icon';
|
|
@@ -33,7 +35,8 @@ const LinkInfo = ({
|
|
|
33
35
|
onViewButtonClick,
|
|
34
36
|
size,
|
|
35
37
|
testId,
|
|
36
|
-
title
|
|
38
|
+
title,
|
|
39
|
+
focusRef
|
|
37
40
|
}) => {
|
|
38
41
|
const {
|
|
39
42
|
onClose
|
|
@@ -41,7 +44,7 @@ const LinkInfo = ({
|
|
|
41
44
|
const {
|
|
42
45
|
formatMessage
|
|
43
46
|
} = useIntl();
|
|
44
|
-
const downloadButton = useMemo(() => /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
47
|
+
const downloadButton = useMemo(() => /*#__PURE__*/React.createElement(LinkInfoButton, _extends({
|
|
45
48
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
|
|
46
49
|
icon: () => /*#__PURE__*/React.createElement(DownloadIcon, {
|
|
47
50
|
label: "",
|
|
@@ -51,14 +54,16 @@ const LinkInfo = ({
|
|
|
51
54
|
label: formatMessage(messages.download),
|
|
52
55
|
onClick: onDownloadButtonClick,
|
|
53
56
|
testId: `${testId}-download`
|
|
54
|
-
}
|
|
57
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
58
|
+
focusRef
|
|
59
|
+
} : {})), [onDownloadButtonClick, testId, formatMessage, focusRef]);
|
|
55
60
|
const urlButton = useMemo(() => {
|
|
56
61
|
if (onViewButtonClick) {
|
|
57
62
|
const label = providerName ? formatMessage(messages.viewInProvider, {
|
|
58
63
|
providerName
|
|
59
64
|
}) : formatMessage(messages.viewOriginal);
|
|
60
65
|
const content = providerName ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.viewIn), " ", providerName) : /*#__PURE__*/React.createElement(FormattedMessage, messages.viewOriginal);
|
|
61
|
-
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
66
|
+
return /*#__PURE__*/React.createElement(LinkInfoButton, _extends({
|
|
62
67
|
content: content,
|
|
63
68
|
icon: () => /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
64
69
|
label: "",
|
|
@@ -69,9 +74,11 @@ const LinkInfo = ({
|
|
|
69
74
|
onClick: onViewButtonClick,
|
|
70
75
|
testId: `${testId}-url`,
|
|
71
76
|
role: 'link'
|
|
72
|
-
})
|
|
77
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
78
|
+
focusRef: !onDownloadButtonClick ? focusRef : undefined
|
|
79
|
+
} : {}));
|
|
73
80
|
}
|
|
74
|
-
}, [onViewButtonClick, providerName, testId, formatMessage]);
|
|
81
|
+
}, [onViewButtonClick, providerName, testId, formatMessage, onDownloadButtonClick, focusRef]);
|
|
75
82
|
const sizeButton = useMemo(() => {
|
|
76
83
|
const isFullScreen = size === MAX_MODAL_SIZE;
|
|
77
84
|
const message = isFullScreen ? messages.preview_min_size : messages.preview_max_size;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
6
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
5
7
|
const LinkInfoButton = ({
|
|
@@ -8,7 +10,8 @@ const LinkInfoButton = ({
|
|
|
8
10
|
label,
|
|
9
11
|
onClick,
|
|
10
12
|
testId,
|
|
11
|
-
role
|
|
13
|
+
role,
|
|
14
|
+
focusRef
|
|
12
15
|
}) => {
|
|
13
16
|
const onMouseDown = useMouseDownEvent();
|
|
14
17
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
@@ -16,7 +19,7 @@ const LinkInfoButton = ({
|
|
|
16
19
|
hideTooltipOnClick: true,
|
|
17
20
|
tag: "span",
|
|
18
21
|
testId: `${testId}-tooltip`
|
|
19
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
22
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
20
23
|
appearance: "subtle",
|
|
21
24
|
icon: icon,
|
|
22
25
|
label: label,
|
|
@@ -24,6 +27,8 @@ const LinkInfoButton = ({
|
|
|
24
27
|
onMouseDown: onMouseDown,
|
|
25
28
|
testId: `${testId}-button`,
|
|
26
29
|
role: role
|
|
27
|
-
})
|
|
30
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
31
|
+
ref: focusRef
|
|
32
|
+
} : {})));
|
|
28
33
|
};
|
|
29
34
|
export default LinkInfoButton;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, { useCallback, useRef, useState } from 'react';
|
|
2
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
5
6
|
import { SmartLinkSize } from '../../constants';
|
|
6
7
|
import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
|
|
@@ -101,6 +102,30 @@ const EmbedModal = ({
|
|
|
101
102
|
if (previewUrl && isSupportTheming) {
|
|
102
103
|
previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
|
|
103
104
|
}
|
|
105
|
+
const focusRef = useRef(null);
|
|
106
|
+
const hasRestoredFocus = useRef(false);
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
if (!isOpen || !fg('navx-4719-a11y-embed-modal-focus-states')) {
|
|
109
|
+
hasRestoredFocus.current = false;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const handleWindowBlur = () => {
|
|
113
|
+
if (hasRestoredFocus.current) return;
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
var _focusRef$current;
|
|
116
|
+
// document.hasFocus() returns true when focus moved to an
|
|
117
|
+
// iframe on the same page, false when the window itself
|
|
118
|
+
// lost focus (e.g. user switched browser tabs)
|
|
119
|
+
if (!document.hasFocus()) return;
|
|
120
|
+
hasRestoredFocus.current = true;
|
|
121
|
+
(_focusRef$current = focusRef.current) === null || _focusRef$current === void 0 ? void 0 : _focusRef$current.focus();
|
|
122
|
+
}, 0);
|
|
123
|
+
};
|
|
124
|
+
window.addEventListener('blur', handleWindowBlur);
|
|
125
|
+
return () => {
|
|
126
|
+
window.removeEventListener('blur', handleWindowBlur);
|
|
127
|
+
};
|
|
128
|
+
}, [isOpen]);
|
|
104
129
|
return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, {
|
|
105
130
|
height: "100%",
|
|
106
131
|
onClose: handleOnClose,
|
|
@@ -110,7 +135,7 @@ const EmbedModal = ({
|
|
|
110
135
|
width: width,
|
|
111
136
|
label: title,
|
|
112
137
|
isBlanketHidden: isBlanketHidden
|
|
113
|
-
}, /*#__PURE__*/React.createElement(LinkInfo, {
|
|
138
|
+
}, /*#__PURE__*/React.createElement(LinkInfo, _extends({
|
|
114
139
|
icon: linkIcon && {
|
|
115
140
|
icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
|
|
116
141
|
size: SmartLinkSize.Large
|
|
@@ -124,7 +149,9 @@ const EmbedModal = ({
|
|
|
124
149
|
size: width,
|
|
125
150
|
title: title,
|
|
126
151
|
testId: testId
|
|
127
|
-
}
|
|
152
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
153
|
+
focusRef
|
|
154
|
+
} : {})), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(EmbedContent, {
|
|
128
155
|
isTrusted: isTrusted,
|
|
129
156
|
name: iframeName,
|
|
130
157
|
src: previewUrl,
|
package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js
CHANGED
|
@@ -8,7 +8,6 @@ import { cx } from '@atlaskit/css';
|
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled';
|
|
10
10
|
import Spinner from '@atlaskit/spinner';
|
|
11
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
12
11
|
import { getPrimitivesInlineSpaceBySize } from '../../../utils';
|
|
13
12
|
import ActionIcon from '../action-icon';
|
|
14
13
|
const styles = {
|
|
@@ -35,11 +34,14 @@ const ActionButton = ({
|
|
|
35
34
|
onClickCallback();
|
|
36
35
|
}
|
|
37
36
|
}, [isDisabled, isLoading, onClickCallback]);
|
|
38
|
-
|
|
39
|
-
//
|
|
40
|
-
|
|
37
|
+
|
|
38
|
+
// FIX-ME: This is required for ResolvedHoverCardFooterBlock action to show proper size
|
|
39
|
+
// ResolvedHoverCardFooterBlock is currently not used but keeping inside the code base for
|
|
40
|
+
// upcoming experiment to refresh HoverCard design
|
|
41
|
+
// If ResolvedHoverCardFooterBlock is cleaned up, this code can be removed.
|
|
42
|
+
const showSpinnerSize24 = false;
|
|
41
43
|
const icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(ActionIcon, {
|
|
42
|
-
icon:
|
|
44
|
+
icon: showSpinnerSize24 ? /*#__PURE__*/React.createElement(Box, {
|
|
43
45
|
xcss: styles.spinner
|
|
44
46
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
45
47
|
size: 16,
|
|
@@ -56,7 +58,7 @@ const ActionButton = ({
|
|
|
56
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
57
59
|
,
|
|
58
60
|
style: style
|
|
59
|
-
}, fg('
|
|
61
|
+
}, fg('platform_sl_action_refactoring') ? {
|
|
60
62
|
'aria-label': ariaLabel
|
|
61
63
|
} : {}), /*#__PURE__*/React.createElement(Inline, {
|
|
62
64
|
alignBlock: "center",
|
|
@@ -21,7 +21,7 @@ export const AISummaryActionComponent = props => {
|
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
onLoadingChange === null || onLoadingChange === void 0 ? void 0 : onLoadingChange(status === 'loading');
|
|
23
23
|
}, [onLoadingChange, status]);
|
|
24
|
-
return status === 'done' ? fg('
|
|
24
|
+
return status === 'done' ? fg('platform_sl_action_refactoring') ? /*#__PURE__*/React.createElement(CopySummaryActionNew, _extends({}, props, {
|
|
25
25
|
summary: content,
|
|
26
26
|
testId: testId
|
|
27
27
|
})) : /*#__PURE__*/React.createElement(CopySummaryAction, _extends({}, props, {
|
|
@@ -69,7 +69,7 @@ const FollowAction = props => {
|
|
|
69
69
|
};
|
|
70
70
|
return /*#__PURE__*/React.createElement(ServerAction, _extends({
|
|
71
71
|
content: /*#__PURE__*/React.createElement(FormattedMessage, label)
|
|
72
|
-
}, fg('
|
|
72
|
+
}, fg('platform_sl_action_refactoring') ? {
|
|
73
73
|
ariaLabel: intl.formatMessage(label)
|
|
74
74
|
} : {}, {
|
|
75
75
|
icon: followIcon,
|
|
@@ -34,10 +34,10 @@ const ViewRelatedLinksAction = ({
|
|
|
34
34
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
35
35
|
return actionData ? /*#__PURE__*/React.createElement(Action, _extends({
|
|
36
36
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
37
|
-
}, fg('
|
|
37
|
+
}, fg('platform_sl_action_refactoring') ? {
|
|
38
38
|
tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_view_related_links)
|
|
39
39
|
} : {}, {
|
|
40
|
-
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('
|
|
40
|
+
icon: /*#__PURE__*/React.createElement(RelatedLinksActionIcon, fg('platform_sl_action_refactoring') ? {
|
|
41
41
|
iconSize: props.iconSize
|
|
42
42
|
} : {}),
|
|
43
43
|
onClick: onClick,
|
|
@@ -12,7 +12,6 @@ import { Provider } from '../../elements';
|
|
|
12
12
|
import Block from '../block';
|
|
13
13
|
/**
|
|
14
14
|
* Allowed footer actions for HoverCard, in display order. Fetched from context.
|
|
15
|
-
* @featureGate platform_sl_3p_auth_rovo_action_kill_switch
|
|
16
15
|
*/
|
|
17
16
|
const HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [ActionName.RovoChatAction];
|
|
18
17
|
const ignoreContainerMarginStyles = null;
|
|
@@ -44,6 +43,9 @@ const ResolvedHoverCardFooterBlock = ({
|
|
|
44
43
|
arr = arr.filter(name => !HIDDEN_HOVER_CARD_FOOTER_ACTIONS.includes(name));
|
|
45
44
|
return arr.map(name => {
|
|
46
45
|
const Action = name in Actions ? Actions[name] : undefined;
|
|
46
|
+
|
|
47
|
+
// Note: For the spinner to render properly, e.g. AI summary action,
|
|
48
|
+
// the spinner need to be updated. See FIX-ME comment on ActionButton
|
|
47
49
|
return Action ? /*#__PURE__*/React.createElement(Action, {
|
|
48
50
|
key: name,
|
|
49
51
|
as: "stack-item",
|
|
@@ -4,7 +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 { useCallback, useLayoutEffect, useState } from 'react';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import { MediaPlacement } from '../../../../../../constants';
|
|
9
8
|
import { Preview } from '../../../elements';
|
|
10
9
|
import Block from '../../block';
|
|
@@ -27,28 +26,7 @@ const PreviewBlockResolvedView = ({
|
|
|
27
26
|
className,
|
|
28
27
|
...blockProps
|
|
29
28
|
}) => {
|
|
30
|
-
const [dynamicStyles, setDynamicStyles] = useState(
|
|
31
|
-
if (fg('dfo-fix-preview-dynamic-style')) {
|
|
32
|
-
if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
|
|
33
|
-
const containerPadding = ignoreContainerPadding ? '0px' : 'var(--container-padding)';
|
|
34
|
-
const newStyle = {
|
|
35
|
-
...style,
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
top: containerPadding,
|
|
38
|
-
bottom: containerPadding,
|
|
39
|
-
width: `calc(var(--preview-block-width) - ${containerPadding})`,
|
|
40
|
-
...(placement === MediaPlacement.Left ? {
|
|
41
|
-
left: containerPadding
|
|
42
|
-
} : {}),
|
|
43
|
-
...(placement === MediaPlacement.Right ? {
|
|
44
|
-
right: containerPadding
|
|
45
|
-
} : {})
|
|
46
|
-
};
|
|
47
|
-
return newStyle;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return style !== null && style !== void 0 ? style : {};
|
|
51
|
-
});
|
|
29
|
+
const [dynamicStyles, setDynamicStyles] = useState(style !== null && style !== void 0 ? style : {});
|
|
52
30
|
const updateStyles = useCallback(() => {
|
|
53
31
|
if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
|
|
54
32
|
const containerPadding = ignoreContainerPadding ? '0px' : 'var(--container-padding)';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
3
2
|
import { AnalyticsContext, useAnalyticsEvents as useAnalyticsEventsNext } from '@atlaskit/analytics-next';
|
|
4
3
|
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
@@ -258,16 +257,14 @@ const HoverCardContent = ({
|
|
|
258
257
|
});
|
|
259
258
|
}
|
|
260
259
|
if (isResolved) {
|
|
261
|
-
return /*#__PURE__*/React.createElement(HoverCardResolvedView,
|
|
262
|
-
actionOptions
|
|
263
|
-
} : undefined, {
|
|
260
|
+
return /*#__PURE__*/React.createElement(HoverCardResolvedView, {
|
|
264
261
|
cardState: cardState,
|
|
265
262
|
extensionKey: extensionKey,
|
|
266
263
|
flexibleCardProps: flexibleCardProps,
|
|
267
264
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
268
265
|
onActionClick: onActionClick,
|
|
269
266
|
titleBlockProps: titleBlockProps
|
|
270
|
-
})
|
|
267
|
+
});
|
|
271
268
|
}
|
|
272
269
|
return null;
|
|
273
270
|
})();
|
|
@@ -309,16 +306,14 @@ const HoverCardContent = ({
|
|
|
309
306
|
});
|
|
310
307
|
}
|
|
311
308
|
if (cardState.status === 'resolved') {
|
|
312
|
-
return /*#__PURE__*/React.createElement(HoverCardResolvedView,
|
|
313
|
-
actionOptions
|
|
314
|
-
} : undefined, {
|
|
309
|
+
return /*#__PURE__*/React.createElement(HoverCardResolvedView, {
|
|
315
310
|
cardState: cardState,
|
|
316
311
|
extensionKey: extensionKey,
|
|
317
312
|
flexibleCardProps: flexibleCardProps,
|
|
318
313
|
isAISummaryEnabled: isAISummaryEnabled,
|
|
319
314
|
onActionClick: onActionClick,
|
|
320
315
|
titleBlockProps: titleBlockProps
|
|
321
|
-
})
|
|
316
|
+
});
|
|
322
317
|
}
|
|
323
318
|
return null;
|
|
324
319
|
};
|
|
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
const PACKAGE_DATA = {
|
|
11
11
|
packageName: "@atlaskit/smart-card",
|
|
12
|
-
packageVersion: "45.6.
|
|
12
|
+
packageVersion: "45.6.11",
|
|
13
13
|
componentName: 'linkUrl'
|
|
14
14
|
};
|
|
15
15
|
const LinkUrl = ({
|
|
@@ -5,6 +5,5 @@
|
|
|
5
5
|
._o5724jg8{white-space:normal}
|
|
6
6
|
._slp31hna{word-wrap:break-word}
|
|
7
7
|
._syazazsu{color:var(--ds-text-subtle,#505258)}
|
|
8
|
-
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
9
8
|
._te171kdv{-ms-user-select:text}
|
|
10
9
|
._uizt1kdv{-webkit-user-select:text;-ms-user-select:text;user-select:text}
|
|
@@ -3,12 +3,9 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import Markdown from 'markdown-to-jsx';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
6
|
import UList from './ulist';
|
|
9
7
|
const baseStyle = null;
|
|
10
|
-
const
|
|
11
|
-
const textStyleOld = null;
|
|
8
|
+
const textStyle = null;
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* A component to render a response from AI in markdown text.
|
|
@@ -24,14 +21,11 @@ const AISummary = ({
|
|
|
24
21
|
if (!content && minHeight === 0) {
|
|
25
22
|
return null;
|
|
26
23
|
}
|
|
27
|
-
const is3pExperimentEnabled =
|
|
28
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
29
|
-
fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
|
|
30
24
|
return /*#__PURE__*/React.createElement(Markdown, {
|
|
31
25
|
"data-testid": testId
|
|
32
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
33
27
|
,
|
|
34
|
-
className: ax(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv",
|
|
28
|
+
className: ax(["_11c8wadc _slp31hna _1nmz1hna _o5724jg8 _181u1kdv _1rkw1kdv _te171kdv _uizt1kdv", "_syazazsu", className]),
|
|
35
29
|
children: content,
|
|
36
30
|
options: {
|
|
37
31
|
forceWrapper: true,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:dbbf6d81c83a372322069c13dabcd2b7371699e5f516bdc7969700d46efe7e8b
|
|
3
|
+
size 6464
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:1db1ebf59936a7f4f74bb7a63df993e1a9e5e10af4b68a64796ff25a3a2bfb2a
|
|
3
|
+
size 9577
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:4b554c873395a1868d4a7b164b2e7a7cf2f7b8fe1c2b2337cd204488b39d87dc
|
|
3
|
+
size 39557
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:942def665afeaf409fcd761d2703bc55d8562d83caf6a5b9e6c84f22d17f0bdc
|
|
3
|
+
size 8208
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:aa204c82151fa9d869b9d1abfc9b38d7c4c06a18039d6057fb9bda6e52947578
|
|
3
|
+
size 219245
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:aa204c82151fa9d869b9d1abfc9b38d7c4c06a18039d6057fb9bda6e52947578
|
|
3
|
+
size 219245
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:0818d63fce2efbbbe48e65a428acd392282fd29111d3cf2246637eaf5e5626df
|
|
3
|
+
size 219455
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:0818d63fce2efbbbe48e65a428acd392282fd29111d3cf2246637eaf5e5626df
|
|
3
|
+
size 219455
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:04734263bf83e1d9eb8e2ef608f364fd7a680a3dc6a379071a6cac13301ccaa9
|
|
3
|
+
size 99640
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
version https://git-lfs.github.com/spec/v1
|
|
2
|
-
oid sha256:
|
|
3
|
-
size
|
|
2
|
+
oid sha256:75e1890fbe159689e0f01aa2b934dbf369e4cc6fcf1591b3fbcb90eb58e0fc71
|
|
3
|
+
size 5712
|
|
@@ -24,12 +24,10 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
var extensionKey = getExtensionKey(response);
|
|
27
|
-
var isGoogleProvider = extensionKey === 'google-object-provider';
|
|
28
27
|
var isInlineExperimentEnabled = fg('platform_sl_3p_auth_inline_tailored_cta_killswitch') && expValEqualsNoExposure('platform_sl_3p_auth_inline_tailored_cta', 'isEnabled', true);
|
|
29
|
-
var is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
30
28
|
var is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && (rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product) === 'CONFLUENCE';
|
|
31
29
|
var is3PEmbedPostAuthActionsEnabled = isEmbedRovoActionsFooterExperimentEnabled === true;
|
|
32
|
-
var isSupportedFeature =
|
|
30
|
+
var isSupportedFeature = is3PBlockPostAuthActionsEnabled || isInlineExperimentEnabled || is3PEmbedPostAuthActionsEnabled;
|
|
33
31
|
var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
34
32
|
var url = extractSmartLinkUrl(response);
|
|
35
33
|
return isSupportedFeature && isOptIn ? {
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card" || '',
|
|
7
|
-
packageVersion: "45.6.
|
|
7
|
+
packageVersion: "45.6.11" || ''
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
5
|
import React, { useMemo } from 'react';
|
|
@@ -9,6 +10,7 @@ import VidFullScreenOnIcon from '@atlaskit/icon/core/fullscreen-enter';
|
|
|
9
10
|
import FullscreenExitIcon from '@atlaskit/icon/core/fullscreen-exit';
|
|
10
11
|
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
11
12
|
import { CloseButton, useModal } from '@atlaskit/modal-dialog';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
14
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
15
|
import { messages } from '../../../../messages';
|
|
14
16
|
import { Icon } from '../../../common/Icon';
|
|
@@ -33,13 +35,14 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
33
35
|
onViewButtonClick = _ref.onViewButtonClick,
|
|
34
36
|
size = _ref.size,
|
|
35
37
|
testId = _ref.testId,
|
|
36
|
-
title = _ref.title
|
|
38
|
+
title = _ref.title,
|
|
39
|
+
focusRef = _ref.focusRef;
|
|
37
40
|
var _useModal = useModal(),
|
|
38
41
|
onClose = _useModal.onClose;
|
|
39
42
|
var _useIntl = useIntl(),
|
|
40
43
|
formatMessage = _useIntl.formatMessage;
|
|
41
44
|
var downloadButton = useMemo(function () {
|
|
42
|
-
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
45
|
+
return /*#__PURE__*/React.createElement(LinkInfoButton, _extends({
|
|
43
46
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.download),
|
|
44
47
|
icon: function icon() {
|
|
45
48
|
return /*#__PURE__*/React.createElement(DownloadIcon, {
|
|
@@ -51,15 +54,17 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
51
54
|
label: formatMessage(messages.download),
|
|
52
55
|
onClick: onDownloadButtonClick,
|
|
53
56
|
testId: "".concat(testId, "-download")
|
|
54
|
-
})
|
|
55
|
-
|
|
57
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
58
|
+
focusRef: focusRef
|
|
59
|
+
} : {}));
|
|
60
|
+
}, [onDownloadButtonClick, testId, formatMessage, focusRef]);
|
|
56
61
|
var urlButton = useMemo(function () {
|
|
57
62
|
if (onViewButtonClick) {
|
|
58
63
|
var label = providerName ? formatMessage(messages.viewInProvider, {
|
|
59
64
|
providerName: providerName
|
|
60
65
|
}) : formatMessage(messages.viewOriginal);
|
|
61
66
|
var content = providerName ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.viewIn), " ", providerName) : /*#__PURE__*/React.createElement(FormattedMessage, messages.viewOriginal);
|
|
62
|
-
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
67
|
+
return /*#__PURE__*/React.createElement(LinkInfoButton, _extends({
|
|
63
68
|
content: content,
|
|
64
69
|
icon: function icon() {
|
|
65
70
|
return /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
@@ -72,9 +77,11 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
72
77
|
onClick: onViewButtonClick,
|
|
73
78
|
testId: "".concat(testId, "-url"),
|
|
74
79
|
role: 'link'
|
|
75
|
-
})
|
|
80
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
81
|
+
focusRef: !onDownloadButtonClick ? focusRef : undefined
|
|
82
|
+
} : {}));
|
|
76
83
|
}
|
|
77
|
-
}, [onViewButtonClick, providerName, testId, formatMessage]);
|
|
84
|
+
}, [onViewButtonClick, providerName, testId, formatMessage, onDownloadButtonClick, focusRef]);
|
|
78
85
|
var sizeButton = useMemo(function () {
|
|
79
86
|
var isFullScreen = size === MAX_MODAL_SIZE;
|
|
80
87
|
var message = isFullScreen ? messages.preview_min_size : messages.preview_max_size;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
5
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
6
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
5
7
|
var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
@@ -8,14 +10,15 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
8
10
|
label = _ref.label,
|
|
9
11
|
onClick = _ref.onClick,
|
|
10
12
|
testId = _ref.testId,
|
|
11
|
-
role = _ref.role
|
|
13
|
+
role = _ref.role,
|
|
14
|
+
focusRef = _ref.focusRef;
|
|
12
15
|
var onMouseDown = useMouseDownEvent();
|
|
13
16
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
14
17
|
content: content,
|
|
15
18
|
hideTooltipOnClick: true,
|
|
16
19
|
tag: "span",
|
|
17
20
|
testId: "".concat(testId, "-tooltip")
|
|
18
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
21
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
19
22
|
appearance: "subtle",
|
|
20
23
|
icon: icon,
|
|
21
24
|
label: label,
|
|
@@ -23,6 +26,8 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
|
|
|
23
26
|
onMouseDown: onMouseDown,
|
|
24
27
|
testId: "".concat(testId, "-button"),
|
|
25
28
|
role: role
|
|
26
|
-
})
|
|
29
|
+
}, fg('navx-4719-a11y-embed-modal-focus-states') ? {
|
|
30
|
+
ref: focusRef
|
|
31
|
+
} : {})));
|
|
27
32
|
};
|
|
28
33
|
export default LinkInfoButton;
|