@atlaskit/smart-card 45.6.8 → 45.6.10

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 (59) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/messages.js +45 -40
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +52 -0
  5. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.js +124 -0
  6. package/dist/cjs/view/EmbedCard/components/carousel/index.compiled.css +12 -0
  7. package/dist/cjs/view/EmbedCard/components/carousel/index.js +122 -0
  8. package/dist/cjs/view/EmbedCard/components/carousel/types.js +5 -0
  9. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +1 -2
  10. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +4 -8
  11. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +5 -16
  12. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +7 -30
  13. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +2 -11
  14. package/dist/cjs/view/LinkUrl/index.js +1 -1
  15. package/dist/cjs/view/common/rovo-chat-utils/index.js +4 -68
  16. package/dist/es2019/messages.js +45 -40
  17. package/dist/es2019/utils/analytics/analytics.js +1 -1
  18. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +52 -0
  19. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.js +114 -0
  20. package/dist/es2019/view/EmbedCard/components/carousel/index.compiled.css +12 -0
  21. package/dist/es2019/view/EmbedCard/components/carousel/index.js +101 -0
  22. package/dist/es2019/view/EmbedCard/components/carousel/types.js +1 -0
  23. package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +2 -3
  24. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +3 -7
  25. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +3 -12
  26. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +7 -30
  27. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +3 -12
  28. package/dist/es2019/view/LinkUrl/index.js +1 -1
  29. package/dist/es2019/view/common/rovo-chat-utils/index.js +4 -68
  30. package/dist/esm/messages.js +45 -40
  31. package/dist/esm/utils/analytics/analytics.js +1 -1
  32. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +52 -0
  33. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.js +117 -0
  34. package/dist/esm/view/EmbedCard/components/carousel/index.compiled.css +12 -0
  35. package/dist/esm/view/EmbedCard/components/carousel/index.js +113 -0
  36. package/dist/esm/view/EmbedCard/components/carousel/types.js +1 -0
  37. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +2 -3
  38. package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +4 -8
  39. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +5 -14
  40. package/dist/esm/view/HoverCard/components/HoverCardContent.js +7 -30
  41. package/dist/esm/view/HoverCard/components/views/resolved/index.js +3 -12
  42. package/dist/esm/view/LinkUrl/index.js +1 -1
  43. package/dist/esm/view/common/rovo-chat-utils/index.js +4 -68
  44. package/dist/types/messages.d.ts +2 -2
  45. package/dist/types/view/EmbedCard/components/carousel/CarouselSlide.d.ts +39 -0
  46. package/dist/types/view/EmbedCard/components/carousel/index.d.ts +22 -0
  47. package/dist/types/view/EmbedCard/components/carousel/types.d.ts +26 -0
  48. package/dist/types/view/FlexibleCard/components/actions/rovo-chat-action/index.d.ts +1 -1
  49. package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
  50. package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +0 -4
  51. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
  52. package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  53. package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -1
  54. package/dist/types/view/HoverCard/types.d.ts +0 -1
  55. package/dist/types/view/common/rovo-chat-utils/index.d.ts +0 -3
  56. package/package.json +2 -2
  57. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
  58. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
  59. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 45.6.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e1ed54d330de5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e1ed54d330de5) -
8
+ Cleanup platform_sl_3p_auth_rovo_action (no ship)
9
+ - Updated dependencies
10
+
11
+ ## 45.6.9
12
+
13
+ ### Patch Changes
14
+
15
+ - [`5005b8d4da66a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5005b8d4da66a) -
16
+ Add carousel view for EmbedCard - a contextual teaser that displays provider benefits via a slide
17
+ carousel.
18
+
3
19
  ## 45.6.8
4
20
 
5
21
  ### Patch Changes
@@ -166,6 +166,51 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
166
166
  defaultMessage: 'To show a preview of this link, connect your {context} account.',
167
167
  description: 'Shown when a user does not have access to a link, but can connect their external account to view the link on card view. Displayed in byline.'
168
168
  },
169
+ connect_link_account_embed_teaser_dot_label: {
170
+ id: 'fabric.linking.connect_link_account_embed_teaser_dot_label.non-final',
171
+ defaultMessage: 'Go to slide {index} of {total}',
172
+ description: 'Accessible label for a dot indicator button in the teaser carousel, describing which slide it navigates to'
173
+ },
174
+ connect_link_account_embed_teaser_dot_row_label: {
175
+ id: 'fabric.linking.connect_link_account_embed_teaser_dot_row_label.non-final',
176
+ defaultMessage: 'Slides',
177
+ description: 'Accessible label for the group of dot indicator buttons in the teaser carousel'
178
+ },
179
+ connect_link_account_embed_teaser_button_next: {
180
+ id: 'fabric.linking.connect_link_account_embed_teaser_button_next.non-final',
181
+ defaultMessage: 'Next',
182
+ description: 'A button to view next teaser on benefit of connecting account on Smart Link embed'
183
+ },
184
+ connect_link_account_embed_teaser_slide_1_description: {
185
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_1_description.non-final',
186
+ defaultMessage: 'Connect your account to preview {context} files and documents directly inside Atlassian. No more context switching.',
187
+ description: 'A description on a teaser slide 1 on benefit of connecting account on Smart Link embed'
188
+ },
189
+ connect_link_account_embed_teaser_slide_1_title: {
190
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_1_title.non-final',
191
+ defaultMessage: 'See your {context} work without leaving Atlassian',
192
+ description: 'A title on a teaser slide 1 on benefit of connecting account on Smart Link embed'
193
+ },
194
+ connect_link_account_embed_teaser_slide_2_title: {
195
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_2_title.non-final',
196
+ defaultMessage: 'Search once, find it everywhere',
197
+ description: 'A title on a teaser slide 2 on benefit of connecting account on Smart Link embed'
198
+ },
199
+ connect_link_account_embed_teaser_slide_2_description: {
200
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_2_description.non-final',
201
+ defaultMessage: 'Search relevant {context} files alongside your Confluence pages and Jira issues, always respecting your {context} permissions.',
202
+ description: 'A description on a teaser slide 2 on benefit of connecting account on Smart Link embed'
203
+ },
204
+ connect_link_account_embed_teaser_slide_3_title: {
205
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_3_title.non-final',
206
+ defaultMessage: 'Get help from Rovo',
207
+ description: 'A title on a teaser slide 3 on benefit of connecting account on Smart Link embed'
208
+ },
209
+ connect_link_account_embed_teaser_slide_3_description: {
210
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_3_description.non-final',
211
+ defaultMessage: "Rovo uses your {context} content to answer questions, summarise docs, and draft updates using the work you've already done.",
212
+ description: 'A description on a teaser slide 3 on benefit of connecting account on Smart Link embed'
213
+ },
169
214
  connect_link_account_success_flag_description: {
170
215
  id: 'fabric.linking.connect_link_account_success_flag_description',
171
216
  defaultMessage: 'Shared links now display rich previews.',
@@ -947,51 +992,11 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
947
992
  defaultMessage: 'Confluence page',
948
993
  description: 'The Confluence page the user see Smart Link in, to be used as the {context} for Rovo prompt message'
949
994
  },
950
- rovo_prompt_context_confluence_page_short: {
951
- id: 'fabric.linking.rovo_prompt_context_confluence_page_short.non-final',
952
- defaultMessage: 'page',
953
- description: 'The Confluence page the user see Smart Link in, to be used as the {context} for Rovo prompt message'
954
- },
955
995
  rovo_prompt_context_jira_work_item: {
956
996
  id: 'fabric.linking.rovo_prompt_context_jira_work_item.non-final',
957
997
  defaultMessage: 'Jira work item',
958
998
  description: 'The Jira work item the user see Smart Link in, to be used as the {context} for Rovo prompt message'
959
999
  },
960
- rovo_prompt_context_jira_work_item_short: {
961
- id: 'fabric.linking.rovo_prompt_context_jira_work_item_short.non-final',
962
- defaultMessage: 'work item',
963
- description: 'The Jira work item the user see Smart Link in, to be used as the {context} for Rovo prompt message'
964
- },
965
- rovo_prompt_button_recommend_other_sources: {
966
- id: 'fabric.linking.rovo_prompt_button_recommend_other_sources.non-final',
967
- defaultMessage: 'Recommend other sources',
968
- description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
969
- },
970
- rovo_prompt_message_recommend_other_sources: {
971
- id: 'fabric.linking.rovo_prompt_message_recommend_other_sources.non-final',
972
- defaultMessage: '<p>From this <a>{url}</a> and the {context} I’m viewing now as context:</p><ul><li><p>Search across all sources I can access for items that discuss <b>similar concepts, themes, or problems</b>, or that <b>reference similar or closely related sources</b> (including links to the same or related pages, issues, or docs).</p></li><li><p>Return the results as a list or table with columns: <code>Item</code>, <code>Type</code>, <code>Short summary</code>, and <code>Why it’s similar</code>.</p></li><li><p>For each result, give a one‑sentence <b>Short summary</b> of what the item is about.</p></li><li><p>In <b>Why it’s similar</b>, briefly explain (in a phrase or short sentence) what makes it related to this Smart Link and/or the item I’m viewing (for example: same project, similar decision, shared requirements, overlapping stakeholders, similar metrics, or referencing related docs).</p></li><li><p>Order the list from <b>most to least relevant</b> based on Rovo’s assessment of semantic similarity to both the Smart Link target and the current item. Prioritize items that I do not own or have not contributed to.</p></li><li><p>If there are more than 5 results, show the <b>5 most relevant</b> and state how many additional items you found.</p></li></ul>',
973
- description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
974
- },
975
- rovo_prompt_button_show_other_mentions: {
976
- id: 'fabric.linking.rovo_prompt_button_show_other_mentions.non-final',
977
- defaultMessage: 'Show other mentions',
978
- description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
979
- },
980
- rovo_prompt_message_show_other_mentions: {
981
- id: 'fabric.linking.rovo_prompt_message_show_other_mentions.non-final',
982
- defaultMessage: '<p>From <a>{url}</a> and the {context} I’m viewing now:</p><ul><li><p>Search across all Confluence pages and Jira work items I can access for other items that contain this exact Smart Link (same underlying URL/resource).</p></li><li><p>List all matching items in a table with columns: <code>Item</code>, <code>Type</code>, <code>Short summary</code>, <code>How this item uses the link</code>, and <code>Relevance to current item</code>.</p></li><li><p>For <code>Short summary</code>, give a one‑sentence description of what the {context} is about.</p></li><li><p>For <code>How this item uses the link</code>, briefly explain the role this link plays there (e.g., decision doc, background context, implementation details, status update).</p></li><li><p>For <code>Relevance to current item</code>, compare each item to the {context} I’m viewing now and label it <code>High</code>, <code>Medium</code>, or <code>Low</code> relevance, with a short reason (a phrase or single clause).</p></li><li><p>If there are more than 15 matches, show the 15 most relevant and tell me how many additional matches exist.</p></li></ul>',
983
- description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
984
- },
985
- rovo_prompt_button_suggest_improvement: {
986
- id: 'fabric.linking.rovo_prompt_button_suggest_improvement.non-final',
987
- defaultMessage: 'Suggest {context} improvement',
988
- description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
989
- },
990
- rovo_prompt_message_suggest_improvement: {
991
- id: 'fabric.linking.rovo_prompt_message_suggest_improvement.non-final',
992
- defaultMessage: '<p>Using the {context} I’m viewing now, plus all files and links referenced in it (including <a>{url}</a>):</p><ul><li><p>Identify unclear reasoning, missing context, or contradictions between the item and its linked files.</p></li><li><p>Call out any places where assumptions are not backed up by data or prior docs.</p></li><li><p>Stay concise: summarize your findings in <b>no more than three short paragraphs of content listed as bullets</b> of no more than a couple of sentences long focused only on the two points above.</p></li><li><p>After presenting that summary, <b>ask me explicitly</b> if I want you to go deeper. Only if I say yes, then:</p><ul><li><p>Suggest concrete rewrites (bullets or short paragraphs) to make the argument clearer, more concise, and better aligned with the supporting files.</p></li><li><p>Propose 3–5 follow‑up edits or additions that would make this item and its linked docs “share‑ready” for stakeholders.</p></li></ul></li></ul>',
993
- description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
994
- },
995
1000
  rovo_prompt_message_summarize: {
996
1001
  id: 'fabric.linking.rovo_prompt_message_summarize.non-final',
997
1002
  defaultMessage: '<p>Summarize the main ideas and key points of <a>{url}</a> in 3-5 clear, complete bullet points (markdown list).</p><p>Preserve important details such as names, dates, and key decisions.</p>',
@@ -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: "45.6.7" || ''
14
+ packageVersion: "45.6.9" || ''
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,52 @@
1
+
2
+ ._2rko1rr0{border-radius:var(--ds-radius-full,9999px)}
3
+ ._zulp1ejb{gap:var(--ds-space-300,24px)}
4
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}
5
+ ._zulpze3t{gap:var(--ds-space-0,0)}._16jlkb7n{flex-grow:1}
6
+ ._18m91wug{overflow-y:auto}
7
+ ._19bv1jfw{padding-left:var(--ds-space-500,40px)}
8
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
9
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
10
+ ._1bah1h6o{justify-content:center}
11
+ ._1bsb1osq{width:100%}
12
+ ._1bsb1tcg{width:24px}
13
+ ._1bsb7vkz{width:1pc}
14
+ ._1bsbi2wt{width:6px}
15
+ ._1e0c1txw{display:flex}
16
+ ._1e0c1ule{display:block}
17
+ ._1n261g80{flex-wrap:wrap}
18
+ ._1o9zidpf{flex-shrink:0}
19
+ ._1o9zkb7n{flex-shrink:1}
20
+ ._1oecfnf5{transition-duration:.2s}
21
+ ._1reo1wug{overflow-x:auto}
22
+ ._2lx21bp4{flex-direction:column}
23
+ ._2lx2vrvc{flex-direction:row}
24
+ ._4cvr1fhb{align-items:stretch}
25
+ ._4cvr1h6o{align-items:center}
26
+ ._4cvr1y6m{align-items:flex-start}
27
+ ._4t3i1osq{height:100%}
28
+ ._4t3i1tcg{height:24px}
29
+ ._4t3i7vkz{height:1pc}
30
+ ._4t3ii2wt{height:6px}
31
+ ._5ral1f51{object-fit:contain}
32
+ ._6fl45ucs{transition-timing-function:ease}
33
+ ._bfhk1dy8{background-color:var(--ds-background-accent-blue-subtler,#cfe1fd)}
34
+ ._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
35
+ ._bfhkjmqp{background-color:var(--ds-background-selected-bold,#1868db)}
36
+ ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
37
+ ._c71l1wdt{max-height:220px}
38
+ ._ca0q1jfw{padding-top:var(--ds-space-500,40px)}
39
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
40
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
41
+ ._i0dlghg7{flex-basis:240px}
42
+ ._i0dluuw1{flex-basis:200px}
43
+ ._k8m01k61{transition-property:background-color}
44
+ ._lcxvglyw{pointer-events:none}
45
+ ._n3td1jfw{padding-bottom:var(--ds-space-500,40px)}
46
+ ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
47
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
48
+ ._rsufaqso{object-position:center center}
49
+ ._u5f31jfw{padding-right:var(--ds-space-500,40px)}
50
+ ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
51
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
52
+ ._vchhusvi{box-sizing:border-box}
@@ -0,0 +1,124 @@
1
+ /* CarouselSlide.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ require("./CarouselSlide.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _reactIntl = require("react-intl");
13
+ var _new = _interopRequireDefault(require("@atlaskit/button/new"));
14
+ var _css = require("@atlaskit/css");
15
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
16
+ var _image = _interopRequireDefault(require("@atlaskit/image"));
17
+ var _compiled = require("@atlaskit/primitives/compiled");
18
+ var _messages = require("../../../../messages");
19
+ var styles = {
20
+ columnImage: "_16jlkb7n _1o9zkb7n _i0dlghg7 _1e0c1txw _4cvr1h6o _1bah1h6o _ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi _bfhk1dy8",
21
+ columnContent: "_zulp1ejb _16jlkb7n _1o9zkb7n _i0dluuw1 _1e0c1txw _2lx21bp4 _ca0q1jfw _u5f31jfw _n3td1jfw _19bv1jfw _4cvr1y6m _1bah1h6o",
22
+ columnContentCompact: "_ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi",
23
+ dot: "_2rko1rr0 _1bsbi2wt _4t3ii2wt _bfhki8nm _1oecfnf5 _k8m01k61 _6fl45ucs _lcxvglyw",
24
+ dotActive: "_bfhkjmqp",
25
+ dotPassable: "_2rko1rr0 _1e0c1txw _4cvr1h6o _1bah1h6o _1bsb7vkz _4t3i7vkz _bfhksm61 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t",
26
+ icon: "_1o9zidpf _1bsb1tcg _4t3i1tcg _1e0c1txw _4cvr1h6o _1bah1h6o",
27
+ iconImage: "_1bsb1osq _4t3i1osq _5ral1f51",
28
+ image: "_1bsb1osq _c71l1wdt _5ral1f51 _rsufaqso _1e0c1ule",
29
+ rowButton: "_zulpu2gc _1e0c1txw _2lx2vrvc _1n261g80 _4cvr1h6o",
30
+ rowButtonCompact: "_1bsb1osq",
31
+ rowDot: "_zulpze3t _1e0c1txw _2lx2vrvc _4cvr1h6o",
32
+ rowIcon: "_zulpu2gc _1e0c1txw _4cvr1h6o",
33
+ slide: "_1reo1wug _18m91wug _1e0c1txw _1n261g80 _1bsb1osq _4t3i1osq _4cvr1fhb _vchhusvi"
34
+ };
35
+ var CarouselSlide = function CarouselSlide(_ref) {
36
+ var icon = _ref.icon,
37
+ iconLabel = _ref.iconLabel,
38
+ title = _ref.title,
39
+ description = _ref.description,
40
+ image = _ref.image,
41
+ primaryButtonLabel = _ref.primaryButtonLabel,
42
+ onPrimaryButtonClick = _ref.onPrimaryButtonClick,
43
+ onDotClick = _ref.onDotClick,
44
+ onNextClick = _ref.onNextClick,
45
+ slideIndex = _ref.slideIndex,
46
+ totalSlides = _ref.totalSlides,
47
+ size = _ref.size,
48
+ _ref$testId = _ref.testId,
49
+ testId = _ref$testId === void 0 ? 'embed-card-teaser-slide' : _ref$testId;
50
+ var _useIntl = (0, _reactIntl.useIntl)(),
51
+ formatMessage = _useIntl.formatMessage;
52
+ var isCompact = size !== 'full';
53
+ var showNavigation = totalSlides > 1;
54
+ var renderedIcon = icon == null ? null : typeof icon === 'string' ? /*#__PURE__*/_react.default.createElement(_compiled.Box, {
55
+ xcss: styles.icon
56
+ }, /*#__PURE__*/_react.default.createElement(_image.default, {
57
+ src: icon,
58
+ alt: iconLabel,
59
+ className: (0, _runtime.ax)([styles.iconImage])
60
+ })) : /*#__PURE__*/_react.default.createElement(_compiled.Box, {
61
+ xcss: styles.icon
62
+ }, icon);
63
+ var renderedImage = image == null ? null : typeof image === 'string' ? /*#__PURE__*/_react.default.createElement(_image.default, {
64
+ src: image,
65
+ alt: title,
66
+ className: (0, _runtime.ax)([styles.image])
67
+ }) : image;
68
+ return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
69
+ xcss: styles.slide,
70
+ testId: testId
71
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
72
+ xcss: (0, _css.cx)(styles.columnContent, isCompact && styles.columnContentCompact)
73
+ }, isCompact && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
74
+ xcss: (0, _css.cx)(styles.rowButton, styles.rowButtonCompact)
75
+ }, /*#__PURE__*/_react.default.createElement(_new.default, {
76
+ appearance: "primary",
77
+ onClick: onPrimaryButtonClick,
78
+ shouldFitContainer: true,
79
+ testId: "".concat(testId, "-connect-compact")
80
+ }, primaryButtonLabel)), renderedIcon && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
81
+ xcss: styles.rowIcon
82
+ }, renderedIcon), /*#__PURE__*/_react.default.createElement(_compiled.Box, null, /*#__PURE__*/_react.default.createElement(_heading.default, {
83
+ size: "medium",
84
+ testId: "".concat(testId, "-title")
85
+ }, title)), /*#__PURE__*/_react.default.createElement(_compiled.Box, null, /*#__PURE__*/_react.default.createElement(_compiled.Text, {
86
+ testId: "".concat(testId, "-description")
87
+ }, description)), /*#__PURE__*/_react.default.createElement(_compiled.Box, {
88
+ xcss: styles.rowButton
89
+ }, !isCompact && /*#__PURE__*/_react.default.createElement(_new.default, {
90
+ appearance: "primary",
91
+ onClick: onPrimaryButtonClick,
92
+ testId: "".concat(testId, "-connect")
93
+ }, primaryButtonLabel), showNavigation && onNextClick && /*#__PURE__*/_react.default.createElement(_new.default, {
94
+ appearance: "subtle",
95
+ onClick: onNextClick,
96
+ testId: "".concat(testId, "-next")
97
+ }, formatMessage(_messages.messages.connect_link_account_embed_teaser_button_next)), showNavigation && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
98
+ xcss: styles.rowDot,
99
+ role: "group",
100
+ "aria-label": formatMessage(_messages.messages.connect_link_account_embed_teaser_dot_row_label)
101
+ }, Array.from({
102
+ length: totalSlides
103
+ }, function (_, i) {
104
+ return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
105
+ key: i,
106
+ xcss: styles.dotPassable,
107
+ onClick: function onClick() {
108
+ return onDotClick === null || onDotClick === void 0 ? void 0 : onDotClick(i);
109
+ },
110
+ "aria-label": formatMessage(_messages.messages.connect_link_account_embed_teaser_dot_label, {
111
+ index: i + 1,
112
+ total: totalSlides
113
+ }),
114
+ "aria-current": i === slideIndex ? 'true' : undefined,
115
+ testId: "".concat(testId, "-dot-").concat(i)
116
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
117
+ xcss: (0, _css.cx)(styles.dot, i === slideIndex && styles.dotActive)
118
+ }));
119
+ })))), !isCompact && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
120
+ xcss: styles.columnImage,
121
+ testId: "".concat(testId, "-image-panel")
122
+ }, renderedImage));
123
+ };
124
+ var _default = exports.default = CarouselSlide;
@@ -0,0 +1,12 @@
1
+ ._18m915vq{overflow-y:hidden}
2
+ ._1bsb1osq{width:100%}
3
+ ._1e0c1txw{display:flex}
4
+ ._1o511hrf{animation-fill-mode:both}
5
+ ._1pglafbj{animation-timing-function:cubic-bezier(.25,.46,.45,.94)}
6
+ ._1reo15vq{overflow-x:hidden}
7
+ ._4t3i1osq{height:100%}
8
+ ._5sagjx92{animation-duration:.28s}
9
+ ._j7hql61g{animation-name:kjqoltm}
10
+ ._kqswh2mm{position:relative}
11
+ @keyframes kjqoltm{0%{opacity:0;transform:translateX(40px)}to{opacity:1;transform:translateX(0)}}
12
+ @media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._2hwzhgkh{animation-duration:.01ms}}
@@ -0,0 +1,122 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.default = void 0;
10
+ require("./index.compiled.css");
11
+ var _runtime = require("@compiled/react/runtime");
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+ var _react = _interopRequireWildcard(require("react"));
14
+ var _compiled = require("@atlaskit/primitives/compiled");
15
+ var _CarouselSlide = _interopRequireDefault(require("./CarouselSlide"));
16
+ 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); }
17
+ var styles = {
18
+ carousel: "_1reo15vq _18m915vq _1e0c1txw _1bsb1osq _4t3i1osq _kqswh2mm"
19
+ };
20
+
21
+ // Slide enters from the right: translates from 40px right + fades in
22
+ var slideInFromRight = null;
23
+ var slideWrapperMap = {
24
+ static: "_1bsb1osq _4t3i1osq",
25
+ animated: "_1bsb1osq _4t3i1osq _j7hql61g _5sagjx92 _1pglafbj _1o511hrf _bl8aglyw _2hwzhgkh"
26
+ };
27
+ /**
28
+ * Derives layout size bucket from pixel dimensions.
29
+ * Used instead of CSS @container queries (which are blocked by the linter)
30
+ * to control which elements are shown at different card sizes.
31
+ */
32
+ var getSize = function getSize(width, height) {
33
+ if (width < 200 || height < 100) {
34
+ return 'minimal';
35
+ }
36
+ if (width < 400 || height < 140) {
37
+ return 'compact';
38
+ }
39
+ return 'full';
40
+ };
41
+ var Carousel = function Carousel(_ref) {
42
+ var icon = _ref.icon,
43
+ iconLabel = _ref.iconLabel,
44
+ items = _ref.items,
45
+ onPrimaryButtonClick = _ref.onPrimaryButtonClick,
46
+ primaryButtonLabel = _ref.primaryButtonLabel,
47
+ _ref$testId = _ref.testId,
48
+ testId = _ref$testId === void 0 ? 'embed-card-teaser-carousel' : _ref$testId;
49
+ var _useState = (0, _react.useState)(0),
50
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
51
+ activeIndex = _useState2[0],
52
+ setActiveIndex = _useState2[1];
53
+ var _useState3 = (0, _react.useState)('full'),
54
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
55
+ size = _useState4[0],
56
+ setSize = _useState4[1];
57
+
58
+ // Tracks whether the user has navigated at least once.
59
+ // The first slide is rendered statically (no animation) to avoid any
60
+ // CSS animation running during SSR or on the initial paint.
61
+ var hasNavigated = (0, _react.useRef)(false);
62
+ var containerRef = (0, _react.useRef)(null);
63
+
64
+ // Observe the carousel container's size and update the layout bucket.
65
+ (0, _react.useEffect)(function () {
66
+ var el = containerRef.current;
67
+ if (!el) {
68
+ return;
69
+ }
70
+ var observer = new ResizeObserver(function (_ref2) {
71
+ var _ref3 = (0, _slicedToArray2.default)(_ref2, 1),
72
+ entry = _ref3[0];
73
+ var _entry$contentRect = entry.contentRect,
74
+ width = _entry$contentRect.width,
75
+ height = _entry$contentRect.height;
76
+ setSize(getSize(width, height));
77
+ });
78
+ observer.observe(el);
79
+ return function () {
80
+ return observer.disconnect();
81
+ };
82
+ }, []);
83
+ var goNext = (0, _react.useCallback)(function () {
84
+ hasNavigated.current = true;
85
+ setActiveIndex(function (current) {
86
+ return (current + 1) % items.length;
87
+ });
88
+ }, [items.length]);
89
+ var goTo = (0, _react.useCallback)(function (index) {
90
+ if (index === activeIndex) {
91
+ return;
92
+ }
93
+ hasNavigated.current = true;
94
+ setActiveIndex(index);
95
+ }, [activeIndex]);
96
+ var currentSlide = items[activeIndex];
97
+ var isLastSlide = activeIndex === items.length - 1;
98
+ return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
99
+ ref: containerRef,
100
+ xcss: styles.carousel,
101
+ testId: testId
102
+ }, /*#__PURE__*/_react.default.createElement(_compiled.Box, {
103
+ key: activeIndex,
104
+ xcss: slideWrapperMap[hasNavigated.current ? 'animated' : 'static'],
105
+ "aria-live": "polite"
106
+ }, /*#__PURE__*/_react.default.createElement(_CarouselSlide.default, {
107
+ primaryButtonLabel: primaryButtonLabel,
108
+ description: currentSlide.description,
109
+ icon: icon,
110
+ iconLabel: iconLabel,
111
+ image: currentSlide.image,
112
+ title: currentSlide.title,
113
+ onPrimaryButtonClick: onPrimaryButtonClick,
114
+ onDotClick: goTo,
115
+ onNextClick: !isLastSlide ? goNext : undefined,
116
+ size: size,
117
+ slideIndex: activeIndex,
118
+ testId: "".concat(testId, "-slide"),
119
+ totalSlides: items.length
120
+ })));
121
+ };
122
+ var _default = exports.default = Carousel;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -23,8 +23,7 @@ var _excluded = ["onClick", "prompts", "testId"];
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); }
24
24
  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; }
25
25
  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; }
26
- var GOOGLE_PROMPTS = [_rovoChatUtils.RovoChatPromptKey.RECOMMEND_OTHER_SOURCES, _rovoChatUtils.RovoChatPromptKey.SHOW_OTHER_MENTIONS, _rovoChatUtils.RovoChatPromptKey.SUGGEST_IMPROVEMENT];
27
- var DEFAULT_PROMPTS = GOOGLE_PROMPTS;
26
+ var DEFAULT_PROMPTS = [];
28
27
  var RovoChatAction = function RovoChatAction(_ref) {
29
28
  var _context$actions;
30
29
  var onClickCallback = _ref.onClick,
@@ -13,7 +13,6 @@ var React = _react;
13
13
  var _runtime = require("@compiled/react/runtime");
14
14
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
15
  var _reactMagneticDi = require("react-magnetic-di");
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _constants = require("../../../../../constants");
18
17
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
19
18
  var Actions = _interopRequireWildcard(require("../../actions"));
@@ -51,18 +50,15 @@ var getPrimitivesPaddingSpaceBySize = exports.getPrimitivesPaddingSpaceBySize =
51
50
  }
52
51
  };
53
52
  var ActionBlock = function ActionBlock(_ref) {
54
- var _context$actions;
55
53
  var blockRef = _ref.blockRef,
56
54
  onClickCallback = _ref.onClick,
57
55
  size = _ref.size,
58
56
  spaceInline = _ref.spaceInline,
59
57
  className = _ref.className,
60
58
  _ref$testId = _ref.testId,
61
- testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId,
62
- isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn;
59
+ testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId;
63
60
  var context = (0, _flexibleUiContext.useFlexibleUiContext)();
64
61
  var ui = (0, _flexibleUiContext.useFlexibleUiOptionContext)();
65
- var isRovoChatActionAvailable = isAny3pRovoActionsExperimentOn && (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[_constants.ActionName.RovoChatAction]) !== undefined : undefined;
66
62
  var _useState = (0, _react.useState)(),
67
63
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
68
64
  message = _useState2[0],
@@ -86,9 +82,9 @@ var ActionBlock = function ActionBlock(_ref) {
86
82
  if (!(context !== null && context !== void 0 && context.actions)) {
87
83
  return;
88
84
  }
89
- var arr = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? isRovoChatActionAvailable ? [_constants.ActionName.RovoChatAction] : Object.keys(context.actions).filter(function (name) {
85
+ var arr = Object.keys(context.actions).filter(function (name) {
90
86
  return name !== _constants.ActionName.RovoChatAction;
91
- }) : Object.keys(context.actions);
87
+ });
92
88
  arr.sort(sort);
93
89
  var renderAction = function renderAction(name) {
94
90
  var Action = name in Actions ? Actions[name] : undefined;
@@ -116,7 +112,7 @@ var ActionBlock = function ActionBlock(_ref) {
116
112
  return arr.map(function (name) {
117
113
  return renderAction(name);
118
114
  });
119
- }, [context === null || context === void 0 ? void 0 : context.actions, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, _onClick]);
115
+ }, [context === null || context === void 0 ? void 0 : context.actions, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, _onClick]);
120
116
  if (!actions) {
121
117
  return null;
122
118
  }
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -11,9 +10,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
11
10
  var _react = _interopRequireDefault(require("react"));
12
11
  var _constants = require("../../../../../constants");
13
12
  var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
14
- var _resolved = _interopRequireWildcard(require("./resolved"));
15
- var _excluded = ["isAny3pRovoActionsExperimentOn", "testId"];
16
- 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); }
13
+ var _resolved = _interopRequireDefault(require("./resolved"));
14
+ var _excluded = ["testId"];
17
15
  /**
18
16
  * Represents an AISummaryBlock, designed to summarising link resource
19
17
  * content using AI.
@@ -22,9 +20,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
22
20
  * @see Block
23
21
  */
24
22
  var AISummaryBlock = function AISummaryBlock(_ref) {
25
- var _context$actions, _props$size2, _cardContext$ui2;
26
- var isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn,
27
- _ref$testId = _ref.testId,
23
+ var _context$actions, _props$size, _cardContext$ui;
24
+ var _ref$testId = _ref.testId,
28
25
  testId = _ref$testId === void 0 ? 'smart-ai-summary-block' : _ref$testId,
29
26
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
30
27
  var cardContext = (0, _flexibleUiContext.useFlexibleCardContext)();
@@ -36,16 +33,8 @@ var AISummaryBlock = function AISummaryBlock(_ref) {
36
33
  if (!(actionData !== null && actionData !== void 0 && actionData.url)) {
37
34
  return null;
38
35
  }
39
- if (isAny3pRovoActionsExperimentOn) {
40
- var _props$size, _cardContext$ui;
41
- return /*#__PURE__*/_react.default.createElement(_resolved.RovoSummaryBlockResolvedView, (0, _extends2.default)({}, props, {
42
- size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : cardContext === null || cardContext === void 0 || (_cardContext$ui = cardContext.ui) === null || _cardContext$ui === void 0 ? void 0 : _cardContext$ui.size,
43
- testId: testId,
44
- url: actionData.url
45
- }));
46
- }
47
36
  return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, props, {
48
- size: (_props$size2 = props.size) !== null && _props$size2 !== void 0 ? _props$size2 : cardContext === null || cardContext === void 0 || (_cardContext$ui2 = cardContext.ui) === null || _cardContext$ui2 === void 0 ? void 0 : _cardContext$ui2.size,
37
+ size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : cardContext === null || cardContext === void 0 || (_cardContext$ui = cardContext.ui) === null || _cardContext$ui === void 0 ? void 0 : _cardContext$ui.size,
49
38
  testId: testId,
50
39
  url: actionData.url
51
40
  }));