@atlaskit/smart-card 45.11.2 → 45.12.1

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 (99) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +3 -0
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +3 -0
  4. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +3 -0
  5. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +3 -0
  6. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +3 -0
  7. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +3 -0
  8. package/dist/cjs/messages.js +35 -25
  9. package/dist/cjs/utils/analytics/analytics.js +1 -1
  10. package/dist/cjs/utils/analytics/click.js +4 -69
  11. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +16 -4
  12. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.js +67 -27
  13. package/dist/cjs/view/EmbedCard/components/carousel/index.compiled.css +2 -2
  14. package/dist/cjs/view/EmbedCard/components/carousel/index.js +13 -5
  15. package/dist/cjs/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +191 -0
  16. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +7 -0
  17. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +31 -0
  18. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +16 -0
  19. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +16 -0
  20. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +6 -0
  21. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +22 -0
  22. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +47 -0
  23. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +359 -0
  24. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +281 -0
  25. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +502 -0
  26. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  27. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +9 -1
  28. package/dist/cjs/view/LinkUrl/index.js +1 -1
  29. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +3 -0
  30. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +3 -0
  31. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +3 -0
  32. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +3 -0
  33. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +3 -0
  34. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +3 -0
  35. package/dist/es2019/messages.js +49 -27
  36. package/dist/es2019/utils/analytics/analytics.js +1 -1
  37. package/dist/es2019/utils/analytics/click.js +3 -66
  38. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +16 -4
  39. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.js +64 -27
  40. package/dist/es2019/view/EmbedCard/components/carousel/index.compiled.css +2 -2
  41. package/dist/es2019/view/EmbedCard/components/carousel/index.js +10 -5
  42. package/dist/es2019/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +184 -0
  43. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +7 -0
  44. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +25 -0
  45. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +3 -0
  46. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +3 -0
  47. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +6 -0
  48. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +13 -0
  49. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +40 -0
  50. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +352 -0
  51. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +268 -0
  52. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +495 -0
  53. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  54. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +9 -1
  55. package/dist/es2019/view/LinkUrl/index.js +1 -1
  56. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +3 -0
  57. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +3 -0
  58. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +3 -0
  59. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +3 -0
  60. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +3 -0
  61. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +3 -0
  62. package/dist/esm/messages.js +35 -25
  63. package/dist/esm/utils/analytics/analytics.js +1 -1
  64. package/dist/esm/utils/analytics/click.js +3 -68
  65. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +16 -4
  66. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.js +65 -27
  67. package/dist/esm/view/EmbedCard/components/carousel/index.compiled.css +2 -2
  68. package/dist/esm/view/EmbedCard/components/carousel/index.js +13 -5
  69. package/dist/esm/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +182 -0
  70. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +7 -0
  71. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +24 -0
  72. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +5 -0
  73. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +5 -0
  74. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +6 -0
  75. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +15 -0
  76. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +40 -0
  77. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +351 -0
  78. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +273 -0
  79. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +494 -0
  80. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  81. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +9 -1
  82. package/dist/esm/view/LinkUrl/index.js +1 -1
  83. package/dist/types/messages.d.ts +1 -1
  84. package/dist/types/utils/analytics/click.d.ts +0 -2
  85. package/dist/types/utils/analytics/types.d.ts +0 -5
  86. package/dist/types/view/EmbedCard/components/carousel/CarouselSlide.d.ts +3 -1
  87. package/dist/types/view/EmbedCard/components/carousel/index.d.ts +3 -1
  88. package/dist/types/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.d.ts +4 -0
  89. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.d.ts +14 -0
  90. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.d.ts +3 -0
  91. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.d.ts +3 -0
  92. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.d.ts +7 -0
  93. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.d.ts +9 -0
  94. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.d.ts +8 -0
  95. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.d.ts +8 -0
  96. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.d.ts +6 -0
  97. package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +2 -2
  98. package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +1 -0
  99. package/package.json +5 -5
@@ -165,49 +165,54 @@ export var messages = defineMessages({
165
165
  defaultMessage: 'To show a preview of this link, connect your {context} account.',
166
166
  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.'
167
167
  },
168
- connect_link_account_embed_teaser_dot_label: {
169
- id: 'fabric.linking.connect_link_account_embed_teaser_dot_label.non-final',
168
+ connect_link_account_embed_carousel_dot_label: {
169
+ id: 'fabric.linking.connect_link_account_embed_carousel_dot_label.non-final',
170
170
  defaultMessage: 'Go to slide {index} of {total}',
171
171
  description: 'Accessible label for a dot indicator button in the teaser carousel, describing which slide it navigates to'
172
172
  },
173
- connect_link_account_embed_teaser_dot_row_label: {
174
- id: 'fabric.linking.connect_link_account_embed_teaser_dot_row_label.non-final',
173
+ connect_link_account_embed_carousel_dot_row_label: {
174
+ id: 'fabric.linking.connect_link_account_embed_carousel_dot_row_label.non-final',
175
175
  defaultMessage: 'Slides',
176
176
  description: 'Accessible label for the group of dot indicator buttons in the teaser carousel'
177
177
  },
178
- connect_link_account_embed_teaser_button_next: {
179
- id: 'fabric.linking.connect_link_account_embed_teaser_button_next.non-final',
178
+ connect_link_account_embed_carousel_button_back: {
179
+ id: 'fabric.linking.connect_link_account_embed_carousel_button_back.non-final',
180
+ defaultMessage: 'Back',
181
+ description: 'Label for the back button in the embed card carousel teaser'
182
+ },
183
+ connect_link_account_embed_carousel_button_next: {
184
+ id: 'fabric.linking.connect_link_account_embed_carousel_button_next.non-final',
180
185
  defaultMessage: 'Next',
181
186
  description: 'A button to view next teaser on benefit of connecting account on Smart Link embed'
182
187
  },
183
- connect_link_account_embed_teaser_slide_1_description: {
184
- id: 'fabric.linking.connect_link_account_embed_teaser_slide_1_description.non-final',
185
- defaultMessage: 'Connect your account to preview {context} files and documents directly inside Atlassian. No more context switching.',
186
- description: 'A description on a teaser slide 1 on benefit of connecting account on Smart Link embed'
188
+ connect_link_account_embed_carousel_sl_description: {
189
+ id: 'fabric.linking.connect_link_account_embed_carousel_sl_description.non-final',
190
+ defaultMessage: "Embed live previews of {context, select, \n\t\t\t\tGoogle {Google Docs, Sheets, and Slides} \n\t\t\t\tother {{context}}} {product, select, \n\t\t\t\tBITBUCKET {right inside Bitbucket}\n\t\t\t\tCONFLUENCE {right inside Confluence and Jira}\n\t\t\t\tJIRA {right inside Confluence and Jira}\n\t\t\t\tTRELLO {right inside Trello}\n\t\t\t\tother {across Atlassian}}.",
191
+ description: 'A description on a teaser slide 1 on benefit of connecting account on Smart Link embed.' + ' Example Google+CONFLUENCE: Embed live previews of Google Docs, Sheets, and Slides right inside Confluence and Jira.' + ' Example Google+TRELLO: Embed live previews of Google Docs, Sheets, and Slides right inside Trello.' + ' Example other+TRELLO: Embed live previews of Figma right inside Trello.' + ' Example other+other: Embed live previews of Figma across Atlassian.'
187
192
  },
188
- connect_link_account_embed_teaser_slide_1_title: {
189
- id: 'fabric.linking.connect_link_account_embed_teaser_slide_1_title.non-final',
190
- defaultMessage: 'See your {context} work without leaving Atlassian',
193
+ connect_link_account_embed_carousel_sl_title: {
194
+ id: 'fabric.linking.connect_link_account_embed_carousel_sl_title.non-final',
195
+ defaultMessage: 'Turn smart links into rich previews',
191
196
  description: 'A title on a teaser slide 1 on benefit of connecting account on Smart Link embed'
192
197
  },
193
- connect_link_account_embed_teaser_slide_2_title: {
194
- id: 'fabric.linking.connect_link_account_embed_teaser_slide_2_title.non-final',
195
- defaultMessage: 'Search once, find it everywhere',
198
+ connect_link_account_embed_carousel_rovo_title: {
199
+ id: 'fabric.linking.connect_link_account_embed_carousel_rovo_title.non-final',
200
+ defaultMessage: 'Find everything in one search',
196
201
  description: 'A title on a teaser slide 2 on benefit of connecting account on Smart Link embed'
197
202
  },
198
- connect_link_account_embed_teaser_slide_2_description: {
199
- id: 'fabric.linking.connect_link_account_embed_teaser_slide_2_description.non-final',
200
- defaultMessage: 'Search relevant {context} files alongside your Confluence pages and Jira issues, always respecting your {context} permissions.',
201
- description: 'A description on a teaser slide 2 on benefit of connecting account on Smart Link embed'
203
+ connect_link_account_embed_carousel_rovo_description: {
204
+ id: 'fabric.linking.connect_link_account_embed_carousel_rovo_description.non-final',
205
+ defaultMessage: "Access {context} files alongside your work in {product, select, \n\t\t\t\tBITBUCKET {Bitbucket}\n\t\t\t\tCONFLUENCE {Confluence and Jira}\n\t\t\t\tJIRA {Confluence and Jira}\n\t\t\t\tTRELLO {Trello}\n\t\t\t\tother {Atlassian}}. We'll always respect your {context} permissions.",
206
+ description: 'A description on a teaser slide 2 on benefit of connecting account on Smart Link embed.' + " Example Figma+JIRA: Access Figma files alongside your work in Confluence and Jira. We'll always respect your Figma permissions." + " Example Figma+BITBUCKET: Access Figma files alongside your work in Bitbucket. We'll always respect your Figma permissions." + " Example Figma+other: Access Figma files alongside your work in Atlassian. We'll always respect your Figma permissions."
202
207
  },
203
- connect_link_account_embed_teaser_slide_3_title: {
204
- id: 'fabric.linking.connect_link_account_embed_teaser_slide_3_title.non-final',
208
+ connect_link_account_embed_carousel_rovochat_title: {
209
+ id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_title.non-final',
205
210
  defaultMessage: 'Get help from Rovo',
206
211
  description: 'A title on a teaser slide 3 on benefit of connecting account on Smart Link embed'
207
212
  },
208
- connect_link_account_embed_teaser_slide_3_description: {
209
- id: 'fabric.linking.connect_link_account_embed_teaser_slide_3_description.non-final',
210
- defaultMessage: "Rovo uses your {context} content to answer questions, summarise docs, and draft updates using the work you've already done.",
213
+ connect_link_account_embed_carousel_rovochat_description: {
214
+ id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_description.non-final',
215
+ defaultMessage: 'Rovo uses your {context} content to answer questions, summarise docs, and draft updates using the work youve already done.',
211
216
  description: 'A description on a teaser slide 3 on benefit of connecting account on Smart Link embed'
212
217
  },
213
218
  connect_link_account_success_flag_description: {
@@ -230,6 +235,11 @@ export var messages = defineMessages({
230
235
  defaultMessage: 'Connect to {context}',
231
236
  description: 'Shown on a button to connect user external account to their Atlassian account.'
232
237
  },
238
+ connect_3p_account: {
239
+ id: 'fabric.linking.connect_3p_account.non-final',
240
+ defaultMessage: 'Connect {context}',
241
+ description: 'Shown on a button to connect user external 3P account to their Atlassian account, e.g. Connect Figma'
242
+ },
233
243
  connect_inline_social_proof: {
234
244
  id: 'fabric.linking.connect_inline_social_proof',
235
245
  defaultMessage: 'Connect',
@@ -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: "45.11.1" || ''
7
+ packageVersion: "45.12.0" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -3,8 +3,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  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; }
4
4
  import React from 'react';
5
5
  import { browser } from '@atlaskit/linking-common/user-agent';
6
- import { functionWithCondition } from '@atlaskit/platform-feature-flags-react';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
6
  import { useLinkClicked, useMouseDownEvent } from '../../state/analytics/useLinkClicked';
9
7
  import { ANALYTICS_CHANNEL } from './analytics';
10
8
  export var buttonMap = new Map([[undefined, 'none'], [0, 'left'], [1, 'middle'], [2, 'right']]);
@@ -71,7 +69,7 @@ export function getLinkClickOutcome(e, clickType) {
71
69
  }
72
70
  return 'unknown';
73
71
  }
74
- var linkClickedEventOld = function linkClickedEventOld(_ref) {
72
+ var linkClickedEvent = function linkClickedEvent(_ref) {
75
73
  var clickType = _ref.clickType,
76
74
  clickOutcome = _ref.clickOutcome,
77
75
  keysHeld = _ref.keysHeld,
@@ -88,26 +86,7 @@ var linkClickedEventOld = function linkClickedEventOld(_ref) {
88
86
  }
89
87
  };
90
88
  };
91
- var linkClickedEventWithShortLink = function linkClickedEventWithShortLink(_ref2) {
92
- var clickType = _ref2.clickType,
93
- clickOutcome = _ref2.clickOutcome,
94
- keysHeld = _ref2.keysHeld,
95
- defaultPrevented = _ref2.defaultPrevented,
96
- isConfluenceShortLink = _ref2.isConfluenceShortLink;
97
- return {
98
- action: 'clicked',
99
- actionSubject: 'link',
100
- eventType: 'ui',
101
- attributes: {
102
- clickType: clickType,
103
- clickOutcome: clickOutcome,
104
- keysHeld: keysHeld,
105
- defaultPrevented: defaultPrevented,
106
- isConfluenceShortLink: isConfluenceShortLink
107
- }
108
- };
109
- };
110
- export var createLinkClickedPayloadOld = function createLinkClickedPayloadOld(event) {
89
+ export var createLinkClickedPayload = function createLinkClickedPayload(event) {
111
90
  // Through the `detail` property, we're able to determine if the event is (most likely) triggered via keyboard
112
91
  // https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail
113
92
  var isKeyboard = event.nativeEvent.detail === 0;
@@ -118,7 +97,7 @@ export var createLinkClickedPayloadOld = function createLinkClickedPayloadOld(ev
118
97
  var clickOutcome = getLinkClickOutcome(event, clickType);
119
98
  var keysHeld = getKeys(event);
120
99
  var defaultPrevented = event.defaultPrevented;
121
- var linkClickedEventResult = linkClickedEventOld({
100
+ var linkClickedEventResult = linkClickedEvent({
122
101
  clickType: clickType,
123
102
  clickOutcome: clickOutcome,
124
103
  keysHeld: keysHeld,
@@ -138,50 +117,6 @@ export var createLinkClickedPayloadOld = function createLinkClickedPayloadOld(ev
138
117
  return linkClickedEventResult;
139
118
  }
140
119
  };
141
- export var createLinkClickedPayloadNew = function createLinkClickedPayloadNew(event) {
142
- // Through the `detail` property, we're able to determine if the event is (most likely) triggered via keyboard
143
- // https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail
144
- var isKeyboard = event.nativeEvent.detail === 0;
145
- var clickType = isKeyboard ? 'keyboard' : buttonMap.get(event.button);
146
- if (!clickType) {
147
- return;
148
- }
149
- var clickOutcome = getLinkClickOutcome(event, clickType);
150
- var keysHeld = getKeys(event);
151
- var defaultPrevented = event.defaultPrevented;
152
-
153
- // Check if the URL is a Confluence shortLink (contains "/l/cp/")
154
- var isConfluenceShortLink = false;
155
- if (event.currentTarget instanceof HTMLAnchorElement) {
156
- var url = event.currentTarget.href;
157
- isConfluenceShortLink = url.includes('/l/cp/');
158
- }
159
- var linkClickedEventResult = linkClickedEventWithShortLink({
160
- clickType: clickType,
161
- clickOutcome: clickOutcome,
162
- keysHeld: keysHeld,
163
- defaultPrevented: defaultPrevented,
164
- isConfluenceShortLink: isConfluenceShortLink
165
- });
166
-
167
- // if the current target is an anchor tag, we can get the href from it and use that as the url being navigated too.
168
- if (event.currentTarget instanceof HTMLAnchorElement) {
169
- var _url = event.currentTarget.href;
170
- return _objectSpread(_objectSpread({}, linkClickedEventResult), {}, {
171
- nonPrivacySafeAttributes: {
172
- url: _url
173
- }
174
- });
175
- } else {
176
- // We can't get the href from the event target, so dont include the url or any non privacy safe attributes
177
- return linkClickedEventResult;
178
- }
179
- };
180
- export var createLinkClickedPayload = functionWithCondition(function () {
181
- return expValEquals('smart_link_confluence_short_link_analytics', 'cohort', 'test');
182
- },
183
- // 12/17/2025: Clean up this feature gate once it's out in prod for 2 weeks - https://product-fabric.atlassian.net/browse/CCPERMS-5030
184
- createLinkClickedPayloadNew, createLinkClickedPayloadOld);
185
120
  export var fireLinkClickedEvent = function fireLinkClickedEvent(createAnalyticsEvent) {
186
121
  return function (event) {
187
122
  var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -1,23 +1,33 @@
1
1
  ._2rko1rr0{border-radius:var(--ds-radius-full,9999px)}
2
2
  ._zulp1ejb{gap:var(--ds-space-300,24px)}
3
+ ._zulppxbi{gap:var(--ds-space-200,1pc)}
3
4
  ._zulpu2gc{gap:var(--ds-space-100,8px)}
4
- ._zulpze3t{gap:var(--ds-space-0,0)}._16jlkb7n{flex-grow:1}
5
+ ._zulpze3t{gap:var(--ds-space-0,0)}._154iidpf{top:0}
6
+ ._16jlkb7n{flex-grow:1}
7
+ ._18m915vq{overflow-y:hidden}
5
8
  ._18m91wug{overflow-y:auto}
6
9
  ._19bv1jfw{padding-left:var(--ds-space-500,40px)}
7
10
  ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
8
11
  ._19bvze3t{padding-left:var(--ds-space-0,0)}
9
12
  ._1bah1h6o{justify-content:center}
13
+ ._1bah1y6m{justify-content:flex-start}
14
+ ._1bah1yb4{justify-content:space-between}
10
15
  ._1bsb1osq{width:100%}
11
16
  ._1bsb1tcg{width:24px}
12
17
  ._1bsb7vkz{width:1pc}
13
- ._1bsbi2wt{width:6px}
18
+ ._1bsbftgi{width:8px}
14
19
  ._1e0c1txw{display:flex}
15
20
  ._1e0c1ule{display:block}
21
+ ._1ltvidpf{left:0}
16
22
  ._1n261g80{flex-wrap:wrap}
23
+ ._1n261q9c{flex-wrap:nowrap}
17
24
  ._1o9zidpf{flex-shrink:0}
18
25
  ._1o9zkb7n{flex-shrink:1}
19
26
  ._1oecfnf5{transition-duration:.2s}
27
+ ._1reo15vq{overflow-x:hidden}
20
28
  ._1reo1wug{overflow-x:auto}
29
+ ._1tkeidpf{min-height:0}
30
+ ._1ul9idpf{min-width:0}
21
31
  ._2lx21bp4{flex-direction:column}
22
32
  ._2lx2vrvc{flex-direction:row}
23
33
  ._4cvr1fhb{align-items:stretch}
@@ -26,10 +36,10 @@
26
36
  ._4t3i1osq{height:100%}
27
37
  ._4t3i1tcg{height:24px}
28
38
  ._4t3i7vkz{height:1pc}
29
- ._4t3ii2wt{height:6px}
39
+ ._4t3iftgi{height:8px}
30
40
  ._5ral1f51{object-fit:contain}
31
41
  ._6fl45ucs{transition-timing-function:ease}
32
- ._bfhk1dy8{background-color:var(--ds-background-accent-blue-subtler,#cfe1fd)}
42
+ ._bfhk9pm7{background-color:var(--ds-background-information-subtle,#8fb8f6)}
33
43
  ._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
34
44
  ._bfhkjmqp{background-color:var(--ds-background-selected-bold,#1868db)}
35
45
  ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
@@ -40,6 +50,8 @@
40
50
  ._i0dlghg7{flex-basis:240px}
41
51
  ._i0dluuw1{flex-basis:200px}
42
52
  ._k8m01k61{transition-property:background-color}
53
+ ._kqswh2mm{position:relative}
54
+ ._kqswstnw{position:absolute}
43
55
  ._lcxvglyw{pointer-events:none}
44
56
  ._n3td1jfw{padding-bottom:var(--ds-space-500,40px)}
45
57
  ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
@@ -1,58 +1,82 @@
1
1
  /* CarouselSlide.tsx generated by @compiled/babel-plugin v0.40.0 */
2
2
  import "./CarouselSlide.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
4
+ import React, { useMemo } from 'react';
5
5
  import { useIntl } from 'react-intl';
6
6
  import Button from '@atlaskit/button/new';
7
7
  import { cx } from '@atlaskit/css';
8
8
  import Heading from '@atlaskit/heading';
9
+ import SmartLinkIcon from '@atlaskit/icon/core/smart-link';
10
+ import IconTile from '@atlaskit/icon/icon-tile';
9
11
  import Image from '@atlaskit/image';
10
12
  import { Box, Pressable, Text } from '@atlaskit/primitives/compiled';
11
13
  import { messages } from '../../../../messages';
12
14
  var styles = {
13
- columnImage: "_16jlkb7n _1o9zkb7n _i0dlghg7 _1e0c1txw _4cvr1h6o _1bah1h6o _ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi _bfhk1dy8",
14
- columnContent: "_zulp1ejb _16jlkb7n _1o9zkb7n _i0dluuw1 _1e0c1txw _2lx21bp4 _ca0q1jfw _u5f31jfw _n3td1jfw _19bv1jfw _4cvr1y6m _1bah1h6o",
15
+ columnImage: "_16jlkb7n _1o9zkb7n _i0dlghg7 _1reo15vq _18m915vq _1e0c1txw _4cvr1fhb _1bah1y6m _1tkeidpf _1ul9idpf _bfhk9pm7",
16
+ imageContainer: "_kqswh2mm _1bsb1osq _4t3i1osq",
17
+ imageAbsolute: "_kqswstnw _154iidpf _1ltvidpf _1bsb1osq",
18
+ columnContent: "_zulp1ejb _16jlkb7n _1o9zkb7n _i0dluuw1 _1reo1wug _18m91wug _1e0c1txw _2lx21bp4 _1tkeidpf _ca0q1jfw _u5f31jfw _n3td1jfw _19bv1jfw _4cvr1y6m _1bah1yb4",
19
+ columnContentTop: "_zulppxbi _1e0c1txw _2lx21bp4 _4cvr1y6m _1bsb1osq",
20
+ columnContentBody: "_zulp1ejb _1e0c1txw _2lx21bp4 _4cvr1y6m _1bsb1osq",
15
21
  columnContentCompact: "_ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi",
16
- dot: "_2rko1rr0 _1bsbi2wt _4t3ii2wt _bfhki8nm _1oecfnf5 _k8m01k61 _6fl45ucs _lcxvglyw",
22
+ dot: "_2rko1rr0 _1bsbftgi _4t3iftgi _bfhki8nm _1oecfnf5 _k8m01k61 _6fl45ucs _lcxvglyw",
17
23
  dotActive: "_bfhkjmqp",
18
24
  dotPassable: "_2rko1rr0 _1e0c1txw _4cvr1h6o _1bah1h6o _1bsb7vkz _4t3i7vkz _bfhksm61 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t",
19
25
  icon: "_1o9zidpf _1bsb1tcg _4t3i1tcg _1e0c1txw _4cvr1h6o _1bah1h6o",
20
26
  iconImage: "_1bsb1osq _4t3i1osq _5ral1f51",
21
27
  image: "_1bsb1osq _c71l1wdt _5ral1f51 _rsufaqso _1e0c1ule",
22
28
  rowButton: "_zulpu2gc _1e0c1txw _2lx2vrvc _1n261g80 _4cvr1h6o",
29
+ rowButtonNavGroup: "_zulpu2gc _1e0c1txw _2lx2vrvc _4cvr1h6o _1o9zidpf",
23
30
  rowButtonCompact: "_1bsb1osq",
24
31
  rowDot: "_zulpze3t _1e0c1txw _2lx2vrvc _4cvr1h6o",
25
32
  rowIcon: "_zulpu2gc _1e0c1txw _4cvr1h6o",
26
- slide: "_1reo1wug _18m91wug _1e0c1txw _1n261g80 _1bsb1osq _4t3i1osq _4cvr1fhb _vchhusvi"
33
+ slide: "_1reo15vq _18m915vq _1e0c1txw _1n261q9c _1bsb1osq _4t3i1osq _4cvr1fhb _vchhusvi"
27
34
  };
28
35
  var CarouselSlide = function CarouselSlide(_ref) {
29
36
  var icon = _ref.icon,
30
- iconLabel = _ref.iconLabel,
37
+ _ref$iconLabel = _ref.iconLabel,
38
+ iconLabel = _ref$iconLabel === void 0 ? '' : _ref$iconLabel,
31
39
  title = _ref.title,
32
40
  description = _ref.description,
33
41
  image = _ref.image,
34
42
  primaryButtonLabel = _ref.primaryButtonLabel,
35
43
  onPrimaryButtonClick = _ref.onPrimaryButtonClick,
44
+ onBackClick = _ref.onBackClick,
36
45
  onDotClick = _ref.onDotClick,
37
46
  onNextClick = _ref.onNextClick,
38
47
  slideIndex = _ref.slideIndex,
39
48
  totalSlides = _ref.totalSlides,
40
49
  size = _ref.size,
41
50
  _ref$testId = _ref.testId,
42
- testId = _ref$testId === void 0 ? 'embed-card-teaser-slide' : _ref$testId;
51
+ testId = _ref$testId === void 0 ? 'embed-card-carousel-slide' : _ref$testId;
43
52
  var _useIntl = useIntl(),
44
53
  formatMessage = _useIntl.formatMessage;
45
54
  var isCompact = size !== 'full';
55
+ var showPrimaryButton = typeof onPrimaryButtonClick === 'function';
46
56
  var showNavigation = totalSlides > 1;
47
- var renderedIcon = icon == null ? null : typeof icon === 'string' ? /*#__PURE__*/React.createElement(Box, {
48
- xcss: styles.icon
49
- }, /*#__PURE__*/React.createElement(Image, {
50
- src: icon,
51
- alt: iconLabel,
52
- className: ax([styles.iconImage])
53
- })) : /*#__PURE__*/React.createElement(Box, {
54
- xcss: styles.icon
55
- }, icon);
57
+ var renderedIcon = useMemo(function () {
58
+ if (typeof icon === 'string') {
59
+ return /*#__PURE__*/React.createElement(Box, {
60
+ xcss: styles.icon
61
+ }, /*#__PURE__*/React.createElement(Image, {
62
+ src: icon,
63
+ alt: iconLabel,
64
+ className: ax([styles.iconImage])
65
+ }));
66
+ }
67
+ if (icon) {
68
+ return /*#__PURE__*/React.createElement(Box, {
69
+ xcss: styles.icon
70
+ }, icon);
71
+ }
72
+ return /*#__PURE__*/React.createElement(IconTile, {
73
+ appearance: "blue",
74
+ icon: SmartLinkIcon,
75
+ label: iconLabel,
76
+ size: "small",
77
+ testId: "embed-card-fallback-icon"
78
+ });
79
+ }, [icon, iconLabel]);
56
80
  var renderedImage = image == null ? null : typeof image === 'string' ? /*#__PURE__*/React.createElement(Image, {
57
81
  src: image,
58
82
  alt: title,
@@ -63,7 +87,9 @@ var CarouselSlide = function CarouselSlide(_ref) {
63
87
  testId: testId
64
88
  }, /*#__PURE__*/React.createElement(Box, {
65
89
  xcss: cx(styles.columnContent, isCompact && styles.columnContentCompact)
66
- }, isCompact && /*#__PURE__*/React.createElement(Box, {
90
+ }, /*#__PURE__*/React.createElement(Box, {
91
+ xcss: styles.columnContentTop
92
+ }, showPrimaryButton && isCompact && /*#__PURE__*/React.createElement(Box, {
67
93
  xcss: cx(styles.rowButton, styles.rowButtonCompact)
68
94
  }, /*#__PURE__*/React.createElement(Button, {
69
95
  appearance: "primary",
@@ -75,22 +101,30 @@ var CarouselSlide = function CarouselSlide(_ref) {
75
101
  }, renderedIcon), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Heading, {
76
102
  size: "medium",
77
103
  testId: "".concat(testId, "-title")
78
- }, title)), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Text, {
104
+ }, title)), /*#__PURE__*/React.createElement(Box, {
105
+ xcss: styles.columnContentBody
106
+ }, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Text, {
79
107
  testId: "".concat(testId, "-description")
80
- }, description)), /*#__PURE__*/React.createElement(Box, {
108
+ }, description)), (showPrimaryButton && !isCompact || showNavigation && (onNextClick || onBackClick)) && /*#__PURE__*/React.createElement(Box, {
81
109
  xcss: styles.rowButton
82
- }, !isCompact && /*#__PURE__*/React.createElement(Button, {
110
+ }, showPrimaryButton && !isCompact && /*#__PURE__*/React.createElement(Button, {
83
111
  appearance: "primary",
84
112
  onClick: onPrimaryButtonClick,
85
113
  testId: "".concat(testId, "-connect")
86
- }, primaryButtonLabel), showNavigation && onNextClick && /*#__PURE__*/React.createElement(Button, {
114
+ }, primaryButtonLabel), showNavigation && (onBackClick || onNextClick) && /*#__PURE__*/React.createElement(Box, {
115
+ xcss: styles.rowButtonNavGroup
116
+ }, onBackClick && /*#__PURE__*/React.createElement(Button, {
117
+ appearance: "subtle",
118
+ onClick: onBackClick,
119
+ testId: "".concat(testId, "-back")
120
+ }, formatMessage(messages.connect_link_account_embed_carousel_button_back)), onNextClick && /*#__PURE__*/React.createElement(Button, {
87
121
  appearance: "subtle",
88
122
  onClick: onNextClick,
89
123
  testId: "".concat(testId, "-next")
90
- }, formatMessage(messages.connect_link_account_embed_teaser_button_next)), showNavigation && /*#__PURE__*/React.createElement(Box, {
124
+ }, formatMessage(messages.connect_link_account_embed_carousel_button_next)))))), showNavigation && /*#__PURE__*/React.createElement(Box, {
91
125
  xcss: styles.rowDot,
92
126
  role: "group",
93
- "aria-label": formatMessage(messages.connect_link_account_embed_teaser_dot_row_label)
127
+ "aria-label": formatMessage(messages.connect_link_account_embed_carousel_dot_row_label)
94
128
  }, Array.from({
95
129
  length: totalSlides
96
130
  }, function (_, i) {
@@ -100,7 +134,7 @@ var CarouselSlide = function CarouselSlide(_ref) {
100
134
  onClick: function onClick() {
101
135
  return onDotClick === null || onDotClick === void 0 ? void 0 : onDotClick(i);
102
136
  },
103
- "aria-label": formatMessage(messages.connect_link_account_embed_teaser_dot_label, {
137
+ "aria-label": formatMessage(messages.connect_link_account_embed_carousel_dot_label, {
104
138
  index: i + 1,
105
139
  total: totalSlides
106
140
  }),
@@ -109,9 +143,13 @@ var CarouselSlide = function CarouselSlide(_ref) {
109
143
  }, /*#__PURE__*/React.createElement(Box, {
110
144
  xcss: cx(styles.dot, i === slideIndex && styles.dotActive)
111
145
  }));
112
- })))), !isCompact && /*#__PURE__*/React.createElement(Box, {
146
+ }))), !isCompact && /*#__PURE__*/React.createElement(Box, {
113
147
  xcss: styles.columnImage,
114
- testId: "".concat(testId, "-image-panel")
115
- }, renderedImage));
148
+ testId: "".concat(testId, "-image-panel-").concat(slideIndex)
149
+ }, /*#__PURE__*/React.createElement(Box, {
150
+ xcss: styles.imageContainer
151
+ }, /*#__PURE__*/React.createElement(Box, {
152
+ xcss: styles.imageAbsolute
153
+ }, renderedImage))));
116
154
  };
117
155
  export default CarouselSlide;
@@ -6,7 +6,7 @@
6
6
  ._1reo15vq{overflow-x:hidden}
7
7
  ._4t3i1osq{height:100%}
8
8
  ._5sagjx92{animation-duration:.28s}
9
- ._j7hql61g{animation-name:kjqoltm}
9
+ ._j7hq1wwu{animation-name:kgnpaw5}
10
10
  ._kqswh2mm{position:relative}
11
- @keyframes kjqoltm{0%{opacity:0;transform:translateX(40px)}to{opacity:1;transform:translateX(0)}}
11
+ @keyframes kgnpaw5{0%{opacity:0}to{opacity:1}}
12
12
  @media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._2hwzhgkh{animation-duration:.01ms}}
@@ -8,12 +8,10 @@ import CarouselSlide from './CarouselSlide';
8
8
  var styles = {
9
9
  carousel: "_1reo15vq _18m915vq _1e0c1txw _1bsb1osq _4t3i1osq _kqswh2mm"
10
10
  };
11
-
12
- // Slide enters from the right: translates from 40px right + fades in
13
- var slideInFromRight = null;
11
+ var fadeIn = null;
14
12
  var slideWrapperMap = {
15
13
  static: "_1bsb1osq _4t3i1osq",
16
- animated: "_1bsb1osq _4t3i1osq _j7hql61g _5sagjx92 _1pglafbj _1o511hrf _bl8aglyw _2hwzhgkh"
14
+ animated: "_1bsb1osq _4t3i1osq _j7hq1wwu _5sagjx92 _1pglafbj _1o511hrf _bl8aglyw _2hwzhgkh"
17
15
  };
18
16
  /**
19
17
  * Derives layout size bucket from pixel dimensions.
@@ -32,12 +30,14 @@ var getSize = function getSize(width, height) {
32
30
  var Carousel = function Carousel(_ref) {
33
31
  var icon = _ref.icon,
34
32
  iconLabel = _ref.iconLabel,
33
+ _ref$initialSlideInde = _ref.initialSlideIndex,
34
+ initialSlideIndex = _ref$initialSlideInde === void 0 ? 0 : _ref$initialSlideInde,
35
35
  items = _ref.items,
36
36
  onPrimaryButtonClick = _ref.onPrimaryButtonClick,
37
37
  primaryButtonLabel = _ref.primaryButtonLabel,
38
38
  _ref$testId = _ref.testId,
39
39
  testId = _ref$testId === void 0 ? 'embed-card-teaser-carousel' : _ref$testId;
40
- var _useState = useState(0),
40
+ var _useState = useState(initialSlideIndex),
41
41
  _useState2 = _slicedToArray(_useState, 2),
42
42
  activeIndex = _useState2[0],
43
43
  setActiveIndex = _useState2[1];
@@ -77,6 +77,12 @@ var Carousel = function Carousel(_ref) {
77
77
  return (current + 1) % items.length;
78
78
  });
79
79
  }, [items.length]);
80
+ var goPrev = useCallback(function () {
81
+ hasNavigated.current = true;
82
+ setActiveIndex(function (current) {
83
+ return Math.max(0, current - 1);
84
+ });
85
+ }, []);
80
86
  var goTo = useCallback(function (index) {
81
87
  if (index === activeIndex) {
82
88
  return;
@@ -85,6 +91,7 @@ var Carousel = function Carousel(_ref) {
85
91
  setActiveIndex(index);
86
92
  }, [activeIndex]);
87
93
  var currentSlide = items[activeIndex];
94
+ var isFirstSlide = activeIndex === 0;
88
95
  var isLastSlide = activeIndex === items.length - 1;
89
96
  return /*#__PURE__*/React.createElement(Box, {
90
97
  ref: containerRef,
@@ -102,6 +109,7 @@ var Carousel = function Carousel(_ref) {
102
109
  image: currentSlide.image,
103
110
  title: currentSlide.title,
104
111
  onPrimaryButtonClick: onPrimaryButtonClick,
112
+ onBackClick: !isFirstSlide ? goPrev : undefined,
105
113
  onDotClick: goTo,
106
114
  onNextClick: !isLastSlide ? goNext : undefined,
107
115
  size: size,