@atlaskit/smart-card 44.6.1 → 44.7.1
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 +25 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-cold-cache--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-message-low-tier--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-message-not-low-tier--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +3 -1
- package/dist/cjs/messages.js +12 -1
- package/dist/cjs/state/hooks/use-block-card-rovo-action-experiment/index.js +69 -0
- package/dist/cjs/state/hooks/use-current-site-cloud-id/index.js +0 -30
- package/dist/cjs/state/hooks/use-incoming-outgoing-links/index.js +3 -3
- package/dist/cjs/state/hooks/use-rovo-chat/constants.js +7 -0
- package/dist/cjs/state/hooks/use-rovo-chat/index.js +2 -2
- package/dist/cjs/state/hooks/use-social-proof/index.js +44 -28
- package/dist/cjs/state/hooks/use-social-proof-experiment/index.js +48 -0
- package/dist/cjs/state/services/current-site-cloud-id/index.js +61 -74
- package/dist/cjs/state/services/personalization/index.js +59 -60
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +20 -21
- package/dist/cjs/view/BlockCard/views/SocialProofMessage.js +36 -0
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +85 -20
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +3 -2
- package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +4 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +14 -10
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +10 -9
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +20 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +3 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-cold-cache--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-message-low-tier--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-message-not-low-tier--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +3 -1
- package/dist/es2019/messages.js +12 -1
- package/dist/es2019/state/hooks/use-block-card-rovo-action-experiment/index.js +64 -0
- package/dist/es2019/state/hooks/use-current-site-cloud-id/index.js +0 -1
- package/dist/es2019/state/hooks/use-incoming-outgoing-links/index.js +2 -2
- package/dist/es2019/state/hooks/use-rovo-chat/constants.js +1 -0
- package/dist/es2019/state/hooks/use-rovo-chat/index.js +2 -2
- package/dist/es2019/state/hooks/use-social-proof/index.js +41 -22
- package/dist/es2019/state/hooks/use-social-proof-experiment/index.js +41 -0
- package/dist/es2019/state/services/current-site-cloud-id/index.js +43 -67
- package/dist/es2019/state/services/personalization/index.js +40 -39
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +29 -31
- package/dist/es2019/view/BlockCard/views/SocialProofMessage.js +27 -0
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +83 -15
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +3 -2
- package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +5 -3
- package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +14 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +10 -9
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +23 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +4 -3
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +3 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-cold-cache--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-message-low-tier--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/block-card/block-card-social-proof-message-not-low-tier--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default--dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-false.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true-dfo-fix-preview-dynamic-style-true.png +3 -0
- package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +3 -1
- package/dist/esm/messages.js +12 -1
- package/dist/esm/state/hooks/use-block-card-rovo-action-experiment/index.js +62 -0
- package/dist/esm/state/hooks/use-current-site-cloud-id/index.js +0 -1
- package/dist/esm/state/hooks/use-incoming-outgoing-links/index.js +2 -2
- package/dist/esm/state/hooks/use-rovo-chat/constants.js +1 -0
- package/dist/esm/state/hooks/use-rovo-chat/index.js +2 -2
- package/dist/esm/state/hooks/use-social-proof/index.js +45 -29
- package/dist/esm/state/hooks/use-social-proof-experiment/index.js +41 -0
- package/dist/esm/state/services/current-site-cloud-id/index.js +59 -72
- package/dist/esm/state/services/personalization/index.js +56 -59
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +20 -21
- package/dist/esm/view/BlockCard/views/SocialProofMessage.js +29 -0
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +85 -20
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +3 -2
- package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -1
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +14 -10
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +10 -9
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +20 -1
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +4 -2
- package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +3 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/hooks/use-block-card-rovo-action-experiment/index.d.ts +27 -0
- package/dist/types/state/hooks/use-current-site-cloud-id/index.d.ts +0 -1
- package/dist/types/state/hooks/use-rovo-chat/constants.d.ts +2 -0
- package/dist/types/state/hooks/use-social-proof/index.d.ts +17 -4
- package/dist/types/state/hooks/use-social-proof-experiment/index.d.ts +39 -0
- package/dist/types/state/services/current-site-cloud-id/index.d.ts +9 -33
- package/dist/types/state/services/personalization/index.d.ts +14 -24
- package/dist/types/view/BlockCard/views/SocialProofMessage.d.ts +14 -0
- package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-block-card-rovo-action-experiment/index.d.ts +27 -0
- package/dist/types-ts4.5/state/hooks/use-current-site-cloud-id/index.d.ts +0 -1
- package/dist/types-ts4.5/state/hooks/use-rovo-chat/constants.d.ts +2 -0
- package/dist/types-ts4.5/state/hooks/use-social-proof/index.d.ts +17 -4
- package/dist/types-ts4.5/state/hooks/use-social-proof-experiment/index.d.ts +39 -0
- package/dist/types-ts4.5/state/services/current-site-cloud-id/index.d.ts +9 -33
- package/dist/types-ts4.5/state/services/personalization/index.d.ts +14 -24
- package/dist/types-ts4.5/view/BlockCard/views/SocialProofMessage.d.ts +14 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
- package/package.json +11 -2
- package/smart-card.docs.tsx +2 -2
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-mixed-padding--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false.png +0 -3
- package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true.png +0 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FormattedMessage } from 'react-intl';
|
|
4
|
+
import { Box, Text } from '@atlaskit/primitives/compiled';
|
|
5
|
+
import { messages } from '../../../messages';
|
|
6
|
+
// TODO: remove when social-proof-3p-unauth-block-fg is cleaned up
|
|
7
|
+
var SocialProofMessage = function SocialProofMessage(_ref) {
|
|
8
|
+
var tier = _ref.tier,
|
|
9
|
+
connectedPct = _ref.connectedPct,
|
|
10
|
+
providerName = _ref.providerName,
|
|
11
|
+
_ref$testId = _ref.testId,
|
|
12
|
+
testId = _ref$testId === void 0 ? 'smart-block-social-proof-message' : _ref$testId;
|
|
13
|
+
var message = tier === 'not-low' ? messages.pre_auth_block_social_proof_not_low : messages.pre_auth_block_social_proof_low;
|
|
14
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
15
|
+
testId: testId
|
|
16
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, message, {
|
|
17
|
+
values: {
|
|
18
|
+
percentage: connectedPct !== null && connectedPct !== void 0 ? connectedPct : 0,
|
|
19
|
+
provider: providerName,
|
|
20
|
+
b: function b(chunks) {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
22
|
+
as: "strong",
|
|
23
|
+
weight: "bold"
|
|
24
|
+
}, chunks);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
29
|
+
export default SocialProofMessage;
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
/* UnauthorisedView.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
-
var _excluded = ["testId"]
|
|
4
|
+
var _excluded = ["content", "providerName", "testId"],
|
|
5
|
+
_excluded2 = ["testId"],
|
|
6
|
+
_excluded3 = ["testId"];
|
|
5
7
|
import "./UnauthorisedView.compiled.css";
|
|
6
8
|
import * as React from 'react';
|
|
7
9
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
10
|
import { useCallback, useMemo } from 'react';
|
|
9
11
|
import { FormattedMessage } from 'react-intl';
|
|
12
|
+
import { di } from 'react-magnetic-di';
|
|
13
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
10
14
|
import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
|
|
15
|
+
import { useSmartLinkContext } from '@atlaskit/link-provider';
|
|
16
|
+
import { componentWithFG } from '@atlaskit/platform-feature-flags-react';
|
|
11
17
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
12
18
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
13
19
|
import { ElementName, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../constants';
|
|
14
20
|
import { messages } from '../../../messages';
|
|
15
21
|
import { useFlexibleCardContext } from '../../../state/flexible-ui-context';
|
|
16
22
|
import { hasAuthScopeOverrides } from '../../../state/helpers';
|
|
23
|
+
import useSocialProofExperiment from '../../../state/hooks/use-social-proof-experiment';
|
|
17
24
|
import UnauthorisedViewContent from '../../common/UnauthorisedViewContent';
|
|
18
25
|
import FlexibleCard from '../../FlexibleCard';
|
|
19
26
|
import ActionGroup from '../../FlexibleCard/components/blocks/action-group';
|
|
@@ -23,6 +30,7 @@ import { renderElementItems } from '../../FlexibleCard/components/blocks/utils';
|
|
|
23
30
|
import { LinkIcon, Title } from '../../FlexibleCard/components/elements';
|
|
24
31
|
import { AuthorizeAction } from '../actions/AuthorizeAction';
|
|
25
32
|
import unauthIllustrationGeneral from './assets/general@2x.png';
|
|
33
|
+
import SocialProofMessage from './SocialProofMessage';
|
|
26
34
|
import { FlexibleCardUiOptions, titleBlockOptions } from './utils';
|
|
27
35
|
import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
|
|
28
36
|
var contentStyles = null;
|
|
@@ -161,15 +169,12 @@ var UnauthorisedBlock = function UnauthorisedBlock(_ref) {
|
|
|
161
169
|
* @see SmartLinkStatus
|
|
162
170
|
* @see FlexibleCardProps
|
|
163
171
|
*/
|
|
164
|
-
var
|
|
165
|
-
var
|
|
166
|
-
|
|
167
|
-
testId = _ref3
|
|
172
|
+
var UnauthorisedViewFrame = function UnauthorisedViewFrame(_ref3) {
|
|
173
|
+
var content = _ref3.content,
|
|
174
|
+
providerName = _ref3.providerName,
|
|
175
|
+
testId = _ref3.testId,
|
|
168
176
|
props = _objectWithoutProperties(_ref3, _excluded);
|
|
169
|
-
var
|
|
170
|
-
onAuthorize = props.onAuthorize;
|
|
171
|
-
var providerName = (_extractSmartLinkProv = extractSmartLinkProvider(cardState.details)) === null || _extractSmartLinkProv === void 0 ? void 0 : _extractSmartLinkProv.text;
|
|
172
|
-
var isProductIntegrationSupported = hasAuthScopeOverrides(cardState.details);
|
|
177
|
+
var onAuthorize = props.onAuthorize;
|
|
173
178
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
174
179
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
175
180
|
var handleAuthorize = useCallback(function () {
|
|
@@ -178,17 +183,6 @@ var UnauthorisedView = function UnauthorisedView(_ref3) {
|
|
|
178
183
|
onAuthorize();
|
|
179
184
|
}
|
|
180
185
|
}, [onAuthorize, fireEvent]);
|
|
181
|
-
var content = useMemo(function () {
|
|
182
|
-
return onAuthorize ? /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
183
|
-
providerName: providerName,
|
|
184
|
-
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
185
|
-
testId: testId
|
|
186
|
-
}) : /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[providerName ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider'], {
|
|
187
|
-
values: {
|
|
188
|
-
context: providerName
|
|
189
|
-
}
|
|
190
|
-
}));
|
|
191
|
-
}, [isProductIntegrationSupported, onAuthorize, providerName, testId]);
|
|
192
186
|
var actions = useMemo(function () {
|
|
193
187
|
return onAuthorize ? [AuthorizeAction(handleAuthorize, providerName)] : [];
|
|
194
188
|
}, [handleAuthorize, onAuthorize, providerName]);
|
|
@@ -209,5 +203,76 @@ var UnauthorisedView = function UnauthorisedView(_ref3) {
|
|
|
209
203
|
className: ax(["_11c8fhey _syazi7uo _19pku2gc", actions.length > 0 && "_1reo15vq _18m915vq _otyrpxbi _p12f1osq _o5721q9c _1bto1l2s"])
|
|
210
204
|
}, content)));
|
|
211
205
|
};
|
|
206
|
+
var UnauthorisedViewBase = function UnauthorisedViewBase(_ref4) {
|
|
207
|
+
var _extractSmartLinkProv;
|
|
208
|
+
var _ref4$testId = _ref4.testId,
|
|
209
|
+
testId = _ref4$testId === void 0 ? 'smart-block-unauthorized-view' : _ref4$testId,
|
|
210
|
+
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
211
|
+
var cardState = props.cardState,
|
|
212
|
+
onAuthorize = props.onAuthorize;
|
|
213
|
+
var providerName = (_extractSmartLinkProv = extractSmartLinkProvider(cardState.details)) === null || _extractSmartLinkProv === void 0 ? void 0 : _extractSmartLinkProv.text;
|
|
214
|
+
var isProductIntegrationSupported = hasAuthScopeOverrides(cardState.details);
|
|
215
|
+
var content = useMemo(function () {
|
|
216
|
+
return onAuthorize ? /*#__PURE__*/React.createElement(UnauthorisedViewContent, {
|
|
217
|
+
providerName: providerName,
|
|
218
|
+
isProductIntegrationSupported: isProductIntegrationSupported,
|
|
219
|
+
testId: testId
|
|
220
|
+
}) : /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages[providerName ? 'unauthorised_account_description' : 'unauthorised_account_description_no_provider'], {
|
|
221
|
+
values: {
|
|
222
|
+
context: providerName
|
|
223
|
+
}
|
|
224
|
+
}));
|
|
225
|
+
}, [isProductIntegrationSupported, onAuthorize, providerName, testId]);
|
|
226
|
+
return /*#__PURE__*/React.createElement(UnauthorisedViewFrame, _extends({}, props, {
|
|
227
|
+
content: content,
|
|
228
|
+
providerName: providerName,
|
|
229
|
+
testId: testId
|
|
230
|
+
}));
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Experiment wrapper: fires social proof exposure and renders social proof UI when FG is on.
|
|
235
|
+
* TODO: remove when social-proof-3p-unauth-block-fg is cleaned up
|
|
236
|
+
*/
|
|
237
|
+
var UnauthorisedViewWithExperiment = function UnauthorisedViewWithExperiment(_ref5) {
|
|
238
|
+
var _props$cardState, _extractSmartLinkProv2;
|
|
239
|
+
var _ref5$testId = _ref5.testId,
|
|
240
|
+
testId = _ref5$testId === void 0 ? 'smart-block-unauthorized-view' : _ref5$testId,
|
|
241
|
+
props = _objectWithoutProperties(_ref5, _excluded3);
|
|
242
|
+
var extensionKey = (_props$cardState = props.cardState) === null || _props$cardState === void 0 || (_props$cardState = _props$cardState.details) === null || _props$cardState === void 0 || (_props$cardState = _props$cardState.meta) === null || _props$cardState === void 0 ? void 0 : _props$cardState.key;
|
|
243
|
+
var providerName = (_extractSmartLinkProv2 = extractSmartLinkProvider(props.cardState.details)) === null || _extractSmartLinkProv2 === void 0 ? void 0 : _extractSmartLinkProv2.text;
|
|
244
|
+
var _useSmartLinkContext = useSmartLinkContext(),
|
|
245
|
+
connections = _useSmartLinkContext.connections;
|
|
246
|
+
var _useSocialProofExperi = useSocialProofExperiment(providerName ? extensionKey : undefined, connections.client.baseUrlOverride),
|
|
247
|
+
isTreatment = _useSocialProofExperi.isTreatment,
|
|
248
|
+
tier = _useSocialProofExperi.tier,
|
|
249
|
+
connectedPct = _useSocialProofExperi.connectedPct;
|
|
250
|
+
if (!isTreatment || !providerName) {
|
|
251
|
+
return /*#__PURE__*/React.createElement(UnauthorisedViewBase, _extends({}, props, {
|
|
252
|
+
testId: testId
|
|
253
|
+
}));
|
|
254
|
+
}
|
|
255
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
256
|
+
data: {
|
|
257
|
+
attributes: {
|
|
258
|
+
experiment: 'social_proof_3p_unauth_block_exp',
|
|
259
|
+
cohort: 'treatment',
|
|
260
|
+
tier: tier
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}, /*#__PURE__*/React.createElement(UnauthorisedViewFrame, _extends({}, props, {
|
|
264
|
+
content: /*#__PURE__*/React.createElement(SocialProofMessage, {
|
|
265
|
+
tier: tier,
|
|
266
|
+
connectedPct: connectedPct,
|
|
267
|
+
providerName: providerName
|
|
268
|
+
}),
|
|
269
|
+
providerName: providerName,
|
|
270
|
+
testId: testId
|
|
271
|
+
})));
|
|
272
|
+
};
|
|
273
|
+
var UnauthorisedViewWithoutExperiment = function UnauthorisedViewWithoutExperiment(props) {
|
|
274
|
+
return /*#__PURE__*/React.createElement(UnauthorisedViewBase, props);
|
|
275
|
+
};
|
|
276
|
+
var UnauthorisedView = componentWithFG('social-proof-3p-unauth-block-fg', UnauthorisedViewWithExperiment, UnauthorisedViewWithoutExperiment);
|
|
212
277
|
var _default_1 = withFlexibleUIBlockCardStyle(UnauthorisedView);
|
|
213
278
|
export default _default_1;
|
|
@@ -5,11 +5,11 @@ import React, { forwardRef, useCallback, useMemo } from 'react';
|
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
6
|
import { LoadingButton } from '@atlaskit/button';
|
|
7
7
|
import Button, { IconButton, LinkButton, LinkIconButton } from '@atlaskit/button/new';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
10
|
import { ActionName, SmartLinkSize } from '../../../../../../constants';
|
|
12
11
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
12
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
13
13
|
import { withOverrideCss } from '../../../common/with-override-css';
|
|
14
14
|
import { sizeToButtonSpacing } from '../../../utils';
|
|
15
15
|
var IconOnlyLarge = null;
|
|
@@ -57,7 +57,8 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
57
57
|
ariaLabel = _ref.ariaLabel;
|
|
58
58
|
var iconOnly = !content;
|
|
59
59
|
var context = useFlexibleUiContext();
|
|
60
|
-
var
|
|
60
|
+
var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
61
|
+
var isRovoSupported = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && isRovoBlockCardExperimentEnabled;
|
|
61
62
|
var onButtonClick = useCallback(function (handler) {
|
|
62
63
|
return function (e) {
|
|
63
64
|
e.preventDefault();
|
package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js
CHANGED
|
@@ -8,6 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
8
8
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
9
9
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
10
10
|
import { messages } from '../../../../../messages';
|
|
11
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
11
12
|
import Action from '../action';
|
|
12
13
|
import { getErrorMessage } from './utils';
|
|
13
14
|
export function AISummariseAction(_ref) {
|
|
@@ -19,6 +20,7 @@ export function AISummariseAction(_ref) {
|
|
|
19
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
21
22
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
23
|
+
var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
22
24
|
var onCompleted = useCallback(function (state) {
|
|
23
25
|
if ((state === null || state === void 0 ? void 0 : state.status) === 'error') {
|
|
24
26
|
onErrorCallback === null || onErrorCallback === void 0 || onErrorCallback(getErrorMessage(state.error));
|
|
@@ -41,7 +43,7 @@ export function AISummariseAction(_ref) {
|
|
|
41
43
|
spacing: "spacious",
|
|
42
44
|
color: "currentColor",
|
|
43
45
|
label: "Summarise with AI"
|
|
44
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
46
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
45
47
|
size: props.iconSize
|
|
46
48
|
} : {})),
|
|
47
49
|
onClick: handleActionClick,
|
|
@@ -9,6 +9,7 @@ import { useAnalyticsEvents } from '../../../../../common/analytics/generated/us
|
|
|
9
9
|
import { ActionName } from '../../../../../constants';
|
|
10
10
|
import { messages } from '../../../../../messages';
|
|
11
11
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
12
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
12
13
|
import { useSmartLinkModal } from '../../../../../state/modal';
|
|
13
14
|
import Action from '../action';
|
|
14
15
|
import { getModalContent } from './utils';
|
|
@@ -25,6 +26,7 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
25
26
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
26
27
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
27
28
|
var automationActionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.AutomationAction];
|
|
29
|
+
var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
28
30
|
var automationActionOnClick = useCallback(function (automationActionData) {
|
|
29
31
|
var product = automationActionData.product,
|
|
30
32
|
resourceType = automationActionData.resourceType,
|
|
@@ -76,7 +78,7 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
76
78
|
spacing: "spacious",
|
|
77
79
|
color: "currentColor",
|
|
78
80
|
label: automationActionIconLabel
|
|
79
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
81
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
80
82
|
size: props.iconSize
|
|
81
83
|
} : {})),
|
|
82
84
|
testId: "smart-action-automation-action",
|
|
@@ -15,6 +15,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
15
15
|
import { ActionName } from '../../../../../constants';
|
|
16
16
|
import { messages } from '../../../../../messages';
|
|
17
17
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
18
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
18
19
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
19
20
|
import Action from '../action';
|
|
20
21
|
var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
@@ -28,6 +29,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
28
29
|
_useState2 = _slicedToArray(_useState, 2),
|
|
29
30
|
tooltipMessage = _useState2[0],
|
|
30
31
|
setTooltipMessage = _useState2[1];
|
|
32
|
+
var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
31
33
|
var onClick = useCallback(function () {
|
|
32
34
|
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
33
35
|
invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
|
|
@@ -62,7 +64,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
62
64
|
color: "currentColor",
|
|
63
65
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
64
66
|
spacing: "spacious"
|
|
65
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
67
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
66
68
|
size: props.iconSize
|
|
67
69
|
} : {})),
|
|
68
70
|
onClick: onClick,
|
|
@@ -11,6 +11,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
11
11
|
import { ActionName } from '../../../../../constants';
|
|
12
12
|
import { messages } from '../../../../../messages';
|
|
13
13
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
14
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
14
15
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
15
16
|
import Action from '../action';
|
|
16
17
|
var PreviewAction = function PreviewAction(_ref) {
|
|
@@ -21,6 +22,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
21
22
|
var invoke = useInvokeClientAction({});
|
|
22
23
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.PreviewAction];
|
|
23
24
|
var hasPreviewPanel = data === null || data === void 0 ? void 0 : data.hasPreviewPanel;
|
|
25
|
+
var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
24
26
|
var onClick = useCallback(function () {
|
|
25
27
|
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
26
28
|
invoke(data.invokeAction);
|
|
@@ -36,7 +38,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
36
38
|
color: "currentColor",
|
|
37
39
|
spacing: "spacious",
|
|
38
40
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
39
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
41
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
40
42
|
size: props.iconSize
|
|
41
43
|
} : {}));
|
|
42
44
|
}
|
|
@@ -44,10 +46,10 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
44
46
|
color: "currentColor",
|
|
45
47
|
spacing: "spacious",
|
|
46
48
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
47
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
49
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
48
50
|
size: props.iconSize
|
|
49
51
|
} : {}));
|
|
50
|
-
}, [hasPreviewPanel, props.iconSize]);
|
|
52
|
+
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
51
53
|
var actionLabel = useCallback(function () {
|
|
52
54
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
53
55
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
@@ -13,11 +13,11 @@ import AiChatIcon from '@atlaskit/icon/core/ai-chat';
|
|
|
13
13
|
import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
|
|
14
14
|
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
15
15
|
import { RovoIcon } from '@atlaskit/logo';
|
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
16
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
18
17
|
import { ActionName, CardDisplay } from '../../../../../constants';
|
|
19
18
|
import { messages } from '../../../../../messages';
|
|
20
19
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
20
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
21
21
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
22
22
|
import useRovoChat from '../../../../../state/hooks/use-rovo-chat';
|
|
23
23
|
import AiChapterIcon from '../../../assets/ai-chapter-icon';
|
|
@@ -75,6 +75,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
75
75
|
},
|
|
76
76
|
contextLong = _ref.contextLong,
|
|
77
77
|
contextShort = _ref.contextShort;
|
|
78
|
+
var isBlockCard3PExperimentEnabled = isBlockCardRovoActionExperimentEnabled(product);
|
|
78
79
|
switch (promptKey) {
|
|
79
80
|
case RovoChatPromptKey.RECOMMEND_OTHER_SOURCES:
|
|
80
81
|
var label_recommend = intl.formatMessage(messages.rovo_prompt_button_recommend_other_sources);
|
|
@@ -140,7 +141,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
140
141
|
ignoreTag: true
|
|
141
142
|
});
|
|
142
143
|
return {
|
|
143
|
-
icon: cardAppearance === CardDisplay.Block &&
|
|
144
|
+
icon: cardAppearance === CardDisplay.Block && isBlockCard3PExperimentEnabled ? /*#__PURE__*/React.createElement(AiChatIcon, {
|
|
144
145
|
label: label_summarize,
|
|
145
146
|
size: iconSize
|
|
146
147
|
}) : /*#__PURE__*/React.createElement(AIEditIcon, null),
|
|
@@ -204,7 +205,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
204
205
|
url: url
|
|
205
206
|
});
|
|
206
207
|
return {
|
|
207
|
-
icon: cardAppearance === CardDisplay.Block &&
|
|
208
|
+
icon: cardAppearance === CardDisplay.Block && isBlockCard3PExperimentEnabled ? /*#__PURE__*/React.createElement(RovoIcon, {
|
|
208
209
|
label: label_ask_rovo_anything,
|
|
209
210
|
size: 'xxsmall',
|
|
210
211
|
shouldUseHexLogo: true
|
|
@@ -16,11 +16,12 @@ import ButtonGroup from '@atlaskit/button/button-group';
|
|
|
16
16
|
import Button from '@atlaskit/button/standard-button';
|
|
17
17
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
18
18
|
import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
19
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
19
|
import Tooltip from '@atlaskit/tooltip';
|
|
21
20
|
import { ActionName, CardDisplay, SmartLinkSize } from '../../../../../constants';
|
|
22
21
|
import { messages } from '../../../../../messages';
|
|
23
22
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
23
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
24
|
+
import useRovoConfig from '../../../../../state/hooks/use-rovo-config';
|
|
24
25
|
import { RovoChatPromptKey } from '../../actions/rovo-chat-action';
|
|
25
26
|
import { sizeToButtonSpacing } from '../../utils';
|
|
26
27
|
import { filterActionItems } from '../utils';
|
|
@@ -67,15 +68,18 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
67
68
|
containerWidth = _ref$containerWidth === void 0 ? Infinity : _ref$containerWidth;
|
|
68
69
|
var context = useFlexibleUiContext();
|
|
69
70
|
var ui = useFlexibleUiOptionContext();
|
|
71
|
+
var _useRovoConfig = useRovoConfig(),
|
|
72
|
+
product = _useRovoConfig.product;
|
|
70
73
|
var _useState = useState(false),
|
|
71
74
|
_useState2 = _slicedToArray(_useState, 2),
|
|
72
75
|
isOpen = _useState2[0],
|
|
73
76
|
setIsOpen = _useState2[1];
|
|
74
77
|
var renderableActionItems = useMemo(function () {
|
|
75
|
-
return filterActionItems(items, context);
|
|
76
|
-
}, [context, items]);
|
|
78
|
+
return filterActionItems(items, context, product);
|
|
79
|
+
}, [context, items, product]);
|
|
77
80
|
var isMoreThenTwoItems = renderableActionItems.length > visibleButtonsNum;
|
|
78
|
-
var
|
|
81
|
+
var rovoChatAction = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction];
|
|
82
|
+
var is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled(rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product);
|
|
79
83
|
var onOpenChange = useCallback(function (attrs) {
|
|
80
84
|
setIsOpen(attrs.isOpen);
|
|
81
85
|
if (onDropdownOpenChange) {
|
|
@@ -90,7 +94,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
90
94
|
}
|
|
91
95
|
}, [isOpen, onOpenChange]);
|
|
92
96
|
var actionButtons = useMemo(function () {
|
|
93
|
-
if (
|
|
97
|
+
if (!!rovoChatAction && is3PBlockExperimentEnabled) {
|
|
94
98
|
var rovoActions = [].concat(_toConsumableArray(containerWidth >= REDUCED_ACTIONS_SIZE ? renderableActionItems.slice(0, visibleButtonsNum - 1) : []), [{
|
|
95
99
|
name: ActionName.RovoChatAction,
|
|
96
100
|
prompts: [RovoChatPromptKey.ASK_ROVO_ANYTHING],
|
|
@@ -110,10 +114,10 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
110
114
|
}
|
|
111
115
|
var actionItems = isMoreThenTwoItems ? renderableActionItems.slice(0, visibleButtonsNum - 1) : renderableActionItems;
|
|
112
116
|
return renderActionItems(actionItems, size, appearance, false, onActionItemClick);
|
|
113
|
-
}, [appearance, isMoreThenTwoItems,
|
|
117
|
+
}, [appearance, isMoreThenTwoItems, onActionItemClick, renderableActionItems, size, visibleButtonsNum, rovoChatAction, is3PBlockExperimentEnabled, containerWidth]);
|
|
114
118
|
var moreActionDropdown = useMemo(function () {
|
|
115
119
|
var actionItems;
|
|
116
|
-
if (
|
|
120
|
+
if (!!rovoChatAction && is3PBlockExperimentEnabled && containerWidth < REDUCED_ACTIONS_SIZE) {
|
|
117
121
|
actionItems = renderableActionItems;
|
|
118
122
|
} else {
|
|
119
123
|
actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
@@ -137,11 +141,11 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
137
141
|
testId: "action-group-more-button-tooltip",
|
|
138
142
|
tag: "span"
|
|
139
143
|
}, /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
140
|
-
spacing:
|
|
144
|
+
spacing: !!rovoChatAction && is3PBlockExperimentEnabled ? size === SmartLinkSize.XLarge ? 'default' : 'compact' : spacing,
|
|
141
145
|
testId: "action-group-more-button",
|
|
142
146
|
iconBefore: moreIcon,
|
|
143
147
|
ref: triggerRef
|
|
144
|
-
},
|
|
148
|
+
}, is3PBlockExperimentEnabled ? {
|
|
145
149
|
appearance: appearance
|
|
146
150
|
} : {})));
|
|
147
151
|
},
|
|
@@ -150,7 +154,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
150
154
|
}, renderActionItems(actionItems, size, appearance, true, onActionItemClick));
|
|
151
155
|
}
|
|
152
156
|
return null;
|
|
153
|
-
}, [appearance, isMoreThenTwoItems, isOpen,
|
|
157
|
+
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum, rovoChatAction, is3PBlockExperimentEnabled, containerWidth]);
|
|
154
158
|
return renderableActionItems.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
155
159
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
156
160
|
className: ax(["_1e0c116y _dzc21h6o _1ilq1i6y", "actions-button-group"]),
|
|
@@ -6,10 +6,10 @@ import * as React from 'react';
|
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { useCallback, useMemo, useState } from 'react';
|
|
8
8
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
11
10
|
import { ActionName, SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../../constants';
|
|
12
11
|
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
12
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
13
13
|
import { Provider } from '../../../elements';
|
|
14
14
|
import ActionGroup from '../../action-group';
|
|
15
15
|
import Block from '../../block';
|
|
@@ -29,8 +29,9 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
29
29
|
hideProvider = props.hideProvider,
|
|
30
30
|
isPreviewBlockErrored = props.isPreviewBlockErrored;
|
|
31
31
|
var context = useFlexibleUiContext();
|
|
32
|
-
var
|
|
33
|
-
var
|
|
32
|
+
var rovoChatAction = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction];
|
|
33
|
+
var is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled(rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product);
|
|
34
|
+
var hasPreview = !!rovoChatAction && is3PBlockExperimentEnabled && !!(context !== null && context !== void 0 && context.preview) && !isPreviewBlockErrored;
|
|
34
35
|
var hasActions = useMemo(function () {
|
|
35
36
|
var _filterActionItems;
|
|
36
37
|
return ((_filterActionItems = filterActionItems(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
|
|
@@ -61,22 +62,22 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
61
62
|
appearance: "subtle",
|
|
62
63
|
testId: "".concat(testId, "-provider"),
|
|
63
64
|
hideLabel: hasPreview,
|
|
64
|
-
className: ax([
|
|
65
|
+
className: ax([!!rovoChatAction && is3PBlockExperimentEnabled && "_1wpz1h6o"])
|
|
65
66
|
}), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, {
|
|
66
67
|
testId: "smart-element-group-actions",
|
|
67
68
|
align: SmartLinkAlignment.Right,
|
|
68
69
|
direction: SmartLinkDirection.Horizontal,
|
|
69
70
|
width: SmartLinkWidth.Flexible,
|
|
70
|
-
className: ax([size === SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq",
|
|
71
|
-
},
|
|
71
|
+
className: ax([size === SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq", !!rovoChatAction && is3PBlockExperimentEnabled && "_kqswh2mm"])
|
|
72
|
+
}, !!rovoChatAction && is3PBlockExperimentEnabled && /*#__PURE__*/React.createElement(WidthObserver, {
|
|
72
73
|
setWidth: setContainerWidth,
|
|
73
74
|
offscreen: true
|
|
74
75
|
}), /*#__PURE__*/React.createElement(ActionGroup, {
|
|
75
76
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
76
77
|
items: actions,
|
|
77
|
-
appearance:
|
|
78
|
-
size:
|
|
79
|
-
containerWidth:
|
|
78
|
+
appearance: !!rovoChatAction && is3PBlockExperimentEnabled ? 'subtle' : 'default',
|
|
79
|
+
size: !!rovoChatAction && is3PBlockExperimentEnabled ? SmartLinkSize.Small : size,
|
|
80
|
+
containerWidth: !!rovoChatAction && is3PBlockExperimentEnabled ? containerWidth : undefined
|
|
80
81
|
})) : null);
|
|
81
82
|
};
|
|
82
83
|
export default FooterBlockResolvedView;
|
|
@@ -10,6 +10,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
10
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
12
|
import { useCallback, useLayoutEffect, useState } from 'react';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { MediaPlacement } from '../../../../../../constants';
|
|
14
15
|
import { Preview } from '../../../elements';
|
|
15
16
|
import Block from '../../block';
|
|
@@ -32,7 +33,25 @@ var PreviewBlockResolvedView = function PreviewBlockResolvedView(_ref) {
|
|
|
32
33
|
style = _ref.style,
|
|
33
34
|
className = _ref.className,
|
|
34
35
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
-
var _useState = useState(
|
|
36
|
+
var _useState = useState(function () {
|
|
37
|
+
if (fg('dfo-fix-preview-dynamic-style')) {
|
|
38
|
+
if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
|
|
39
|
+
var containerPadding = ignoreContainerPadding ? '0px' : 'var(--container-padding)';
|
|
40
|
+
var newStyle = _objectSpread(_objectSpread(_objectSpread({}, style), {}, {
|
|
41
|
+
position: 'absolute',
|
|
42
|
+
top: containerPadding,
|
|
43
|
+
bottom: containerPadding,
|
|
44
|
+
width: "calc(var(--preview-block-width) - ".concat(containerPadding, ")")
|
|
45
|
+
}, placement === MediaPlacement.Left ? {
|
|
46
|
+
left: containerPadding
|
|
47
|
+
} : {}), placement === MediaPlacement.Right ? {
|
|
48
|
+
right: containerPadding
|
|
49
|
+
} : {});
|
|
50
|
+
return newStyle;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return style !== null && style !== void 0 ? style : {};
|
|
54
|
+
}),
|
|
36
55
|
_useState2 = _slicedToArray(_useState, 2),
|
|
37
56
|
dynamicStyles = _useState2[0],
|
|
38
57
|
setDynamicStyles = _useState2[1];
|
|
@@ -5,8 +5,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
var _excluded = ["name"];
|
|
6
6
|
var _ElementDisplaySchema;
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { ActionName, ElementName, SmartLinkSize } from '../../../../constants';
|
|
9
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
10
10
|
import { isFlexibleUiElement } from '../../../../utils/flexible';
|
|
11
11
|
import * as Elements from '../elements';
|
|
12
12
|
import ActionGroup from './action-group';
|
|
@@ -50,6 +50,8 @@ var isElementOrElementGroup = function isElementOrElementGroup(node) {
|
|
|
50
50
|
export var filterActionItems = function filterActionItems() {
|
|
51
51
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
52
52
|
var context = arguments.length > 1 ? arguments[1] : undefined;
|
|
53
|
+
var product = arguments.length > 2 ? arguments[2] : undefined;
|
|
54
|
+
var isBlockCard3PExperimentEnabled = isBlockCardRovoActionExperimentEnabled(product);
|
|
53
55
|
return items.filter(function (item) {
|
|
54
56
|
switch (item.name) {
|
|
55
57
|
case ActionName.DeleteAction:
|
|
@@ -58,7 +60,7 @@ export var filterActionItems = function filterActionItems() {
|
|
|
58
60
|
// Named and custom actions that user defines.
|
|
59
61
|
return Boolean(ActionName[item.name]);
|
|
60
62
|
case ActionName.RovoChatAction:
|
|
61
|
-
if (
|
|
63
|
+
if (isBlockCard3PExperimentEnabled) {
|
|
62
64
|
return Boolean(ActionName[item.name]);
|
|
63
65
|
}
|
|
64
66
|
// same as default case below
|
|
@@ -6,11 +6,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
7
7
|
|
|
8
8
|
import React, { forwardRef } from 'react';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import { IconType } from '../../../../../../constants';
|
|
12
11
|
import { messages } from '../../../../../../messages';
|
|
13
12
|
import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
13
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
14
14
|
import AtlaskitIcon from '../../../common/atlaskit-icon';
|
|
15
15
|
import ImageIcon from '../../../common/image-icon';
|
|
16
16
|
import { withOverrideCss } from '../../../common/with-override-css';
|
|
@@ -81,12 +81,13 @@ var BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
81
81
|
_ref$hideLabel = _ref.hideLabel,
|
|
82
82
|
hideLabel = _ref$hideLabel === void 0 ? false : _ref$hideLabel;
|
|
83
83
|
var ui = useFlexibleUiOptionContext();
|
|
84
|
+
var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
84
85
|
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
85
86
|
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
86
87
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
87
88
|
return null;
|
|
88
89
|
}
|
|
89
|
-
var shouldHideLabel = hideLabel &&
|
|
90
|
+
var shouldHideLabel = hideLabel && isRovoBlockCardExperimentEnabled;
|
|
90
91
|
return /*#__PURE__*/React.createElement("span", {
|
|
91
92
|
"data-smart-element": name,
|
|
92
93
|
"data-smart-element-badge": true,
|
|
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
15
15
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
16
16
|
var PACKAGE_DATA = {
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "44.
|
|
18
|
+
packageVersion: "44.7.0",
|
|
19
19
|
componentName: 'linkUrl'
|
|
20
20
|
};
|
|
21
21
|
var Anchor = withLinkClickedEvent('a');
|