@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 44.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`5e3e8cbdce9a2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5e3e8cbdce9a2) -
|
|
8
|
+
Adding hook to determine which experiment to render for confluence vs jira block card rovo actions
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- [`1eef1c4aebf12`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1eef1c4aebf12) -
|
|
13
|
+
Fix dynamic styling mutation
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 44.6.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 44.6.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -9,6 +9,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
9
9
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
10
10
|
var _constants = require("../../../constants");
|
|
11
11
|
var _helpers = require("../../../state/helpers");
|
|
12
|
+
var _useBlockCardRovoActionExperiment = require("../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
12
13
|
var _canShowAction = require("../../../utils/actions/can-show-action");
|
|
13
14
|
var _rovo = require("../../../utils/rovo");
|
|
14
15
|
var _types = require("../../../view/Card/types");
|
|
@@ -31,9 +32,10 @@ var extractRovoChatAction = function extractRovoChatAction(_ref) {
|
|
|
31
32
|
}
|
|
32
33
|
var extensionKey = (0, _helpers.getExtensionKey)(response);
|
|
33
34
|
var isGoogleProvider = extensionKey === 'google-object-provider';
|
|
35
|
+
var is3PBlockExperimentEnabled = (0, _useBlockCardRovoActionExperiment.isBlockCardRovoActionExperimentEnabled)(product);
|
|
34
36
|
var is3PAuthRovoActionEnabled = isGoogleProvider && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch');
|
|
35
37
|
var is3PInlinePostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
|
|
36
|
-
var is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) &&
|
|
38
|
+
var is3PBlockPostAuthActionsEnabled = extensionKey !== undefined && ELIGIBLE_EXTENSION_KEYS.has(extensionKey) && is3PBlockExperimentEnabled;
|
|
37
39
|
var isSupportedFeature = is3PInlinePostAuthActionsEnabled || is3PAuthRovoActionEnabled || is3PBlockPostAuthActionsEnabled;
|
|
38
40
|
var isOptIn = (actionOptions === null || actionOptions === void 0 || (_actionOptions$rovoCh = actionOptions.rovoChatAction) === null || _actionOptions$rovoCh === void 0 ? void 0 : _actionOptions$rovoCh.optIn) === true;
|
|
39
41
|
var url = (0, _linkExtractors.extractSmartLinkUrl)(response);
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.useBlockCardRovoActionExperimentNoExposure = exports.isBlockCardRovoActionExperimentEnabled = exports.default = void 0;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
11
|
+
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
12
|
+
var _rovo = require("../../../utils/rovo");
|
|
13
|
+
var _helpers = require("../../helpers");
|
|
14
|
+
var _store = require("../../store");
|
|
15
|
+
var _constants = require("../use-rovo-chat/constants");
|
|
16
|
+
var _useRovoConfig3 = _interopRequireDefault(require("../use-rovo-config"));
|
|
17
|
+
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']);
|
|
18
|
+
var NOT_ENABLED_RESULT = {
|
|
19
|
+
isEnabled: false
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns whether the platform_sl_3p_auth_rovo_block_card_jira or platform_sl_3p_auth_rovo_block_card_confluence experiment
|
|
24
|
+
* is enabled for the current user and link context.
|
|
25
|
+
*
|
|
26
|
+
* All eligibility criteria are consolidated here:
|
|
27
|
+
* 1. Rovo chat must be enabled for the tenant.
|
|
28
|
+
* 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
|
|
29
|
+
* 3. The link must support the RovoActions feature.
|
|
30
|
+
* 4. The extension key must be one of the supported options.
|
|
31
|
+
* 5. The experiment value must be true (via tmp-editor-statsig).
|
|
32
|
+
*
|
|
33
|
+
* The extension key is derived from the card store via the resolved URL,
|
|
34
|
+
* so callers don't need to thread it as a prop.
|
|
35
|
+
*/
|
|
36
|
+
var useBlockCardRovoActionExperiment = function useBlockCardRovoActionExperiment(url, actionOptions) {
|
|
37
|
+
var _actionOptions$rovoCh, _actionOptions$rovoCh2;
|
|
38
|
+
var _useRovoConfig = (0, _useRovoConfig3.default)(),
|
|
39
|
+
rovoConfig = _useRovoConfig.rovoOptions,
|
|
40
|
+
product = _useRovoConfig.product;
|
|
41
|
+
var isRovoChatEnabled = (0, _rovo.getIsRovoChatEnabled)(rovoConfig);
|
|
42
|
+
var cardState = (0, _store.useSmartCardState)(url !== null && url !== void 0 ? url : '');
|
|
43
|
+
var extensionKey = (0, _helpers.getExtensionKey)(cardState.details);
|
|
44
|
+
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;
|
|
45
|
+
return (0, _react.useMemo)(function () {
|
|
46
|
+
if (!isRovoChatEnabled || !url || !isRovoChatActionOptedIn) {
|
|
47
|
+
return NOT_ENABLED_RESULT;
|
|
48
|
+
}
|
|
49
|
+
if (extensionKey && !ELIGIBLE_EXTENSION_KEYS.has(extensionKey)) {
|
|
50
|
+
return NOT_ENABLED_RESULT;
|
|
51
|
+
}
|
|
52
|
+
var isJiraEnabled = !!product && _constants.JIRA_PRODUCTS.includes(product) && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_block_jira_kill_switch') && (0, _expValEquals.expValEquals)('platform_sl_3p_auth_rovo_block_card_jira', 'isEnabled', true);
|
|
53
|
+
var isConfluenceEnabled = !!product && product === 'CONFLUENCE' && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_block_card_kill_switch') && (0, _expValEquals.expValEquals)('platform_sl_3p_auth_rovo_block_card_confluence', 'isEnabled', true);
|
|
54
|
+
return {
|
|
55
|
+
isEnabled: isJiraEnabled || isConfluenceEnabled
|
|
56
|
+
};
|
|
57
|
+
}, [isRovoChatEnabled, extensionKey, url, isRovoChatActionOptedIn, product]);
|
|
58
|
+
};
|
|
59
|
+
var isBlockCardRovoActionExperimentEnabled = exports.isBlockCardRovoActionExperimentEnabled = function isBlockCardRovoActionExperimentEnabled(product) {
|
|
60
|
+
var isJiraEnabled = !!product && _constants.JIRA_PRODUCTS.includes(product) && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_block_jira_kill_switch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_block_card_jira', 'isEnabled', true);
|
|
61
|
+
var isConfluenceEnabled = !!product && product === 'CONFLUENCE' && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_block_card_kill_switch') && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_block_card_confluence', 'isEnabled', true);
|
|
62
|
+
return isJiraEnabled || isConfluenceEnabled;
|
|
63
|
+
};
|
|
64
|
+
var useBlockCardRovoActionExperimentNoExposure = exports.useBlockCardRovoActionExperimentNoExposure = function useBlockCardRovoActionExperimentNoExposure() {
|
|
65
|
+
var _useRovoConfig2 = (0, _useRovoConfig3.default)(),
|
|
66
|
+
product = _useRovoConfig2.product;
|
|
67
|
+
return isBlockCardRovoActionExperimentEnabled(product);
|
|
68
|
+
};
|
|
69
|
+
var _default = exports.default = useBlockCardRovoActionExperiment;
|
|
@@ -11,6 +11,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
11
11
|
var _postMessageToPubsub = require("@atlaskit/rovo-triggers/post-message-to-pubsub");
|
|
12
12
|
var _rovo = require("../../../utils/rovo");
|
|
13
13
|
var _useRovoConfig2 = _interopRequireDefault(require("../use-rovo-config"));
|
|
14
|
+
var _constants = require("./constants");
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
17
|
var SMART_LINK_TO_ROVO_SOURCE = 'smart-link';
|
|
@@ -23,7 +24,6 @@ var useRovoChat = function useRovoChat() {
|
|
|
23
24
|
var isRovoChatEnabled = (0, _rovo.getIsRovoChatEnabled)(config);
|
|
24
25
|
var sendPromptMessage = (0, _react.useCallback)(function (data) {
|
|
25
26
|
var _window$parent;
|
|
26
|
-
var jiraProducts = ['JSM', 'JWM', 'JSW', 'JPD'];
|
|
27
27
|
publishWithPostMessage({
|
|
28
28
|
targetWindow: (_window$parent = window.parent) !== null && _window$parent !== void 0 ? _window$parent : window,
|
|
29
29
|
payload: {
|
|
@@ -35,7 +35,7 @@ var useRovoChat = function useRovoChat() {
|
|
|
35
35
|
agentId: undefined
|
|
36
36
|
}),
|
|
37
37
|
openChat: true,
|
|
38
|
-
openChatMode: product &&
|
|
38
|
+
openChatMode: product && _constants.JIRA_PRODUCTS.includes(product) && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_block_jira_kill_switch') || (0, _platformFeatureFlags.fg)('rovogrowth-640-inline-action-nudge-fg') ? 'mini-modal' : 'sidebar'
|
|
39
39
|
},
|
|
40
40
|
onAcknowledgeTimeout: function onAcknowledgeTimeout() {
|
|
41
41
|
// NAVX-3599: Add analytics event
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card" || '',
|
|
14
|
-
packageVersion: "44.
|
|
14
|
+
packageVersion: "44.6.1" || ''
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -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 _constants = require("../../../constants");
|
|
19
18
|
var _extractRovoChatAction = _interopRequireDefault(require("../../../extractors/flexible/actions/extract-rovo-chat-action"));
|
|
20
19
|
var _helpers = require("../../../state/helpers");
|
|
20
|
+
var _useBlockCardRovoActionExperiment = _interopRequireDefault(require("../../../state/hooks/use-block-card-rovo-action-experiment"));
|
|
21
21
|
var _useRovoConfig = _interopRequireDefault(require("../../../state/hooks/use-rovo-config"));
|
|
22
22
|
var _FlexibleCard = _interopRequireDefault(require("../../FlexibleCard"));
|
|
23
23
|
var _rovoChatAction = require("../../FlexibleCard/components/actions/rovo-chat-action");
|
|
@@ -51,10 +51,12 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
51
51
|
isPreviewBlockErrored = _useState2[0],
|
|
52
52
|
setIsPreviewBlockErrored = _useState2[1];
|
|
53
53
|
var extensionKey = (0, _helpers.getExtensionKey)(cardState.details);
|
|
54
|
-
var
|
|
54
|
+
var _useBlockCardRovoActi = (0, _useBlockCardRovoActionExperiment.default)(url, actionOptions),
|
|
55
|
+
is3PRovoBlockExperimentEnabled = _useBlockCardRovoActi.isEnabled;
|
|
56
|
+
var rovoConfig = is3PRovoBlockExperimentEnabled ?
|
|
55
57
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
56
58
|
(0, _useRovoConfig.default)() : undefined;
|
|
57
|
-
var showRovoResolvedView =
|
|
59
|
+
var showRovoResolvedView = is3PRovoBlockExperimentEnabled ?
|
|
58
60
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
59
61
|
(0, _react.useMemo)(function () {
|
|
60
62
|
return (cardState === null || cardState === void 0 ? void 0 : cardState.status) === 'resolved' && cardState.details && (0, _extractRovoChatAction.default)({
|
|
@@ -78,7 +80,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
78
80
|
topMetadata = _getSimulatedBetterMe.topMetadata,
|
|
79
81
|
bottomMetadata = _getSimulatedBetterMe.bottomMetadata;
|
|
80
82
|
var prompts = (0, _react.useMemo)(function () {
|
|
81
|
-
if (
|
|
83
|
+
if (is3PRovoBlockExperimentEnabled) {
|
|
82
84
|
var _cardState$details;
|
|
83
85
|
var defaultPrompts = [_rovoChatAction.RovoChatPromptKey.KEY_HIGHLIGHTS];
|
|
84
86
|
var linkType = (_cardState$details = cardState.details) === null || _cardState$details === void 0 || (_cardState$details = _cardState$details.data) === null || _cardState$details === void 0 ? void 0 : _cardState$details['@type'];
|
|
@@ -94,23 +96,20 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
94
96
|
return [_rovoChatAction.RovoChatPromptKey.SUMMARIZE_LINK].concat(defaultPrompts);
|
|
95
97
|
}
|
|
96
98
|
return [];
|
|
97
|
-
}, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data, extensionKey]);
|
|
99
|
+
}, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data, extensionKey, is3PRovoBlockExperimentEnabled]);
|
|
98
100
|
var footerActions = (0, _react.useMemo)(function () {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}];
|
|
112
|
-
}
|
|
113
|
-
return [{
|
|
101
|
+
return showRovoResolvedView && is3PRovoBlockExperimentEnabled ? [{
|
|
102
|
+
name: _constants.ActionName.RovoChatAction,
|
|
103
|
+
prompts: prompts,
|
|
104
|
+
iconSize: 'small',
|
|
105
|
+
cardAppearance: _constants.CardDisplay.Block
|
|
106
|
+
}, {
|
|
107
|
+
name: _constants.ActionName.FollowAction,
|
|
108
|
+
iconSize: 'small'
|
|
109
|
+
}, {
|
|
110
|
+
name: _constants.ActionName.DownloadAction,
|
|
111
|
+
iconSize: 'small'
|
|
112
|
+
}] : [{
|
|
114
113
|
name: _constants.ActionName.FollowAction,
|
|
115
114
|
hideIcon: true
|
|
116
115
|
}, {
|
|
@@ -120,7 +119,7 @@ var ResolvedView = function ResolvedView(_ref) {
|
|
|
120
119
|
name: _constants.ActionName.DownloadAction,
|
|
121
120
|
hideIcon: true
|
|
122
121
|
}];
|
|
123
|
-
}, [showRovoResolvedView, prompts]);
|
|
122
|
+
}, [showRovoResolvedView, prompts, is3PRovoBlockExperimentEnabled]);
|
|
124
123
|
var uiOptions = _utils.FlexibleCardUiOptions;
|
|
125
124
|
uiOptions.enableSnippetRenderer = true;
|
|
126
125
|
uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
|
|
@@ -13,11 +13,11 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _react2 = require("@compiled/react");
|
|
14
14
|
var _button = require("@atlaskit/button");
|
|
15
15
|
var _new = _interopRequireWildcard(require("@atlaskit/button/new"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
17
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
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 _withOverrideCss = require("../../../common/with-override-css");
|
|
22
22
|
var _utils = require("../../../utils");
|
|
23
23
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -66,7 +66,8 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
66
66
|
ariaLabel = _ref.ariaLabel;
|
|
67
67
|
var iconOnly = !content;
|
|
68
68
|
var context = (0, _flexibleUiContext.useFlexibleUiContext)();
|
|
69
|
-
var
|
|
69
|
+
var isRovoBlockCardExperimentEnabled = (0, _useBlockCardRovoActionExperiment.useBlockCardRovoActionExperimentNoExposure)();
|
|
70
|
+
var isRovoSupported = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[_constants.ActionName.RovoChatAction]) && isRovoBlockCardExperimentEnabled;
|
|
70
71
|
var onButtonClick = (0, _react.useCallback)(function (handler) {
|
|
71
72
|
return function (e) {
|
|
72
73
|
e.preventDefault();
|
package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js
CHANGED
|
@@ -15,6 +15,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
15
15
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
16
16
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
17
17
|
var _messages = require("../../../../../messages");
|
|
18
|
+
var _useBlockCardRovoActionExperiment = require("../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
18
19
|
var _action = _interopRequireDefault(require("../action"));
|
|
19
20
|
var _utils = require("./utils");
|
|
20
21
|
var _excluded = ["onClick", "onError", "testId", "status", "summariseUrl"];
|
|
@@ -28,6 +29,7 @@ function AISummariseAction(_ref) {
|
|
|
28
29
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
29
30
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
30
31
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
32
|
+
var isRovoBlockCardExperimentEnabled = (0, _useBlockCardRovoActionExperiment.useBlockCardRovoActionExperimentNoExposure)();
|
|
31
33
|
var onCompleted = (0, _react.useCallback)(function (state) {
|
|
32
34
|
if ((state === null || state === void 0 ? void 0 : state.status) === 'error') {
|
|
33
35
|
onErrorCallback === null || onErrorCallback === void 0 || onErrorCallback((0, _utils.getErrorMessage)(state.error));
|
|
@@ -50,7 +52,7 @@ function AISummariseAction(_ref) {
|
|
|
50
52
|
spacing: "spacious",
|
|
51
53
|
color: "currentColor",
|
|
52
54
|
label: "Summarise with AI"
|
|
53
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
55
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
54
56
|
size: props.iconSize
|
|
55
57
|
} : {})),
|
|
56
58
|
onClick: handleActionClick,
|
|
@@ -17,6 +17,7 @@ var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/us
|
|
|
17
17
|
var _constants = require("../../../../../constants");
|
|
18
18
|
var _messages = require("../../../../../messages");
|
|
19
19
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
20
|
+
var _useBlockCardRovoActionExperiment = require("../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
20
21
|
var _modal = require("../../../../../state/modal");
|
|
21
22
|
var _action = _interopRequireDefault(require("../action"));
|
|
22
23
|
var _utils = require("./utils");
|
|
@@ -36,6 +37,7 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
36
37
|
var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
|
|
37
38
|
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
38
39
|
var automationActionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.AutomationAction];
|
|
40
|
+
var isRovoBlockCardExperimentEnabled = (0, _useBlockCardRovoActionExperiment.useBlockCardRovoActionExperimentNoExposure)();
|
|
39
41
|
var automationActionOnClick = (0, _react.useCallback)(function (automationActionData) {
|
|
40
42
|
var product = automationActionData.product,
|
|
41
43
|
resourceType = automationActionData.resourceType,
|
|
@@ -87,7 +89,7 @@ var AutomationAction = function AutomationAction(props) {
|
|
|
87
89
|
spacing: "spacious",
|
|
88
90
|
color: "currentColor",
|
|
89
91
|
label: automationActionIconLabel
|
|
90
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
92
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
91
93
|
size: props.iconSize
|
|
92
94
|
} : {})),
|
|
93
95
|
testId: "smart-action-automation-action",
|
|
@@ -20,6 +20,7 @@ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equa
|
|
|
20
20
|
var _constants = require("../../../../../constants");
|
|
21
21
|
var _messages = require("../../../../../messages");
|
|
22
22
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
23
|
+
var _useBlockCardRovoActionExperiment = require("../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
23
24
|
var _useInvokeClientAction = _interopRequireDefault(require("../../../../../state/hooks/use-invoke-client-action"));
|
|
24
25
|
var _action = _interopRequireDefault(require("../action"));
|
|
25
26
|
var _excluded = ["onClick"];
|
|
@@ -37,6 +38,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
37
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
38
39
|
tooltipMessage = _useState2[0],
|
|
39
40
|
setTooltipMessage = _useState2[1];
|
|
41
|
+
var isRovoBlockCardExperimentEnabled = (0, _useBlockCardRovoActionExperiment.useBlockCardRovoActionExperimentNoExposure)();
|
|
40
42
|
var onClick = (0, _react.useCallback)(function () {
|
|
41
43
|
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
42
44
|
invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
|
|
@@ -71,7 +73,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
|
|
|
71
73
|
color: "currentColor",
|
|
72
74
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
|
|
73
75
|
spacing: "spacious"
|
|
74
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
76
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
75
77
|
size: props.iconSize
|
|
76
78
|
} : {})),
|
|
77
79
|
onClick: onClick,
|
|
@@ -18,6 +18,7 @@ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equa
|
|
|
18
18
|
var _constants = require("../../../../../constants");
|
|
19
19
|
var _messages = require("../../../../../messages");
|
|
20
20
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
21
|
+
var _useBlockCardRovoActionExperiment = require("../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
21
22
|
var _useInvokeClientAction = _interopRequireDefault(require("../../../../../state/hooks/use-invoke-client-action"));
|
|
22
23
|
var _action = _interopRequireDefault(require("../action"));
|
|
23
24
|
var _excluded = ["onClick"];
|
|
@@ -30,6 +31,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
30
31
|
var invoke = (0, _useInvokeClientAction.default)({});
|
|
31
32
|
var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.PreviewAction];
|
|
32
33
|
var hasPreviewPanel = data === null || data === void 0 ? void 0 : data.hasPreviewPanel;
|
|
34
|
+
var isRovoBlockCardExperimentEnabled = (0, _useBlockCardRovoActionExperiment.useBlockCardRovoActionExperimentNoExposure)();
|
|
33
35
|
var onClick = (0, _react.useCallback)(function () {
|
|
34
36
|
if (data !== null && data !== void 0 && data.invokeAction) {
|
|
35
37
|
invoke(data.invokeAction);
|
|
@@ -45,7 +47,7 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
45
47
|
color: "currentColor",
|
|
46
48
|
spacing: "spacious",
|
|
47
49
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
|
|
48
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
50
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
49
51
|
size: props.iconSize
|
|
50
52
|
} : {}));
|
|
51
53
|
}
|
|
@@ -53,10 +55,10 @@ var PreviewAction = function PreviewAction(_ref) {
|
|
|
53
55
|
color: "currentColor",
|
|
54
56
|
spacing: "spacious",
|
|
55
57
|
label: (0, _platformFeatureFlags.fg)('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
|
|
56
|
-
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ||
|
|
58
|
+
}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
|
|
57
59
|
size: props.iconSize
|
|
58
60
|
} : {}));
|
|
59
|
-
}, [hasPreviewPanel, props.iconSize]);
|
|
61
|
+
}, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
|
|
60
62
|
var actionLabel = (0, _react.useCallback)(function () {
|
|
61
63
|
// Only use panel message if experiment is enabled and hasPreviewPanel is true
|
|
62
64
|
if ((0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
|
|
@@ -18,11 +18,11 @@ var _aiChat = _interopRequireDefault(require("@atlaskit/icon/core/ai-chat"));
|
|
|
18
18
|
var _aiGenerativeTextSummary = _interopRequireDefault(require("@atlaskit/icon/core/ai-generative-text-summary"));
|
|
19
19
|
var _rovoChat = _interopRequireDefault(require("@atlaskit/icon/core/rovo-chat"));
|
|
20
20
|
var _logo = require("@atlaskit/logo");
|
|
21
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
21
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
23
22
|
var _constants = require("../../../../../constants");
|
|
24
23
|
var _messages = require("../../../../../messages");
|
|
25
24
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
25
|
+
var _useBlockCardRovoActionExperiment = require("../../../../../state/hooks/use-block-card-rovo-action-experiment");
|
|
26
26
|
var _useInvokeClientAction = _interopRequireDefault(require("../../../../../state/hooks/use-invoke-client-action"));
|
|
27
27
|
var _useRovoChat2 = _interopRequireDefault(require("../../../../../state/hooks/use-rovo-chat"));
|
|
28
28
|
var _aiChapterIcon = _interopRequireDefault(require("../../../assets/ai-chapter-icon"));
|
|
@@ -84,6 +84,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
84
84
|
},
|
|
85
85
|
contextLong = _ref.contextLong,
|
|
86
86
|
contextShort = _ref.contextShort;
|
|
87
|
+
var isBlockCard3PExperimentEnabled = (0, _useBlockCardRovoActionExperiment.isBlockCardRovoActionExperimentEnabled)(product);
|
|
87
88
|
switch (promptKey) {
|
|
88
89
|
case RovoChatPromptKey.RECOMMEND_OTHER_SOURCES:
|
|
89
90
|
var label_recommend = intl.formatMessage(_messages.messages.rovo_prompt_button_recommend_other_sources);
|
|
@@ -149,7 +150,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
149
150
|
ignoreTag: true
|
|
150
151
|
});
|
|
151
152
|
return {
|
|
152
|
-
icon: cardAppearance === _constants.CardDisplay.Block &&
|
|
153
|
+
icon: cardAppearance === _constants.CardDisplay.Block && isBlockCard3PExperimentEnabled ? /*#__PURE__*/_react.default.createElement(_aiChat.default, {
|
|
153
154
|
label: label_summarize,
|
|
154
155
|
size: iconSize
|
|
155
156
|
}) : /*#__PURE__*/_react.default.createElement(_aiEditIcon.default, null),
|
|
@@ -213,7 +214,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
|
|
|
213
214
|
url: url
|
|
214
215
|
});
|
|
215
216
|
return {
|
|
216
|
-
icon: cardAppearance === _constants.CardDisplay.Block &&
|
|
217
|
+
icon: cardAppearance === _constants.CardDisplay.Block && isBlockCard3PExperimentEnabled ? /*#__PURE__*/_react.default.createElement(_logo.RovoIcon, {
|
|
217
218
|
label: label_ask_rovo_anything,
|
|
218
219
|
size: 'xxsmall',
|
|
219
220
|
shouldUseHexLogo: true
|