@atlaskit/smart-card 45.12.0 → 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.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +3 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +3 -0
- package/dist/cjs/messages.js +35 -25
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +16 -4
- package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.js +67 -27
- package/dist/cjs/view/EmbedCard/components/carousel/index.compiled.css +2 -2
- package/dist/cjs/view/EmbedCard/components/carousel/index.js +13 -5
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +191 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +7 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +31 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +16 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +16 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +6 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +22 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +47 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +359 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +281 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +502 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +9 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +3 -0
- package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +3 -0
- package/dist/es2019/messages.js +49 -27
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +16 -4
- package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.js +64 -27
- package/dist/es2019/view/EmbedCard/components/carousel/index.compiled.css +2 -2
- package/dist/es2019/view/EmbedCard/components/carousel/index.js +10 -5
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +184 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +7 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +25 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +3 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +3 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +6 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +13 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +40 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +352 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +268 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +495 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +9 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +3 -0
- package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +3 -0
- package/dist/esm/messages.js +35 -25
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +16 -4
- package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.js +65 -27
- package/dist/esm/view/EmbedCard/components/carousel/index.compiled.css +2 -2
- package/dist/esm/view/EmbedCard/components/carousel/index.js +13 -5
- package/dist/esm/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +182 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +7 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +24 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +5 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +5 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +6 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +15 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +40 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +351 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +273 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +494 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
- package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +9 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/view/EmbedCard/components/carousel/CarouselSlide.d.ts +3 -1
- package/dist/types/view/EmbedCard/components/carousel/index.d.ts +3 -1
- package/dist/types/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.d.ts +4 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.d.ts +14 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.d.ts +3 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.d.ts +3 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.d.ts +7 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.d.ts +9 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.d.ts +8 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.d.ts +8 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.d.ts +6 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +2 -2
- package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +1 -0
- package/package.json +3 -3
package/dist/es2019/messages.js
CHANGED
|
@@ -165,49 +165,66 @@ export const 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
|
-
|
|
169
|
-
id: 'fabric.linking.
|
|
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
|
-
|
|
174
|
-
id: 'fabric.linking.
|
|
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
|
-
|
|
179
|
-
id: 'fabric.linking.
|
|
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
|
-
|
|
184
|
-
id: 'fabric.linking.
|
|
185
|
-
defaultMessage:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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,
|
|
191
|
+
Google {Google Docs, Sheets, and Slides}
|
|
192
|
+
other {{context}}} {product, select,
|
|
193
|
+
BITBUCKET {right inside Bitbucket}
|
|
194
|
+
CONFLUENCE {right inside Confluence and Jira}
|
|
195
|
+
JIRA {right inside Confluence and Jira}
|
|
196
|
+
TRELLO {right inside Trello}
|
|
197
|
+
other {across Atlassian}}.`,
|
|
198
|
+
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.'
|
|
199
|
+
},
|
|
200
|
+
connect_link_account_embed_carousel_sl_title: {
|
|
201
|
+
id: 'fabric.linking.connect_link_account_embed_carousel_sl_title.non-final',
|
|
202
|
+
defaultMessage: 'Turn smart links into rich previews',
|
|
191
203
|
description: 'A title on a teaser slide 1 on benefit of connecting account on Smart Link embed'
|
|
192
204
|
},
|
|
193
|
-
|
|
194
|
-
id: 'fabric.linking.
|
|
195
|
-
defaultMessage: '
|
|
205
|
+
connect_link_account_embed_carousel_rovo_title: {
|
|
206
|
+
id: 'fabric.linking.connect_link_account_embed_carousel_rovo_title.non-final',
|
|
207
|
+
defaultMessage: 'Find everything in one search',
|
|
196
208
|
description: 'A title on a teaser slide 2 on benefit of connecting account on Smart Link embed'
|
|
197
209
|
},
|
|
198
|
-
|
|
199
|
-
id: 'fabric.linking.
|
|
200
|
-
defaultMessage:
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
210
|
+
connect_link_account_embed_carousel_rovo_description: {
|
|
211
|
+
id: 'fabric.linking.connect_link_account_embed_carousel_rovo_description.non-final',
|
|
212
|
+
defaultMessage: `Access {context} files alongside your work in {product, select,
|
|
213
|
+
BITBUCKET {Bitbucket}
|
|
214
|
+
CONFLUENCE {Confluence and Jira}
|
|
215
|
+
JIRA {Confluence and Jira}
|
|
216
|
+
TRELLO {Trello}
|
|
217
|
+
other {Atlassian}}. We'll always respect your {context} permissions.`,
|
|
218
|
+
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."
|
|
219
|
+
},
|
|
220
|
+
connect_link_account_embed_carousel_rovochat_title: {
|
|
221
|
+
id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_title.non-final',
|
|
205
222
|
defaultMessage: 'Get help from Rovo',
|
|
206
223
|
description: 'A title on a teaser slide 3 on benefit of connecting account on Smart Link embed'
|
|
207
224
|
},
|
|
208
|
-
|
|
209
|
-
id: 'fabric.linking.
|
|
210
|
-
defaultMessage:
|
|
225
|
+
connect_link_account_embed_carousel_rovochat_description: {
|
|
226
|
+
id: 'fabric.linking.connect_link_account_embed_carousel_rovochat_description.non-final',
|
|
227
|
+
defaultMessage: 'Rovo uses your {context} content to answer questions, summarise docs, and draft updates using the work you’ve already done.',
|
|
211
228
|
description: 'A description on a teaser slide 3 on benefit of connecting account on Smart Link embed'
|
|
212
229
|
},
|
|
213
230
|
connect_link_account_success_flag_description: {
|
|
@@ -230,6 +247,11 @@ export const messages = defineMessages({
|
|
|
230
247
|
defaultMessage: 'Connect to {context}',
|
|
231
248
|
description: 'Shown on a button to connect user external account to their Atlassian account.'
|
|
232
249
|
},
|
|
250
|
+
connect_3p_account: {
|
|
251
|
+
id: 'fabric.linking.connect_3p_account.non-final',
|
|
252
|
+
defaultMessage: 'Connect {context}',
|
|
253
|
+
description: 'Shown on a button to connect user external 3P account to their Atlassian account, e.g. Connect Figma'
|
|
254
|
+
},
|
|
233
255
|
connect_inline_social_proof: {
|
|
234
256
|
id: 'fabric.linking.connect_inline_social_proof',
|
|
235
257
|
defaultMessage: 'Connect',
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card" || '',
|
|
5
|
-
packageVersion: "45.
|
|
5
|
+
packageVersion: "45.12.0" || ''
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -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)}.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
39
|
+
._4t3iftgi{height:8px}
|
|
30
40
|
._5ral1f51{object-fit:contain}
|
|
31
41
|
._6fl45ucs{transition-timing-function:ease}
|
|
32
|
-
.
|
|
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,59 +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
|
const styles = {
|
|
13
|
-
columnImage: "_16jlkb7n _1o9zkb7n _i0dlghg7
|
|
14
|
-
|
|
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
|
|
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: "
|
|
33
|
+
slide: "_1reo15vq _18m915vq _1e0c1txw _1n261q9c _1bsb1osq _4t3i1osq _4cvr1fhb _vchhusvi"
|
|
27
34
|
};
|
|
28
35
|
const CarouselSlide = ({
|
|
29
36
|
icon,
|
|
30
|
-
iconLabel,
|
|
37
|
+
iconLabel = '',
|
|
31
38
|
title,
|
|
32
39
|
description,
|
|
33
40
|
image,
|
|
34
41
|
primaryButtonLabel,
|
|
35
42
|
onPrimaryButtonClick,
|
|
43
|
+
onBackClick,
|
|
36
44
|
onDotClick,
|
|
37
45
|
onNextClick,
|
|
38
46
|
slideIndex,
|
|
39
47
|
totalSlides,
|
|
40
48
|
size,
|
|
41
|
-
testId = 'embed-card-
|
|
49
|
+
testId = 'embed-card-carousel-slide'
|
|
42
50
|
}) => {
|
|
43
51
|
const {
|
|
44
52
|
formatMessage
|
|
45
53
|
} = useIntl();
|
|
46
54
|
const isCompact = size !== 'full';
|
|
55
|
+
const showPrimaryButton = typeof onPrimaryButtonClick === 'function';
|
|
47
56
|
const showNavigation = totalSlides > 1;
|
|
48
|
-
const renderedIcon =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
const renderedIcon = useMemo(() => {
|
|
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]);
|
|
57
80
|
const renderedImage = image == null ? null : typeof image === 'string' ? /*#__PURE__*/React.createElement(Image, {
|
|
58
81
|
src: image,
|
|
59
82
|
alt: title,
|
|
@@ -64,7 +87,9 @@ const CarouselSlide = ({
|
|
|
64
87
|
testId: testId
|
|
65
88
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
66
89
|
xcss: cx(styles.columnContent, isCompact && styles.columnContentCompact)
|
|
67
|
-
},
|
|
90
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
91
|
+
xcss: styles.columnContentTop
|
|
92
|
+
}, showPrimaryButton && isCompact && /*#__PURE__*/React.createElement(Box, {
|
|
68
93
|
xcss: cx(styles.rowButton, styles.rowButtonCompact)
|
|
69
94
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
70
95
|
appearance: "primary",
|
|
@@ -76,29 +101,37 @@ const CarouselSlide = ({
|
|
|
76
101
|
}, renderedIcon), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Heading, {
|
|
77
102
|
size: "medium",
|
|
78
103
|
testId: `${testId}-title`
|
|
79
|
-
}, title)), /*#__PURE__*/React.createElement(Box,
|
|
104
|
+
}, title)), /*#__PURE__*/React.createElement(Box, {
|
|
105
|
+
xcss: styles.columnContentBody
|
|
106
|
+
}, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Text, {
|
|
80
107
|
testId: `${testId}-description`
|
|
81
|
-
}, description)), /*#__PURE__*/React.createElement(Box, {
|
|
108
|
+
}, description)), (showPrimaryButton && !isCompact || showNavigation && (onNextClick || onBackClick)) && /*#__PURE__*/React.createElement(Box, {
|
|
82
109
|
xcss: styles.rowButton
|
|
83
|
-
}, !isCompact && /*#__PURE__*/React.createElement(Button, {
|
|
110
|
+
}, showPrimaryButton && !isCompact && /*#__PURE__*/React.createElement(Button, {
|
|
84
111
|
appearance: "primary",
|
|
85
112
|
onClick: onPrimaryButtonClick,
|
|
86
113
|
testId: `${testId}-connect`
|
|
87
|
-
}, primaryButtonLabel), showNavigation && onNextClick && /*#__PURE__*/React.createElement(
|
|
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: `${testId}-back`
|
|
120
|
+
}, formatMessage(messages.connect_link_account_embed_carousel_button_back)), onNextClick && /*#__PURE__*/React.createElement(Button, {
|
|
88
121
|
appearance: "subtle",
|
|
89
122
|
onClick: onNextClick,
|
|
90
123
|
testId: `${testId}-next`
|
|
91
|
-
}, formatMessage(messages.
|
|
124
|
+
}, formatMessage(messages.connect_link_account_embed_carousel_button_next)))))), showNavigation && /*#__PURE__*/React.createElement(Box, {
|
|
92
125
|
xcss: styles.rowDot,
|
|
93
126
|
role: "group",
|
|
94
|
-
"aria-label": formatMessage(messages.
|
|
127
|
+
"aria-label": formatMessage(messages.connect_link_account_embed_carousel_dot_row_label)
|
|
95
128
|
}, Array.from({
|
|
96
129
|
length: totalSlides
|
|
97
130
|
}, (_, i) => /*#__PURE__*/React.createElement(Pressable, {
|
|
98
131
|
key: i,
|
|
99
132
|
xcss: styles.dotPassable,
|
|
100
133
|
onClick: () => onDotClick === null || onDotClick === void 0 ? void 0 : onDotClick(i),
|
|
101
|
-
"aria-label": formatMessage(messages.
|
|
134
|
+
"aria-label": formatMessage(messages.connect_link_account_embed_carousel_dot_label, {
|
|
102
135
|
index: i + 1,
|
|
103
136
|
total: totalSlides
|
|
104
137
|
}),
|
|
@@ -106,9 +139,13 @@ const CarouselSlide = ({
|
|
|
106
139
|
testId: `${testId}-dot-${i}`
|
|
107
140
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
108
141
|
xcss: cx(styles.dot, i === slideIndex && styles.dotActive)
|
|
109
|
-
})))))
|
|
142
|
+
}))))), !isCompact && /*#__PURE__*/React.createElement(Box, {
|
|
110
143
|
xcss: styles.columnImage,
|
|
111
|
-
testId: `${testId}-image-panel`
|
|
112
|
-
},
|
|
144
|
+
testId: `${testId}-image-panel-${slideIndex}`
|
|
145
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
146
|
+
xcss: styles.imageContainer
|
|
147
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
148
|
+
xcss: styles.imageAbsolute
|
|
149
|
+
}, renderedImage))));
|
|
113
150
|
};
|
|
114
151
|
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
|
-
.
|
|
9
|
+
._j7hq1wwu{animation-name:kgnpaw5}
|
|
10
10
|
._kqswh2mm{position:relative}
|
|
11
|
-
@keyframes
|
|
11
|
+
@keyframes kgnpaw5{0%{opacity:0}to{opacity:1}}
|
|
12
12
|
@media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._2hwzhgkh{animation-duration:.01ms}}
|
|
@@ -7,12 +7,10 @@ import CarouselSlide from './CarouselSlide';
|
|
|
7
7
|
const styles = {
|
|
8
8
|
carousel: "_1reo15vq _18m915vq _1e0c1txw _1bsb1osq _4t3i1osq _kqswh2mm"
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
// Slide enters from the right: translates from 40px right + fades in
|
|
12
|
-
const slideInFromRight = null;
|
|
10
|
+
const fadeIn = null;
|
|
13
11
|
const slideWrapperMap = {
|
|
14
12
|
static: "_1bsb1osq _4t3i1osq",
|
|
15
|
-
animated: "_1bsb1osq _4t3i1osq
|
|
13
|
+
animated: "_1bsb1osq _4t3i1osq _j7hq1wwu _5sagjx92 _1pglafbj _1o511hrf _bl8aglyw _2hwzhgkh"
|
|
16
14
|
};
|
|
17
15
|
/**
|
|
18
16
|
* Derives layout size bucket from pixel dimensions.
|
|
@@ -31,12 +29,13 @@ const getSize = (width, height) => {
|
|
|
31
29
|
const Carousel = ({
|
|
32
30
|
icon,
|
|
33
31
|
iconLabel,
|
|
32
|
+
initialSlideIndex = 0,
|
|
34
33
|
items,
|
|
35
34
|
onPrimaryButtonClick,
|
|
36
35
|
primaryButtonLabel,
|
|
37
36
|
testId = 'embed-card-teaser-carousel'
|
|
38
37
|
}) => {
|
|
39
|
-
const [activeIndex, setActiveIndex] = useState(
|
|
38
|
+
const [activeIndex, setActiveIndex] = useState(initialSlideIndex);
|
|
40
39
|
const [size, setSize] = useState('full');
|
|
41
40
|
|
|
42
41
|
// Tracks whether the user has navigated at least once.
|
|
@@ -65,6 +64,10 @@ const Carousel = ({
|
|
|
65
64
|
hasNavigated.current = true;
|
|
66
65
|
setActiveIndex(current => (current + 1) % items.length);
|
|
67
66
|
}, [items.length]);
|
|
67
|
+
const goPrev = useCallback(() => {
|
|
68
|
+
hasNavigated.current = true;
|
|
69
|
+
setActiveIndex(current => Math.max(0, current - 1));
|
|
70
|
+
}, []);
|
|
68
71
|
const goTo = useCallback(index => {
|
|
69
72
|
if (index === activeIndex) {
|
|
70
73
|
return;
|
|
@@ -73,6 +76,7 @@ const Carousel = ({
|
|
|
73
76
|
setActiveIndex(index);
|
|
74
77
|
}, [activeIndex]);
|
|
75
78
|
const currentSlide = items[activeIndex];
|
|
79
|
+
const isFirstSlide = activeIndex === 0;
|
|
76
80
|
const isLastSlide = activeIndex === items.length - 1;
|
|
77
81
|
return /*#__PURE__*/React.createElement(Box, {
|
|
78
82
|
ref: containerRef,
|
|
@@ -90,6 +94,7 @@ const Carousel = ({
|
|
|
90
94
|
image: currentSlide.image,
|
|
91
95
|
title: currentSlide.title,
|
|
92
96
|
onPrimaryButtonClick: onPrimaryButtonClick,
|
|
97
|
+
onBackClick: !isFirstSlide ? goPrev : undefined,
|
|
93
98
|
onDotClick: goTo,
|
|
94
99
|
onNextClick: !isLastSlide ? goNext : undefined,
|
|
95
100
|
size: size,
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import React, { Suspense, useCallback, useMemo } from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
|
+
import { di } from 'react-magnetic-di';
|
|
4
|
+
import LinkGlyph from '@atlaskit/icon/core/link';
|
|
5
|
+
import SmartLinkIcon from '@atlaskit/icon/core/smart-link';
|
|
6
|
+
import IconTile from '@atlaskit/icon/icon-tile';
|
|
7
|
+
import Image from '@atlaskit/image/image';
|
|
8
|
+
import { useAnalyticsEvents } from '../../../../common/analytics/generated/use-analytics-events';
|
|
9
|
+
import { messages } from '../../../../messages';
|
|
10
|
+
import useRovoConfig from '../../../../state/hooks/use-rovo-config';
|
|
11
|
+
import Carousel from '../../components/carousel';
|
|
12
|
+
import { ExpandedFrame } from '../../components/ExpandedFrame';
|
|
13
|
+
import { ImageIcon } from '../../components/ImageIcon';
|
|
14
|
+
import LazyRovoChatBenefitImage from './carousel-images/LazyRovoChatBenefitImage';
|
|
15
|
+
import LazyRovoSearchBenefitImage from './carousel-images/LazyRovoSearchBenefitImage';
|
|
16
|
+
import NoAuthAvailableImage from './carousel-images/NoAuthAvailableImage';
|
|
17
|
+
import ProductIcon from './carousel-images/ProductIcon';
|
|
18
|
+
import SmartLinkBenefitImage from './carousel-images/SmartLinkBenefitImage';
|
|
19
|
+
const PARENT_PRODUCT = {
|
|
20
|
+
ATLAS: 'ATLAS',
|
|
21
|
+
BITBUCKET: 'BITBUCKET',
|
|
22
|
+
CONFLUENCE: 'CONFLUENCE',
|
|
23
|
+
CSM: 'JIRA',
|
|
24
|
+
JPD: 'JIRA',
|
|
25
|
+
JSM: 'JIRA',
|
|
26
|
+
JSW: 'JIRA',
|
|
27
|
+
JWM: 'JIRA',
|
|
28
|
+
TRELLO: 'TRELLO'
|
|
29
|
+
};
|
|
30
|
+
const PRODUCT_COMPANION = {
|
|
31
|
+
ATLAS: 'ATLAS',
|
|
32
|
+
BITBUCKET: 'BITBUCKET',
|
|
33
|
+
CONFLUENCE: 'JIRA',
|
|
34
|
+
JIRA: 'CONFLUENCE',
|
|
35
|
+
TRELLO: 'TRELLO'
|
|
36
|
+
};
|
|
37
|
+
const UnauthorizedCarouselView = ({
|
|
38
|
+
context,
|
|
39
|
+
frameStyle,
|
|
40
|
+
inheritDimensions,
|
|
41
|
+
isSelected,
|
|
42
|
+
onAuthorize,
|
|
43
|
+
onClick,
|
|
44
|
+
testId = 'embed-card-unauthorized-view',
|
|
45
|
+
url
|
|
46
|
+
}) => {
|
|
47
|
+
const intl = useIntl();
|
|
48
|
+
const {
|
|
49
|
+
fireEvent
|
|
50
|
+
} = useAnalyticsEvents();
|
|
51
|
+
const {
|
|
52
|
+
rovoOptions,
|
|
53
|
+
product
|
|
54
|
+
} = useRovoConfig();
|
|
55
|
+
const canAuthorize = typeof onAuthorize === 'function';
|
|
56
|
+
const providerName = context === null || context === void 0 ? void 0 : context.text;
|
|
57
|
+
const providerIcon = useMemo(() => {
|
|
58
|
+
var _ref, _context$iconLabel;
|
|
59
|
+
const iconLabel = (_ref = (_context$iconLabel = context === null || context === void 0 ? void 0 : context.iconLabel) !== null && _context$iconLabel !== void 0 ? _context$iconLabel : context === null || context === void 0 ? void 0 : context.text) !== null && _ref !== void 0 ? _ref : '';
|
|
60
|
+
if (typeof (context === null || context === void 0 ? void 0 : context.icon) === 'string') {
|
|
61
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
62
|
+
src: context.icon,
|
|
63
|
+
alt: iconLabel
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (context !== null && context !== void 0 && context.icon) {
|
|
67
|
+
return context.icon;
|
|
68
|
+
}
|
|
69
|
+
return /*#__PURE__*/React.createElement(IconTile, {
|
|
70
|
+
appearance: "blue",
|
|
71
|
+
icon: SmartLinkIcon,
|
|
72
|
+
label: iconLabel,
|
|
73
|
+
size: "small",
|
|
74
|
+
testId: "embed-card-fallback-icon"
|
|
75
|
+
});
|
|
76
|
+
}, [context]);
|
|
77
|
+
const items = useMemo(() => {
|
|
78
|
+
if (!canAuthorize) {
|
|
79
|
+
return [{
|
|
80
|
+
title: intl.formatMessage(messages.unauthorised_account_name_no_provider),
|
|
81
|
+
description: intl.formatMessage(messages.unauthorised_account_description_no_provider),
|
|
82
|
+
image: /*#__PURE__*/React.createElement(NoAuthAvailableImage, null)
|
|
83
|
+
}];
|
|
84
|
+
}
|
|
85
|
+
const parentProduct = product ? PARENT_PRODUCT[product] : undefined;
|
|
86
|
+
const parentProductIcon = /*#__PURE__*/React.createElement(ProductIcon, {
|
|
87
|
+
product: parentProduct
|
|
88
|
+
});
|
|
89
|
+
const parentProductAlt = parentProduct ? PRODUCT_COMPANION[parentProduct] : parentProduct;
|
|
90
|
+
const parentProductIconAlt = /*#__PURE__*/React.createElement(ProductIcon, {
|
|
91
|
+
product: parentProductAlt
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// We only have special text for Google Drive and i18n select takes only one word (no space).
|
|
95
|
+
const i18nSelectContext = (context === null || context === void 0 ? void 0 : context.text) === 'Google Drive' ? 'Google' : context === null || context === void 0 ? void 0 : context.text;
|
|
96
|
+
const slides = [{
|
|
97
|
+
title: intl.formatMessage(messages.connect_link_account_embed_carousel_sl_title),
|
|
98
|
+
description: intl.formatMessage(messages.connect_link_account_embed_carousel_sl_description, {
|
|
99
|
+
context: i18nSelectContext,
|
|
100
|
+
product: parentProduct
|
|
101
|
+
}),
|
|
102
|
+
image: /*#__PURE__*/React.createElement(SmartLinkBenefitImage, {
|
|
103
|
+
productIcon: parentProductIcon
|
|
104
|
+
})
|
|
105
|
+
}];
|
|
106
|
+
|
|
107
|
+
// If the link has an unauthorized status and provides an onAuthorize callback,
|
|
108
|
+
// it is likely a 3P (third-party) link and is supported by Rovo. In that case,
|
|
109
|
+
// we show additional Rovo-specific teaser slides to encourage the user to connect their account.
|
|
110
|
+
if (rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoEnabled) {
|
|
111
|
+
slides.push({
|
|
112
|
+
title: intl.formatMessage(messages.connect_link_account_embed_carousel_rovo_title),
|
|
113
|
+
description: intl.formatMessage(messages.connect_link_account_embed_carousel_rovo_description, {
|
|
114
|
+
context: providerName,
|
|
115
|
+
product: parentProduct
|
|
116
|
+
}),
|
|
117
|
+
image: /*#__PURE__*/React.createElement(Suspense, {
|
|
118
|
+
fallback: null
|
|
119
|
+
}, /*#__PURE__*/React.createElement(LazyRovoSearchBenefitImage, {
|
|
120
|
+
productIcon: parentProductIcon,
|
|
121
|
+
productIconAlt: parentProductIconAlt,
|
|
122
|
+
providerIcon: providerIcon
|
|
123
|
+
}))
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
if (rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoEnabled && rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoLLMEnabled) {
|
|
127
|
+
slides.push({
|
|
128
|
+
title: intl.formatMessage(messages.connect_link_account_embed_carousel_rovochat_title),
|
|
129
|
+
description: intl.formatMessage(messages.connect_link_account_embed_carousel_rovochat_description, {
|
|
130
|
+
context: providerName
|
|
131
|
+
}),
|
|
132
|
+
image: /*#__PURE__*/React.createElement(Suspense, {
|
|
133
|
+
fallback: null
|
|
134
|
+
}, /*#__PURE__*/React.createElement(LazyRovoChatBenefitImage, {
|
|
135
|
+
productIcon: parentProductIcon,
|
|
136
|
+
productIconAlt: parentProductIconAlt,
|
|
137
|
+
providerIcon: providerIcon
|
|
138
|
+
}))
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return slides;
|
|
142
|
+
}, [canAuthorize, context, intl, product, providerName, providerIcon, rovoOptions]);
|
|
143
|
+
const handleOnAuthorizeClick = useCallback(() => {
|
|
144
|
+
if (onAuthorize) {
|
|
145
|
+
fireEvent('track.applicationAccount.authStarted', {});
|
|
146
|
+
onAuthorize();
|
|
147
|
+
}
|
|
148
|
+
}, [onAuthorize, fireEvent]);
|
|
149
|
+
const buttonLabel = context !== null && context !== void 0 && context.text ? intl.formatMessage(messages.connect_3p_account, {
|
|
150
|
+
context: context.text
|
|
151
|
+
}) : intl.formatMessage(messages.connect_link_account_card);
|
|
152
|
+
const icon = useMemo(() => {
|
|
153
|
+
if ( /*#__PURE__*/React.isValidElement(context === null || context === void 0 ? void 0 : context.icon)) {
|
|
154
|
+
return context.icon;
|
|
155
|
+
}
|
|
156
|
+
return /*#__PURE__*/React.createElement(ImageIcon, {
|
|
157
|
+
default: /*#__PURE__*/React.createElement(LinkGlyph, {
|
|
158
|
+
label: "icon",
|
|
159
|
+
color: "currentColor"
|
|
160
|
+
}),
|
|
161
|
+
src: typeof (context === null || context === void 0 ? void 0 : context.icon) === 'string' ? context.icon : undefined
|
|
162
|
+
});
|
|
163
|
+
}, [context === null || context === void 0 ? void 0 : context.icon]);
|
|
164
|
+
return /*#__PURE__*/React.createElement(ExpandedFrame, {
|
|
165
|
+
allowScrollBar: true,
|
|
166
|
+
frameStyle: frameStyle !== null && frameStyle !== void 0 ? frameStyle : 'show',
|
|
167
|
+
href: url,
|
|
168
|
+
icon: icon,
|
|
169
|
+
isSelected: isSelected,
|
|
170
|
+
inheritDimensions: inheritDimensions,
|
|
171
|
+
onClick: onClick,
|
|
172
|
+
setOverflow: true,
|
|
173
|
+
testId: testId,
|
|
174
|
+
text: context === null || context === void 0 ? void 0 : context.text
|
|
175
|
+
}, /*#__PURE__*/React.createElement(Carousel, {
|
|
176
|
+
icon: context === null || context === void 0 ? void 0 : context.icon,
|
|
177
|
+
iconLabel: context === null || context === void 0 ? void 0 : context.text,
|
|
178
|
+
items: items,
|
|
179
|
+
onPrimaryButtonClick: canAuthorize ? handleOnAuthorizeClick : undefined,
|
|
180
|
+
primaryButtonLabel: buttonLabel,
|
|
181
|
+
testId: `${testId}-carousel`
|
|
182
|
+
}));
|
|
183
|
+
};
|
|
184
|
+
export default UnauthorizedCarouselView;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* IconSlot.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
|
+
import "./IconSlot.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
const iconSlotDivStyles = null;
|
|
6
|
+
const IconSlot = ({
|
|
7
|
+
icon,
|
|
8
|
+
x,
|
|
9
|
+
y,
|
|
10
|
+
w,
|
|
11
|
+
h
|
|
12
|
+
}) => {
|
|
13
|
+
if (!icon) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return /*#__PURE__*/React.createElement("foreignObject", {
|
|
17
|
+
x: x,
|
|
18
|
+
y: y,
|
|
19
|
+
width: w,
|
|
20
|
+
height: h
|
|
21
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: ax(["_1reo15vq _18m915vq _1bsb1osq _4t3i1osq _1e0c1txw _4cvr1h6o _1bah1h6o"])
|
|
23
|
+
}, icon));
|
|
24
|
+
};
|
|
25
|
+
export default IconSlot;
|