@atlaskit/smart-card 44.6.0 → 44.7.0
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 +19 -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/state/hooks/use-block-card-rovo-action-experiment/index.js +69 -0
- 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/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +20 -21
- 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__/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/state/hooks/use-block-card-rovo-action-experiment/index.js +64 -0
- 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/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +29 -31
- 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__/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/state/hooks/use-block-card-rovo-action-experiment/index.js +62 -0
- 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/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +20 -21
- 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/state/hooks/use-block-card-rovo-action-experiment/index.d.ts +27 -0
- package/dist/types/state/hooks/use-rovo-chat/constants.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +2 -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-rovo-chat/constants.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
- package/package.json +5 -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
|
@@ -21,11 +21,12 @@ var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group
|
|
|
21
21
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
22
22
|
var _dropdownMenu = _interopRequireDefault(require("@atlaskit/dropdown-menu"));
|
|
23
23
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
24
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
24
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
26
25
|
var _constants = require("../../../../../constants");
|
|
27
26
|
var _messages = require("../../../../../messages");
|
|
28
27
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
28
|
+
var _useBlockCardRovoActionExperiment = require("../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
29
|
+
var _useRovoConfig2 = _interopRequireDefault(require("../../../../../state/hooks/use-rovo-config"));
|
|
29
30
|
var _rovoChatAction = require("../../actions/rovo-chat-action");
|
|
30
31
|
var _utils = require("../../utils");
|
|
31
32
|
var _utils2 = require("../utils");
|
|
@@ -75,15 +76,18 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
75
76
|
containerWidth = _ref$containerWidth === void 0 ? Infinity : _ref$containerWidth;
|
|
76
77
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
77
78
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
79
|
+
var _useRovoConfig = (0, _useRovoConfig2.default)(),
|
|
80
|
+
product = _useRovoConfig.product;
|
|
78
81
|
var _useState = (0, _react.useState)(false),
|
|
79
82
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
80
83
|
isOpen = _useState2[0],
|
|
81
84
|
setIsOpen = _useState2[1];
|
|
82
85
|
var renderableActionItems = (0, _react.useMemo)(function () {
|
|
83
|
-
return (0, _utils2.filterActionItems)(items, context);
|
|
84
|
-
}, [context, items]);
|
|
86
|
+
return (0, _utils2.filterActionItems)(items, context, product);
|
|
87
|
+
}, [context, items, product]);
|
|
85
88
|
var isMoreThenTwoItems = renderableActionItems.length > visibleButtonsNum;
|
|
86
|
-
var
|
|
89
|
+
var rovoChatAction = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.RovoChatAction];
|
|
90
|
+
var is3PBlockExperimentEnabled = (0, _useBlockCardRovoActionExperiment.isBlockCardRovoActionExperimentEnabled)(rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product);
|
|
87
91
|
var onOpenChange = (0, _react.useCallback)(function (attrs) {
|
|
88
92
|
setIsOpen(attrs.isOpen);
|
|
89
93
|
if (onDropdownOpenChange) {
|
|
@@ -98,7 +102,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
98
102
|
}
|
|
99
103
|
}, [isOpen, onOpenChange]);
|
|
100
104
|
var actionButtons = (0, _react.useMemo)(function () {
|
|
101
|
-
if (
|
|
105
|
+
if (!!rovoChatAction && is3PBlockExperimentEnabled) {
|
|
102
106
|
var rovoActions = [].concat((0, _toConsumableArray2.default)(containerWidth >= REDUCED_ACTIONS_SIZE ? renderableActionItems.slice(0, visibleButtonsNum - 1) : []), [{
|
|
103
107
|
name: _constants.ActionName.RovoChatAction,
|
|
104
108
|
prompts: [_rovoChatAction.RovoChatPromptKey.ASK_ROVO_ANYTHING],
|
|
@@ -118,10 +122,10 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
118
122
|
}
|
|
119
123
|
var actionItems = isMoreThenTwoItems ? renderableActionItems.slice(0, visibleButtonsNum - 1) : renderableActionItems;
|
|
120
124
|
return renderActionItems(actionItems, size, appearance, false, onActionItemClick);
|
|
121
|
-
}, [appearance, isMoreThenTwoItems,
|
|
125
|
+
}, [appearance, isMoreThenTwoItems, onActionItemClick, renderableActionItems, size, visibleButtonsNum, rovoChatAction, is3PBlockExperimentEnabled, containerWidth]);
|
|
122
126
|
var moreActionDropdown = (0, _react.useMemo)(function () {
|
|
123
127
|
var actionItems;
|
|
124
|
-
if (
|
|
128
|
+
if (!!rovoChatAction && is3PBlockExperimentEnabled && containerWidth < REDUCED_ACTIONS_SIZE) {
|
|
125
129
|
actionItems = renderableActionItems;
|
|
126
130
|
} else {
|
|
127
131
|
actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
@@ -145,11 +149,11 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
145
149
|
testId: "action-group-more-button-tooltip",
|
|
146
150
|
tag: "span"
|
|
147
151
|
}, /*#__PURE__*/React.createElement(_standardButton.default, (0, _extends2.default)({}, props, {
|
|
148
|
-
spacing:
|
|
152
|
+
spacing: !!rovoChatAction && is3PBlockExperimentEnabled ? size === _constants.SmartLinkSize.XLarge ? 'default' : 'compact' : spacing,
|
|
149
153
|
testId: "action-group-more-button",
|
|
150
154
|
iconBefore: moreIcon,
|
|
151
155
|
ref: triggerRef
|
|
152
|
-
},
|
|
156
|
+
}, is3PBlockExperimentEnabled ? {
|
|
153
157
|
appearance: appearance
|
|
154
158
|
} : {})));
|
|
155
159
|
},
|
|
@@ -158,7 +162,7 @@ var ActionGroup = function ActionGroup(_ref) {
|
|
|
158
162
|
}, renderActionItems(actionItems, size, appearance, true, onActionItemClick));
|
|
159
163
|
}
|
|
160
164
|
return null;
|
|
161
|
-
}, [appearance, isMoreThenTwoItems, isOpen,
|
|
165
|
+
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum, rovoChatAction, is3PBlockExperimentEnabled, containerWidth]);
|
|
162
166
|
return renderableActionItems.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
163
167
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
164
168
|
className: (0, _runtime.ax)(["_1e0c116y _dzc21h6o _1ilq1i6y", "actions-button-group"]),
|
|
@@ -14,10 +14,10 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _userAgent = require("@atlaskit/linking-common/user-agent");
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var _widthDetector = require("@atlaskit/width-detector");
|
|
19
18
|
var _constants = require("../../../../../../constants");
|
|
20
19
|
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
20
|
+
var _useBlockCardRovoActionExperiment = require("../../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
21
21
|
var _elements = require("../../../elements");
|
|
22
22
|
var _actionGroup = _interopRequireDefault(require("../../action-group"));
|
|
23
23
|
var _block = _interopRequireDefault(require("../../block"));
|
|
@@ -38,8 +38,9 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
38
38
|
hideProvider = props.hideProvider,
|
|
39
39
|
isPreviewBlockErrored = props.isPreviewBlockErrored;
|
|
40
40
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
41
|
-
var
|
|
42
|
-
var
|
|
41
|
+
var rovoChatAction = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.RovoChatAction];
|
|
42
|
+
var is3PBlockExperimentEnabled = (0, _useBlockCardRovoActionExperiment.isBlockCardRovoActionExperimentEnabled)(rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product);
|
|
43
|
+
var hasPreview = !!rovoChatAction && is3PBlockExperimentEnabled && !!(context !== null && context !== void 0 && context.preview) && !isPreviewBlockErrored;
|
|
43
44
|
var hasActions = (0, _react.useMemo)(function () {
|
|
44
45
|
var _filterActionItems;
|
|
45
46
|
return ((_filterActionItems = (0, _utils.filterActionItems)(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
|
|
@@ -70,22 +71,22 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
70
71
|
appearance: "subtle",
|
|
71
72
|
testId: "".concat(testId, "-provider"),
|
|
72
73
|
hideLabel: hasPreview,
|
|
73
|
-
className: (0, _runtime.ax)([
|
|
74
|
+
className: (0, _runtime.ax)([!!rovoChatAction && is3PBlockExperimentEnabled && "_1wpz1h6o"])
|
|
74
75
|
}), actions && hasActions ? /*#__PURE__*/React.createElement(_elementGroup.default, {
|
|
75
76
|
testId: "smart-element-group-actions",
|
|
76
77
|
align: _constants.SmartLinkAlignment.Right,
|
|
77
78
|
direction: _constants.SmartLinkDirection.Horizontal,
|
|
78
79
|
width: _constants.SmartLinkWidth.Flexible,
|
|
79
|
-
className: (0, _runtime.ax)([size === _constants.SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq",
|
|
80
|
-
},
|
|
80
|
+
className: (0, _runtime.ax)([size === _constants.SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq", !!rovoChatAction && is3PBlockExperimentEnabled && "_kqswh2mm"])
|
|
81
|
+
}, !!rovoChatAction && is3PBlockExperimentEnabled && /*#__PURE__*/React.createElement(_widthDetector.WidthObserver, {
|
|
81
82
|
setWidth: setContainerWidth,
|
|
82
83
|
offscreen: true
|
|
83
84
|
}), /*#__PURE__*/React.createElement(_actionGroup.default, {
|
|
84
85
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
85
86
|
items: actions,
|
|
86
|
-
appearance:
|
|
87
|
-
size:
|
|
88
|
-
containerWidth:
|
|
87
|
+
appearance: !!rovoChatAction && is3PBlockExperimentEnabled ? 'subtle' : 'default',
|
|
88
|
+
size: !!rovoChatAction && is3PBlockExperimentEnabled ? _constants.SmartLinkSize.Small : size,
|
|
89
|
+
containerWidth: !!rovoChatAction && is3PBlockExperimentEnabled ? containerWidth : undefined
|
|
89
90
|
})) : null);
|
|
90
91
|
};
|
|
91
92
|
var _default = exports.default = FooterBlockResolvedView;
|
|
@@ -15,6 +15,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
17
17
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _constants = require("../../../../../../constants");
|
|
19
20
|
var _elements = require("../../../elements");
|
|
20
21
|
var _block = _interopRequireDefault(require("../../block"));
|
|
@@ -41,7 +42,25 @@ var PreviewBlockResolvedView = function PreviewBlockResolvedView(_ref) {
|
|
|
41
42
|
style = _ref.style,
|
|
42
43
|
className = _ref.className,
|
|
43
44
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
44
|
-
var _useState = (0, _react.useState)(
|
|
45
|
+
var _useState = (0, _react.useState)(function () {
|
|
46
|
+
if ((0, _platformFeatureFlags.fg)('dfo-fix-preview-dynamic-style')) {
|
|
47
|
+
if (placement === _constants.MediaPlacement.Left || placement === _constants.MediaPlacement.Right) {
|
|
48
|
+
var containerPadding = ignoreContainerPadding ? '0px' : 'var(--container-padding)';
|
|
49
|
+
var newStyle = _objectSpread(_objectSpread(_objectSpread({}, style), {}, {
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
top: containerPadding,
|
|
52
|
+
bottom: containerPadding,
|
|
53
|
+
width: "calc(var(--preview-block-width) - ".concat(containerPadding, ")")
|
|
54
|
+
}, placement === _constants.MediaPlacement.Left ? {
|
|
55
|
+
left: containerPadding
|
|
56
|
+
} : {}), placement === _constants.MediaPlacement.Right ? {
|
|
57
|
+
right: containerPadding
|
|
58
|
+
} : {});
|
|
59
|
+
return newStyle;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return style !== null && style !== void 0 ? style : {};
|
|
63
|
+
}),
|
|
45
64
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
46
65
|
dynamicStyles = _useState2[0],
|
|
47
66
|
setDynamicStyles = _useState2[1];
|
|
@@ -11,8 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireDefault(require("react"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _constants = require("../../../../constants");
|
|
15
|
+
var _useBlockCardRovoActionExperiment = require("../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
16
16
|
var _flexible = require("../../../../utils/flexible");
|
|
17
17
|
var Elements = _interopRequireWildcard(require("../elements"));
|
|
18
18
|
var _actionGroup = _interopRequireDefault(require("./action-group"));
|
|
@@ -58,6 +58,8 @@ var isElementOrElementGroup = function isElementOrElementGroup(node) {
|
|
|
58
58
|
var filterActionItems = exports.filterActionItems = function filterActionItems() {
|
|
59
59
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
60
60
|
var context = arguments.length > 1 ? arguments[1] : undefined;
|
|
61
|
+
var product = arguments.length > 2 ? arguments[2] : undefined;
|
|
62
|
+
var isBlockCard3PExperimentEnabled = (0, _useBlockCardRovoActionExperiment.isBlockCardRovoActionExperimentEnabled)(product);
|
|
61
63
|
return items.filter(function (item) {
|
|
62
64
|
switch (item.name) {
|
|
63
65
|
case _constants.ActionName.DeleteAction:
|
|
@@ -66,7 +68,7 @@ var filterActionItems = exports.filterActionItems = function filterActionItems()
|
|
|
66
68
|
// Named and custom actions that user defines.
|
|
67
69
|
return Boolean(_constants.ActionName[item.name]);
|
|
68
70
|
case _constants.ActionName.RovoChatAction:
|
|
69
|
-
if (
|
|
71
|
+
if (isBlockCard3PExperimentEnabled) {
|
|
70
72
|
return Boolean(_constants.ActionName[item.name]);
|
|
71
73
|
}
|
|
72
74
|
// same as default case below
|
|
@@ -11,11 +11,11 @@ require("./index.compiled.css");
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
16
15
|
var _constants = require("../../../../../../constants");
|
|
17
16
|
var _messages = require("../../../../../../messages");
|
|
18
17
|
var _flexibleUiContext = require("../../../../../../state/flexible-ui-context");
|
|
18
|
+
var _useBlockCardRovoActionExperiment = require("../../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
19
19
|
var _atlaskitIcon = _interopRequireDefault(require("../../../common/atlaskit-icon"));
|
|
20
20
|
var _imageIcon = _interopRequireDefault(require("../../../common/image-icon"));
|
|
21
21
|
var _withOverrideCss = require("../../../common/with-override-css");
|
|
@@ -89,12 +89,13 @@ var BaseBadgeRefreshNew = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
89
89
|
_ref$hideLabel = _ref.hideLabel,
|
|
90
90
|
hideLabel = _ref$hideLabel === void 0 ? false : _ref$hideLabel;
|
|
91
91
|
var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
|
|
92
|
+
var isRovoBlockCardExperimentEnabled = (0, _useBlockCardRovoActionExperiment.useBlockCardRovoActionExperimentNoExposure)();
|
|
92
93
|
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
93
94
|
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
94
95
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
95
96
|
return null;
|
|
96
97
|
}
|
|
97
|
-
var shouldHideLabel = hideLabel &&
|
|
98
|
+
var shouldHideLabel = hideLabel && isRovoBlockCardExperimentEnabled;
|
|
98
99
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
99
100
|
"data-smart-element": name,
|
|
100
101
|
"data-smart-element-badge": true,
|
|
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
22
22
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
23
23
|
var PACKAGE_DATA = {
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "44.
|
|
25
|
+
packageVersion: "44.6.1",
|
|
26
26
|
componentName: 'linkUrl'
|
|
27
27
|
};
|
|
28
28
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -3,6 +3,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
3
3
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
4
4
|
import { ActionName } from '../../../constants';
|
|
5
5
|
import { getDefinitionId, getExtensionKey, getResourceType } from '../../../state/helpers';
|
|
6
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
6
7
|
import { canShowAction } from '../../../utils/actions/can-show-action';
|
|
7
8
|
import { getIsRovoChatEnabled } from '../../../utils/rovo';
|
|
8
9
|
import { CardAction } from '../../../view/Card/types';
|
|
@@ -26,9 +27,10 @@ const extractRovoChatAction = ({
|
|
|
26
27
|
}
|
|
27
28
|
const extensionKey = getExtensionKey(response);
|
|
28
29
|
const isGoogleProvider = extensionKey === 'google-object-provider';
|
|
30
|
+
const is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled(product);
|
|
29
31
|
const is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
30
32
|
const is3PInlinePostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
31
|
-
const is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) &&
|
|
33
|
+
const is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && is3PBlockExperimentEnabled;
|
|
32
34
|
const isSupportedFeature = is3PInlinePostAuthActionsEnabled || is3PAuthRovoActionEnabled || is3PBlockPostAuthActionsEnabled;
|
|
33
35
|
const isOptIn = (actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
34
36
|
const url = extractSmartLinkUrl(response);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
4
|
+
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
5
|
+
import { getIsRovoChatEnabled } from '../../../utils/rovo';
|
|
6
|
+
import { getExtensionKey } from '../../helpers';
|
|
7
|
+
import { useSmartCardState } from '../../store';
|
|
8
|
+
import { JIRA_PRODUCTS } from '../use-rovo-chat/constants';
|
|
9
|
+
import useRovoConfig from '../use-rovo-config';
|
|
10
|
+
const ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
|
|
11
|
+
const NOT_ENABLED_RESULT = {
|
|
12
|
+
isEnabled: false
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Returns whether the platform_sl_3p_auth_rovo_block_card_jira or platform_sl_3p_auth_rovo_block_card_confluence experiment
|
|
17
|
+
* is enabled for the current user and link context.
|
|
18
|
+
*
|
|
19
|
+
* All eligibility criteria are consolidated here:
|
|
20
|
+
* 1. Rovo chat must be enabled for the tenant.
|
|
21
|
+
* 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
|
|
22
|
+
* 3. The link must support the RovoActions feature.
|
|
23
|
+
* 4. The extension key must be one of the supported options.
|
|
24
|
+
* 5. The experiment value must be true (via tmp-editor-statsig).
|
|
25
|
+
*
|
|
26
|
+
* The extension key is derived from the card store via the resolved URL,
|
|
27
|
+
* so callers don't need to thread it as a prop.
|
|
28
|
+
*/
|
|
29
|
+
const useBlockCardRovoActionExperiment = (url, actionOptions) => {
|
|
30
|
+
var _actionOptions$rovoCh, _actionOptions$rovoCh2;
|
|
31
|
+
const {
|
|
32
|
+
rovoOptions: rovoConfig,
|
|
33
|
+
product
|
|
34
|
+
} = useRovoConfig();
|
|
35
|
+
const isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
|
|
36
|
+
const cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
|
|
37
|
+
const extensionKey = getExtensionKey(cardState.details);
|
|
38
|
+
const isRovoChatActionOptedIn = (_actionOptions$rovoCh = actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$rovoCh2 = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh2 === void 0 ? void 0 : _actionOptions$rovoCh2.optIn) !== null && _actionOptions$rovoCh !== void 0 ? _actionOptions$rovoCh : false;
|
|
39
|
+
return useMemo(() => {
|
|
40
|
+
if (!isRovoChatEnabled || !url || !isRovoChatActionOptedIn) {
|
|
41
|
+
return NOT_ENABLED_RESULT;
|
|
42
|
+
}
|
|
43
|
+
if (extensionKey && !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
|
|
44
|
+
return NOT_ENABLED_RESULT;
|
|
45
|
+
}
|
|
46
|
+
const isJiraEnabled = !!product && JIRA_PRODUCTS.includes(product) && fg('platform_sl_3p_auth_rovo_block_jira_kill_switch') && expValEquals('platform_sl_3p_auth_rovo_block_card_jira', 'isEnabled', true);
|
|
47
|
+
const isConfluenceEnabled = !!product && product === 'CONFLUENCE' && fg('platform_sl_3p_auth_rovo_block_card_kill_switch') && expValEquals('platform_sl_3p_auth_rovo_block_card_confluence', 'isEnabled', true);
|
|
48
|
+
return {
|
|
49
|
+
isEnabled: isJiraEnabled || isConfluenceEnabled
|
|
50
|
+
};
|
|
51
|
+
}, [isRovoChatEnabled, extensionKey, url, isRovoChatActionOptedIn, product]);
|
|
52
|
+
};
|
|
53
|
+
export const isBlockCardRovoActionExperimentEnabled = product => {
|
|
54
|
+
const isJiraEnabled = !!product && JIRA_PRODUCTS.includes(product) && fg('platform_sl_3p_auth_rovo_block_jira_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_block_card_jira', 'isEnabled', true);
|
|
55
|
+
const isConfluenceEnabled = !!product && product === 'CONFLUENCE' && fg('platform_sl_3p_auth_rovo_block_card_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_block_card_confluence', 'isEnabled', true);
|
|
56
|
+
return isJiraEnabled || isConfluenceEnabled;
|
|
57
|
+
};
|
|
58
|
+
export const useBlockCardRovoActionExperimentNoExposure = () => {
|
|
59
|
+
const {
|
|
60
|
+
product
|
|
61
|
+
} = useRovoConfig();
|
|
62
|
+
return isBlockCardRovoActionExperimentEnabled(product);
|
|
63
|
+
};
|
|
64
|
+
export default useBlockCardRovoActionExperiment;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const JIRA_PRODUCTS = ['JSM', 'JWM', 'JSW', 'JPD'];
|
|
@@ -3,6 +3,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
3
3
|
import { useRovoPostMessageToPubsub } from '@atlaskit/rovo-triggers/post-message-to-pubsub';
|
|
4
4
|
import { getIsRovoChatEnabled } from '../../../utils/rovo';
|
|
5
5
|
import useRovoConfig from '../use-rovo-config';
|
|
6
|
+
import { JIRA_PRODUCTS } from './constants';
|
|
6
7
|
const SMART_LINK_TO_ROVO_SOURCE = 'smart-link';
|
|
7
8
|
const useRovoChat = () => {
|
|
8
9
|
const {
|
|
@@ -15,7 +16,6 @@ const useRovoChat = () => {
|
|
|
15
16
|
const isRovoChatEnabled = getIsRovoChatEnabled(config);
|
|
16
17
|
const sendPromptMessage = useCallback(data => {
|
|
17
18
|
var _window$parent;
|
|
18
|
-
const jiraProducts = ['JSM', 'JWM', 'JSW', 'JPD'];
|
|
19
19
|
publishWithPostMessage({
|
|
20
20
|
targetWindow: (_window$parent = window.parent) !== null && _window$parent !== void 0 ? _window$parent : window,
|
|
21
21
|
payload: {
|
|
@@ -27,7 +27,7 @@ const useRovoChat = () => {
|
|
|
27
27
|
agentId: undefined
|
|
28
28
|
},
|
|
29
29
|
openChat: true,
|
|
30
|
-
openChatMode: product &&
|
|
30
|
+
openChatMode: product && JIRA_PRODUCTS.includes(product) && fg('platform_sl_3p_auth_rovo_block_jira_kill_switch') || fg('rovogrowth-640-inline-action-nudge-fg') ? 'mini-modal' : 'sidebar'
|
|
31
31
|
},
|
|
32
32
|
onAcknowledgeTimeout: () => {
|
|
33
33
|
// NAVX-3599: Add analytics event
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card" || '',
|
|
5
|
-
packageVersion: "44.
|
|
5
|
+
packageVersion: "44.6.1" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,10 +5,10 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useEffect, useMemo, useState } from 'react';
|
|
7
7
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { ActionName, CardDisplay, ElementName, SmartLinkPosition } from '../../../constants';
|
|
10
9
|
import extractRovoChatAction from '../../../extractors/flexible/actions/extract-rovo-chat-action';
|
|
11
10
|
import { getExtensionKey } from '../../../state/helpers';
|
|
11
|
+
import useBlockCardRovoActionExperiment from '../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
12
12
|
import useRovoConfig from '../../../state/hooks/use-rovo-config';
|
|
13
13
|
import FlexibleCard from '../../FlexibleCard';
|
|
14
14
|
import { RovoChatPromptKey } from '../../FlexibleCard/components/actions/rovo-chat-action';
|
|
@@ -38,10 +38,13 @@ const ResolvedView = ({
|
|
|
38
38
|
var _cardState$details2;
|
|
39
39
|
const [isPreviewBlockErrored, setIsPreviewBlockErrored] = useState(false);
|
|
40
40
|
const extensionKey = getExtensionKey(cardState.details);
|
|
41
|
-
const
|
|
41
|
+
const {
|
|
42
|
+
isEnabled: is3PRovoBlockExperimentEnabled
|
|
43
|
+
} = useBlockCardRovoActionExperiment(url, actionOptions);
|
|
44
|
+
const rovoConfig = is3PRovoBlockExperimentEnabled ?
|
|
42
45
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
43
46
|
useRovoConfig() : undefined;
|
|
44
|
-
const showRovoResolvedView =
|
|
47
|
+
const showRovoResolvedView = is3PRovoBlockExperimentEnabled ?
|
|
45
48
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
46
49
|
useMemo(() => (cardState === null || cardState === void 0 ? void 0 : cardState.status) === 'resolved' && cardState.details && extractRovoChatAction({
|
|
47
50
|
response: cardState.details,
|
|
@@ -62,7 +65,7 @@ const ResolvedView = ({
|
|
|
62
65
|
bottomMetadata
|
|
63
66
|
} = getSimulatedBetterMetadata(cardState.details);
|
|
64
67
|
const prompts = useMemo(() => {
|
|
65
|
-
if (
|
|
68
|
+
if (is3PRovoBlockExperimentEnabled) {
|
|
66
69
|
var _cardState$details, _cardState$details$da;
|
|
67
70
|
const defaultPrompts = [RovoChatPromptKey.KEY_HIGHLIGHTS];
|
|
68
71
|
const linkType = (_cardState$details = cardState.details) === null || _cardState$details === void 0 ? void 0 : (_cardState$details$da = _cardState$details.data) === null || _cardState$details$da === void 0 ? void 0 : _cardState$details$da['@type'];
|
|
@@ -78,33 +81,28 @@ const ResolvedView = ({
|
|
|
78
81
|
return [RovoChatPromptKey.SUMMARIZE_LINK, ...defaultPrompts];
|
|
79
82
|
}
|
|
80
83
|
return [];
|
|
81
|
-
}, [cardState === null || cardState === void 0 ? void 0 : (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data, extensionKey]);
|
|
82
|
-
const footerActions = useMemo(() => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}, {
|
|
104
|
-
name: ActionName.DownloadAction,
|
|
105
|
-
hideIcon: true
|
|
106
|
-
}];
|
|
107
|
-
}, [showRovoResolvedView, prompts]);
|
|
84
|
+
}, [cardState === null || cardState === void 0 ? void 0 : (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data, extensionKey, is3PRovoBlockExperimentEnabled]);
|
|
85
|
+
const footerActions = useMemo(() => showRovoResolvedView && is3PRovoBlockExperimentEnabled ? [{
|
|
86
|
+
name: ActionName.RovoChatAction,
|
|
87
|
+
prompts: prompts,
|
|
88
|
+
iconSize: 'small',
|
|
89
|
+
cardAppearance: CardDisplay.Block
|
|
90
|
+
}, {
|
|
91
|
+
name: ActionName.FollowAction,
|
|
92
|
+
iconSize: 'small'
|
|
93
|
+
}, {
|
|
94
|
+
name: ActionName.DownloadAction,
|
|
95
|
+
iconSize: 'small'
|
|
96
|
+
}] : [{
|
|
97
|
+
name: ActionName.FollowAction,
|
|
98
|
+
hideIcon: true
|
|
99
|
+
}, {
|
|
100
|
+
name: ActionName.PreviewAction,
|
|
101
|
+
hideIcon: true
|
|
102
|
+
}, {
|
|
103
|
+
name: ActionName.DownloadAction,
|
|
104
|
+
hideIcon: true
|
|
105
|
+
}], [showRovoResolvedView, prompts, is3PRovoBlockExperimentEnabled]);
|
|
108
106
|
const uiOptions = FlexibleCardUiOptions;
|
|
109
107
|
uiOptions.enableSnippetRenderer = true;
|
|
110
108
|
uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
|
|
@@ -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
|
const IconOnlyLarge = null;
|
|
@@ -57,7 +57,8 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
57
57
|
var _context$actions;
|
|
58
58
|
const iconOnly = !content;
|
|
59
59
|
const context = useFlexibleUiContext();
|
|
60
|
-
const
|
|
60
|
+
const isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
61
|
+
const isRovoSupported = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && isRovoBlockCardExperimentEnabled;
|
|
61
62
|
const onButtonClick = useCallback(handler => e => {
|
|
62
63
|
e.preventDefault();
|
|
63
64
|
handler();
|