@atlaskit/smart-card 45.12.0 → 45.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/cjs/__tests__/vr-tests/__snapshots__/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/i18n/cs.js +3 -180
- package/dist/cjs/i18n/da.js +3 -180
- package/dist/cjs/i18n/de.js +3 -180
- package/dist/cjs/i18n/en.js +3 -182
- package/dist/cjs/i18n/en_GB.js +3 -182
- package/dist/cjs/i18n/en_ZZ.js +3 -182
- package/dist/cjs/i18n/es.js +3 -180
- package/dist/cjs/i18n/fi.js +3 -180
- package/dist/cjs/i18n/fr.js +3 -180
- package/dist/cjs/i18n/hr.js +3 -175
- package/dist/cjs/i18n/hu.js +3 -180
- package/dist/cjs/i18n/it.js +3 -180
- package/dist/cjs/i18n/ja.js +3 -180
- package/dist/cjs/i18n/ko.js +3 -180
- package/dist/cjs/i18n/nb.js +3 -180
- package/dist/cjs/i18n/nl.js +3 -180
- package/dist/cjs/i18n/pl.js +3 -180
- package/dist/cjs/i18n/pt_BR.js +3 -180
- package/dist/cjs/i18n/ru.js +3 -180
- package/dist/cjs/i18n/sl.js +3 -175
- package/dist/cjs/i18n/sr_RS.js +3 -175
- package/dist/cjs/i18n/sr_YR.js +3 -175
- package/dist/cjs/i18n/sv.js +3 -180
- package/dist/cjs/i18n/th.js +3 -180
- package/dist/cjs/i18n/tr.js +3 -180
- package/dist/cjs/i18n/uk.js +3 -180
- package/dist/cjs/i18n/vi.js +3 -180
- package/dist/cjs/i18n/zh.js +3 -180
- package/dist/cjs/i18n/zh_TW.js +3 -180
- 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/i18n/cs.js +3 -180
- package/dist/es2019/i18n/da.js +3 -180
- package/dist/es2019/i18n/de.js +3 -180
- package/dist/es2019/i18n/en.js +3 -182
- package/dist/es2019/i18n/en_GB.js +3 -182
- package/dist/es2019/i18n/en_ZZ.js +3 -182
- package/dist/es2019/i18n/es.js +3 -180
- package/dist/es2019/i18n/fi.js +3 -180
- package/dist/es2019/i18n/fr.js +3 -180
- package/dist/es2019/i18n/hr.js +3 -175
- package/dist/es2019/i18n/hu.js +3 -180
- package/dist/es2019/i18n/it.js +3 -180
- package/dist/es2019/i18n/ja.js +3 -180
- package/dist/es2019/i18n/ko.js +3 -180
- package/dist/es2019/i18n/nb.js +3 -180
- package/dist/es2019/i18n/nl.js +3 -180
- package/dist/es2019/i18n/pl.js +3 -180
- package/dist/es2019/i18n/pt_BR.js +3 -180
- package/dist/es2019/i18n/ru.js +3 -180
- package/dist/es2019/i18n/sl.js +3 -175
- package/dist/es2019/i18n/sr_RS.js +3 -175
- package/dist/es2019/i18n/sr_YR.js +3 -175
- package/dist/es2019/i18n/sv.js +3 -180
- package/dist/es2019/i18n/th.js +3 -180
- package/dist/es2019/i18n/tr.js +3 -180
- package/dist/es2019/i18n/uk.js +3 -180
- package/dist/es2019/i18n/vi.js +3 -180
- package/dist/es2019/i18n/zh.js +3 -180
- package/dist/es2019/i18n/zh_TW.js +3 -180
- 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/i18n/cs.js +3 -180
- package/dist/esm/i18n/da.js +3 -180
- package/dist/esm/i18n/de.js +3 -180
- package/dist/esm/i18n/en.js +3 -182
- package/dist/esm/i18n/en_GB.js +3 -182
- package/dist/esm/i18n/en_ZZ.js +3 -182
- package/dist/esm/i18n/es.js +3 -180
- package/dist/esm/i18n/fi.js +3 -180
- package/dist/esm/i18n/fr.js +3 -180
- package/dist/esm/i18n/hr.js +3 -175
- package/dist/esm/i18n/hu.js +3 -180
- package/dist/esm/i18n/it.js +3 -180
- package/dist/esm/i18n/ja.js +3 -180
- package/dist/esm/i18n/ko.js +3 -180
- package/dist/esm/i18n/nb.js +3 -180
- package/dist/esm/i18n/nl.js +3 -180
- package/dist/esm/i18n/pl.js +3 -180
- package/dist/esm/i18n/pt_BR.js +3 -180
- package/dist/esm/i18n/ru.js +3 -180
- package/dist/esm/i18n/sl.js +3 -175
- package/dist/esm/i18n/sr_RS.js +3 -175
- package/dist/esm/i18n/sr_YR.js +3 -175
- package/dist/esm/i18n/sv.js +3 -180
- package/dist/esm/i18n/th.js +3 -180
- package/dist/esm/i18n/tr.js +3 -180
- package/dist/esm/i18n/uk.js +3 -180
- package/dist/esm/i18n/vi.js +3 -180
- package/dist/esm/i18n/zh.js +3 -180
- package/dist/esm/i18n/zh_TW.js +3 -180
- 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/i18n/cs.d.ts +2 -180
- package/dist/types/i18n/da.d.ts +2 -180
- package/dist/types/i18n/de.d.ts +2 -180
- package/dist/types/i18n/en.d.ts +2 -182
- package/dist/types/i18n/en_GB.d.ts +2 -182
- package/dist/types/i18n/en_ZZ.d.ts +2 -182
- package/dist/types/i18n/es.d.ts +2 -180
- package/dist/types/i18n/fi.d.ts +2 -180
- package/dist/types/i18n/fr.d.ts +2 -180
- package/dist/types/i18n/hr.d.ts +2 -175
- package/dist/types/i18n/hu.d.ts +2 -180
- package/dist/types/i18n/it.d.ts +2 -180
- package/dist/types/i18n/ja.d.ts +2 -180
- package/dist/types/i18n/ko.d.ts +2 -180
- package/dist/types/i18n/nb.d.ts +2 -180
- package/dist/types/i18n/nl.d.ts +2 -180
- package/dist/types/i18n/pl.d.ts +2 -180
- package/dist/types/i18n/pt_BR.d.ts +2 -180
- package/dist/types/i18n/ru.d.ts +2 -180
- package/dist/types/i18n/sl.d.ts +2 -175
- package/dist/types/i18n/sr_RS.d.ts +2 -175
- package/dist/types/i18n/sr_YR.d.ts +2 -175
- package/dist/types/i18n/sv.d.ts +2 -180
- package/dist/types/i18n/th.d.ts +2 -180
- package/dist/types/i18n/tr.d.ts +2 -180
- package/dist/types/i18n/uk.d.ts +2 -180
- package/dist/types/i18n/vi.d.ts +2 -180
- package/dist/types/i18n/zh.d.ts +2 -180
- package/dist/types/i18n/zh_TW.d.ts +2 -180
- 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
|
@@ -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
|
|
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
|
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-
|
|
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 =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
},
|
|
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,
|
|
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(
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
-
})))
|
|
146
|
+
}))), !isCompact && /*#__PURE__*/React.createElement(Box, {
|
|
113
147
|
xcss: styles.columnImage,
|
|
114
|
-
testId: "".concat(testId, "-image-panel")
|
|
115
|
-
},
|
|
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
|
-
.
|
|
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}}
|
|
@@ -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
|
|
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(
|
|
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,
|
|
@@ -0,0 +1,182 @@
|
|
|
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
|
+
var 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
|
+
var PRODUCT_COMPANION = {
|
|
31
|
+
ATLAS: 'ATLAS',
|
|
32
|
+
BITBUCKET: 'BITBUCKET',
|
|
33
|
+
CONFLUENCE: 'JIRA',
|
|
34
|
+
JIRA: 'CONFLUENCE',
|
|
35
|
+
TRELLO: 'TRELLO'
|
|
36
|
+
};
|
|
37
|
+
var UnauthorizedCarouselView = function UnauthorizedCarouselView(_ref) {
|
|
38
|
+
var context = _ref.context,
|
|
39
|
+
frameStyle = _ref.frameStyle,
|
|
40
|
+
inheritDimensions = _ref.inheritDimensions,
|
|
41
|
+
isSelected = _ref.isSelected,
|
|
42
|
+
onAuthorize = _ref.onAuthorize,
|
|
43
|
+
onClick = _ref.onClick,
|
|
44
|
+
_ref$testId = _ref.testId,
|
|
45
|
+
testId = _ref$testId === void 0 ? 'embed-card-unauthorized-view' : _ref$testId,
|
|
46
|
+
url = _ref.url;
|
|
47
|
+
var intl = useIntl();
|
|
48
|
+
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
49
|
+
fireEvent = _useAnalyticsEvents.fireEvent;
|
|
50
|
+
var _useRovoConfig = useRovoConfig(),
|
|
51
|
+
rovoOptions = _useRovoConfig.rovoOptions,
|
|
52
|
+
product = _useRovoConfig.product;
|
|
53
|
+
var canAuthorize = typeof onAuthorize === 'function';
|
|
54
|
+
var providerName = context === null || context === void 0 ? void 0 : context.text;
|
|
55
|
+
var providerIcon = useMemo(function () {
|
|
56
|
+
var _ref2, _context$iconLabel;
|
|
57
|
+
var iconLabel = (_ref2 = (_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 && _ref2 !== void 0 ? _ref2 : '';
|
|
58
|
+
if (typeof (context === null || context === void 0 ? void 0 : context.icon) === 'string') {
|
|
59
|
+
return /*#__PURE__*/React.createElement(Image, {
|
|
60
|
+
src: context.icon,
|
|
61
|
+
alt: iconLabel
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (context !== null && context !== void 0 && context.icon) {
|
|
65
|
+
return context.icon;
|
|
66
|
+
}
|
|
67
|
+
return /*#__PURE__*/React.createElement(IconTile, {
|
|
68
|
+
appearance: "blue",
|
|
69
|
+
icon: SmartLinkIcon,
|
|
70
|
+
label: iconLabel,
|
|
71
|
+
size: "small",
|
|
72
|
+
testId: "embed-card-fallback-icon"
|
|
73
|
+
});
|
|
74
|
+
}, [context]);
|
|
75
|
+
var items = useMemo(function () {
|
|
76
|
+
if (!canAuthorize) {
|
|
77
|
+
return [{
|
|
78
|
+
title: intl.formatMessage(messages.unauthorised_account_name_no_provider),
|
|
79
|
+
description: intl.formatMessage(messages.unauthorised_account_description_no_provider),
|
|
80
|
+
image: /*#__PURE__*/React.createElement(NoAuthAvailableImage, null)
|
|
81
|
+
}];
|
|
82
|
+
}
|
|
83
|
+
var parentProduct = product ? PARENT_PRODUCT[product] : undefined;
|
|
84
|
+
var parentProductIcon = /*#__PURE__*/React.createElement(ProductIcon, {
|
|
85
|
+
product: parentProduct
|
|
86
|
+
});
|
|
87
|
+
var parentProductAlt = parentProduct ? PRODUCT_COMPANION[parentProduct] : parentProduct;
|
|
88
|
+
var parentProductIconAlt = /*#__PURE__*/React.createElement(ProductIcon, {
|
|
89
|
+
product: parentProductAlt
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// We only have special text for Google Drive and i18n select takes only one word (no space).
|
|
93
|
+
var i18nSelectContext = (context === null || context === void 0 ? void 0 : context.text) === 'Google Drive' ? 'Google' : context === null || context === void 0 ? void 0 : context.text;
|
|
94
|
+
var slides = [{
|
|
95
|
+
title: intl.formatMessage(messages.connect_link_account_embed_carousel_sl_title),
|
|
96
|
+
description: intl.formatMessage(messages.connect_link_account_embed_carousel_sl_description, {
|
|
97
|
+
context: i18nSelectContext,
|
|
98
|
+
product: parentProduct
|
|
99
|
+
}),
|
|
100
|
+
image: /*#__PURE__*/React.createElement(SmartLinkBenefitImage, {
|
|
101
|
+
productIcon: parentProductIcon
|
|
102
|
+
})
|
|
103
|
+
}];
|
|
104
|
+
|
|
105
|
+
// If the link has an unauthorized status and provides an onAuthorize callback,
|
|
106
|
+
// it is likely a 3P (third-party) link and is supported by Rovo. In that case,
|
|
107
|
+
// we show additional Rovo-specific teaser slides to encourage the user to connect their account.
|
|
108
|
+
if (rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoEnabled) {
|
|
109
|
+
slides.push({
|
|
110
|
+
title: intl.formatMessage(messages.connect_link_account_embed_carousel_rovo_title),
|
|
111
|
+
description: intl.formatMessage(messages.connect_link_account_embed_carousel_rovo_description, {
|
|
112
|
+
context: providerName,
|
|
113
|
+
product: parentProduct
|
|
114
|
+
}),
|
|
115
|
+
image: /*#__PURE__*/React.createElement(Suspense, {
|
|
116
|
+
fallback: null
|
|
117
|
+
}, /*#__PURE__*/React.createElement(LazyRovoSearchBenefitImage, {
|
|
118
|
+
productIcon: parentProductIcon,
|
|
119
|
+
productIconAlt: parentProductIconAlt,
|
|
120
|
+
providerIcon: providerIcon
|
|
121
|
+
}))
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoEnabled && rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoLLMEnabled) {
|
|
125
|
+
slides.push({
|
|
126
|
+
title: intl.formatMessage(messages.connect_link_account_embed_carousel_rovochat_title),
|
|
127
|
+
description: intl.formatMessage(messages.connect_link_account_embed_carousel_rovochat_description, {
|
|
128
|
+
context: providerName
|
|
129
|
+
}),
|
|
130
|
+
image: /*#__PURE__*/React.createElement(Suspense, {
|
|
131
|
+
fallback: null
|
|
132
|
+
}, /*#__PURE__*/React.createElement(LazyRovoChatBenefitImage, {
|
|
133
|
+
productIcon: parentProductIcon,
|
|
134
|
+
productIconAlt: parentProductIconAlt,
|
|
135
|
+
providerIcon: providerIcon
|
|
136
|
+
}))
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
return slides;
|
|
140
|
+
}, [canAuthorize, context, intl, product, providerName, providerIcon, rovoOptions]);
|
|
141
|
+
var handleOnAuthorizeClick = useCallback(function () {
|
|
142
|
+
if (onAuthorize) {
|
|
143
|
+
fireEvent('track.applicationAccount.authStarted', {});
|
|
144
|
+
onAuthorize();
|
|
145
|
+
}
|
|
146
|
+
}, [onAuthorize, fireEvent]);
|
|
147
|
+
var buttonLabel = context !== null && context !== void 0 && context.text ? intl.formatMessage(messages.connect_3p_account, {
|
|
148
|
+
context: context.text
|
|
149
|
+
}) : intl.formatMessage(messages.connect_link_account_card);
|
|
150
|
+
var icon = useMemo(function () {
|
|
151
|
+
if ( /*#__PURE__*/React.isValidElement(context === null || context === void 0 ? void 0 : context.icon)) {
|
|
152
|
+
return context.icon;
|
|
153
|
+
}
|
|
154
|
+
return /*#__PURE__*/React.createElement(ImageIcon, {
|
|
155
|
+
default: /*#__PURE__*/React.createElement(LinkGlyph, {
|
|
156
|
+
label: "icon",
|
|
157
|
+
color: "currentColor"
|
|
158
|
+
}),
|
|
159
|
+
src: typeof (context === null || context === void 0 ? void 0 : context.icon) === 'string' ? context.icon : undefined
|
|
160
|
+
});
|
|
161
|
+
}, [context === null || context === void 0 ? void 0 : context.icon]);
|
|
162
|
+
return /*#__PURE__*/React.createElement(ExpandedFrame, {
|
|
163
|
+
allowScrollBar: true,
|
|
164
|
+
frameStyle: frameStyle !== null && frameStyle !== void 0 ? frameStyle : 'show',
|
|
165
|
+
href: url,
|
|
166
|
+
icon: icon,
|
|
167
|
+
isSelected: isSelected,
|
|
168
|
+
inheritDimensions: inheritDimensions,
|
|
169
|
+
onClick: onClick,
|
|
170
|
+
setOverflow: true,
|
|
171
|
+
testId: testId,
|
|
172
|
+
text: context === null || context === void 0 ? void 0 : context.text
|
|
173
|
+
}, /*#__PURE__*/React.createElement(Carousel, {
|
|
174
|
+
icon: context === null || context === void 0 ? void 0 : context.icon,
|
|
175
|
+
iconLabel: context === null || context === void 0 ? void 0 : context.text,
|
|
176
|
+
items: items,
|
|
177
|
+
onPrimaryButtonClick: canAuthorize ? handleOnAuthorizeClick : undefined,
|
|
178
|
+
primaryButtonLabel: buttonLabel,
|
|
179
|
+
testId: "".concat(testId, "-carousel")
|
|
180
|
+
}));
|
|
181
|
+
};
|
|
182
|
+
export default UnauthorizedCarouselView;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
var iconSlotDivStyles = null;
|
|
6
|
+
var IconSlot = function IconSlot(_ref) {
|
|
7
|
+
var icon = _ref.icon,
|
|
8
|
+
x = _ref.x,
|
|
9
|
+
y = _ref.y,
|
|
10
|
+
w = _ref.w,
|
|
11
|
+
h = _ref.h;
|
|
12
|
+
if (!icon) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
return /*#__PURE__*/React.createElement("foreignObject", {
|
|
16
|
+
x: x,
|
|
17
|
+
y: y,
|
|
18
|
+
width: w,
|
|
19
|
+
height: h
|
|
20
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
21
|
+
className: ax(["_1reo15vq _18m915vq _1bsb1osq _4t3i1osq _1e0c1txw _4cvr1h6o _1bah1h6o"])
|
|
22
|
+
}, icon));
|
|
23
|
+
};
|
|
24
|
+
export default IconSlot;
|
package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* NoAuthAvailableImage.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
|
+
import "./NoAuthAvailableImage.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
6
|
+
import { UnauthorizedSVG } from '../unauthorized-svg';
|
|
7
|
+
var styles = {
|
|
8
|
+
container: "_1bsb1osq _1e0c1txw _4cvr1h6o _1bah1h6o _ca0q1ejb _n3td1ejb"
|
|
9
|
+
};
|
|
10
|
+
var NoAuthAvailableImage = function NoAuthAvailableImage() {
|
|
11
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
12
|
+
xcss: styles.container
|
|
13
|
+
}, /*#__PURE__*/React.createElement(UnauthorizedSVG, null));
|
|
14
|
+
};
|
|
15
|
+
export default NoAuthAvailableImage;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AtlassianIcon } from '@atlaskit/logo/atlassian-icon';
|
|
3
|
+
import { BitbucketIcon } from '@atlaskit/logo/bitbucket-icon';
|
|
4
|
+
import { ConfluenceIcon } from '@atlaskit/logo/confluence-icon';
|
|
5
|
+
import { JiraIcon } from '@atlaskit/logo/jira-icon';
|
|
6
|
+
import { ProjectsIcon } from '@atlaskit/logo/projects/icon';
|
|
7
|
+
import { TrelloIcon } from '@atlaskit/logo/trello-icon';
|
|
8
|
+
var ProductIcon = function ProductIcon(_ref) {
|
|
9
|
+
var product = _ref.product,
|
|
10
|
+
_ref$size = _ref.size,
|
|
11
|
+
size = _ref$size === void 0 ? 'xsmall' : _ref$size;
|
|
12
|
+
switch (product) {
|
|
13
|
+
case 'ATLAS':
|
|
14
|
+
return /*#__PURE__*/React.createElement(ProjectsIcon, {
|
|
15
|
+
size: size
|
|
16
|
+
});
|
|
17
|
+
case 'BITBUCKET':
|
|
18
|
+
return /*#__PURE__*/React.createElement(BitbucketIcon, {
|
|
19
|
+
size: size
|
|
20
|
+
});
|
|
21
|
+
case 'CONFLUENCE':
|
|
22
|
+
return /*#__PURE__*/React.createElement(ConfluenceIcon, {
|
|
23
|
+
size: size
|
|
24
|
+
});
|
|
25
|
+
case 'JIRA':
|
|
26
|
+
return /*#__PURE__*/React.createElement(JiraIcon, {
|
|
27
|
+
size: size
|
|
28
|
+
});
|
|
29
|
+
case 'TRELLO':
|
|
30
|
+
return /*#__PURE__*/React.createElement(TrelloIcon, {
|
|
31
|
+
size: size
|
|
32
|
+
});
|
|
33
|
+
default:
|
|
34
|
+
return /*#__PURE__*/React.createElement(AtlassianIcon, {
|
|
35
|
+
appearance: "brand",
|
|
36
|
+
size: size
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
export default ProductIcon;
|