@zohodesk/dot 1.0.0-temp-232 → 1.0.0-temp-230.4
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/README.md +14 -2
- package/es/ActionButton/__tests__/ActionButton.spec.js +5 -4
- package/es/AttachmentViewer/AttachmentImage.js +3 -1
- package/es/AttachmentViewer/AttachmentViewer.js +340 -265
- package/es/AttachmentViewer/AttachmentViewer.module.css +8 -15
- package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +104 -100
- package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
- package/es/AttachmentViewer/props/defaultProps.js +4 -2
- package/es/AttachmentViewer/props/propTypes.js +9 -2
- package/es/AttachmentViewer/utils.js +7 -6
- package/es/AudioPlayer/utils/utils.js +5 -2
- package/es/DotProvider/hooks/useDotProvider.js +15 -14
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +16 -21
- package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +4 -3
- package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +5 -4
- package/es/DotProvider/utils/errorValidation.js +6 -5
- package/es/DotProvider/utils/getAssetsImportPromises.js +5 -4
- package/es/Drawer/Drawer.js +8 -6
- package/es/FreezeLayer/css/cssJSLogic.js +5 -4
- package/es/Hooks/Dragger/useDragger.js +6 -5
- package/es/Hooks/Dragger/utils/DraggerUtil.js +8 -7
- package/es/Hooks/useFreezeLayer.js +5 -4
- package/es/Link/Link.js +4 -3
- package/es/Link/props/propTypes.js +1 -0
- package/es/Onboarding/CarouselDots/CarouselDots.js +32 -29
- package/es/Onboarding/Onboarding.js +24 -23
- package/es/Onboarding/hooks/useOnboarding.js +5 -4
- package/es/Onboarding/hooks/useOnboardingSlider.js +6 -5
- package/es/deprecated/SelectDropdown/SelectDropdown.js +47 -43
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +225 -214
- package/es/errorstate/Inconvenience/Inconvenience.js +36 -32
- package/es/errorstate/NoRequestFound/NoRequestFound.js +36 -32
- package/es/errorstate/PermissionPlay/PermissionPlay.js +35 -31
- package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +36 -32
- package/es/errorstate/UnableToProcess/UnableToProcess.js +36 -32
- package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +36 -32
- package/es/errorstate/WillBack/WillBack.js +34 -30
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +85 -81
- package/es/list/status/StatusDropdown/StatusDropdown.js +113 -109
- package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +4 -3
- package/es/lookup/header/Search/Search.js +5 -4
- package/es/lookup/header/Search/__tests__/Search.spec.js +4 -3
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +75 -67
- package/es/utils/General.js +7 -2
- package/es/utils/editorUtils.js +5 -1
- package/es/version2/lookup/AlertHeader/AlertHeader.js +3 -5
- package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +0 -24
- package/es/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +0 -34
- package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +5 -4
- package/es/version2/lookup/AlertHeader/props/propTypes.js +1 -2
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +63 -59
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +44 -40
- package/lib/AttachmentViewer/AttachmentImage.js +3 -1
- package/lib/AttachmentViewer/AttachmentViewer.js +164 -97
- package/lib/AttachmentViewer/AttachmentViewer.module.css +8 -15
- package/lib/AttachmentViewer/__tests__/AttachmentViewer.spec.js +100 -100
- package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
- package/lib/AttachmentViewer/props/defaultProps.js +6 -2
- package/lib/AttachmentViewer/props/propTypes.js +9 -2
- package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +3 -9
- package/lib/Link/Link.js +4 -3
- package/lib/Link/props/propTypes.js +1 -0
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +2 -5
- package/lib/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +0 -26
- package/lib/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +0 -34
- package/lib/version2/lookup/AlertHeader/props/propTypes.js +1 -2
- package/package.json +5 -5
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DUMMY_OBJECT } from "../../utils/General";
|
|
1
2
|
export const AttachmentImage_defaultProps = {
|
|
2
3
|
dataId: 'AttachmentImage',
|
|
3
4
|
customClass: {
|
|
@@ -11,6 +12,7 @@ export const AttachmentViewer_defaultProps = {
|
|
|
11
12
|
maintainZoom: false,
|
|
12
13
|
isActive: false,
|
|
13
14
|
dataId: 'AttachmentViewer',
|
|
14
|
-
i18nKeys:
|
|
15
|
-
customProps:
|
|
15
|
+
i18nKeys: DUMMY_OBJECT,
|
|
16
|
+
customProps: DUMMY_OBJECT,
|
|
17
|
+
hasCount: true
|
|
16
18
|
};
|
|
@@ -2,6 +2,9 @@ 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
|
+
})]),
|
|
5
8
|
customClass: PropTypes.shape({
|
|
6
9
|
customImageClass: PropTypes.string,
|
|
7
10
|
customChildrenClass: PropTypes.string
|
|
@@ -29,7 +32,7 @@ export const AttachmentViewer_propTypes = {
|
|
|
29
32
|
showText: PropTypes.string,
|
|
30
33
|
previewUnsupportedText: PropTypes.string
|
|
31
34
|
}),
|
|
32
|
-
needDownload: PropTypes.
|
|
35
|
+
needDownload: PropTypes.bool,
|
|
33
36
|
previewObj: PropTypes.object,
|
|
34
37
|
responsiveId: PropTypes.string,
|
|
35
38
|
maintainZoom: PropTypes.bool,
|
|
@@ -42,7 +45,11 @@ export const AttachmentViewer_propTypes = {
|
|
|
42
45
|
document: PropTypes.arrayOf(PropTypes.string)
|
|
43
46
|
}),
|
|
44
47
|
renderUnSupportedElement: PropTypes.func,
|
|
48
|
+
renderCustomImagePreviewElement: PropTypes.func,
|
|
45
49
|
customProps: PropTypes.shape({
|
|
46
50
|
avatarProps: PropTypes.exact(AvatarProps)
|
|
47
|
-
})
|
|
51
|
+
}),
|
|
52
|
+
hasCount: PropTypes.bool,
|
|
53
|
+
renderCustomIcons: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
54
|
+
onSelectedAttachmentChange: PropTypes.func
|
|
48
55
|
};
|
|
@@ -175,12 +175,13 @@ export const SUPPORTED_FILE_EXTENSIONS = {
|
|
|
175
175
|
exe: ['exe'],
|
|
176
176
|
event: ['ics']
|
|
177
177
|
};
|
|
178
|
-
export function checkFileSourcesValidation({
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
export function checkFileSourcesValidation(_ref) {
|
|
179
|
+
let {
|
|
180
|
+
fileName,
|
|
181
|
+
viewURL,
|
|
182
|
+
previewUrl,
|
|
183
|
+
allowedPreviewExtensionsData
|
|
184
|
+
} = _ref;
|
|
184
185
|
const extension = (getExtensionFromFileName(fileName) || '').toLowerCase();
|
|
185
186
|
|
|
186
187
|
if (!extension) {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
export function openInNewTabWithNoopener(url
|
|
1
|
+
export function openInNewTabWithNoopener(url) {
|
|
2
|
+
let targetnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_blank';
|
|
2
3
|
const aTag = document.createElement('a');
|
|
3
4
|
aTag.rel = 'noopener noreferrer';
|
|
4
5
|
aTag.target = targetnName;
|
|
5
6
|
aTag.href = url;
|
|
6
7
|
aTag.click();
|
|
7
8
|
}
|
|
8
|
-
export function addLeadingZeros(number
|
|
9
|
+
export function addLeadingZeros(number) {
|
|
10
|
+
let desiredLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '2';
|
|
11
|
+
|
|
9
12
|
if (typeof number !== 'undefined') {
|
|
10
13
|
number = `${number}`;
|
|
11
14
|
desiredLength = Number(desiredLength);
|
|
@@ -11,20 +11,21 @@ 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({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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;
|
|
28
29
|
const assetsPromises = useDownloadAssetsAndSetAttr({
|
|
29
30
|
themeAppearance,
|
|
30
31
|
themeColor,
|
|
@@ -3,18 +3,19 @@ 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({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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;
|
|
18
19
|
const excluded = useMemo(() => new Set(excludeFeatures), [excludeFeatures]);
|
|
19
20
|
const needTheme = !excluded.has('theme');
|
|
20
21
|
const needZoom = !excluded.has('zoom');
|
|
@@ -81,10 +82,7 @@ export default function useDownloadAssetsAndSetAttr({
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
function setZoomSizeAttribute() {
|
|
84
|
-
|
|
85
|
-
const varLower = String(zoomUnitVariable).toLowerCase();
|
|
86
|
-
|
|
87
|
-
if (!needZoom || zoomLower === 'none' || zoomLower === 'unset' || varLower === 'none' || varLower === 'unset') {
|
|
85
|
+
if (!needZoom) {
|
|
88
86
|
return;
|
|
89
87
|
}
|
|
90
88
|
|
|
@@ -100,10 +98,7 @@ export default function useDownloadAssetsAndSetAttr({
|
|
|
100
98
|
}
|
|
101
99
|
|
|
102
100
|
function setFontSizeAttribute() {
|
|
103
|
-
|
|
104
|
-
const varLower = String(fontUnitVariable).toLowerCase();
|
|
105
|
-
|
|
106
|
-
if (!needFont || fontLower === 'none' || fontLower === 'unset' || varLower === 'none' || varLower === 'unset') {
|
|
101
|
+
if (!needFont) {
|
|
107
102
|
return;
|
|
108
103
|
}
|
|
109
104
|
|
|
@@ -123,7 +118,7 @@ export default function useDownloadAssetsAndSetAttr({
|
|
|
123
118
|
}, [themeAppearanceAttr, themeColorAttr, themeAppearance, themeColor, getProviderElement, needTheme]);
|
|
124
119
|
useLayoutEffect(() => {
|
|
125
120
|
setZoomSizeAttribute();
|
|
126
|
-
}, [zoomUnitVariable, modifiedZoomUnitWithSuffix, zoomSizePromise, getProviderElement, needZoom
|
|
121
|
+
}, [zoomUnitVariable, modifiedZoomUnitWithSuffix, zoomSizePromise, getProviderElement, needZoom]);
|
|
127
122
|
useLayoutEffect(() => {
|
|
128
123
|
setFontSizeAttribute();
|
|
129
124
|
}, [fontUnitVariable, baseFontUnit, fontSizePromise, getProviderElement, needFont]);
|
|
@@ -2,9 +2,10 @@ 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({
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export function getThemeAppearanceAssetPromise(_ref) {
|
|
6
|
+
let {
|
|
7
|
+
themeAppearance
|
|
8
|
+
} = _ref;
|
|
8
9
|
const isError = validateAndLogError({
|
|
9
10
|
options: THEME_APPEARANCES,
|
|
10
11
|
value: themeAppearance,
|
|
@@ -2,10 +2,11 @@ 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({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
export function getThemeColorAssetPromise(_ref) {
|
|
6
|
+
let {
|
|
7
|
+
themeAppearance,
|
|
8
|
+
themeColor
|
|
9
|
+
} = _ref;
|
|
9
10
|
const isError = validateAndLogError({
|
|
10
11
|
options: THEME_COLORS,
|
|
11
12
|
value: themeColor,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { THEME_APPEARANCES, THEME_COLORS } from "./constants";
|
|
2
|
-
export function validateAndLogError({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export function validateAndLogError(_ref) {
|
|
3
|
+
let {
|
|
4
|
+
options,
|
|
5
|
+
value,
|
|
6
|
+
type
|
|
7
|
+
} = _ref;
|
|
7
8
|
let isError = !options.includes(value);
|
|
8
9
|
|
|
9
10
|
if (isError) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export function getAssetsImportPromises({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export function getAssetsImportPromises(_ref) {
|
|
2
|
+
let {
|
|
3
|
+
assetImportKeys,
|
|
4
|
+
assetImports
|
|
5
|
+
} = _ref;
|
|
5
6
|
const promises = [];
|
|
6
7
|
assetImportKeys.forEach(importKey => {
|
|
7
8
|
const assetURL = assetImports[importKey];
|
package/es/Drawer/Drawer.js
CHANGED
|
@@ -210,9 +210,10 @@ export default class Drawer extends React.Component {
|
|
|
210
210
|
}, content) : content);
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
responsiveFunc({
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
responsiveFunc(_ref) {
|
|
214
|
+
let {
|
|
215
|
+
mediaQueryOR
|
|
216
|
+
} = _ref;
|
|
216
217
|
return {
|
|
217
218
|
uptoTablet: mediaQueryOR([{
|
|
218
219
|
maxWidth: 768
|
|
@@ -242,9 +243,10 @@ export default class Drawer extends React.Component {
|
|
|
242
243
|
return /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
243
244
|
query: this.responsiveFunc,
|
|
244
245
|
responsiveId: responsiveId
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
}, _ref2 => {
|
|
247
|
+
let {
|
|
248
|
+
uptoTablet
|
|
249
|
+
} = _ref2;
|
|
248
250
|
let styleByResolutions = `${subDrawerClass} ${style.secondDrawer} ${uptoTablet ? `${style.secondMobDrawer} ${style.mbleSize}` : `${style[subDrawerSize]}`} `;
|
|
249
251
|
return needFreeze ? /*#__PURE__*/React.createElement(FreezeLayer, {
|
|
250
252
|
onClick: onClose,
|
|
@@ -9,11 +9,12 @@ 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({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
export default function useDragger(_ref) {
|
|
13
|
+
let {
|
|
14
|
+
isActive,
|
|
15
|
+
ChildRef,
|
|
16
|
+
boundaryLimit = getDotLibraryConfig('boundaryLimit')
|
|
17
|
+
} = _ref;
|
|
17
18
|
const draggableEle = useRef(null);
|
|
18
19
|
const parentEle = useRef(null);
|
|
19
20
|
const offset = useRef({
|
|
@@ -1,10 +1,11 @@
|
|
|
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({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export default function useFreezeLayer(_ref) {
|
|
5
|
+
let {
|
|
6
|
+
isActive: propsActive,
|
|
7
|
+
onClick
|
|
8
|
+
} = _ref;
|
|
8
9
|
const [isActive, setActive] = useState(propsActive);
|
|
9
10
|
const [isChildActive, setChildActive] = useState(false);
|
|
10
11
|
let isFreezeLayerEnabled = useRef(false);
|
package/es/Link/Link.js
CHANGED
|
@@ -61,7 +61,8 @@ export default class Link extends React.Component {
|
|
|
61
61
|
rel,
|
|
62
62
|
dataId,
|
|
63
63
|
customProps,
|
|
64
|
-
ariaLabel
|
|
64
|
+
ariaLabel,
|
|
65
|
+
downloadName
|
|
65
66
|
} = this.props;
|
|
66
67
|
let {
|
|
67
68
|
isLink,
|
|
@@ -71,10 +72,10 @@ export default class Link extends React.Component {
|
|
|
71
72
|
let option = {};
|
|
72
73
|
|
|
73
74
|
if (download) {
|
|
74
|
-
option.download = true;
|
|
75
|
+
option.download = downloadName || true;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
let ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
|
|
78
|
+
let ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'downloadName', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
|
|
78
79
|
let others = Object.keys(this.props).filter(key => ignoreKeys.indexOf(key) == -1).reduce((res, key) => {
|
|
79
80
|
res[key] = this.props[key];
|
|
80
81
|
return res;
|
|
@@ -5,35 +5,38 @@ 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 =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
+
};
|
|
37
40
|
|
|
38
41
|
CarouselDots.propTypes = propTypes;
|
|
39
42
|
CarouselDots.defaultProps = defaultProps;
|
|
@@ -33,29 +33,30 @@ import { DUMMY_OBJECT } from "../utils/General";
|
|
|
33
33
|
|
|
34
34
|
import defaultStyle from "./css/Onboarding.module.css";
|
|
35
35
|
|
|
36
|
-
const Onboarding =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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;
|
|
59
60
|
const getNextIndex = useZIndex();
|
|
60
61
|
const style = useMergeStyle(defaultStyle, customStyle);
|
|
61
62
|
const {
|
|
@@ -2,10 +2,11 @@ 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 =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const useOnboarding = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
dragBoundaryLimit,
|
|
8
|
+
isDraggable
|
|
9
|
+
} = _ref;
|
|
9
10
|
const dragRef = useRef(null);
|
|
10
11
|
useDragger({
|
|
11
12
|
isActive: isDraggable,
|
|
@@ -1,11 +1,12 @@
|
|
|
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 =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
const useOnboardingSlider = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
isAutoPlayAnimation,
|
|
7
|
+
sliderData,
|
|
8
|
+
animationClass
|
|
9
|
+
} = _ref;
|
|
9
10
|
const [currentSlide, setCurrentSlide] = useState(0);
|
|
10
11
|
const [autoplay, setAutoplay] = useState(true);
|
|
11
12
|
const progressRef = useRef(0);
|
|
@@ -33,9 +33,10 @@ class SelectDropdown extends React.Component {
|
|
|
33
33
|
togglePopup(e, 'bottomRight');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
responsiveFunc({
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
responsiveFunc(_ref) {
|
|
37
|
+
let {
|
|
38
|
+
mediaQueryOR
|
|
39
|
+
} = _ref;
|
|
39
40
|
return {
|
|
40
41
|
tabletMode: mediaQueryOR([{
|
|
41
42
|
maxWidth: 700
|
|
@@ -77,46 +78,49 @@ class SelectDropdown extends React.Component {
|
|
|
77
78
|
})), /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
78
79
|
query: this.responsiveFunc,
|
|
79
80
|
responsiveId: "Helmet"
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
81
|
+
}, _ref2 => {
|
|
82
|
+
let {
|
|
83
|
+
tabletMode
|
|
84
|
+
} = _ref2;
|
|
85
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
86
|
+
size: "medium",
|
|
87
|
+
boxPosition: "bottomRight",
|
|
88
|
+
isArrow: true,
|
|
89
|
+
isAnimate: true,
|
|
90
|
+
right: "-25",
|
|
91
|
+
isActive: isPopupOpen && isPopupReady,
|
|
92
|
+
getRef: getContainerRef,
|
|
93
|
+
isResponsivePadding: true,
|
|
94
|
+
alignBox: "row"
|
|
95
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
96
|
+
flexible: true
|
|
97
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
98
|
+
alignBox: "column",
|
|
99
|
+
className: `${tabletMode ? '' : style.rulesPopup}`
|
|
100
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
101
|
+
className: style.rulesDepart
|
|
102
|
+
}, /*#__PURE__*/React.createElement(DropDownHeading, {
|
|
103
|
+
text: title
|
|
104
|
+
})), isSearchRequired ? /*#__PURE__*/React.createElement(Box, {
|
|
105
|
+
className: style.searchDepart
|
|
106
|
+
}, /*#__PURE__*/React.createElement(TextBox, {
|
|
107
|
+
name: "Test",
|
|
108
|
+
id: "Test",
|
|
109
|
+
maxLength: "150",
|
|
110
|
+
placeHolder: "Search Department"
|
|
111
|
+
})) : null, /*#__PURE__*/React.createElement(Box, {
|
|
112
|
+
scroll: "vertical",
|
|
113
|
+
flexible: true,
|
|
114
|
+
shrink: true
|
|
115
|
+
}, options && options.length && options.map((obj, index) => /*#__PURE__*/React.createElement(ListItem, {
|
|
116
|
+
key: index,
|
|
117
|
+
autoHover: true,
|
|
118
|
+
value: obj[valueKey],
|
|
119
|
+
active: selectedId == obj[idKey],
|
|
120
|
+
id: obj[idKey],
|
|
121
|
+
onClick: this.handleClick
|
|
122
|
+
}))))));
|
|
123
|
+
}));
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
}
|