@zohodesk/dot 1.0.0-temp-187.10 → 1.0.0-temp-208.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/.cli/propValidation_report.html +1 -1
- package/README.md +9 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +29 -0
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +7 -0
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +7 -0
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +7 -0
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +7 -0
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +7 -0
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +29 -0
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +7 -0
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +7 -0
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +7 -0
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +7 -0
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +7 -0
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +29 -0
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +7 -0
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +7 -0
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +7 -0
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +7 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +7 -0
- package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +3 -3
- package/es/DotProvider/libraryChunks/appearance/component/Dark_Component.js +2 -0
- package/es/DotProvider/libraryChunks/appearance/component/Light_Component.js +2 -0
- package/es/DotProvider/libraryChunks/appearance/component/PureDark_Component.js +2 -0
- package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +3 -3
- package/es/IconButton/IconButton.js +2 -1
- package/es/IconButton/IconButton.module.css +30 -3
- package/es/IconButton/__tests__/IconButton.spec.js +9 -0
- package/es/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +87 -22
- package/es/IconButton/props/defaultProps.js +1 -0
- package/es/IconButton/props/propTypes.js +1 -0
- package/es/Onboarding/CarouselDots/CarouselDot/CarouselDot.js +34 -0
- package/es/Onboarding/CarouselDots/CarouselDot/__tests__/CarouselDot.spec.js +43 -0
- package/es/Onboarding/CarouselDots/CarouselDot/__tests__/__snapshots__/CarouselDot.spec.js.snap +51 -0
- package/es/Onboarding/CarouselDots/CarouselDot/css/CarouselDot.module.css +83 -0
- package/es/Onboarding/CarouselDots/CarouselDot/props/defaultProps.js +6 -0
- package/es/Onboarding/CarouselDots/CarouselDot/props/propTypes.js +9 -0
- package/es/Onboarding/CarouselDots/CarouselDots.js +43 -0
- package/es/Onboarding/CarouselDots/__tests__/CarouselDots.spec.js +64 -0
- package/es/Onboarding/CarouselDots/__tests__/__snapshots__/CarouselDots.spec.js.snap +94 -0
- package/es/Onboarding/CarouselDots/css/CarouselDots.module.css +6 -0
- package/es/Onboarding/CarouselDots/props/defaultProps.js +7 -0
- package/es/Onboarding/CarouselDots/props/propTypes.js +13 -0
- package/es/Onboarding/Onboarding.js +303 -0
- package/es/Onboarding/__tests__/Onboarding.spec.js +428 -0
- package/es/Onboarding/__tests__/__snapshots__/Onboarding.spec.js.snap +3573 -0
- package/es/Onboarding/css/Onboarding.module.css +460 -0
- package/es/Onboarding/hooks/useOnboarding.js +34 -0
- package/es/Onboarding/hooks/useOnboardingSlider.js +55 -0
- package/es/Onboarding/props/defaultProps.js +13 -0
- package/es/Onboarding/props/propTypes.js +55 -0
- package/es/VideoLookup/VideoLookup.js +81 -0
- package/es/VideoLookup/__tests__/VideoLookup.spec.js +86 -0
- package/es/VideoLookup/__tests__/__snapshots__/VideoLookup.spec.js.snap +434 -0
- package/es/VideoLookup/css/VideoLookup.module.css +67 -0
- package/es/VideoLookup/props/defaultProps.js +8 -0
- package/es/VideoLookup/props/propTypes.js +12 -0
- package/es/alert/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +1 -1
- package/es/common/dot_boxShadow.module.css +6 -0
- package/es/form/fields/Fields.module.css +0 -4
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -4
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +116 -116
- package/es/form/fields/TagsMultiSelect/props/propTypes.js +1 -2
- package/es/form/fields/TextEditorField/__tests__/__snapshots__/TextEditorField.spec.js.snap +1 -1
- package/es/form/fields/TextEditorWrapper/__tests__/__snapshots__/TextEditorWrapper.spec.js.snap +1 -1
- package/es/form/fields/TextareaField/__tests__/__snapshots__/TextareaField.spec.js.snap +1 -1
- package/es/index.js +1 -0
- package/es/list/DepartmentDropDown/DepartmentDropDown.js +2 -7
- package/es/list/DepartmentDropDown/props/defaultProps.js +1 -2
- package/es/list/DepartmentDropDown/props/propTypes.js +0 -3
- package/es/list/status/StatusListItem/StatusListItem.module.css +4 -2
- package/es/lookup/header/Close/__tests__/__snapshots__/Close.spec.js.snap +1 -1
- package/es/lookup/header/TicketHeader/__tests__/__snapshots__/TicketHeader.spec.js.snap +1 -1
- package/es/utils/General.js +2 -1
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -4
- package/es/v1/form/fields/TagsMultiSelect/props/propTypes.js +1 -2
- package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +2 -7
- package/es/v1/list/DepartmentDropDown/props/defaultProps.js +1 -2
- package/es/v1/list/DepartmentDropDown/props/propTypes.js +0 -3
- package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +3 -3
- package/lib/DotProvider/libraryChunks/appearance/component/Dark_Component.js +5 -0
- package/lib/DotProvider/libraryChunks/appearance/component/Light_Component.js +5 -0
- package/lib/DotProvider/libraryChunks/appearance/component/PureDark_Component.js +5 -0
- package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +3 -3
- package/lib/IconButton/IconButton.js +2 -1
- package/lib/IconButton/IconButton.module.css +30 -3
- package/lib/IconButton/__tests__/IconButton.spec.js +35 -26
- package/lib/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +87 -22
- package/lib/IconButton/props/defaultProps.js +1 -0
- package/lib/IconButton/props/propTypes.js +1 -0
- package/lib/Onboarding/CarouselDots/CarouselDot/CarouselDot.js +44 -0
- package/lib/Onboarding/CarouselDots/CarouselDot/__tests__/CarouselDot.spec.js +50 -0
- package/lib/Onboarding/CarouselDots/CarouselDot/__tests__/__snapshots__/CarouselDot.spec.js.snap +51 -0
- package/lib/Onboarding/CarouselDots/CarouselDot/css/CarouselDot.module.css +83 -0
- package/lib/Onboarding/CarouselDots/CarouselDot/props/defaultProps.js +13 -0
- package/lib/Onboarding/CarouselDots/CarouselDot/props/propTypes.js +20 -0
- package/lib/Onboarding/CarouselDots/CarouselDots.js +66 -0
- package/lib/Onboarding/CarouselDots/__tests__/CarouselDots.spec.js +71 -0
- package/lib/Onboarding/CarouselDots/__tests__/__snapshots__/CarouselDots.spec.js.snap +94 -0
- package/lib/Onboarding/CarouselDots/css/CarouselDots.module.css +6 -0
- package/lib/Onboarding/CarouselDots/props/defaultProps.js +14 -0
- package/lib/Onboarding/CarouselDots/props/propTypes.js +24 -0
- package/lib/Onboarding/Onboarding.js +316 -0
- package/lib/Onboarding/__tests__/Onboarding.spec.js +435 -0
- package/lib/Onboarding/__tests__/__snapshots__/Onboarding.spec.js.snap +3573 -0
- package/lib/Onboarding/css/Onboarding.module.css +460 -0
- package/lib/Onboarding/hooks/useOnboarding.js +59 -0
- package/lib/Onboarding/hooks/useOnboardingSlider.js +85 -0
- package/lib/Onboarding/props/defaultProps.js +20 -0
- package/lib/Onboarding/props/propTypes.js +72 -0
- package/lib/VideoLookup/VideoLookup.js +104 -0
- package/lib/VideoLookup/__tests__/VideoLookup.spec.js +93 -0
- package/lib/VideoLookup/__tests__/__snapshots__/VideoLookup.spec.js.snap +434 -0
- package/lib/VideoLookup/css/VideoLookup.module.css +67 -0
- package/lib/VideoLookup/props/defaultProps.js +15 -0
- package/lib/VideoLookup/props/propTypes.js +23 -0
- package/lib/alert/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +1 -1
- package/lib/common/dot_boxShadow.module.css +6 -0
- package/lib/form/fields/Fields.module.css +0 -4
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +3 -5
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +116 -116
- package/lib/form/fields/TagsMultiSelect/props/propTypes.js +1 -2
- package/lib/form/fields/TextEditorField/__tests__/__snapshots__/TextEditorField.spec.js.snap +1 -1
- package/lib/form/fields/TextEditorWrapper/__tests__/__snapshots__/TextEditorWrapper.spec.js.snap +1 -1
- package/lib/form/fields/TextareaField/__tests__/__snapshots__/TextareaField.spec.js.snap +1 -1
- package/lib/index.js +9 -0
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +3 -8
- package/lib/list/DepartmentDropDown/props/defaultProps.js +1 -2
- package/lib/list/DepartmentDropDown/props/propTypes.js +0 -2
- package/lib/list/status/StatusListItem/StatusListItem.module.css +4 -2
- package/lib/lookup/header/Close/__tests__/__snapshots__/Close.spec.js.snap +1 -1
- package/lib/lookup/header/TicketHeader/__tests__/__snapshots__/TicketHeader.spec.js.snap +1 -1
- package/lib/utils/General.js +5 -1
- package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +3 -5
- package/lib/v1/form/fields/TagsMultiSelect/props/propTypes.js +1 -2
- package/lib/v1/list/DepartmentDropDown/DepartmentDropDown.js +3 -8
- package/lib/v1/list/DepartmentDropDown/props/defaultProps.js +1 -2
- package/lib/v1/list/DepartmentDropDown/props/propTypes.js +0 -2
- package/package.json +10 -8
- package/result.json +1 -1
- package/unittest/index.html +4 -12
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`CarouselDots rendering of slider data 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="flex row alignItems_center justifyContent_center btnCnt"
|
|
7
|
+
data-id="carouselDots"
|
|
8
|
+
data-test-id="carouselDots"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
class="bullet bulletActive"
|
|
12
|
+
data-id="carouselDots_0"
|
|
13
|
+
data-test-id="carouselDots_0"
|
|
14
|
+
/>
|
|
15
|
+
<div
|
|
16
|
+
class="bullet bulletNormal"
|
|
17
|
+
data-id="carouselDots_1"
|
|
18
|
+
data-test-id="carouselDots_1"
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
</DocumentFragment>
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
exports[`CarouselDots rendering prop of currentSliderIndex 1`] = `
|
|
25
|
+
<DocumentFragment>
|
|
26
|
+
<div
|
|
27
|
+
class="flex row alignItems_center justifyContent_center btnCnt"
|
|
28
|
+
data-id="carouselDots"
|
|
29
|
+
data-test-id="carouselDots"
|
|
30
|
+
>
|
|
31
|
+
<div
|
|
32
|
+
class="bullet bulletNormal"
|
|
33
|
+
data-id="carouselDots_0"
|
|
34
|
+
data-test-id="carouselDots_0"
|
|
35
|
+
/>
|
|
36
|
+
<div
|
|
37
|
+
class="bullet bulletActive"
|
|
38
|
+
data-id="carouselDots_1"
|
|
39
|
+
data-test-id="carouselDots_1"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</DocumentFragment>
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
exports[`CarouselDots rendering prop of isAnimationPaused 1`] = `
|
|
46
|
+
<DocumentFragment>
|
|
47
|
+
<div
|
|
48
|
+
class="flex row alignItems_center justifyContent_center btnCnt"
|
|
49
|
+
data-id="carouselDots"
|
|
50
|
+
data-test-id="carouselDots"
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
class="bullet animationPaused bulletActive"
|
|
54
|
+
data-id="carouselDots_0"
|
|
55
|
+
data-test-id="carouselDots_0"
|
|
56
|
+
/>
|
|
57
|
+
<div
|
|
58
|
+
class="bullet animationPaused bulletNormal"
|
|
59
|
+
data-id="carouselDots_1"
|
|
60
|
+
data-test-id="carouselDots_1"
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</DocumentFragment>
|
|
64
|
+
`;
|
|
65
|
+
|
|
66
|
+
exports[`CarouselDots rendering the defult props 1`] = `
|
|
67
|
+
<DocumentFragment>
|
|
68
|
+
<div
|
|
69
|
+
class="flex row alignItems_center justifyContent_center btnCnt"
|
|
70
|
+
data-id="carouselDots"
|
|
71
|
+
data-test-id="carouselDots"
|
|
72
|
+
/>
|
|
73
|
+
</DocumentFragment>
|
|
74
|
+
`;
|
|
75
|
+
|
|
76
|
+
exports[`CarouselDots rendering with customId 1`] = `
|
|
77
|
+
<DocumentFragment>
|
|
78
|
+
<div
|
|
79
|
+
class="flex row alignItems_center justifyContent_center btnCnt"
|
|
80
|
+
data-id="radar"
|
|
81
|
+
data-test-id="carouselDots"
|
|
82
|
+
/>
|
|
83
|
+
</DocumentFragment>
|
|
84
|
+
`;
|
|
85
|
+
|
|
86
|
+
exports[`CarouselDots rendering with testId 1`] = `
|
|
87
|
+
<DocumentFragment>
|
|
88
|
+
<div
|
|
89
|
+
class="flex row alignItems_center justifyContent_center btnCnt"
|
|
90
|
+
data-id="carouselDots"
|
|
91
|
+
data-test-id="radar_test"
|
|
92
|
+
/>
|
|
93
|
+
</DocumentFragment>
|
|
94
|
+
`;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const propTypes = {
|
|
3
|
+
sliderDetails: PropTypes.arrayOf(PropTypes.shape({
|
|
4
|
+
tabName: PropTypes.string.isRequired
|
|
5
|
+
})).isRequired,
|
|
6
|
+
currentSliderIndex: PropTypes.string,
|
|
7
|
+
isAnimationPaused: PropTypes.bool,
|
|
8
|
+
onClick: PropTypes.func,
|
|
9
|
+
onMouseEnter: PropTypes.func,
|
|
10
|
+
onMouseLeave: PropTypes.func,
|
|
11
|
+
testId: PropTypes.string,
|
|
12
|
+
customId: PropTypes.string
|
|
13
|
+
};
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**propTypes**/
|
|
3
|
+
|
|
4
|
+
import { propTypes } from "./props/propTypes";
|
|
5
|
+
import { defaultProps } from "./props/defaultProps";
|
|
6
|
+
/**components**/
|
|
7
|
+
|
|
8
|
+
import Icon from '@zohodesk/icons/lib/Icon';
|
|
9
|
+
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
10
|
+
import Button from '@zohodesk/components/lib/Button/Button';
|
|
11
|
+
import Modal from '@zohodesk/components/lib/Modal/Modal';
|
|
12
|
+
import Ribbon from '@zohodesk/components/es/Ribbon/Ribbon';
|
|
13
|
+
import Typography from '@zohodesk/components/es/Typography/Typography';
|
|
14
|
+
import btnStyle from '@zohodesk/components/es/semantic/Button/semanticButton.module.css';
|
|
15
|
+
/** local **/
|
|
16
|
+
|
|
17
|
+
import VideoLookup from "../VideoLookup/VideoLookup";
|
|
18
|
+
import Link from "../Link/Link";
|
|
19
|
+
import CarouselDots from "./CarouselDots/CarouselDots";
|
|
20
|
+
import Image from "../Image/Image";
|
|
21
|
+
/** hooks **/
|
|
22
|
+
|
|
23
|
+
import useOnboardingSlider from "./hooks/useOnboardingSlider";
|
|
24
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
25
|
+
import useOnboarding from "./hooks/useOnboarding";
|
|
26
|
+
/** Constant **/
|
|
27
|
+
|
|
28
|
+
import { DUMMY_OBJECT } from "../utils/General";
|
|
29
|
+
/** style **/
|
|
30
|
+
|
|
31
|
+
import defaultStyle from "./css/Onboarding.module.css";
|
|
32
|
+
|
|
33
|
+
const Onboarding = _ref => {
|
|
34
|
+
let {
|
|
35
|
+
hasCloseIcon,
|
|
36
|
+
onClose,
|
|
37
|
+
ribbonText,
|
|
38
|
+
hasRibbon,
|
|
39
|
+
videoLookupCloseText,
|
|
40
|
+
customStyle,
|
|
41
|
+
sliderData,
|
|
42
|
+
isAutoPlayAnimation,
|
|
43
|
+
hasBouncAnimationOnMount,
|
|
44
|
+
customId,
|
|
45
|
+
testId,
|
|
46
|
+
hasExpandedButton,
|
|
47
|
+
onPrimaryButtonClick,
|
|
48
|
+
onSecondaryButtonClick,
|
|
49
|
+
customProps
|
|
50
|
+
} = _ref;
|
|
51
|
+
const style = useMergeStyle(defaultStyle, customStyle);
|
|
52
|
+
const {
|
|
53
|
+
state,
|
|
54
|
+
openVideoLookup,
|
|
55
|
+
closeVideoLookup
|
|
56
|
+
} = useOnboarding();
|
|
57
|
+
const {
|
|
58
|
+
videoLookupLink,
|
|
59
|
+
isVideoLookupOpen,
|
|
60
|
+
isEmbeddedLink,
|
|
61
|
+
videoLookupFormat
|
|
62
|
+
} = state;
|
|
63
|
+
const {
|
|
64
|
+
primaryButtonProps,
|
|
65
|
+
secondaryButtonProps,
|
|
66
|
+
secondaryButtonLinkProps,
|
|
67
|
+
ribbonProps,
|
|
68
|
+
footerProps,
|
|
69
|
+
headingProps,
|
|
70
|
+
descriptionProps,
|
|
71
|
+
videoLookupProps
|
|
72
|
+
} = customProps;
|
|
73
|
+
const {
|
|
74
|
+
sliderIndex,
|
|
75
|
+
isAnimationPaused,
|
|
76
|
+
translateMovementVal,
|
|
77
|
+
handleMouseEnter,
|
|
78
|
+
handleMouseLeave,
|
|
79
|
+
handleSliderIndexChange,
|
|
80
|
+
handleSliderNext
|
|
81
|
+
} = useOnboardingSlider({
|
|
82
|
+
isAutoPlayAnimation: isAutoPlayAnimation,
|
|
83
|
+
sliderData: sliderData
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const renderMediaElement = (imageSource, videoSourceLink, videoSourceFormat) => imageSource ? /*#__PURE__*/React.createElement(Image, {
|
|
87
|
+
src: imageSource,
|
|
88
|
+
className: `${style.mediaElement} ${style.image}`
|
|
89
|
+
}) : videoSourceLink ? /*#__PURE__*/React.createElement("video", {
|
|
90
|
+
className: style.mediaElement,
|
|
91
|
+
autoPlay: true,
|
|
92
|
+
loop: true,
|
|
93
|
+
muted: true
|
|
94
|
+
}, /*#__PURE__*/React.createElement("source", {
|
|
95
|
+
src: videoSourceLink,
|
|
96
|
+
type: `video/${videoSourceFormat}`
|
|
97
|
+
})) : null;
|
|
98
|
+
|
|
99
|
+
const renderFooter = (sliderData, currentSliderIndex) => {
|
|
100
|
+
const currentSliderData = sliderData && sliderData[currentSliderIndex];
|
|
101
|
+
const {
|
|
102
|
+
hasPrimaryButton = true,
|
|
103
|
+
hasSecondaryButton = false,
|
|
104
|
+
hasSecondaryButtonLink = false,
|
|
105
|
+
primaryButtonText = 'Got it',
|
|
106
|
+
secondaryButtonText,
|
|
107
|
+
secondaryButtonLink,
|
|
108
|
+
tabName
|
|
109
|
+
} = currentSliderData || DUMMY_OBJECT;
|
|
110
|
+
const expandedClass = hasExpandedButton ? style.expandedButton : "";
|
|
111
|
+
const isFinalSlide = sliderData && sliderData.length - 1 === currentSliderIndex;
|
|
112
|
+
|
|
113
|
+
const handlePrimaryButtonClick = () => {
|
|
114
|
+
if (typeof onPrimaryButtonClick == 'function') {
|
|
115
|
+
onPrimaryButtonClick(tabName);
|
|
116
|
+
} else {
|
|
117
|
+
if (!isFinalSlide) {
|
|
118
|
+
handleSliderNext();
|
|
119
|
+
} else {
|
|
120
|
+
onClose && onClose();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const handleSecondaryButtonClick = () => {
|
|
126
|
+
if (typeof onSecondaryButtonClick == 'function') {
|
|
127
|
+
onSecondaryButtonClick(tabName);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
132
|
+
$ui_displayMode: "flex",
|
|
133
|
+
$ui_direction: hasExpandedButton ? "column" : "row",
|
|
134
|
+
$ui_wrapMode: hasExpandedButton ? "wrap" : undefined,
|
|
135
|
+
$ui_alignItems: "center",
|
|
136
|
+
$ui_className: style.footer,
|
|
137
|
+
...footerProps
|
|
138
|
+
}, sliderData.length > 1 && /*#__PURE__*/React.createElement(CarouselDots, {
|
|
139
|
+
sliderDetails: sliderData,
|
|
140
|
+
currentSliderIndex: currentSliderIndex,
|
|
141
|
+
isAnimationPaused: isAnimationPaused,
|
|
142
|
+
onClick: handleSliderIndexChange,
|
|
143
|
+
customId: `${customId}_carousel_dots`,
|
|
144
|
+
testId: `${testId}_carousel_dots`
|
|
145
|
+
}), /*#__PURE__*/React.createElement(Flex, {
|
|
146
|
+
$ui_displayMode: "flex",
|
|
147
|
+
$ui_justifyContent: "end",
|
|
148
|
+
$flag_flexible: true,
|
|
149
|
+
$ui_wrapMode: hasExpandedButton ? "wrap" : undefined,
|
|
150
|
+
$ui_className: style.btnWrapper
|
|
151
|
+
}, hasSecondaryButton && (hasSecondaryButtonLink ? /*#__PURE__*/React.createElement(Link, {
|
|
152
|
+
href: secondaryButtonLink,
|
|
153
|
+
title: secondaryButtonText,
|
|
154
|
+
dataId: `${customId}_secondary_button_link`,
|
|
155
|
+
target: "_blank",
|
|
156
|
+
className: `${style.secondaryButtton} ${style.secondaryButttonLink} ${style.footerButton} ${expandedClass}`,
|
|
157
|
+
...secondaryButtonLinkProps
|
|
158
|
+
}, secondaryButtonText) : /*#__PURE__*/React.createElement(Button, {
|
|
159
|
+
dataId: `${customId}_secondary_button`,
|
|
160
|
+
title: secondaryButtonText,
|
|
161
|
+
text: secondaryButtonText,
|
|
162
|
+
onClick: handleSecondaryButtonClick,
|
|
163
|
+
customClass: {
|
|
164
|
+
customButton: ` ${style.secondaryButtton} ${style.footerButton} ${expandedClass}`
|
|
165
|
+
},
|
|
166
|
+
...secondaryButtonProps
|
|
167
|
+
})), hasPrimaryButton && /*#__PURE__*/React.createElement(Button, {
|
|
168
|
+
dataId: `${customId}_primary_button`,
|
|
169
|
+
title: primaryButtonText,
|
|
170
|
+
text: primaryButtonText,
|
|
171
|
+
palette: "primaryFilled",
|
|
172
|
+
customClass: {
|
|
173
|
+
customButton: `${style.primaryButton} ${style.footerButton} ${expandedClass}`
|
|
174
|
+
},
|
|
175
|
+
onClick: handlePrimaryButtonClick,
|
|
176
|
+
...primaryButtonProps
|
|
177
|
+
})));
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
181
|
+
"data-id": `${customId}_container`,
|
|
182
|
+
"data-test-id": `${testId}_container`,
|
|
183
|
+
className: `${style.mainContainer} ${hasBouncAnimationOnMount ? style.mainContainerAnimation : ""}`
|
|
184
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
185
|
+
className: style.mainWrapper,
|
|
186
|
+
onMouseEnter: handleMouseEnter,
|
|
187
|
+
onMouseLeave: handleMouseLeave
|
|
188
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
189
|
+
className: style.gradientLayer
|
|
190
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
191
|
+
className: `${style.circleBlur} ${style.circleBlurOne}`
|
|
192
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
193
|
+
className: `${style.circleBlur} ${style.circleBlurTwo}`
|
|
194
|
+
})), Array.isArray(sliderData) && sliderData.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
195
|
+
className: style.carousel
|
|
196
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
197
|
+
$ui_displayMode: "flex",
|
|
198
|
+
$tagAttributes_container: {
|
|
199
|
+
style: {
|
|
200
|
+
'--local_translate_movement': `${translateMovementVal}%`
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
$ui_className: style.carouselInner
|
|
204
|
+
}, sliderData.map((item, index) => {
|
|
205
|
+
const {
|
|
206
|
+
imageSource,
|
|
207
|
+
videoSource,
|
|
208
|
+
heading,
|
|
209
|
+
description,
|
|
210
|
+
hasVideoPlayButton = false,
|
|
211
|
+
videoLookupSource,
|
|
212
|
+
tabName
|
|
213
|
+
} = item;
|
|
214
|
+
const videoLookupSourceLink = videoLookupSource && videoLookupSource.link ? videoLookupSource.link : null;
|
|
215
|
+
const videoLookupSourceFormat = videoLookupSource && videoLookupSource.format ? videoLookupSource.format : null;
|
|
216
|
+
const isEmbeddedvideoLookupSource = videoLookupSource && videoLookupSource.isEmbeddedLink ? videoLookupSource.isEmbeddedLink : null;
|
|
217
|
+
const videoSourceLink = videoSource && videoSource.link ? videoSource.link : null;
|
|
218
|
+
const videoSourceFormat = videoSource && videoSource.format ? videoSource.format : null;
|
|
219
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
220
|
+
$ui_displayMode: "flex",
|
|
221
|
+
$ui_direction: "column",
|
|
222
|
+
$flag_shrink: false,
|
|
223
|
+
$ui_className: style.carouselItem,
|
|
224
|
+
key: tabName
|
|
225
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
226
|
+
$ui_className: style.header,
|
|
227
|
+
$ui_displayMode: "flex",
|
|
228
|
+
$ui_justifyContent: "center",
|
|
229
|
+
$ui_alignItems: "center",
|
|
230
|
+
$flag_fullsize: true
|
|
231
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
232
|
+
className: `${style.innerHead} ${hasVideoPlayButton ? style.dvLayer : null}`
|
|
233
|
+
}, renderMediaElement(imageSource, videoSourceLink, videoSourceFormat), hasVideoPlayButton && /*#__PURE__*/React.createElement(Flex, {
|
|
234
|
+
$ui_displayMode: "flex",
|
|
235
|
+
$ui_justifyContent: "center",
|
|
236
|
+
$ui_alignItems: "center",
|
|
237
|
+
$ui_className: style.playIconWrapper
|
|
238
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
239
|
+
$ui_displayMode: "flex",
|
|
240
|
+
$ui_justifyContent: "center",
|
|
241
|
+
$ui_alignItems: "center",
|
|
242
|
+
$ui_tagName: "button",
|
|
243
|
+
customId: `${customId}_play_icon`,
|
|
244
|
+
testId: `${testId}_play_icon`,
|
|
245
|
+
$ui_className: `${style.playIcon} ${style.animate} ${btnStyle.buttonReset}`,
|
|
246
|
+
$event_onClick: () => openVideoLookup(videoLookupSourceLink, isEmbeddedvideoLookupSource, videoLookupSourceFormat)
|
|
247
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
248
|
+
name: "ZD-GN-arrowFill",
|
|
249
|
+
iconClass: style.playIconInner
|
|
250
|
+
}))))), /*#__PURE__*/React.createElement(Flex, {
|
|
251
|
+
$ui_scroll: "vertical",
|
|
252
|
+
$ui_className: style.content
|
|
253
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
254
|
+
$ui_size: "20",
|
|
255
|
+
$ui_lineClamp: "3",
|
|
256
|
+
$ui_weight: "bold",
|
|
257
|
+
$ui_className: style.heading,
|
|
258
|
+
$i18n_dataTitle: heading,
|
|
259
|
+
$ui_lineHeight: "1.4",
|
|
260
|
+
...headingProps
|
|
261
|
+
}, heading), /*#__PURE__*/React.createElement(Typography, {
|
|
262
|
+
$ui_size: "14",
|
|
263
|
+
$ui_lineHeight: "1.6",
|
|
264
|
+
$ui_lineClamp: "4",
|
|
265
|
+
$i18n_dataTitle: description,
|
|
266
|
+
$ui_className: style.description,
|
|
267
|
+
...descriptionProps
|
|
268
|
+
}, description)));
|
|
269
|
+
}))) : null, renderFooter(sliderData, sliderIndex), hasCloseIcon ? /*#__PURE__*/React.createElement(Flex, {
|
|
270
|
+
$flag_fullsize: true,
|
|
271
|
+
$ui_tagName: "button",
|
|
272
|
+
$ui_displayMode: "flex",
|
|
273
|
+
customId: `${customId}_close_icon`,
|
|
274
|
+
testId: `${testId}_close_icon`,
|
|
275
|
+
$ui_justifyContent: "center",
|
|
276
|
+
$ui_alignItems: "center",
|
|
277
|
+
$ui_className: `${style.closeIconContainer} ${btnStyle.buttonReset}`,
|
|
278
|
+
$event_onClick: onClose
|
|
279
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
280
|
+
name: "ZD-inappClose",
|
|
281
|
+
iconClass: style.closeIcon
|
|
282
|
+
})) : null, hasRibbon ? /*#__PURE__*/React.createElement(Ribbon, {
|
|
283
|
+
dataId: `${customId}_ribbon`,
|
|
284
|
+
palette: "primary",
|
|
285
|
+
size: "medium",
|
|
286
|
+
customClass: style.newRibbon,
|
|
287
|
+
type: "flag",
|
|
288
|
+
text: ribbonText,
|
|
289
|
+
...ribbonProps
|
|
290
|
+
}) : null, isVideoLookupOpen ? /*#__PURE__*/React.createElement(Modal, null, /*#__PURE__*/React.createElement(VideoLookup, {
|
|
291
|
+
videoFormat: videoLookupFormat,
|
|
292
|
+
onClose: closeVideoLookup,
|
|
293
|
+
isEmbeddedLink: isEmbeddedLink,
|
|
294
|
+
link: videoLookupLink,
|
|
295
|
+
isOpened: isVideoLookupOpen,
|
|
296
|
+
closeText: videoLookupCloseText,
|
|
297
|
+
...videoLookupProps
|
|
298
|
+
})) : null));
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export default Onboarding;
|
|
302
|
+
Onboarding.propTypes = propTypes;
|
|
303
|
+
Onboarding.defaultProps = defaultProps;
|