@zohodesk/dot 1.0.0-temp-187.11 → 1.0.0-temp-209

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +5 -0
  3. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +29 -0
  4. package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +7 -0
  5. package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +7 -0
  6. package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +7 -0
  7. package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +7 -0
  8. package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +7 -0
  9. package/assets/Appearance/light/mode/Dot_LightMode.module.css +29 -0
  10. package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +7 -0
  11. package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +7 -0
  12. package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +7 -0
  13. package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +7 -0
  14. package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +7 -0
  15. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +29 -0
  16. package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +7 -0
  17. package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +7 -0
  18. package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +7 -0
  19. package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +7 -0
  20. package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +7 -0
  21. package/es/DotProvider/libraryChunks/appearance/component/Dark_Component.js +2 -0
  22. package/es/DotProvider/libraryChunks/appearance/component/Light_Component.js +2 -0
  23. package/es/DotProvider/libraryChunks/appearance/component/PureDark_Component.js +2 -0
  24. package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +3 -3
  25. package/es/Onboarding/CarouselDots/CarouselDot/CarouselDot.js +34 -0
  26. package/es/Onboarding/CarouselDots/CarouselDot/__tests__/CarouselDot.spec.js +43 -0
  27. package/es/Onboarding/CarouselDots/CarouselDot/__tests__/__snapshots__/CarouselDot.spec.js.snap +51 -0
  28. package/es/Onboarding/CarouselDots/CarouselDot/css/CarouselDot.module.css +83 -0
  29. package/es/Onboarding/CarouselDots/CarouselDot/props/defaultProps.js +6 -0
  30. package/es/Onboarding/CarouselDots/CarouselDot/props/propTypes.js +9 -0
  31. package/es/Onboarding/CarouselDots/CarouselDots.js +43 -0
  32. package/es/Onboarding/CarouselDots/__tests__/CarouselDots.spec.js +64 -0
  33. package/es/Onboarding/CarouselDots/__tests__/__snapshots__/CarouselDots.spec.js.snap +94 -0
  34. package/es/Onboarding/CarouselDots/css/CarouselDots.module.css +6 -0
  35. package/es/Onboarding/CarouselDots/props/defaultProps.js +7 -0
  36. package/es/Onboarding/CarouselDots/props/propTypes.js +13 -0
  37. package/es/Onboarding/Onboarding.js +303 -0
  38. package/es/Onboarding/__tests__/Onboarding.spec.js +428 -0
  39. package/es/Onboarding/__tests__/__snapshots__/Onboarding.spec.js.snap +3573 -0
  40. package/es/Onboarding/css/Onboarding.module.css +460 -0
  41. package/es/Onboarding/hooks/useOnboarding.js +34 -0
  42. package/es/Onboarding/hooks/useOnboardingSlider.js +55 -0
  43. package/es/Onboarding/props/defaultProps.js +13 -0
  44. package/es/Onboarding/props/propTypes.js +55 -0
  45. package/es/VideoLookup/VideoLookup.js +81 -0
  46. package/es/VideoLookup/__tests__/VideoLookup.spec.js +86 -0
  47. package/es/VideoLookup/__tests__/__snapshots__/VideoLookup.spec.js.snap +434 -0
  48. package/es/VideoLookup/css/VideoLookup.module.css +67 -0
  49. package/es/VideoLookup/props/defaultProps.js +8 -0
  50. package/es/VideoLookup/props/propTypes.js +12 -0
  51. package/es/common/dot_boxShadow.module.css +6 -0
  52. package/es/form/fields/CheckBoxField/CheckBoxField.js +6 -9
  53. package/es/form/fields/CurrencyField/CurrencyField.js +5 -5
  54. package/es/form/fields/DateField/DateField.js +7 -8
  55. package/es/form/fields/Fields.module.css +0 -4
  56. package/es/form/fields/MultiSelectField/MultiSelectField.js +5 -6
  57. package/es/form/fields/SelectField/SelectField.js +5 -6
  58. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -4
  59. package/es/form/fields/TagsMultiSelect/props/propTypes.js +1 -2
  60. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +6 -8
  61. package/es/form/fields/TextBoxField/TextBoxField.js +7 -7
  62. package/es/form/fields/TextareaField/TextareaField.js +6 -6
  63. package/es/index.js +1 -0
  64. package/es/list/DepartmentDropDown/DepartmentDropDown.js +2 -7
  65. package/es/list/DepartmentDropDown/props/defaultProps.js +1 -2
  66. package/es/list/DepartmentDropDown/props/propTypes.js +0 -3
  67. package/es/list/status/StatusListItem/StatusListItem.module.css +4 -2
  68. package/es/utils/General.js +2 -1
  69. package/lib/DotProvider/libraryChunks/appearance/component/Dark_Component.js +5 -0
  70. package/lib/DotProvider/libraryChunks/appearance/component/Light_Component.js +5 -0
  71. package/lib/DotProvider/libraryChunks/appearance/component/PureDark_Component.js +5 -0
  72. package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +3 -3
  73. package/lib/Onboarding/CarouselDots/CarouselDot/CarouselDot.js +44 -0
  74. package/lib/Onboarding/CarouselDots/CarouselDot/__tests__/CarouselDot.spec.js +50 -0
  75. package/lib/Onboarding/CarouselDots/CarouselDot/__tests__/__snapshots__/CarouselDot.spec.js.snap +51 -0
  76. package/lib/Onboarding/CarouselDots/CarouselDot/css/CarouselDot.module.css +83 -0
  77. package/lib/Onboarding/CarouselDots/CarouselDot/props/defaultProps.js +13 -0
  78. package/lib/Onboarding/CarouselDots/CarouselDot/props/propTypes.js +20 -0
  79. package/lib/Onboarding/CarouselDots/CarouselDots.js +66 -0
  80. package/lib/Onboarding/CarouselDots/__tests__/CarouselDots.spec.js +71 -0
  81. package/lib/Onboarding/CarouselDots/__tests__/__snapshots__/CarouselDots.spec.js.snap +94 -0
  82. package/lib/Onboarding/CarouselDots/css/CarouselDots.module.css +6 -0
  83. package/lib/Onboarding/CarouselDots/props/defaultProps.js +14 -0
  84. package/lib/Onboarding/CarouselDots/props/propTypes.js +24 -0
  85. package/lib/Onboarding/Onboarding.js +316 -0
  86. package/lib/Onboarding/__tests__/Onboarding.spec.js +435 -0
  87. package/lib/Onboarding/__tests__/__snapshots__/Onboarding.spec.js.snap +3573 -0
  88. package/lib/Onboarding/css/Onboarding.module.css +460 -0
  89. package/lib/Onboarding/hooks/useOnboarding.js +59 -0
  90. package/lib/Onboarding/hooks/useOnboardingSlider.js +85 -0
  91. package/lib/Onboarding/props/defaultProps.js +20 -0
  92. package/lib/Onboarding/props/propTypes.js +72 -0
  93. package/lib/VideoLookup/VideoLookup.js +104 -0
  94. package/lib/VideoLookup/__tests__/VideoLookup.spec.js +93 -0
  95. package/lib/VideoLookup/__tests__/__snapshots__/VideoLookup.spec.js.snap +434 -0
  96. package/lib/VideoLookup/css/VideoLookup.module.css +67 -0
  97. package/lib/VideoLookup/props/defaultProps.js +15 -0
  98. package/lib/VideoLookup/props/propTypes.js +23 -0
  99. package/lib/common/dot_boxShadow.module.css +6 -0
  100. package/lib/form/fields/CheckBoxField/CheckBoxField.js +6 -10
  101. package/lib/form/fields/CurrencyField/CurrencyField.js +4 -5
  102. package/lib/form/fields/DateField/DateField.js +6 -9
  103. package/lib/form/fields/Fields.module.css +0 -4
  104. package/lib/form/fields/MultiSelectField/MultiSelectField.js +5 -7
  105. package/lib/form/fields/SelectField/SelectField.js +5 -7
  106. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +3 -5
  107. package/lib/form/fields/TagsMultiSelect/props/propTypes.js +1 -2
  108. package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +5 -8
  109. package/lib/form/fields/TextBoxField/TextBoxField.js +6 -8
  110. package/lib/form/fields/TextareaField/TextareaField.js +5 -6
  111. package/lib/index.js +9 -0
  112. package/lib/list/DepartmentDropDown/DepartmentDropDown.js +3 -8
  113. package/lib/list/DepartmentDropDown/props/defaultProps.js +1 -2
  114. package/lib/list/DepartmentDropDown/props/propTypes.js +0 -2
  115. package/lib/list/status/StatusListItem/StatusListItem.module.css +4 -2
  116. package/lib/utils/General.js +5 -1
  117. package/package.json +7 -5
  118. package/result.json +1 -1
  119. package/unittest/index.html +10 -2
@@ -0,0 +1,43 @@
1
+ import React, { memo } from 'react';
2
+ import { Flex } from '@zohodesk/layout';
3
+ import { propTypes } from "./props/propTypes";
4
+ import { defaultProps } from "./props/defaultProps";
5
+ import CarouselDot from "./CarouselDot/CarouselDot";
6
+ import style from "./css/CarouselDots.module.css";
7
+
8
+ const CarouselDots = _ref => {
9
+ let {
10
+ sliderDetails,
11
+ currentSliderIndex,
12
+ isAnimationPaused,
13
+ onClick,
14
+ onMouseEnter,
15
+ onMouseLeave,
16
+ testId,
17
+ customId
18
+ } = _ref;
19
+ return /*#__PURE__*/React.createElement(Flex, {
20
+ $ui_displayMode: "flex",
21
+ $ui_alignItems: "center",
22
+ $ui_className: style.btnCnt,
23
+ $ui_justifyContent: "center",
24
+ $tagAttributes_container: {
25
+ onMouseEnter: onMouseEnter,
26
+ onMouseLeave: onMouseLeave
27
+ },
28
+ customId: customId,
29
+ testId: testId
30
+ }, sliderDetails.map((data, index) => /*#__PURE__*/React.createElement(CarouselDot, {
31
+ key: data.tabName,
32
+ isActive: index === currentSliderIndex,
33
+ isAnimationPaused: isAnimationPaused,
34
+ onClick: onClick,
35
+ index: index,
36
+ customId: customId + '_' + index,
37
+ testId: testId + '_' + index
38
+ })));
39
+ };
40
+
41
+ CarouselDots.propTypes = propTypes;
42
+ CarouselDots.defaultProps = defaultProps;
43
+ export default /*#__PURE__*/memo(CarouselDots);
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import CarouselDots from "../CarouselDots";
4
+ describe('CarouselDots', () => {
5
+ const sliderData = [{
6
+ imageSource: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ3Mu0NdfXXqvCExZ9YG_j93CKuU4DIdcIlEQ&s",
7
+ tabName: 'commentPin',
8
+ heading: "Onboarding with carousel Slide 1",
9
+ description: "Discover innovative tools and solutions to streamline your processes and boost productivity on Slide 1."
10
+ }, {
11
+ imageSource: "https://crm-masters.com/wp-content/uploads/2023/05/cover-images-1200-%C3%97-630px-39-1-1200x675.jpg",
12
+ tabName: 'visibility',
13
+ heading: "Slide 2",
14
+ description: "Immerse yourself in a visually stunning experience on Slide 2, where innovative ideas and compelling visuals spark curiosity and inspiration."
15
+ }];
16
+ test('rendering the defult props', () => {
17
+ const {
18
+ asFragment
19
+ } = render( /*#__PURE__*/React.createElement(CarouselDots, null));
20
+ expect(asFragment()).toMatchSnapshot();
21
+ });
22
+ test('rendering of slider data', () => {
23
+ const {
24
+ asFragment
25
+ } = render( /*#__PURE__*/React.createElement(CarouselDots, {
26
+ sliderDetails: sliderData
27
+ }));
28
+ expect(asFragment()).toMatchSnapshot();
29
+ });
30
+ test('rendering prop of currentSliderIndex', () => {
31
+ const {
32
+ asFragment
33
+ } = render( /*#__PURE__*/React.createElement(CarouselDots, {
34
+ sliderDetails: sliderData,
35
+ currentSliderIndex: 1
36
+ }));
37
+ expect(asFragment()).toMatchSnapshot();
38
+ });
39
+ test('rendering prop of isAnimationPaused', () => {
40
+ const {
41
+ asFragment
42
+ } = render( /*#__PURE__*/React.createElement(CarouselDots, {
43
+ sliderDetails: sliderData,
44
+ isAnimationPaused: true
45
+ }));
46
+ expect(asFragment()).toMatchSnapshot();
47
+ });
48
+ test('rendering with customId', () => {
49
+ const {
50
+ asFragment
51
+ } = render( /*#__PURE__*/React.createElement(CarouselDots, {
52
+ customId: "radar"
53
+ }));
54
+ expect(asFragment()).toMatchSnapshot();
55
+ });
56
+ test('rendering with testId', () => {
57
+ const {
58
+ asFragment
59
+ } = render( /*#__PURE__*/React.createElement(CarouselDots, {
60
+ testId: "radar_test"
61
+ }));
62
+ expect(asFragment()).toMatchSnapshot();
63
+ });
64
+ });
@@ -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,6 @@
1
+
2
+ /* carousel style */
3
+ .btnCnt {
4
+ gap: var(--zd_size7) ;
5
+ height: var(--zd_size23) ;
6
+ }
@@ -0,0 +1,7 @@
1
+ export const defaultProps = {
2
+ sliderDetails: [],
3
+ currentSliderIndex: 0,
4
+ isAnimationPaused: false,
5
+ customId: "carouselDots",
6
+ testId: 'carouselDots'
7
+ };
@@ -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;