@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.
Files changed (161) hide show
  1. package/CHANGELOG.md +19 -0
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. package/dist/cjs/extractors/flexible/actions/extract-rovo-chat-action.js +3 -1
  25. package/dist/cjs/state/hooks/use-block-card-rovo-action-experiment/index.js +69 -0
  26. package/dist/cjs/state/hooks/use-rovo-chat/constants.js +7 -0
  27. package/dist/cjs/state/hooks/use-rovo-chat/index.js +2 -2
  28. package/dist/cjs/utils/analytics/analytics.js +1 -1
  29. package/dist/cjs/view/BlockCard/views/ResolvedView.js +20 -21
  30. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +3 -2
  31. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -1
  32. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/index.js +3 -1
  33. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +3 -1
  34. package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +5 -3
  35. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +4 -3
  36. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +14 -10
  37. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +10 -9
  38. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +20 -1
  39. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +4 -2
  40. package/dist/cjs/view/FlexibleCard/components/elements/common/base-badge-element/index.js +3 -2
  41. package/dist/cjs/view/LinkUrl/index.js +1 -1
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. 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
  53. 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
  54. 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
  55. 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
  56. 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
  57. 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
  58. 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
  59. 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
  60. 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
  61. 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
  62. 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
  63. 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
  64. package/dist/es2019/extractors/flexible/actions/extract-rovo-chat-action.js +3 -1
  65. package/dist/es2019/state/hooks/use-block-card-rovo-action-experiment/index.js +64 -0
  66. package/dist/es2019/state/hooks/use-rovo-chat/constants.js +1 -0
  67. package/dist/es2019/state/hooks/use-rovo-chat/index.js +2 -2
  68. package/dist/es2019/utils/analytics/analytics.js +1 -1
  69. package/dist/es2019/view/BlockCard/views/ResolvedView.js +29 -31
  70. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +3 -2
  71. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -1
  72. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/index.js +3 -1
  73. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +3 -1
  74. package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +5 -3
  75. package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +4 -3
  76. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +14 -9
  77. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +10 -9
  78. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +23 -1
  79. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +4 -3
  80. package/dist/es2019/view/FlexibleCard/components/elements/common/base-badge-element/index.js +3 -2
  81. package/dist/es2019/view/LinkUrl/index.js +1 -1
  82. 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
  83. 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
  84. 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
  85. 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
  86. 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
  87. 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
  88. 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
  89. 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
  90. 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
  91. 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
  92. 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
  93. 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
  94. 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
  95. 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
  96. 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
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. package/dist/esm/extractors/flexible/actions/extract-rovo-chat-action.js +3 -1
  105. package/dist/esm/state/hooks/use-block-card-rovo-action-experiment/index.js +62 -0
  106. package/dist/esm/state/hooks/use-rovo-chat/constants.js +1 -0
  107. package/dist/esm/state/hooks/use-rovo-chat/index.js +2 -2
  108. package/dist/esm/utils/analytics/analytics.js +1 -1
  109. package/dist/esm/view/BlockCard/views/ResolvedView.js +20 -21
  110. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +3 -2
  111. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +3 -1
  112. package/dist/esm/view/FlexibleCard/components/actions/automation-action/index.js +3 -1
  113. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +3 -1
  114. package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +5 -3
  115. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +4 -3
  116. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +14 -10
  117. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +10 -9
  118. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +20 -1
  119. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +4 -2
  120. package/dist/esm/view/FlexibleCard/components/elements/common/base-badge-element/index.js +3 -2
  121. package/dist/esm/view/LinkUrl/index.js +1 -1
  122. package/dist/types/state/hooks/use-block-card-rovo-action-experiment/index.d.ts +27 -0
  123. package/dist/types/state/hooks/use-rovo-chat/constants.d.ts +2 -0
  124. package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
  125. package/dist/types-ts4.5/state/hooks/use-block-card-rovo-action-experiment/index.d.ts +27 -0
  126. package/dist/types-ts4.5/state/hooks/use-rovo-chat/constants.d.ts +2 -0
  127. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/utils.d.ts +2 -1
  128. package/package.json +5 -2
  129. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false.png +0 -3
  130. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true.png +0 -3
  131. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false.png +0 -3
  132. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true.png +0 -3
  133. 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
  134. 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
  135. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default.png +0 -3
  136. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false.png +0 -3
  137. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true.png +0 -3
  138. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false.png +0 -3
  139. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true.png +0 -3
  140. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false.png +0 -3
  141. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true.png +0 -3
  142. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false.png +0 -3
  143. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true.png +0 -3
  144. 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
  145. 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
  146. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default.png +0 -3
  147. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false.png +0 -3
  148. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true.png +0 -3
  149. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false.png +0 -3
  150. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true.png +0 -3
  151. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-false.png +0 -3
  152. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-large--default--navx-1895-new-logo-design-true.png +0 -3
  153. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-false.png +0 -3
  154. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-medium--default--navx-1895-new-logo-design-true.png +0 -3
  155. 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
  156. 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
  157. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-override-css--default.png +0 -3
  158. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-false.png +0 -3
  159. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-small--default--navx-1895-new-logo-design-true.png +0 -3
  160. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-false.png +0 -3
  161. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-block-preview-xlarge--default--navx-1895-new-logo-design-true.png +0 -3
@@ -6,6 +6,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
6
6
  import { useRovoPostMessageToPubsub } from '@atlaskit/rovo-triggers/post-message-to-pubsub';
7
7
  import { getIsRovoChatEnabled } from '../../../utils/rovo';
8
8
  import useRovoConfig from '../use-rovo-config';
9
+ import { JIRA_PRODUCTS } from './constants';
9
10
  var SMART_LINK_TO_ROVO_SOURCE = 'smart-link';
10
11
  var useRovoChat = function useRovoChat() {
11
12
  var _useRovoConfig = useRovoConfig(),
@@ -16,7 +17,6 @@ var useRovoChat = function useRovoChat() {
16
17
  var isRovoChatEnabled = getIsRovoChatEnabled(config);
17
18
  var sendPromptMessage = useCallback(function (data) {
18
19
  var _window$parent;
19
- var jiraProducts = ['JSM', 'JWM', 'JSW', 'JPD'];
20
20
  publishWithPostMessage({
21
21
  targetWindow: (_window$parent = window.parent) !== null && _window$parent !== void 0 ? _window$parent : window,
22
22
  payload: {
@@ -28,7 +28,7 @@ var useRovoChat = function useRovoChat() {
28
28
  agentId: undefined
29
29
  }),
30
30
  openChat: true,
31
- openChatMode: product && jiraProducts.includes(product) && (fg('platform_sl_3p_auth_rovo_block_jira_kill_switch') || fg('rovogrowth-640-inline-action-nudge-fg')) ? 'mini-modal' : 'sidebar'
31
+ openChatMode: product && JIRA_PRODUCTS.includes(product) && fg('platform_sl_3p_auth_rovo_block_jira_kill_switch') || fg('rovogrowth-640-inline-action-nudge-fg') ? 'mini-modal' : 'sidebar'
32
32
  },
33
33
  onAcknowledgeTimeout: function onAcknowledgeTimeout() {
34
34
  // NAVX-3599: Add analytics event
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "44.5.4" || ''
7
+ packageVersion: "44.6.1" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -6,10 +6,10 @@ import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
7
  import { useEffect, useMemo, useState } from 'react';
8
8
  import { browser } from '@atlaskit/linking-common/user-agent';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { ActionName, CardDisplay, ElementName, SmartLinkPosition } from '../../../constants';
11
10
  import extractRovoChatAction from '../../../extractors/flexible/actions/extract-rovo-chat-action';
12
11
  import { getExtensionKey } from '../../../state/helpers';
12
+ import useBlockCardRovoActionExperiment from '../../../state/hooks/use-block-card-rovo-action-experiment';
13
13
  import useRovoConfig from '../../../state/hooks/use-rovo-config';
14
14
  import FlexibleCard from '../../FlexibleCard';
15
15
  import { RovoChatPromptKey } from '../../FlexibleCard/components/actions/rovo-chat-action';
@@ -42,10 +42,12 @@ var ResolvedView = function ResolvedView(_ref) {
42
42
  isPreviewBlockErrored = _useState2[0],
43
43
  setIsPreviewBlockErrored = _useState2[1];
44
44
  var extensionKey = getExtensionKey(cardState.details);
45
- var rovoConfig = fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ?
45
+ var _useBlockCardRovoActi = useBlockCardRovoActionExperiment(url, actionOptions),
46
+ is3PRovoBlockExperimentEnabled = _useBlockCardRovoActi.isEnabled;
47
+ var rovoConfig = is3PRovoBlockExperimentEnabled ?
46
48
  // eslint-disable-next-line react-hooks/rules-of-hooks
47
49
  useRovoConfig() : undefined;
48
- var showRovoResolvedView = fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ?
50
+ var showRovoResolvedView = is3PRovoBlockExperimentEnabled ?
49
51
  // eslint-disable-next-line react-hooks/rules-of-hooks
50
52
  useMemo(function () {
51
53
  return (cardState === null || cardState === void 0 ? void 0 : cardState.status) === 'resolved' && cardState.details && extractRovoChatAction({
@@ -69,7 +71,7 @@ var ResolvedView = function ResolvedView(_ref) {
69
71
  topMetadata = _getSimulatedBetterMe.topMetadata,
70
72
  bottomMetadata = _getSimulatedBetterMe.bottomMetadata;
71
73
  var prompts = useMemo(function () {
72
- if (fg('platform_sl_3p_auth_rovo_block_card_kill_switch')) {
74
+ if (is3PRovoBlockExperimentEnabled) {
73
75
  var _cardState$details;
74
76
  var defaultPrompts = [RovoChatPromptKey.KEY_HIGHLIGHTS];
75
77
  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'];
@@ -85,23 +87,20 @@ var ResolvedView = function ResolvedView(_ref) {
85
87
  return [RovoChatPromptKey.SUMMARIZE_LINK].concat(defaultPrompts);
86
88
  }
87
89
  return [];
88
- }, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data, extensionKey]);
90
+ }, [cardState === null || cardState === void 0 || (_cardState$details2 = cardState.details) === null || _cardState$details2 === void 0 ? void 0 : _cardState$details2.data, extensionKey, is3PRovoBlockExperimentEnabled]);
89
91
  var footerActions = useMemo(function () {
90
- if (showRovoResolvedView && fg('platform_sl_3p_auth_rovo_block_card_kill_switch')) {
91
- return [{
92
- name: ActionName.RovoChatAction,
93
- prompts: prompts,
94
- iconSize: 'small',
95
- cardAppearance: CardDisplay.Block
96
- }, {
97
- name: ActionName.FollowAction,
98
- iconSize: 'small'
99
- }, {
100
- name: ActionName.DownloadAction,
101
- iconSize: 'small'
102
- }];
103
- }
104
- return [{
92
+ return showRovoResolvedView && is3PRovoBlockExperimentEnabled ? [{
93
+ name: ActionName.RovoChatAction,
94
+ prompts: prompts,
95
+ iconSize: 'small',
96
+ cardAppearance: CardDisplay.Block
97
+ }, {
98
+ name: ActionName.FollowAction,
99
+ iconSize: 'small'
100
+ }, {
101
+ name: ActionName.DownloadAction,
102
+ iconSize: 'small'
103
+ }] : [{
105
104
  name: ActionName.FollowAction,
106
105
  hideIcon: true
107
106
  }, {
@@ -111,7 +110,7 @@ var ResolvedView = function ResolvedView(_ref) {
111
110
  name: ActionName.DownloadAction,
112
111
  hideIcon: true
113
112
  }];
114
- }, [showRovoResolvedView, prompts]);
113
+ }, [showRovoResolvedView, prompts, is3PRovoBlockExperimentEnabled]);
115
114
  var uiOptions = FlexibleCardUiOptions;
116
115
  uiOptions.enableSnippetRenderer = true;
117
116
  uiOptions.hideLoadingSkeleton = hideIconLoadingSkeleton;
@@ -5,11 +5,11 @@ import React, { forwardRef, useCallback, useMemo } from 'react';
5
5
  import { cx } from '@compiled/react';
6
6
  import { LoadingButton } from '@atlaskit/button';
7
7
  import Button, { IconButton, LinkButton, LinkIconButton } from '@atlaskit/button/new';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { Box } from '@atlaskit/primitives/compiled';
10
9
  import Tooltip from '@atlaskit/tooltip';
11
10
  import { ActionName, SmartLinkSize } from '../../../../../../constants';
12
11
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
12
+ import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../../state/hooks/use-block-card-rovo-action-experiment';
13
13
  import { withOverrideCss } from '../../../common/with-override-css';
14
14
  import { sizeToButtonSpacing } from '../../../utils';
15
15
  var IconOnlyLarge = null;
@@ -57,7 +57,8 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
57
57
  ariaLabel = _ref.ariaLabel;
58
58
  var iconOnly = !content;
59
59
  var context = useFlexibleUiContext();
60
- var isRovoSupported = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
60
+ var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
61
+ var isRovoSupported = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && isRovoBlockCardExperimentEnabled;
61
62
  var onButtonClick = useCallback(function (handler) {
62
63
  return function (e) {
63
64
  e.preventDefault();
@@ -8,6 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
8
8
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
9
9
  import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
10
10
  import { messages } from '../../../../../messages';
11
+ import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
11
12
  import Action from '../action';
12
13
  import { getErrorMessage } from './utils';
13
14
  export function AISummariseAction(_ref) {
@@ -19,6 +20,7 @@ export function AISummariseAction(_ref) {
19
20
  props = _objectWithoutProperties(_ref, _excluded);
20
21
  var _useAnalyticsEvents = useAnalyticsEvents(),
21
22
  fireEvent = _useAnalyticsEvents.fireEvent;
23
+ var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
22
24
  var onCompleted = useCallback(function (state) {
23
25
  if ((state === null || state === void 0 ? void 0 : state.status) === 'error') {
24
26
  onErrorCallback === null || onErrorCallback === void 0 || onErrorCallback(getErrorMessage(state.error));
@@ -41,7 +43,7 @@ export function AISummariseAction(_ref) {
41
43
  spacing: "spacious",
42
44
  color: "currentColor",
43
45
  label: "Summarise with AI"
44
- }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
46
+ }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
45
47
  size: props.iconSize
46
48
  } : {})),
47
49
  onClick: handleActionClick,
@@ -9,6 +9,7 @@ import { useAnalyticsEvents } from '../../../../../common/analytics/generated/us
9
9
  import { ActionName } from '../../../../../constants';
10
10
  import { messages } from '../../../../../messages';
11
11
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
12
+ import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
12
13
  import { useSmartLinkModal } from '../../../../../state/modal';
13
14
  import Action from '../action';
14
15
  import { getModalContent } from './utils';
@@ -25,6 +26,7 @@ var AutomationAction = function AutomationAction(props) {
25
26
  var _useAnalyticsEvents = useAnalyticsEvents(),
26
27
  fireEvent = _useAnalyticsEvents.fireEvent;
27
28
  var automationActionData = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.AutomationAction];
29
+ var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
28
30
  var automationActionOnClick = useCallback(function (automationActionData) {
29
31
  var product = automationActionData.product,
30
32
  resourceType = automationActionData.resourceType,
@@ -76,7 +78,7 @@ var AutomationAction = function AutomationAction(props) {
76
78
  spacing: "spacious",
77
79
  color: "currentColor",
78
80
  label: automationActionIconLabel
79
- }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
81
+ }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
80
82
  size: props.iconSize
81
83
  } : {})),
82
84
  testId: "smart-action-automation-action",
@@ -15,6 +15,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
15
15
  import { ActionName } from '../../../../../constants';
16
16
  import { messages } from '../../../../../messages';
17
17
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
18
+ import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
18
19
  import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
19
20
  import Action from '../action';
20
21
  var CopyLinkAction = function CopyLinkAction(_ref) {
@@ -28,6 +29,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
28
29
  _useState2 = _slicedToArray(_useState, 2),
29
30
  tooltipMessage = _useState2[0],
30
31
  setTooltipMessage = _useState2[1];
32
+ var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
31
33
  var onClick = useCallback(function () {
32
34
  if (data !== null && data !== void 0 && data.invokeAction) {
33
35
  invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
@@ -62,7 +64,7 @@ var CopyLinkAction = function CopyLinkAction(_ref) {
62
64
  color: "currentColor",
63
65
  label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'copy url',
64
66
  spacing: "spacious"
65
- }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
67
+ }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
66
68
  size: props.iconSize
67
69
  } : {})),
68
70
  onClick: onClick,
@@ -11,6 +11,7 @@ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equ
11
11
  import { ActionName } from '../../../../../constants';
12
12
  import { messages } from '../../../../../messages';
13
13
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
14
+ import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
14
15
  import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
15
16
  import Action from '../action';
16
17
  var PreviewAction = function PreviewAction(_ref) {
@@ -21,6 +22,7 @@ var PreviewAction = function PreviewAction(_ref) {
21
22
  var invoke = useInvokeClientAction({});
22
23
  var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.PreviewAction];
23
24
  var hasPreviewPanel = data === null || data === void 0 ? void 0 : data.hasPreviewPanel;
25
+ var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
24
26
  var onClick = useCallback(function () {
25
27
  if (data !== null && data !== void 0 && data.invokeAction) {
26
28
  invoke(data.invokeAction);
@@ -36,7 +38,7 @@ var PreviewAction = function PreviewAction(_ref) {
36
38
  color: "currentColor",
37
39
  spacing: "spacious",
38
40
  label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview panel'
39
- }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
41
+ }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
40
42
  size: props.iconSize
41
43
  } : {}));
42
44
  }
@@ -44,10 +46,10 @@ var PreviewAction = function PreviewAction(_ref) {
44
46
  color: "currentColor",
45
47
  spacing: "spacious",
46
48
  label: fg('navx-3698-flexible-card-a11y-fix') ? '' : 'Open preview'
47
- }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('platform_sl_3p_auth_rovo_block_card_kill_switch') || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
49
+ }, fg('platform_sl_3p_auth_rovo_action_kill_switch') || isRovoBlockCardExperimentEnabled || expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true) ? {
48
50
  size: props.iconSize
49
51
  } : {}));
50
- }, [hasPreviewPanel, props.iconSize]);
52
+ }, [hasPreviewPanel, props.iconSize, isRovoBlockCardExperimentEnabled]);
51
53
  var actionLabel = useCallback(function () {
52
54
  // Only use panel message if experiment is enabled and hasPreviewPanel is true
53
55
  if (expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && hasPreviewPanel) {
@@ -13,11 +13,11 @@ import AiChatIcon from '@atlaskit/icon/core/ai-chat';
13
13
  import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
14
14
  import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
15
15
  import { RovoIcon } from '@atlaskit/logo';
16
- import { fg } from '@atlaskit/platform-feature-flags';
17
16
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
18
17
  import { ActionName, CardDisplay } from '../../../../../constants';
19
18
  import { messages } from '../../../../../messages';
20
19
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
20
+ import { isBlockCardRovoActionExperimentEnabled } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
21
21
  import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
22
22
  import useRovoChat from '../../../../../state/hooks/use-rovo-chat';
23
23
  import AiChapterIcon from '../../../assets/ai-chapter-icon';
@@ -75,6 +75,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
75
75
  },
76
76
  contextLong = _ref.contextLong,
77
77
  contextShort = _ref.contextShort;
78
+ var isBlockCard3PExperimentEnabled = isBlockCardRovoActionExperimentEnabled(product);
78
79
  switch (promptKey) {
79
80
  case RovoChatPromptKey.RECOMMEND_OTHER_SOURCES:
80
81
  var label_recommend = intl.formatMessage(messages.rovo_prompt_button_recommend_other_sources);
@@ -140,7 +141,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
140
141
  ignoreTag: true
141
142
  });
142
143
  return {
143
- icon: cardAppearance === CardDisplay.Block && fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? /*#__PURE__*/React.createElement(AiChatIcon, {
144
+ icon: cardAppearance === CardDisplay.Block && isBlockCard3PExperimentEnabled ? /*#__PURE__*/React.createElement(AiChatIcon, {
144
145
  label: label_summarize,
145
146
  size: iconSize
146
147
  }) : /*#__PURE__*/React.createElement(AIEditIcon, null),
@@ -204,7 +205,7 @@ var getPromptAction = function getPromptAction(promptKey, intl) {
204
205
  url: url
205
206
  });
206
207
  return {
207
- icon: cardAppearance === CardDisplay.Block && fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? /*#__PURE__*/React.createElement(RovoIcon, {
208
+ icon: cardAppearance === CardDisplay.Block && isBlockCard3PExperimentEnabled ? /*#__PURE__*/React.createElement(RovoIcon, {
208
209
  label: label_ask_rovo_anything,
209
210
  size: 'xxsmall',
210
211
  shouldUseHexLogo: true
@@ -16,11 +16,12 @@ import ButtonGroup from '@atlaskit/button/button-group';
16
16
  import Button from '@atlaskit/button/standard-button';
17
17
  import DropdownMenu from '@atlaskit/dropdown-menu';
18
18
  import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
19
- import { fg } from '@atlaskit/platform-feature-flags';
20
19
  import Tooltip from '@atlaskit/tooltip';
21
20
  import { ActionName, CardDisplay, SmartLinkSize } from '../../../../../constants';
22
21
  import { messages } from '../../../../../messages';
23
22
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
23
+ import { isBlockCardRovoActionExperimentEnabled } from '../../../../../state/hooks/use-block-card-rovo-action-experiment';
24
+ import useRovoConfig from '../../../../../state/hooks/use-rovo-config';
24
25
  import { RovoChatPromptKey } from '../../actions/rovo-chat-action';
25
26
  import { sizeToButtonSpacing } from '../../utils';
26
27
  import { filterActionItems } from '../utils';
@@ -67,15 +68,18 @@ var ActionGroup = function ActionGroup(_ref) {
67
68
  containerWidth = _ref$containerWidth === void 0 ? Infinity : _ref$containerWidth;
68
69
  var context = useFlexibleUiContext();
69
70
  var ui = useFlexibleUiOptionContext();
71
+ var _useRovoConfig = useRovoConfig(),
72
+ product = _useRovoConfig.product;
70
73
  var _useState = useState(false),
71
74
  _useState2 = _slicedToArray(_useState, 2),
72
75
  isOpen = _useState2[0],
73
76
  setIsOpen = _useState2[1];
74
77
  var renderableActionItems = useMemo(function () {
75
- return filterActionItems(items, context);
76
- }, [context, items]);
78
+ return filterActionItems(items, context, product);
79
+ }, [context, items, product]);
77
80
  var isMoreThenTwoItems = renderableActionItems.length > visibleButtonsNum;
78
- var isRovoActionsEnabled = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
81
+ var rovoChatAction = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction];
82
+ var is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled(rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product);
79
83
  var onOpenChange = useCallback(function (attrs) {
80
84
  setIsOpen(attrs.isOpen);
81
85
  if (onDropdownOpenChange) {
@@ -90,7 +94,7 @@ var ActionGroup = function ActionGroup(_ref) {
90
94
  }
91
95
  }, [isOpen, onOpenChange]);
92
96
  var actionButtons = useMemo(function () {
93
- if (isRovoActionsEnabled) {
97
+ if (!!rovoChatAction && is3PBlockExperimentEnabled) {
94
98
  var rovoActions = [].concat(_toConsumableArray(containerWidth >= REDUCED_ACTIONS_SIZE ? renderableActionItems.slice(0, visibleButtonsNum - 1) : []), [{
95
99
  name: ActionName.RovoChatAction,
96
100
  prompts: [RovoChatPromptKey.ASK_ROVO_ANYTHING],
@@ -110,10 +114,10 @@ var ActionGroup = function ActionGroup(_ref) {
110
114
  }
111
115
  var actionItems = isMoreThenTwoItems ? renderableActionItems.slice(0, visibleButtonsNum - 1) : renderableActionItems;
112
116
  return renderActionItems(actionItems, size, appearance, false, onActionItemClick);
113
- }, [appearance, isMoreThenTwoItems, isRovoActionsEnabled, onActionItemClick, renderableActionItems, size, visibleButtonsNum, containerWidth]);
117
+ }, [appearance, isMoreThenTwoItems, onActionItemClick, renderableActionItems, size, visibleButtonsNum, rovoChatAction, is3PBlockExperimentEnabled, containerWidth]);
114
118
  var moreActionDropdown = useMemo(function () {
115
119
  var actionItems;
116
- if (isRovoActionsEnabled && containerWidth < REDUCED_ACTIONS_SIZE) {
120
+ if (!!rovoChatAction && is3PBlockExperimentEnabled && containerWidth < REDUCED_ACTIONS_SIZE) {
117
121
  actionItems = renderableActionItems;
118
122
  } else {
119
123
  actionItems = isMoreThenTwoItems ? renderableActionItems.slice(visibleButtonsNum - 1) : [];
@@ -137,11 +141,11 @@ var ActionGroup = function ActionGroup(_ref) {
137
141
  testId: "action-group-more-button-tooltip",
138
142
  tag: "span"
139
143
  }, /*#__PURE__*/React.createElement(Button, _extends({}, props, {
140
- spacing: isRovoActionsEnabled && fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? size === SmartLinkSize.XLarge ? 'default' : 'compact' : spacing,
144
+ spacing: !!rovoChatAction && is3PBlockExperimentEnabled ? size === SmartLinkSize.XLarge ? 'default' : 'compact' : spacing,
141
145
  testId: "action-group-more-button",
142
146
  iconBefore: moreIcon,
143
147
  ref: triggerRef
144
- }, fg('platform_sl_3p_auth_rovo_block_card_kill_switch') ? {
148
+ }, is3PBlockExperimentEnabled ? {
145
149
  appearance: appearance
146
150
  } : {})));
147
151
  },
@@ -150,7 +154,7 @@ var ActionGroup = function ActionGroup(_ref) {
150
154
  }, renderActionItems(actionItems, size, appearance, true, onActionItemClick));
151
155
  }
152
156
  return null;
153
- }, [appearance, isMoreThenTwoItems, isOpen, isRovoActionsEnabled, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum, containerWidth]);
157
+ }, [appearance, isMoreThenTwoItems, isOpen, onActionItemClick, onOpenChange, renderableActionItems, size, ui === null || ui === void 0 ? void 0 : ui.zIndex, visibleButtonsNum, rovoChatAction, is3PBlockExperimentEnabled, containerWidth]);
154
158
  return renderableActionItems.length > 0 ? /*#__PURE__*/React.createElement("div", {
155
159
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
156
160
  className: ax(["_1e0c116y _dzc21h6o _1ilq1i6y", "actions-button-group"]),
@@ -6,10 +6,10 @@ import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
7
  import { useCallback, useMemo, useState } from 'react';
8
8
  import { browser } from '@atlaskit/linking-common/user-agent';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { WidthObserver } from '@atlaskit/width-detector';
11
10
  import { ActionName, SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../../constants';
12
11
  import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
12
+ import { isBlockCardRovoActionExperimentEnabled } from '../../../../../../state/hooks/use-block-card-rovo-action-experiment';
13
13
  import { Provider } from '../../../elements';
14
14
  import ActionGroup from '../../action-group';
15
15
  import Block from '../../block';
@@ -29,8 +29,9 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
29
29
  hideProvider = props.hideProvider,
30
30
  isPreviewBlockErrored = props.isPreviewBlockErrored;
31
31
  var context = useFlexibleUiContext();
32
- var isRovoSupportedFeature = !!(context !== null && context !== void 0 && (_context$actions = context.actions) !== null && _context$actions !== void 0 && _context$actions[ActionName.RovoChatAction]) && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
33
- var hasPreview = isRovoSupportedFeature && !!(context !== null && context !== void 0 && context.preview) && !isPreviewBlockErrored;
32
+ var rovoChatAction = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction];
33
+ var is3PBlockExperimentEnabled = isBlockCardRovoActionExperimentEnabled(rovoChatAction === null || rovoChatAction === void 0 ? void 0 : rovoChatAction.product);
34
+ var hasPreview = !!rovoChatAction && is3PBlockExperimentEnabled && !!(context !== null && context !== void 0 && context.preview) && !isPreviewBlockErrored;
34
35
  var hasActions = useMemo(function () {
35
36
  var _filterActionItems;
36
37
  return ((_filterActionItems = filterActionItems(actions, context)) === null || _filterActionItems === void 0 ? void 0 : _filterActionItems.length) > 0;
@@ -61,22 +62,22 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
61
62
  appearance: "subtle",
62
63
  testId: "".concat(testId, "-provider"),
63
64
  hideLabel: hasPreview,
64
- className: ax([isRovoSupportedFeature && "_1wpz1h6o"])
65
+ className: ax([!!rovoChatAction && is3PBlockExperimentEnabled && "_1wpz1h6o"])
65
66
  }), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, {
66
67
  testId: "smart-element-group-actions",
67
68
  align: SmartLinkAlignment.Right,
68
69
  direction: SmartLinkDirection.Horizontal,
69
70
  width: SmartLinkWidth.Flexible,
70
- className: ax([size === SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq", isRovoSupportedFeature && "_kqswh2mm"])
71
- }, isRovoSupportedFeature && /*#__PURE__*/React.createElement(WidthObserver, {
71
+ className: ax([size === SmartLinkSize.XLarge && "_c71lxy5q", safari && "_4t3i1osq", !!rovoChatAction && is3PBlockExperimentEnabled && "_kqswh2mm"])
72
+ }, !!rovoChatAction && is3PBlockExperimentEnabled && /*#__PURE__*/React.createElement(WidthObserver, {
72
73
  setWidth: setContainerWidth,
73
74
  offscreen: true
74
75
  }), /*#__PURE__*/React.createElement(ActionGroup, {
75
76
  onDropdownOpenChange: onDropdownOpenChange,
76
77
  items: actions,
77
- appearance: isRovoSupportedFeature ? 'subtle' : 'default',
78
- size: isRovoSupportedFeature ? SmartLinkSize.Small : size,
79
- containerWidth: isRovoSupportedFeature ? containerWidth : undefined
78
+ appearance: !!rovoChatAction && is3PBlockExperimentEnabled ? 'subtle' : 'default',
79
+ size: !!rovoChatAction && is3PBlockExperimentEnabled ? SmartLinkSize.Small : size,
80
+ containerWidth: !!rovoChatAction && is3PBlockExperimentEnabled ? containerWidth : undefined
80
81
  })) : null);
81
82
  };
82
83
  export default FooterBlockResolvedView;
@@ -10,6 +10,7 @@ import { ax, ix } from "@compiled/react/runtime";
10
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
12
  import { useCallback, useLayoutEffect, useState } from 'react';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { MediaPlacement } from '../../../../../../constants';
14
15
  import { Preview } from '../../../elements';
15
16
  import Block from '../../block';
@@ -32,7 +33,25 @@ var PreviewBlockResolvedView = function PreviewBlockResolvedView(_ref) {
32
33
  style = _ref.style,
33
34
  className = _ref.className,
34
35
  blockProps = _objectWithoutProperties(_ref, _excluded);
35
- var _useState = useState(style !== null && style !== void 0 ? style : {}),
36
+ var _useState = useState(function () {
37
+ if (fg('dfo-fix-preview-dynamic-style')) {
38
+ if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
39
+ var containerPadding = ignoreContainerPadding ? '0px' : 'var(--container-padding)';
40
+ var newStyle = _objectSpread(_objectSpread(_objectSpread({}, style), {}, {
41
+ position: 'absolute',
42
+ top: containerPadding,
43
+ bottom: containerPadding,
44
+ width: "calc(var(--preview-block-width) - ".concat(containerPadding, ")")
45
+ }, placement === MediaPlacement.Left ? {
46
+ left: containerPadding
47
+ } : {}), placement === MediaPlacement.Right ? {
48
+ right: containerPadding
49
+ } : {});
50
+ return newStyle;
51
+ }
52
+ }
53
+ return style !== null && style !== void 0 ? style : {};
54
+ }),
36
55
  _useState2 = _slicedToArray(_useState, 2),
37
56
  dynamicStyles = _useState2[0],
38
57
  setDynamicStyles = _useState2[1];
@@ -5,8 +5,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  var _excluded = ["name"];
6
6
  var _ElementDisplaySchema;
7
7
  import React from 'react';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { ActionName, ElementName, SmartLinkSize } from '../../../../constants';
9
+ import { isBlockCardRovoActionExperimentEnabled } from '../../../../state/hooks/use-block-card-rovo-action-experiment';
10
10
  import { isFlexibleUiElement } from '../../../../utils/flexible';
11
11
  import * as Elements from '../elements';
12
12
  import ActionGroup from './action-group';
@@ -50,6 +50,8 @@ var isElementOrElementGroup = function isElementOrElementGroup(node) {
50
50
  export var filterActionItems = function filterActionItems() {
51
51
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
52
52
  var context = arguments.length > 1 ? arguments[1] : undefined;
53
+ var product = arguments.length > 2 ? arguments[2] : undefined;
54
+ var isBlockCard3PExperimentEnabled = isBlockCardRovoActionExperimentEnabled(product);
53
55
  return items.filter(function (item) {
54
56
  switch (item.name) {
55
57
  case ActionName.DeleteAction:
@@ -58,7 +60,7 @@ export var filterActionItems = function filterActionItems() {
58
60
  // Named and custom actions that user defines.
59
61
  return Boolean(ActionName[item.name]);
60
62
  case ActionName.RovoChatAction:
61
- if (fg('platform_sl_3p_auth_rovo_block_card_kill_switch')) {
63
+ if (isBlockCard3PExperimentEnabled) {
62
64
  return Boolean(ActionName[item.name]);
63
65
  }
64
66
  // same as default case below
@@ -6,11 +6,11 @@ import { ax, ix } from "@compiled/react/runtime";
6
6
  /* eslint-disable @atlaskit/design-system/use-tokens-typography */
7
7
 
8
8
  import React, { forwardRef } from 'react';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { Box } from '@atlaskit/primitives/compiled';
11
10
  import { IconType } from '../../../../../../constants';
12
11
  import { messages } from '../../../../../../messages';
13
12
  import { useFlexibleUiOptionContext } from '../../../../../../state/flexible-ui-context';
13
+ import { useBlockCardRovoActionExperimentNoExposure } from '../../../../../../state/hooks/use-block-card-rovo-action-experiment';
14
14
  import AtlaskitIcon from '../../../common/atlaskit-icon';
15
15
  import ImageIcon from '../../../common/image-icon';
16
16
  import { withOverrideCss } from '../../../common/with-override-css';
@@ -81,12 +81,13 @@ var BaseBadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
81
81
  _ref$hideLabel = _ref.hideLabel,
82
82
  hideLabel = _ref$hideLabel === void 0 ? false : _ref$hideLabel;
83
83
  var ui = useFlexibleUiOptionContext();
84
+ var isRovoBlockCardExperimentEnabled = useBlockCardRovoActionExperimentNoExposure();
84
85
  var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
85
86
  var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId, ui === null || ui === void 0 ? void 0 : ui.hideLoadingSkeleton);
86
87
  if (!formattedMessageOrLabel || !badgeIcon) {
87
88
  return null;
88
89
  }
89
- var shouldHideLabel = hideLabel && fg('platform_sl_3p_auth_rovo_block_card_kill_switch');
90
+ var shouldHideLabel = hideLabel && isRovoBlockCardExperimentEnabled;
90
91
  return /*#__PURE__*/React.createElement("span", {
91
92
  "data-smart-element": name,
92
93
  "data-smart-element-badge": true,
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "44.5.4",
18
+ packageVersion: "44.6.1",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -0,0 +1,27 @@
1
+ import type { ProductType } from '@atlaskit/linking-common';
2
+ import type { CardActionOptions } from '../../../view/Card/types';
3
+ export interface BlockCardRovoActionExperiment {
4
+ /**
5
+ * True when the user is in the treatment cohort and should see the
6
+ * inline action nudge UI. All treatment surfaces should gate on this.
7
+ */
8
+ isEnabled: boolean;
9
+ }
10
+ /**
11
+ * Returns whether the platform_sl_3p_auth_rovo_block_card_jira or platform_sl_3p_auth_rovo_block_card_confluence experiment
12
+ * is enabled for the current user and link context.
13
+ *
14
+ * All eligibility criteria are consolidated here:
15
+ * 1. Rovo chat must be enabled for the tenant.
16
+ * 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
17
+ * 3. The link must support the RovoActions feature.
18
+ * 4. The extension key must be one of the supported options.
19
+ * 5. The experiment value must be true (via tmp-editor-statsig).
20
+ *
21
+ * The extension key is derived from the card store via the resolved URL,
22
+ * so callers don't need to thread it as a prop.
23
+ */
24
+ declare const useBlockCardRovoActionExperiment: (url?: string, actionOptions?: CardActionOptions) => BlockCardRovoActionExperiment;
25
+ export declare const isBlockCardRovoActionExperimentEnabled: (product?: ProductType) => boolean;
26
+ export declare const useBlockCardRovoActionExperimentNoExposure: () => boolean;
27
+ export default useBlockCardRovoActionExperiment;
@@ -0,0 +1,2 @@
1
+ import type { ProductType } from '@atlaskit/linking-common';
2
+ export declare const JIRA_PRODUCTS: ProductType[];
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { ProductType } from '@atlaskit/linking-common';
2
3
  import { ElementName, SmartLinkSize } from '../../../../constants';
3
4
  import type { FlexibleUiDataContext } from '../../../../state/flexible-ui-context/types';
4
5
  import { type ActionItem, type ElementItem } from './types';
@@ -11,6 +12,6 @@ export declare const ElementDisplaySchema: Record<ElementName, ElementDisplaySch
11
12
  */
12
13
  export declare const getGapSize: (size: SmartLinkSize) => number;
13
14
  export declare const isJSXElementNull: (children: JSX.Element) => boolean;
14
- export declare const filterActionItems: (items?: ActionItem[], context?: FlexibleUiDataContext) => ActionItem[];
15
+ export declare const filterActionItems: (items?: ActionItem[], context?: FlexibleUiDataContext, product?: ProductType) => ActionItem[];
15
16
  export declare const renderChildren: (children: React.ReactNode, size: SmartLinkSize) => React.ReactNode;
16
17
  export declare const renderElementItems: (items?: ElementItem[], display?: ElementDisplaySchemaType) => React.ReactNode | undefined;
@@ -0,0 +1,27 @@
1
+ import type { ProductType } from '@atlaskit/linking-common';
2
+ import type { CardActionOptions } from '../../../view/Card/types';
3
+ export interface BlockCardRovoActionExperiment {
4
+ /**
5
+ * True when the user is in the treatment cohort and should see the
6
+ * inline action nudge UI. All treatment surfaces should gate on this.
7
+ */
8
+ isEnabled: boolean;
9
+ }
10
+ /**
11
+ * Returns whether the platform_sl_3p_auth_rovo_block_card_jira or platform_sl_3p_auth_rovo_block_card_confluence experiment
12
+ * is enabled for the current user and link context.
13
+ *
14
+ * All eligibility criteria are consolidated here:
15
+ * 1. Rovo chat must be enabled for the tenant.
16
+ * 2. The consumer must have opted in via actionOptions.rovoChatAction.optIn.
17
+ * 3. The link must support the RovoActions feature.
18
+ * 4. The extension key must be one of the supported options.
19
+ * 5. The experiment value must be true (via tmp-editor-statsig).
20
+ *
21
+ * The extension key is derived from the card store via the resolved URL,
22
+ * so callers don't need to thread it as a prop.
23
+ */
24
+ declare const useBlockCardRovoActionExperiment: (url?: string, actionOptions?: CardActionOptions) => BlockCardRovoActionExperiment;
25
+ export declare const isBlockCardRovoActionExperimentEnabled: (product?: ProductType) => boolean;
26
+ export declare const useBlockCardRovoActionExperimentNoExposure: () => boolean;
27
+ export default useBlockCardRovoActionExperiment;
@@ -0,0 +1,2 @@
1
+ import type { ProductType } from '@atlaskit/linking-common';
2
+ export declare const JIRA_PRODUCTS: ProductType[];