@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
package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js
CHANGED
|
@@ -6,6 +6,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
6
6
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
7
|
import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
|
|
8
8
|
import { messages } from '../../../../../messages';
|
|
9
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
9
10
|
import Action from '../action';
|
|
10
11
|
import { getErrorMessage } from './utils';
|
|
11
12
|
export function AISummariseAction({
|
|
@@ -19,6 +20,7 @@ export function AISummariseAction({
|
|
|
19
20
|
const {
|
|
20
21
|
fireEvent
|
|
21
22
|
} = useAnalyticsEvents();
|
|
23
|
+
const isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
22
24
|
const onCompleted = useCallback(state => {
|
|
23
25
|
if ((state === null || state === void 0 ? void 0 : state.status) === 'error') {
|
|
24
26
|
onErrorCallback === null || onErrorCallback === void 0 ? void 0 : onErrorCallback(getErrorMessage(state.error));
|
|
@@ -41,7 +43,7 @@ export function AISummariseAction({
|
|
|
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';
|
|
@@ -27,6 +28,7 @@ const AutomationAction = props => {
|
|
|
27
28
|
fireEvent
|
|
28
29
|
} = useAnalyticsEvents();
|
|
29
30
|
const automationActionData = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.AutomationAction];
|
|
31
|
+
const isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
30
32
|
const automationActionOnClick = useCallback(automationActionData => {
|
|
31
33
|
const {
|
|
32
34
|
product,
|
|
@@ -77,7 +79,7 @@ const AutomationAction = props => {
|
|
|
77
79
|
spacing: "spacious",
|
|
78
80
|
color: "currentColor",
|
|
79
81
|
label: automationActionIconLabel
|
|
80
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
82
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
81
83
|
size: props.iconSize
|
|
82
84
|
} : {})),
|
|
83
85
|
testId: "smart-action-automation-action",
|
|
@@ -7,6 +7,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
7
7
|
import { ActionName } from '../../../../../constants';
|
|
8
8
|
import { messages } from '../../../../../messages';
|
|
9
9
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
10
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
10
11
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
11
12
|
import Action from '../action';
|
|
12
13
|
const CopyLinkAction = ({
|
|
@@ -18,6 +19,7 @@ const CopyLinkAction = ({
|
|
|
18
19
|
const invoke = useInvokeClientAction({});
|
|
19
20
|
const data = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.CopyLinkAction];
|
|
20
21
|
const [tooltipMessage, setTooltipMessage] = useState(messages.copy_url_to_clipboard);
|
|
22
|
+
const isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
21
23
|
const onClick = useCallback(() => {
|
|
22
24
|
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
23
25
|
invoke({
|
|
@@ -37,7 +39,7 @@ const CopyLinkAction = ({
|
|
|
37
39
|
color: "currentColor",
|
|
38
40
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
39
41
|
spacing: "spacious"
|
|
40
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
42
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
41
43
|
size: props.iconSize
|
|
42
44
|
} : {})),
|
|
43
45
|
onClick: onClick,
|
|
@@ -9,6 +9,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
|
|
|
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 useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
13
14
|
import Action from '../action';
|
|
14
15
|
const PreviewAction = ({
|
|
@@ -20,6 +21,7 @@ const PreviewAction = ({
|
|
|
20
21
|
const invoke = useInvokeClientAction({});
|
|
21
22
|
const data = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.PreviewAction];
|
|
22
23
|
const hasPreviewPanel = data === null || data === void 0 ? void 0 : data.hasPreviewPanel;
|
|
24
|
+
const isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
23
25
|
const onClick = useCallback(() => {
|
|
24
26
|
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
25
27
|
invoke(data.invokeAction);
|
|
@@ -35,7 +37,7 @@ const PreviewAction = ({
|
|
|
35
37
|
color: "currentColor",
|
|
36
38
|
spacing: "spacious",
|
|
37
39
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
38
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
40
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
39
41
|
size: props.iconSize
|
|
40
42
|
} : {}));
|
|
41
43
|
}
|
|
@@ -43,10 +45,10 @@ const PreviewAction = ({
|
|
|
43
45
|
color: "currentColor",
|
|
44
46
|
spacing: "spacious",
|
|
45
47
|
label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
46
|
-
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
48
|
+
}, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
47
49
|
size: props.iconSize
|
|
48
50
|
} : {}));
|
|
49
|
-
}, [hasPreviewPanel, props.iconSize]);
|
|
51
|
+
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
50
52
|
const actionLabel = useCallback(() => {
|
|
51
53
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
52
54
|
if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
@@ -6,11 +6,11 @@ import AiChatIcon from '@atlaskit/icon/core/ai-chat';
|
|
|
6
6
|
import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
|
|
7
7
|
import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
|
|
8
8
|
import { RovoIcon } from '@atlaskit/logo';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
11
10
|
import { ActionName, CardDisplay } from '../../../../../constants';
|
|
12
11
|
import { messages } from '../../../../../messages';
|
|
13
12
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
13
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
14
14
|
import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
|
|
15
15
|
import useRovoChat from '../../../../../state/hooks/use-rovo-chat';
|
|
16
16
|
import AiChapterIcon from '../../../assets/ai-chapter-icon';
|
|
@@ -65,6 +65,7 @@ const getPromptAction = (promptKey, intl, url = '', product, iconSize, cardAppea
|
|
|
65
65
|
contextLong: intl.formatMessage(messages.rovo_prompt_context_generic),
|
|
66
66
|
contextShort: intl.formatMessage(messages.rovo_prompt_context_generic)
|
|
67
67
|
};
|
|
68
|
+
const isBlockCard3PExperimentEnabled = isBlockCardRovoActionExperimentEnabled(product);
|
|
68
69
|
switch (promptKey) {
|
|
69
70
|
case RovoChatPromptKey.RECOMMEND_OTHER_SOURCES:
|
|
70
71
|
const label_recommend = intl.formatMessage(messages.rovo_prompt_button_recommend_other_sources);
|
|
@@ -130,7 +131,7 @@ const getPromptAction = (promptKey, intl, url = '', product, iconSize, cardAppea
|
|
|
130
131
|
ignoreTag: true
|
|
131
132
|
});
|
|
132
133
|
return {
|
|
133
|
-
icon: cardAppearance === CardDisplay.Block &&
|
|
134
|
+
icon: cardAppearance === CardDisplay.Block && isBlockCard3PExperimentEnabled ? /*#__PURE__*/React.createElement(AiChatIcon, {
|
|
134
135
|
label: label_summarize,
|
|
135
136
|
size: iconSize
|
|
136
137
|
}) : /*#__PURE__*/React.createElement(AIEditIcon, null),
|
|
@@ -194,7 +195,7 @@ const getPromptAction = (promptKey, intl, url = '', product, iconSize, cardAppea
|
|
|
194
195
|
url
|
|
195
196
|
});
|
|
196
197
|
return {
|
|
197
|
-
icon: cardAppearance === CardDisplay.Block &&
|
|
198
|
+
icon: cardAppearance === CardDisplay.Block && isBlockCard3PExperimentEnabled ? /*#__PURE__*/React.createElement(RovoIcon, {
|
|
198
199
|
label: label_ask_rovo_anything,
|
|
199
200
|
size: 'xxsmall',
|
|
200
201
|
shouldUseHexLogo: true
|
|
@@ -12,11 +12,12 @@ import ButtonGroup from '@atlaskit/button/button-group';
|
|
|
12
12
|
import Button from '@atlaskit/button/standard-button';
|
|
13
13
|
import DropdownMenu from '@atlaskit/dropdown-menu';
|
|
14
14
|
import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
15
|
import Tooltip from '@atlaskit/tooltip';
|
|
17
16
|
import { ActionName, CardDisplay, SmartLinkSize } from '../../../../../constants';
|
|
18
17
|
import { messages } from '../../../../../messages';
|
|
19
18
|
import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
19
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
20
|
+
import useRovoConfig from '../../../../../state/hooks/use-rovo-config';
|
|
20
21
|
import { RovoChatPromptKey } from '../../actions/rovo-chat-action';
|
|
21
22
|
import { sizeToButtonSpacing } from '../../utils';
|
|
22
23
|
import { filterActionItems } from '../utils';
|
|
@@ -51,10 +52,14 @@ const ActionGroup = ({
|
|
|
51
52
|
var _context$actions;
|
|
52
53
|
const context = useFlexibleUiContext();
|
|
53
54
|
const ui = useFlexibleUiOptionContext();
|
|
55
|
+
const {
|
|
56
|
+
product
|
|
57
|
+
} = useRovoConfig();
|
|
54
58
|
const [isOpen, setIsOpen] = useState(false);
|
|
55
|
-
const renderableActionItems = useMemo(() => filterActionItems(items, context), [context, items]);
|
|
59
|
+
const renderableActionItems = useMemo(() => filterActionItems(items, context, product), [context, items, product]);
|
|
56
60
|
const isMoreThenTwoItems = renderableActionItems.length > visibleButtonsNum;
|
|
57
|
-
const
|
|
61
|
+
const rovoChatAction = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction];
|
|
62
|
+
const is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled(rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product);
|
|
58
63
|
const onOpenChange = useCallback(attrs => {
|
|
59
64
|
setIsOpen(attrs.isOpen);
|
|
60
65
|
if (onDropdownOpenChange) {
|
|
@@ -69,7 +74,7 @@ const ActionGroup = ({
|
|
|
69
74
|
}
|
|
70
75
|
}, [isOpen, onOpenChange]);
|
|
71
76
|
const actionButtons = useMemo(() => {
|
|
72
|
-
if (
|
|
77
|
+
if (!!rovoChatAction && is3PBlockExperimentEnabled) {
|
|
73
78
|
const rovoActions = [...(containerWidth >= REDUCED_ACTIONS_SIZE ? renderableActionItems.slice(0, visibleButtonsNum - 1) : []), {
|
|
74
79
|
name: ActionName.RovoChatAction,
|
|
75
80
|
prompts: [RovoChatPromptKey.ASK_ROVO_ANYTHING],
|
|
@@ -89,10 +94,10 @@ const ActionGroup = ({
|
|
|
89
94
|
}
|
|
90
95
|
const actionItems = isMoreThenTwoItems ? renderableActionItems.slice(0, visibleButtonsNum - 1) : renderableActionItems;
|
|
91
96
|
return renderActionItems(actionItems, size, appearance, false, onActionItemClick);
|
|
92
|
-
}, [appearance, isMoreThenTwoItems,
|
|
97
|
+
}, [appearance, isMoreThenTwoItems, onActionItemClick, renderableActionItems, size, visibleButtonsNum, rovoChatAction, is3PBlockExperimentEnabled, containerWidth]);
|
|
93
98
|
const moreActionDropdown = useMemo(() => {
|
|
94
99
|
let actionItems;
|
|
95
|
-
if (
|
|
100
|
+
if (!!rovoChatAction && is3PBlockExperimentEnabled && containerWidth < REDUCED_ACTIONS_SIZE) {
|
|
96
101
|
actionItems = renderableActionItems;
|
|
97
102
|
} else {
|
|
98
103
|
actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
|
|
@@ -116,11 +121,11 @@ const ActionGroup = ({
|
|
|
116
121
|
testId: "action-group-more-button-tooltip",
|
|
117
122
|
tag: "span"
|
|
118
123
|
}, /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
119
|
-
spacing:
|
|
124
|
+
spacing: !!rovoChatAction && is3PBlockExperimentEnabled ? size === SmartLinkSize.XLarge ? 'default' : 'compact' : spacing,
|
|
120
125
|
testId: "action-group-more-button",
|
|
121
126
|
iconBefore: moreIcon,
|
|
122
127
|
ref: triggerRef
|
|
123
|
-
},
|
|
128
|
+
}, is3PBlockExperimentEnabled ? {
|
|
124
129
|
appearance
|
|
125
130
|
} : {}))),
|
|
126
131
|
testId: "action-group-dropdown",
|
|
@@ -128,7 +133,7 @@ const ActionGroup = ({
|
|
|
128
133
|
}, renderActionItems(actionItems, size, appearance, true, onActionItemClick));
|
|
129
134
|
}
|
|
130
135
|
return null;
|
|
131
|
-
}, [appearance, isMoreThenTwoItems, isOpen,
|
|
136
|
+
}, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum, rovoChatAction, is3PBlockExperimentEnabled, containerWidth]);
|
|
132
137
|
return renderableActionItems.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
133
138
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
134
139
|
className: ax(["_1e0c116y _dzc21h6o _1ilq1i6y", "actions-button-group"]),
|
|
@@ -5,10 +5,10 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback, 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 { WidthObserver } from '@atlaskit/width-detector';
|
|
10
9
|
import { ActionName, SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../../constants';
|
|
11
10
|
import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
|
|
11
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
12
12
|
import { Provider } from '../../../elements';
|
|
13
13
|
import ActionGroup from '../../action-group';
|
|
14
14
|
import Block from '../../block';
|
|
@@ -29,8 +29,9 @@ const FooterBlockResolvedView = props => {
|
|
|
29
29
|
isPreviewBlockErrored
|
|
30
30
|
} = props;
|
|
31
31
|
const context = useFlexibleUiContext();
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const rovoChatAction = context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction];
|
|
33
|
+
const is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled(rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product);
|
|
34
|
+
const hasPreview = !!rovoChatAction && is3PBlockExperimentEnabled && !!(context !== null && context !== void 0 && context.preview) && !isPreviewBlockErrored;
|
|
34
35
|
const hasActions = useMemo(() => {
|
|
35
36
|
var _filterActionItems;
|
|
36
37
|
return ((_filterActionItems = filterActionItems(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
|
|
@@ -56,22 +57,22 @@ const FooterBlockResolvedView = props => {
|
|
|
56
57
|
appearance: "subtle",
|
|
57
58
|
testId: `${testId}-provider`,
|
|
58
59
|
hideLabel: hasPreview,
|
|
59
|
-
className: ax([
|
|
60
|
+
className: ax([!!rovoChatAction && is3PBlockExperimentEnabled && "_1wpz1h6o"])
|
|
60
61
|
}), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, {
|
|
61
62
|
testId: "smart-element-group-actions",
|
|
62
63
|
align: SmartLinkAlignment.Right,
|
|
63
64
|
direction: SmartLinkDirection.Horizontal,
|
|
64
65
|
width: SmartLinkWidth.Flexible,
|
|
65
|
-
className: ax([size === SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq",
|
|
66
|
-
},
|
|
66
|
+
className: ax([size === SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq", !!rovoChatAction && is3PBlockExperimentEnabled && "_kqswh2mm"])
|
|
67
|
+
}, !!rovoChatAction && is3PBlockExperimentEnabled && /*#__PURE__*/React.createElement(WidthObserver, {
|
|
67
68
|
setWidth: setContainerWidth,
|
|
68
69
|
offscreen: true
|
|
69
70
|
}), /*#__PURE__*/React.createElement(ActionGroup, {
|
|
70
71
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
71
72
|
items: actions,
|
|
72
|
-
appearance:
|
|
73
|
-
size:
|
|
74
|
-
containerWidth:
|
|
73
|
+
appearance: !!rovoChatAction && is3PBlockExperimentEnabled ? 'subtle' : 'default',
|
|
74
|
+
size: !!rovoChatAction && is3PBlockExperimentEnabled ? SmartLinkSize.Small : size,
|
|
75
|
+
containerWidth: !!rovoChatAction && is3PBlockExperimentEnabled ? containerWidth : undefined
|
|
75
76
|
})) : null);
|
|
76
77
|
};
|
|
77
78
|
export default FooterBlockResolvedView;
|
|
@@ -4,6 +4,7 @@ import "./index.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback, useLayoutEffect, useState } from 'react';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { MediaPlacement } from '../../../../../../constants';
|
|
8
9
|
import { Preview } from '../../../elements';
|
|
9
10
|
import Block from '../../block';
|
|
@@ -26,7 +27,28 @@ const PreviewBlockResolvedView = ({
|
|
|
26
27
|
className,
|
|
27
28
|
...blockProps
|
|
28
29
|
}) => {
|
|
29
|
-
const [dynamicStyles, setDynamicStyles] = useState(
|
|
30
|
+
const [dynamicStyles, setDynamicStyles] = useState(() => {
|
|
31
|
+
if (fg('dfo-fix-preview-dynamic-style')) {
|
|
32
|
+
if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
|
|
33
|
+
const containerPadding = ignoreContainerPadding ? '0px' : 'var(--container-padding)';
|
|
34
|
+
const newStyle = {
|
|
35
|
+
...style,
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
top: containerPadding,
|
|
38
|
+
bottom: containerPadding,
|
|
39
|
+
width: `calc(var(--preview-block-width) - ${containerPadding})`,
|
|
40
|
+
...(placement === MediaPlacement.Left ? {
|
|
41
|
+
left: containerPadding
|
|
42
|
+
} : {}),
|
|
43
|
+
...(placement === MediaPlacement.Right ? {
|
|
44
|
+
right: containerPadding
|
|
45
|
+
} : {})
|
|
46
|
+
};
|
|
47
|
+
return newStyle;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return style !== null && style !== void 0 ? style : {};
|
|
51
|
+
});
|
|
30
52
|
const updateStyles = useCallback(() => {
|
|
31
53
|
if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
|
|
32
54
|
const containerPadding = ignoreContainerPadding ? '0px' : 'var(--container-padding)';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
import { ActionName, ElementName, SmartLinkSize } from '../../../../constants';
|
|
4
|
+
import { isBlockCardRovoActionExperimentEnabled } from '../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
5
5
|
import { isFlexibleUiElement } from '../../../../utils/flexible';
|
|
6
6
|
import * as Elements from '../elements';
|
|
7
7
|
import ActionGroup from './action-group';
|
|
@@ -77,7 +77,8 @@ export const isJSXElementNull = children => {
|
|
|
77
77
|
return Boolean(children.type() === null);
|
|
78
78
|
};
|
|
79
79
|
const isElementOrElementGroup = node => /*#__PURE__*/React.isValidElement(node) && (isFlexibleUiElement(node) || node.type === ElementGroup);
|
|
80
|
-
export const filterActionItems = (items = [], context) => {
|
|
80
|
+
export const filterActionItems = (items = [], context, product) => {
|
|
81
|
+
const isBlockCard3PExperimentEnabled = isBlockCardRovoActionExperimentEnabled(product);
|
|
81
82
|
return items.filter(item => {
|
|
82
83
|
switch (item.name) {
|
|
83
84
|
case ActionName.DeleteAction:
|
|
@@ -86,7 +87,7 @@ export const filterActionItems = (items = [], context) => {
|
|
|
86
87
|
// Named and custom actions that user defines.
|
|
87
88
|
return Boolean(ActionName[item.name]);
|
|
88
89
|
case ActionName.RovoChatAction:
|
|
89
|
-
if (
|
|
90
|
+
if (isBlockCard3PExperimentEnabled) {
|
|
90
91
|
return Boolean(ActionName[item.name]);
|
|
91
92
|
}
|
|
92
93
|
// same as default case below
|
package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
7
|
import { IconType } from '../../../../../../constants';
|
|
9
8
|
import { messages } from '../../../../../../messages';
|
|
10
9
|
import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
|
|
10
|
+
import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../../state/hooks/use-block-card-rovo-action-experiment';
|
|
11
11
|
import AtlaskitIcon from '../../../common/atlaskit-icon';
|
|
12
12
|
import ImageIcon from '../../../common/image-icon';
|
|
13
13
|
import { withOverrideCss } from '../../../common/with-override-css';
|
|
@@ -87,12 +87,13 @@ const BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(({
|
|
|
87
87
|
hideLabel = false
|
|
88
88
|
}, ref) => {
|
|
89
89
|
const ui = useFlexibleUiOptionContext();
|
|
90
|
+
const isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
|
|
90
91
|
const formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
91
92
|
const badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
|
|
92
93
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
93
94
|
return null;
|
|
94
95
|
}
|
|
95
|
-
const shouldHideLabel = hideLabel &&
|
|
96
|
+
const shouldHideLabel = hideLabel && isRovoBlockCardExperimentEnabled;
|
|
96
97
|
return /*#__PURE__*/React.createElement("span", {
|
|
97
98
|
"data-smart-element": name,
|
|
98
99
|
"data-smart-element-badge": true,
|
|
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
12
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
13
13
|
const PACKAGE_DATA = {
|
|
14
14
|
packageName: "@atlaskit/smart-card",
|
|
15
|
-
packageVersion: "44.
|
|
15
|
+
packageVersion: "44.6.1",
|
|
16
16
|
componentName: 'linkUrl'
|
|
17
17
|
};
|
|
18
18
|
const Anchor = 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';
|
|
@@ -25,9 +26,10 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
|
25
26
|
}
|
|
26
27
|
var extensionKey = getExtensionKey(response);
|
|
27
28
|
var isGoogleProvider = extensionKey === 'google-object-provider';
|
|
29
|
+
var is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled(product);
|
|
28
30
|
var is3PAuthRovoActionEnabled = isGoogleProvider && fg('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
29
31
|
var is3PInlinePostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
30
|
-
var is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) &&
|
|
32
|
+
var is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && is3PBlockExperimentEnabled;
|
|
31
33
|
var isSupportedFeature = is3PInlinePostAuthActionsEnabled || is3PAuthRovoActionEnabled || is3PBlockPostAuthActionsEnabled;
|
|
32
34
|
var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
33
35
|
var url = extractSmartLinkUrl(response);
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
var ELIGIBLE_EXTENSION_KEYS = new Set(['slack-object-provider', 'google-object-provider', 'onedrive-object-provider', 'github-object-provider', 'ms-teams-object-provider', 'gitlab-object-provider', 'salesforce-object-provider']);
|
|
11
|
+
var 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
|
+
var useBlockCardRovoActionExperiment = function useBlockCardRovoActionExperiment(url, actionOptions) {
|
|
30
|
+
var _actionOptions$rovoCh, _actionOptions$rovoCh2;
|
|
31
|
+
var _useRovoConfig = useRovoConfig(),
|
|
32
|
+
rovoConfig = _useRovoConfig.rovoOptions,
|
|
33
|
+
product = _useRovoConfig.product;
|
|
34
|
+
var isRovoChatEnabled = getIsRovoChatEnabled(rovoConfig);
|
|
35
|
+
var cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
|
|
36
|
+
var extensionKey = getExtensionKey(cardState.details);
|
|
37
|
+
var isRovoChatActionOptedIn = (_actionOptions$rovoCh = actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh2 = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh2 === void 0 ? void 0 : _actionOptions$rovoCh2.optIn) !== null && _actionOptions$rovoCh !== void 0 ? _actionOptions$rovoCh : false;
|
|
38
|
+
return useMemo(function () {
|
|
39
|
+
if (!isRovoChatEnabled || !url || !isRovoChatActionOptedIn) {
|
|
40
|
+
return NOT_ENABLED_RESULT;
|
|
41
|
+
}
|
|
42
|
+
if (extensionKey && !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
|
|
43
|
+
return NOT_ENABLED_RESULT;
|
|
44
|
+
}
|
|
45
|
+
var 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);
|
|
46
|
+
var 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);
|
|
47
|
+
return {
|
|
48
|
+
isEnabled: isJiraEnabled || isConfluenceEnabled
|
|
49
|
+
};
|
|
50
|
+
}, [isRovoChatEnabled, extensionKey, url, isRovoChatActionOptedIn, product]);
|
|
51
|
+
};
|
|
52
|
+
export var isBlockCardRovoActionExperimentEnabled = function isBlockCardRovoActionExperimentEnabled(product) {
|
|
53
|
+
var 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);
|
|
54
|
+
var 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);
|
|
55
|
+
return isJiraEnabled || isConfluenceEnabled;
|
|
56
|
+
};
|
|
57
|
+
export var useBlockCardRovoActionExperimentNoExposure = function useBlockCardRovoActionExperimentNoExposure() {
|
|
58
|
+
var _useRovoConfig2 = useRovoConfig(),
|
|
59
|
+
product = _useRovoConfig2.product;
|
|
60
|
+
return isBlockCardRovoActionExperimentEnabled(product);
|
|
61
|
+
};
|
|
62
|
+
export default useBlockCardRovoActionExperiment;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var JIRA_PRODUCTS = ['JSM', 'JWM', 'JSW', 'JPD'];
|