@zohodesk/dot 1.0.0-temp-230.3 → 1.0.0-temp-232

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 (63) hide show
  1. package/README.md +2 -11
  2. package/es/ActionButton/__tests__/ActionButton.spec.js +4 -5
  3. package/es/AttachmentViewer/AttachmentImage.js +1 -3
  4. package/es/AttachmentViewer/AttachmentViewer.js +254 -359
  5. package/es/AttachmentViewer/AttachmentViewer.module.css +15 -8
  6. package/es/AttachmentViewer/props/defaultProps.js +2 -4
  7. package/es/AttachmentViewer/props/propTypes.js +2 -8
  8. package/es/AttachmentViewer/utils.js +6 -7
  9. package/es/AudioPlayer/utils/utils.js +2 -5
  10. package/es/DotProvider/hooks/useDotProvider.js +14 -15
  11. package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +21 -16
  12. package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +3 -4
  13. package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +4 -5
  14. package/es/DotProvider/utils/errorValidation.js +5 -6
  15. package/es/DotProvider/utils/getAssetsImportPromises.js +4 -5
  16. package/es/Drawer/Drawer.js +6 -8
  17. package/es/FreezeLayer/css/cssJSLogic.js +4 -5
  18. package/es/Hooks/Dragger/useDragger.js +5 -6
  19. package/es/Hooks/Dragger/utils/DraggerUtil.js +7 -8
  20. package/es/Hooks/useFreezeLayer.js +4 -5
  21. package/es/Link/Link.js +3 -4
  22. package/es/Link/props/propTypes.js +0 -1
  23. package/es/Onboarding/CarouselDots/CarouselDots.js +29 -32
  24. package/es/Onboarding/Onboarding.js +23 -24
  25. package/es/Onboarding/hooks/useOnboarding.js +4 -5
  26. package/es/Onboarding/hooks/useOnboardingSlider.js +5 -6
  27. package/es/deprecated/SelectDropdown/SelectDropdown.js +43 -47
  28. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +214 -225
  29. package/es/errorstate/Inconvenience/Inconvenience.js +32 -36
  30. package/es/errorstate/NoRequestFound/NoRequestFound.js +32 -36
  31. package/es/errorstate/PermissionPlay/PermissionPlay.js +31 -35
  32. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +32 -36
  33. package/es/errorstate/UnableToProcess/UnableToProcess.js +32 -36
  34. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +32 -36
  35. package/es/errorstate/WillBack/WillBack.js +30 -34
  36. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +81 -85
  37. package/es/list/status/StatusDropdown/StatusDropdown.js +109 -113
  38. package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +3 -4
  39. package/es/lookup/header/Search/Search.js +4 -5
  40. package/es/lookup/header/Search/__tests__/Search.spec.js +3 -4
  41. package/es/lookup/header/ViewDropDown/ViewDropDown.js +67 -75
  42. package/es/utils/General.js +2 -7
  43. package/es/utils/editorUtils.js +1 -5
  44. package/es/version2/lookup/AlertHeader/AlertHeader.js +5 -3
  45. package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +24 -0
  46. package/es/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +34 -0
  47. package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +4 -5
  48. package/es/version2/lookup/AlertHeader/props/propTypes.js +2 -1
  49. package/es/version2/notification/DesktopNotification/DesktopNotification.js +59 -63
  50. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +40 -44
  51. package/lib/AttachmentViewer/AttachmentImage.js +1 -3
  52. package/lib/AttachmentViewer/AttachmentViewer.js +85 -187
  53. package/lib/AttachmentViewer/AttachmentViewer.module.css +15 -8
  54. package/lib/AttachmentViewer/props/defaultProps.js +2 -6
  55. package/lib/AttachmentViewer/props/propTypes.js +2 -8
  56. package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +9 -3
  57. package/lib/Link/Link.js +3 -4
  58. package/lib/Link/props/propTypes.js +0 -1
  59. package/lib/version2/lookup/AlertHeader/AlertHeader.js +5 -2
  60. package/lib/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +26 -0
  61. package/lib/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +34 -0
  62. package/lib/version2/lookup/AlertHeader/props/propTypes.js +2 -1
  63. package/package.json +7 -7
@@ -1,8 +1,8 @@
1
1
  .header {
2
- height: var(--zd_size48) ;
2
+ height: var(--zd_size40) ;
3
3
  position: relative;
4
4
  z-index: 1;
5
- padding-block: 0 ;
5
+ padding-block:0 ;
6
6
  padding-inline: var(--zd_size15) ;
7
7
  composes: alignVertical from '~@zohodesk/components/es/common/common.module.css';
8
8
  background-color: var(--zdt_attachmentviewer_header_bg);
@@ -10,13 +10,20 @@
10
10
  }
11
11
 
12
12
  .title {
13
- padding-inline-end: var(--zd_size15) ;
14
13
  max-width: 50% ;
15
14
  composes: dotted from '~@zohodesk/components/es/common/common.module.css';
16
15
  }
17
16
 
17
+ [dir=ltr] .title {
18
+ padding-right: var(--zd_size15) ;
19
+ }
20
+
21
+ [dir=rtl] .title {
22
+ padding-left: var(--zd_size15) ;
23
+ }
24
+
18
25
  .count {
19
- padding-block: 0 ;
26
+ padding-block:0 ;
20
27
  padding-inline: var(--zd_size10) ;
21
28
  position: absolute;
22
29
  composes: xMiddle from '~@zohodesk/components/es/common/common.module.css';
@@ -73,7 +80,7 @@
73
80
 
74
81
  .preview {
75
82
  margin-block: var(--zd_size20) ;
76
- margin-inline: 0 ;
83
+ margin-inline:0 ;
77
84
  composes: posrel from '~@zohodesk/components/es/common/common.module.css';
78
85
  text-align: center;
79
86
  }
@@ -129,7 +136,7 @@
129
136
  }
130
137
 
131
138
  .listContainer {
132
- padding-block: 0 ;
139
+ padding-block:0 ;
133
140
  padding-inline: var(--zd_size18) ;
134
141
  }
135
142
 
@@ -317,7 +324,7 @@
317
324
  }
318
325
 
319
326
  .authorName {
320
- margin-block: 0 ;
327
+ margin-block:0 ;
321
328
  margin-inline: var(--zd_size10) ;
322
329
  font-size: var(--zd_font_size15) ;
323
330
  color: var(--zdt_attachmentviewer_title_text);
@@ -357,4 +364,4 @@
357
364
  color: var(--zdt_attachmentviewer_title_text);
358
365
  padding: var(--zd_size2) ;
359
366
  margin: auto ;
360
- }
367
+ }
@@ -1,4 +1,3 @@
1
- import { DUMMY_OBJECT } from "../../utils/General";
2
1
  export const AttachmentImage_defaultProps = {
3
2
  dataId: 'AttachmentImage',
4
3
  customClass: {
@@ -12,7 +11,6 @@ export const AttachmentViewer_defaultProps = {
12
11
  maintainZoom: false,
13
12
  isActive: false,
14
13
  dataId: 'AttachmentViewer',
15
- i18nKeys: DUMMY_OBJECT,
16
- customProps: DUMMY_OBJECT,
17
- showCount: true
14
+ i18nKeys: {},
15
+ customProps: {}
18
16
  };
@@ -2,9 +2,6 @@ import PropTypes from 'prop-types';
2
2
  import { propTypes as AvatarProps } from '@zohodesk/components/es/Avatar/props/propTypes';
3
3
  export const AttachmentImage_propTypes = {
4
4
  alt: PropTypes.string,
5
- imageRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
6
- current: PropTypes.any
7
- })]),
8
5
  customClass: PropTypes.shape({
9
6
  customImageClass: PropTypes.string,
10
7
  customChildrenClass: PropTypes.string
@@ -32,7 +29,7 @@ export const AttachmentViewer_propTypes = {
32
29
  showText: PropTypes.string,
33
30
  previewUnsupportedText: PropTypes.string
34
31
  }),
35
- needDownload: PropTypes.bool,
32
+ needDownload: PropTypes.string,
36
33
  previewObj: PropTypes.object,
37
34
  responsiveId: PropTypes.string,
38
35
  maintainZoom: PropTypes.bool,
@@ -45,10 +42,7 @@ export const AttachmentViewer_propTypes = {
45
42
  document: PropTypes.arrayOf(PropTypes.string)
46
43
  }),
47
44
  renderUnSupportedElement: PropTypes.func,
48
- renderCustomImagePreviewElement: PropTypes.func,
49
45
  customProps: PropTypes.shape({
50
46
  avatarProps: PropTypes.exact(AvatarProps)
51
- }),
52
- showCount: PropTypes.bool,
53
- renderCustomIcons: PropTypes.func
47
+ })
54
48
  };
@@ -175,13 +175,12 @@ export const SUPPORTED_FILE_EXTENSIONS = {
175
175
  exe: ['exe'],
176
176
  event: ['ics']
177
177
  };
178
- export function checkFileSourcesValidation(_ref) {
179
- let {
180
- fileName,
181
- viewURL,
182
- previewUrl,
183
- allowedPreviewExtensionsData
184
- } = _ref;
178
+ export function checkFileSourcesValidation({
179
+ fileName,
180
+ viewURL,
181
+ previewUrl,
182
+ allowedPreviewExtensionsData
183
+ }) {
185
184
  const extension = (getExtensionFromFileName(fileName) || '').toLowerCase();
186
185
 
187
186
  if (!extension) {
@@ -1,14 +1,11 @@
1
- export function openInNewTabWithNoopener(url) {
2
- let targetnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_blank';
1
+ export function openInNewTabWithNoopener(url, targetnName = '_blank') {
3
2
  const aTag = document.createElement('a');
4
3
  aTag.rel = 'noopener noreferrer';
5
4
  aTag.target = targetnName;
6
5
  aTag.href = url;
7
6
  aTag.click();
8
7
  }
9
- export function addLeadingZeros(number) {
10
- let desiredLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '2';
11
-
8
+ export function addLeadingZeros(number, desiredLength = '2') {
12
9
  if (typeof number !== 'undefined') {
13
10
  number = `${number}`;
14
11
  desiredLength = Number(desiredLength);
@@ -11,21 +11,20 @@ import '@zohodesk/variables/es/fontWeightVariables.module.css';
11
11
  import '@zohodesk/components/es/common/boxShadow.module.css';
12
12
  import "../../common/dot_boxShadow.module.css";
13
13
 
14
- function useDotProvider(_ref) {
15
- let {
16
- themeAppearance,
17
- themeColor,
18
- baseZoomUnit,
19
- baseFontUnit,
20
- getProviderElement,
21
- zoomUnitVariable,
22
- fontUnitVariable,
23
- excludeFeatures,
24
- themeAppearanceAttr,
25
- themeColorAttr,
26
- onAssetsDownloadSuccess,
27
- getAssetsPromises
28
- } = _ref;
14
+ function useDotProvider({
15
+ themeAppearance,
16
+ themeColor,
17
+ baseZoomUnit,
18
+ baseFontUnit,
19
+ getProviderElement,
20
+ zoomUnitVariable,
21
+ fontUnitVariable,
22
+ excludeFeatures,
23
+ themeAppearanceAttr,
24
+ themeColorAttr,
25
+ onAssetsDownloadSuccess,
26
+ getAssetsPromises
27
+ }) {
29
28
  const assetsPromises = useDownloadAssetsAndSetAttr({
30
29
  themeAppearance,
31
30
  themeColor,
@@ -3,19 +3,18 @@ import { getThemeAppearanceAssetPromise } from "../utils/assetPromiseHandlers/th
3
3
  import { getThemeColorAssetPromise } from "../utils/assetPromiseHandlers/themeColorAssetPromise.js";
4
4
  import { getFontSizeAssetPromise } from "../utils/assetPromiseHandlers/fontSizeAssetPromise.js";
5
5
  import { getZoomSizeAssetPromise } from "../utils/assetPromiseHandlers/zoomSizeAssetPromise.js";
6
- export default function useDownloadAssetsAndSetAttr(_ref) {
7
- let {
8
- themeAppearance,
9
- themeColor,
10
- baseZoomUnit,
11
- baseFontUnit,
12
- getProviderElement,
13
- zoomUnitVariable,
14
- fontUnitVariable,
15
- excludeFeatures,
16
- themeAppearanceAttr,
17
- themeColorAttr
18
- } = _ref;
6
+ export default function useDownloadAssetsAndSetAttr({
7
+ themeAppearance,
8
+ themeColor,
9
+ baseZoomUnit,
10
+ baseFontUnit,
11
+ getProviderElement,
12
+ zoomUnitVariable,
13
+ fontUnitVariable,
14
+ excludeFeatures,
15
+ themeAppearanceAttr,
16
+ themeColorAttr
17
+ }) {
19
18
  const excluded = useMemo(() => new Set(excludeFeatures), [excludeFeatures]);
20
19
  const needTheme = !excluded.has('theme');
21
20
  const needZoom = !excluded.has('zoom');
@@ -82,7 +81,10 @@ export default function useDownloadAssetsAndSetAttr(_ref) {
82
81
  }
83
82
 
84
83
  function setZoomSizeAttribute() {
85
- if (!needZoom) {
84
+ const zoomLower = String(baseZoomUnit).toLowerCase();
85
+ const varLower = String(zoomUnitVariable).toLowerCase();
86
+
87
+ if (!needZoom || zoomLower === 'none' || zoomLower === 'unset' || varLower === 'none' || varLower === 'unset') {
86
88
  return;
87
89
  }
88
90
 
@@ -98,7 +100,10 @@ export default function useDownloadAssetsAndSetAttr(_ref) {
98
100
  }
99
101
 
100
102
  function setFontSizeAttribute() {
101
- if (!needFont) {
103
+ const fontLower = String(baseFontUnit).toLowerCase();
104
+ const varLower = String(fontUnitVariable).toLowerCase();
105
+
106
+ if (!needFont || fontLower === 'none' || fontLower === 'unset' || varLower === 'none' || varLower === 'unset') {
102
107
  return;
103
108
  }
104
109
 
@@ -118,7 +123,7 @@ export default function useDownloadAssetsAndSetAttr(_ref) {
118
123
  }, [themeAppearanceAttr, themeColorAttr, themeAppearance, themeColor, getProviderElement, needTheme]);
119
124
  useLayoutEffect(() => {
120
125
  setZoomSizeAttribute();
121
- }, [zoomUnitVariable, modifiedZoomUnitWithSuffix, zoomSizePromise, getProviderElement, needZoom]);
126
+ }, [zoomUnitVariable, modifiedZoomUnitWithSuffix, zoomSizePromise, getProviderElement, needZoom, baseZoomUnit]);
122
127
  useLayoutEffect(() => {
123
128
  setFontSizeAttribute();
124
129
  }, [fontUnitVariable, baseFontUnit, fontSizePromise, getProviderElement, needFont]);
@@ -2,10 +2,9 @@ import { getAssetsImportPromises } from "../getAssetsImportPromises";
2
2
  import { themeAppearanceImports, themeAppearanceMapping } from "../themeAppearanceAssetsConfig";
3
3
  import { validateAndLogError } from "../errorValidation";
4
4
  import { LIBRARIES, THEME_APPEARANCES } from "../constants";
5
- export function getThemeAppearanceAssetPromise(_ref) {
6
- let {
7
- themeAppearance
8
- } = _ref;
5
+ export function getThemeAppearanceAssetPromise({
6
+ themeAppearance
7
+ }) {
9
8
  const isError = validateAndLogError({
10
9
  options: THEME_APPEARANCES,
11
10
  value: themeAppearance,
@@ -2,11 +2,10 @@ import { getAssetsImportPromises } from "../getAssetsImportPromises";
2
2
  import { themeColorImports, themeColorMapping } from "../themeColorAssetsConfig";
3
3
  import { validateAndLogError } from "../errorValidation";
4
4
  import { LIBRARIES, THEME_COLORS } from "../constants";
5
- export function getThemeColorAssetPromise(_ref) {
6
- let {
7
- themeAppearance,
8
- themeColor
9
- } = _ref;
5
+ export function getThemeColorAssetPromise({
6
+ themeAppearance,
7
+ themeColor
8
+ }) {
10
9
  const isError = validateAndLogError({
11
10
  options: THEME_COLORS,
12
11
  value: themeColor,
@@ -1,10 +1,9 @@
1
1
  import { THEME_APPEARANCES, THEME_COLORS } from "./constants";
2
- export function validateAndLogError(_ref) {
3
- let {
4
- options,
5
- value,
6
- type
7
- } = _ref;
2
+ export function validateAndLogError({
3
+ options,
4
+ value,
5
+ type
6
+ }) {
8
7
  let isError = !options.includes(value);
9
8
 
10
9
  if (isError) {
@@ -1,8 +1,7 @@
1
- export function getAssetsImportPromises(_ref) {
2
- let {
3
- assetImportKeys,
4
- assetImports
5
- } = _ref;
1
+ export function getAssetsImportPromises({
2
+ assetImportKeys,
3
+ assetImports
4
+ }) {
6
5
  const promises = [];
7
6
  assetImportKeys.forEach(importKey => {
8
7
  const assetURL = assetImports[importKey];
@@ -210,10 +210,9 @@ export default class Drawer extends React.Component {
210
210
  }, content) : content);
211
211
  }
212
212
 
213
- responsiveFunc(_ref) {
214
- let {
215
- mediaQueryOR
216
- } = _ref;
213
+ responsiveFunc({
214
+ mediaQueryOR
215
+ }) {
217
216
  return {
218
217
  uptoTablet: mediaQueryOR([{
219
218
  maxWidth: 768
@@ -243,10 +242,9 @@ export default class Drawer extends React.Component {
243
242
  return /*#__PURE__*/React.createElement(ResponsiveReceiver, {
244
243
  query: this.responsiveFunc,
245
244
  responsiveId: responsiveId
246
- }, _ref2 => {
247
- let {
248
- uptoTablet
249
- } = _ref2;
245
+ }, ({
246
+ uptoTablet
247
+ }) => {
250
248
  let styleByResolutions = `${subDrawerClass} ${style.secondDrawer} ${uptoTablet ? `${style.secondMobDrawer} ${style.mbleSize}` : `${style[subDrawerSize]}`} `;
251
249
  return needFreeze ? /*#__PURE__*/React.createElement(FreezeLayer, {
252
250
  onClick: onClose,
@@ -1,9 +1,8 @@
1
1
  import { compileClassNames } from '@zohodesk/utils';
2
- export default function cssJSLogic(_ref) {
3
- let {
4
- props,
5
- style
6
- } = _ref;
2
+ export default function cssJSLogic({
3
+ props,
4
+ style
5
+ }) {
7
6
  let {
8
7
  zIndex,
9
8
  palette,
@@ -9,12 +9,11 @@ import defaultProps from "./props/defaultProps";
9
9
  import propTypes from "./props/propTypes"; //CSS
10
10
 
11
11
  import style from "./css/Dragger.module.css";
12
- export default function useDragger(_ref) {
13
- let {
14
- isActive,
15
- ChildRef,
16
- boundaryLimit = getDotLibraryConfig('boundaryLimit')
17
- } = _ref;
12
+ export default function useDragger({
13
+ isActive,
14
+ ChildRef,
15
+ boundaryLimit = getDotLibraryConfig('boundaryLimit')
16
+ }) {
18
17
  const draggableEle = useRef(null);
19
18
  const parentEle = useRef(null);
20
19
  const offset = useRef({
@@ -1,11 +1,10 @@
1
- export function DragPosCalc(_ref) {
2
- let {
3
- x,
4
- y,
5
- element,
6
- dragWrapper,
7
- boundaryLimit
8
- } = _ref;
1
+ export function DragPosCalc({
2
+ x,
3
+ y,
4
+ element,
5
+ dragWrapper,
6
+ boundaryLimit
7
+ }) {
9
8
  let {
10
9
  top,
11
10
  left,
@@ -1,11 +1,10 @@
1
1
  import React, { useRef, useState, useEffect } from 'react';
2
2
  import { isTextSelected, cancelBubblingEffect } from '@zohodesk/components/es/utils/Common';
3
3
  import { getDotLibraryConfig } from "../Provider/Config";
4
- export default function useFreezeLayer(_ref) {
5
- let {
6
- isActive: propsActive,
7
- onClick
8
- } = _ref;
4
+ export default function useFreezeLayer({
5
+ isActive: propsActive,
6
+ onClick
7
+ }) {
9
8
  const [isActive, setActive] = useState(propsActive);
10
9
  const [isChildActive, setChildActive] = useState(false);
11
10
  let isFreezeLayerEnabled = useRef(false);
package/es/Link/Link.js CHANGED
@@ -61,8 +61,7 @@ export default class Link extends React.Component {
61
61
  rel,
62
62
  dataId,
63
63
  customProps,
64
- ariaLabel,
65
- downloadName
64
+ ariaLabel
66
65
  } = this.props;
67
66
  let {
68
67
  isLink,
@@ -72,10 +71,10 @@ export default class Link extends React.Component {
72
71
  let option = {};
73
72
 
74
73
  if (download) {
75
- option.download = downloadName || true;
74
+ option.download = true;
76
75
  }
77
76
 
78
- let ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'downloadName', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
77
+ let ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
79
78
  let others = Object.keys(this.props).filter(key => ignoreKeys.indexOf(key) == -1).reduce((res, key) => {
80
79
  res[key] = this.props[key];
81
80
  return res;
@@ -13,7 +13,6 @@ export const propTypes = {
13
13
  customProps: PropTypes.object,
14
14
  onClick: PropTypes.func,
15
15
  download: PropTypes.bool,
16
- downloadName: PropTypes.string,
17
16
  ariaLabel: PropTypes.string,
18
17
  key: PropTypes.string
19
18
  };
@@ -5,38 +5,35 @@ import { defaultProps } from "./props/defaultProps";
5
5
  import CarouselDot from "./CarouselDot/CarouselDot";
6
6
  import style from "./css/CarouselDots.module.css";
7
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
- };
8
+ const CarouselDots = ({
9
+ sliderDetails,
10
+ currentSliderIndex,
11
+ isAnimationPaused,
12
+ onClick,
13
+ onMouseEnter,
14
+ onMouseLeave,
15
+ testId,
16
+ customId
17
+ }) => /*#__PURE__*/React.createElement(Flex, {
18
+ $ui_displayMode: "flex",
19
+ $ui_alignItems: "center",
20
+ $ui_className: style.btnCnt,
21
+ $ui_justifyContent: "center",
22
+ $tagAttributes_container: {
23
+ onMouseEnter: onMouseEnter,
24
+ onMouseLeave: onMouseLeave
25
+ },
26
+ customId: customId,
27
+ testId: testId
28
+ }, sliderDetails.map((data, index) => /*#__PURE__*/React.createElement(CarouselDot, {
29
+ key: data.tabName,
30
+ isActive: index === currentSliderIndex,
31
+ isAnimationPaused: isAnimationPaused,
32
+ onClick: onClick,
33
+ index: index,
34
+ customId: customId + '_' + index,
35
+ testId: testId + '_' + index
36
+ })));
40
37
 
41
38
  CarouselDots.propTypes = propTypes;
42
39
  CarouselDots.defaultProps = defaultProps;
@@ -33,30 +33,29 @@ import { DUMMY_OBJECT } from "../utils/General";
33
33
 
34
34
  import defaultStyle from "./css/Onboarding.module.css";
35
35
 
36
- const Onboarding = _ref => {
37
- let {
38
- hasCloseIcon,
39
- onClose,
40
- ribbonText,
41
- hasRibbon,
42
- videoLookupCloseText,
43
- customStyle,
44
- sliderData,
45
- isAutoPlayAnimation,
46
- hasBouncAnimationOnMount,
47
- customId,
48
- testId,
49
- hasExpandedButton,
50
- onPrimaryButtonClick,
51
- onSecondaryButtonClick,
52
- customProps,
53
- tagAttributes,
54
- a11yAttributes,
55
- closeIconTooltip,
56
- dragBoundaryLimit,
57
- isDraggable,
58
- position
59
- } = _ref;
36
+ const Onboarding = ({
37
+ hasCloseIcon,
38
+ onClose,
39
+ ribbonText,
40
+ hasRibbon,
41
+ videoLookupCloseText,
42
+ customStyle,
43
+ sliderData,
44
+ isAutoPlayAnimation,
45
+ hasBouncAnimationOnMount,
46
+ customId,
47
+ testId,
48
+ hasExpandedButton,
49
+ onPrimaryButtonClick,
50
+ onSecondaryButtonClick,
51
+ customProps,
52
+ tagAttributes,
53
+ a11yAttributes,
54
+ closeIconTooltip,
55
+ dragBoundaryLimit,
56
+ isDraggable,
57
+ position
58
+ }) => {
60
59
  const getNextIndex = useZIndex();
61
60
  const style = useMergeStyle(defaultStyle, customStyle);
62
61
  const {
@@ -2,11 +2,10 @@ import { useRef } from 'react';
2
2
  import useMergeState from '@zohodesk/hooks/es/utils/useMergeState';
3
3
  import useDragger from "../../Hooks/Dragger/useDragger";
4
4
 
5
- const useOnboarding = _ref => {
6
- let {
7
- dragBoundaryLimit,
8
- isDraggable
9
- } = _ref;
5
+ const useOnboarding = ({
6
+ dragBoundaryLimit,
7
+ isDraggable
8
+ }) => {
10
9
  const dragRef = useRef(null);
11
10
  useDragger({
12
11
  isActive: isDraggable,
@@ -1,12 +1,11 @@
1
1
  import { useState, useEffect, useCallback, useRef } from 'react';
2
2
  const autoplayDelay = 50; // 5000ms divided by 100 for smoother animation
3
3
 
4
- const useOnboardingSlider = _ref => {
5
- let {
6
- isAutoPlayAnimation,
7
- sliderData,
8
- animationClass
9
- } = _ref;
4
+ const useOnboardingSlider = ({
5
+ isAutoPlayAnimation,
6
+ sliderData,
7
+ animationClass
8
+ }) => {
10
9
  const [currentSlide, setCurrentSlide] = useState(0);
11
10
  const [autoplay, setAutoplay] = useState(true);
12
11
  const progressRef = useRef(0);