@zohodesk/dot 1.3.0 → 1.3.2
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/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +21 -12
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +163 -553
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +163 -553
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +163 -553
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +3 -12
- package/coverage/ExternalLink/ExternalLink.js.html +1 -1
- package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
- package/coverage/ExternalLink/index.html +1 -1
- package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
- package/coverage/ExternalLink/props/index.html +1 -1
- package/coverage/ExternalLink/props/propTypes.js.html +1 -1
- package/coverage/IconButton/IconButton.js.html +466 -0
- package/coverage/IconButton/IconButton.module.css.html +151 -0
- package/coverage/IconButton/index.html +131 -0
- package/coverage/IconButton/props/defaultProps.js.html +136 -0
- package/coverage/IconButton/props/index.html +131 -0
- package/coverage/IconButton/props/propTypes.js.html +187 -0
- package/coverage/Image/Image.js.html +1 -1
- package/coverage/Image/Image.module.css.html +1 -1
- package/coverage/Image/index.html +1 -1
- package/coverage/Image/props/defaultProps.js.html +1 -1
- package/coverage/Image/props/index.html +1 -1
- package/coverage/Image/props/propTypes.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
- package/coverage/avatar/AvatarWithTeam/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +4 -0
- package/coverage/coverage-summary.json +5 -1
- package/coverage/index.html +40 -10
- package/es/IconButton/__tests__/IconButton.spec.js +148 -0
- package/es/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/es/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/es/v1/ActionButton/ActionButton.js +2 -2
- package/es/v1/AlphabeticList/AlphabeticList.js +6 -2
- package/es/v1/Attachment/Attachment.js +78 -75
- package/es/v1/AttachmentViewer/AttachmentImage.js +44 -63
- package/es/v1/Image/Image.js +26 -33
- package/es/v1/Loader/Loader.js +12 -18
- package/es/v1/Message/Message.js +16 -42
- package/es/v1/PlusIcon/PlusIcon.js +25 -37
- package/es/v1/Separator/Separator.js +40 -47
- package/es/v1/Upload/Upload.js +59 -66
- package/es/v1/alert/AlertHeader/AlertHeader.js +5 -4
- package/es/v1/alert/AlertHeader/props/defaultProps.js +12 -0
- package/es/v1/alert/AlertHeader/props/propTypes.js +20 -0
- package/es/v1/alert/AlertLookup/AlertLookup.js +6 -4
- package/es/v1/alert/AlertLookup/props/defaultProps.js +13 -0
- package/es/v1/alert/AlertLookup/props/propTypes.js +36 -0
- package/es/v1/avatar/AvatarClose/AvatarClose.js +32 -43
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +41 -52
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +38 -43
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +52 -63
- package/es/v1/avatar/AvatarThread/AvatarThread.js +62 -69
- package/es/v1/avatar/AvatarUser/AvatarUser.js +93 -100
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +81 -88
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +6 -6
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
- package/es/v1/form/fields/DateField/DateField.js +6 -6
- package/es/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
- package/es/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/es/v1/form/fields/RadioField/RadioField.js +89 -97
- package/es/v1/form/fields/SelectField/SelectField.js +139 -154
- package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +154 -197
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +108 -124
- package/es/v1/list/SecondaryText/AccountName.js +61 -69
- package/es/v1/list/SecondaryText/ContactName.js +66 -74
- package/es/v1/list/SecondaryText/DepartmentText.js +15 -27
- package/es/v1/list/SecondaryText/Email.js +32 -40
- package/es/v1/list/SecondaryText/HappinessRating.js +17 -25
- package/es/v1/list/SecondaryText/PhoneNumber.js +36 -44
- package/es/v1/list/SecondaryText/PriorityText.js +16 -28
- package/es/v1/list/SecondaryText/SecondaryText.js +21 -33
- package/es/v1/list/SecondaryText/StatusText.js +17 -29
- package/es/v1/list/SecondaryText/TicketId.js +33 -45
- package/es/v1/list/SecondaryText/Website.js +22 -30
- package/es/v1/list/SecondryPanel/SecondryPanel.js +66 -83
- package/es/v1/list/SentimentStatus/SentimentStatus.js +18 -29
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/es/v1/list/status/StatusListItem/StatusListItem.js +75 -100
- package/es/v1/lookup/EmptyPage/EmptyPage.js +15 -26
- package/es/v1/lookup/Section/Section.js +14 -20
- package/es/v1/svg/PlusIcon.js +20 -27
- package/es/v1/svg/SnippetIcon.js +22 -29
- package/es/v1/svg/TemplateIcon.js +23 -30
- package/lib/IconButton/__tests__/IconButton.spec.js +156 -0
- package/lib/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/lib/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/lib/v1/ActionButton/ActionButton.js +2 -2
- package/lib/v1/AlphabeticList/AlphabeticList.js +7 -3
- package/lib/v1/Attachment/Attachment.js +77 -112
- package/lib/v1/AttachmentViewer/AttachmentImage.js +61 -96
- package/lib/v1/Image/Image.js +26 -71
- package/lib/v1/Loader/Loader.js +12 -55
- package/lib/v1/Message/Message.js +23 -80
- package/lib/v1/PlusIcon/PlusIcon.js +25 -71
- package/lib/v1/Separator/Separator.js +44 -85
- package/lib/v1/Upload/Upload.js +58 -103
- package/lib/v1/alert/AlertHeader/AlertHeader.js +5 -4
- package/lib/v1/alert/AlertHeader/props/defaultProps.js +19 -0
- package/lib/v1/alert/AlertHeader/props/propTypes.js +31 -0
- package/lib/v1/alert/AlertLookup/AlertLookup.js +6 -4
- package/lib/v1/alert/AlertLookup/props/defaultProps.js +20 -0
- package/lib/v1/alert/AlertLookup/props/propTypes.js +47 -0
- package/lib/v1/avatar/AvatarClose/AvatarClose.js +32 -77
- package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +41 -86
- package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +37 -80
- package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +52 -97
- package/lib/v1/avatar/AvatarThread/AvatarThread.js +61 -106
- package/lib/v1/avatar/AvatarUser/AvatarUser.js +95 -140
- package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +85 -130
- package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +6 -6
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
- package/lib/v1/form/fields/DateField/DateField.js +6 -6
- package/lib/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
- package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
- package/lib/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/lib/v1/form/fields/RadioField/RadioField.js +91 -137
- package/lib/v1/form/fields/SelectField/SelectField.js +149 -200
- package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +160 -253
- package/lib/v1/layout/SubtabLayout/SubtabLayout.js +107 -206
- package/lib/v1/list/SecondaryText/AccountName.js +63 -113
- package/lib/v1/list/SecondaryText/ContactName.js +67 -117
- package/lib/v1/list/SecondaryText/DepartmentText.js +16 -66
- package/lib/v1/list/SecondaryText/Email.js +32 -82
- package/lib/v1/list/SecondaryText/HappinessRating.js +21 -68
- package/lib/v1/list/SecondaryText/PhoneNumber.js +36 -86
- package/lib/v1/list/SecondaryText/PriorityText.js +16 -66
- package/lib/v1/list/SecondaryText/SecondaryText.js +19 -69
- package/lib/v1/list/SecondaryText/StatusText.js +17 -67
- package/lib/v1/list/SecondaryText/TicketId.js +33 -83
- package/lib/v1/list/SecondaryText/Website.js +29 -72
- package/lib/v1/list/SecondryPanel/SecondryPanel.js +69 -168
- package/lib/v1/list/SentimentStatus/SentimentStatus.js +19 -64
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/lib/v1/list/status/StatusListItem/StatusListItem.js +81 -137
- package/lib/v1/lookup/EmptyPage/EmptyPage.js +43 -93
- package/lib/v1/lookup/Section/Section.js +14 -58
- package/lib/v1/svg/PlusIcon.js +20 -65
- package/lib/v1/svg/SnippetIcon.js +22 -67
- package/lib/v1/svg/TemplateIcon.js +23 -68
- package/package.json +12 -12
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
/**** Libraries ****/
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { defaultProps } from '
|
|
6
|
-
import { propTypes } from '
|
|
4
|
+
import React, { useRef } from 'react';
|
|
5
|
+
import { defaultProps } from '../../../../list/status/StatusListItem/props/defaultProps';
|
|
6
|
+
import { propTypes } from '../../../../list/status/StatusListItem/props/propTypes';
|
|
7
7
|
import { Container, Box } from '@zohodesk/components/es/v1/Layout';
|
|
8
8
|
/**** Components ****/
|
|
9
9
|
|
|
@@ -11,112 +11,87 @@ import { Icon } from '@zohodesk/icons';
|
|
|
11
11
|
import CssProvider from '@zohodesk/components/es/v1/Provider/CssProvider';
|
|
12
12
|
/**** CSS ****/
|
|
13
13
|
|
|
14
|
-
import style from '
|
|
15
|
-
export default
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
import style from '../../../../list/status/StatusListItem/StatusListItem.module.css';
|
|
15
|
+
export default function StatusListItem(props) {
|
|
16
|
+
let {
|
|
17
|
+
size,
|
|
18
|
+
active,
|
|
19
|
+
highlight,
|
|
20
|
+
value,
|
|
21
|
+
autoHover,
|
|
22
|
+
palette,
|
|
23
|
+
title,
|
|
24
|
+
disableTitle,
|
|
25
|
+
needTick,
|
|
26
|
+
isLink,
|
|
27
|
+
href,
|
|
28
|
+
target,
|
|
29
|
+
needBorder,
|
|
30
|
+
isDisabled,
|
|
31
|
+
bulletColor,
|
|
32
|
+
a11y,
|
|
33
|
+
needMultiLineText,
|
|
34
|
+
index,
|
|
35
|
+
getRef,
|
|
36
|
+
id,
|
|
37
|
+
onClick,
|
|
38
|
+
onMouseEnter
|
|
39
|
+
} = props;
|
|
40
|
+
let options = {};
|
|
41
|
+
let {
|
|
42
|
+
role,
|
|
43
|
+
ariaSelected,
|
|
44
|
+
ariaHidden = true
|
|
45
|
+
} = a11y;
|
|
46
|
+
|
|
47
|
+
if (isLink) {
|
|
48
|
+
options.href = href;
|
|
49
|
+
options.target = `_${target}`;
|
|
21
50
|
}
|
|
22
51
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
id
|
|
29
|
-
} = this.props;
|
|
30
|
-
getRef && getRef(ele, index, id);
|
|
52
|
+
const element = useRef(null);
|
|
53
|
+
|
|
54
|
+
function getReference(ele) {
|
|
55
|
+
element.current = ele;
|
|
56
|
+
getRef && getRef(element.current, index, id);
|
|
31
57
|
}
|
|
32
58
|
|
|
33
|
-
handleClick(e) {
|
|
34
|
-
let {
|
|
35
|
-
onClick,
|
|
36
|
-
id,
|
|
37
|
-
value,
|
|
38
|
-
index
|
|
39
|
-
} = this.props;
|
|
59
|
+
function handleClick(e) {
|
|
40
60
|
onClick && onClick(id, value, index, e);
|
|
41
61
|
}
|
|
42
62
|
|
|
43
|
-
handleMouseEnter(e) {
|
|
44
|
-
let {
|
|
45
|
-
onMouseEnter,
|
|
46
|
-
id,
|
|
47
|
-
value,
|
|
48
|
-
index
|
|
49
|
-
} = this.props;
|
|
63
|
+
function handleMouseEnter(e) {
|
|
50
64
|
onMouseEnter && onMouseEnter(id, value, index, e);
|
|
51
65
|
}
|
|
52
66
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
options.href = href;
|
|
82
|
-
options.target = `_${target}`;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
86
|
-
role: role,
|
|
87
|
-
"aria-selected": ariaSelected,
|
|
88
|
-
isCover: false,
|
|
89
|
-
align: "baseline",
|
|
90
|
-
alignBox: "row",
|
|
91
|
-
className: `${style.list} ${style[size]} ${style[palette]} ${active ? style.active : highlight && !isDisabled ? style.hover : ''} ${autoHover && !isDisabled ? style.effect : ''} ${needTick ? style.withTick : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? style.withBorder : ''}`,
|
|
92
|
-
dataId: String(value).replace("'", '_'),
|
|
93
|
-
onClick: !isDisabled && this.handleClick,
|
|
94
|
-
onMouseEnter: this.handleMouseEnter,
|
|
95
|
-
eleRef: this.getRef,
|
|
96
|
-
tagName: isLink ? 'a' : 'li',
|
|
97
|
-
"data-title": isDisabled ? disableTitle : null,
|
|
98
|
-
tabindex: isDisabled ? '-1' : '0'
|
|
99
|
-
}, options), /*#__PURE__*/React.createElement(Box, {
|
|
100
|
-
className: `${style.statusType} ${style[bulletColor]}`
|
|
101
|
-
}), /*#__PURE__*/React.createElement(Box, {
|
|
102
|
-
"data-title": isDisabled ? null : title,
|
|
103
|
-
flexible: true,
|
|
104
|
-
shrink: true,
|
|
105
|
-
className: needMultiLineText ? style.multiLineValue : style.value
|
|
106
|
-
}, value), needTick && active ? /*#__PURE__*/React.createElement("div", {
|
|
107
|
-
className: style.tickIcon,
|
|
108
|
-
"aria-hidden": ariaHidden
|
|
109
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
110
|
-
name: "ZD-ticknew",
|
|
111
|
-
size: "8"
|
|
112
|
-
})) : null);
|
|
113
|
-
}
|
|
114
|
-
|
|
67
|
+
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
68
|
+
role: role,
|
|
69
|
+
"aria-selected": ariaSelected,
|
|
70
|
+
isCover: false,
|
|
71
|
+
align: "baseline",
|
|
72
|
+
alignBox: "row",
|
|
73
|
+
className: `${style.list} ${style[size]} ${style[palette]} ${active ? style.active : highlight && !isDisabled ? style.hover : ''} ${autoHover && !isDisabled ? style.effect : ''} ${needTick ? style.withTick : ''} ${isDisabled ? CssProvider('isDisable') : ''} ${needBorder ? style.withBorder : ''}`,
|
|
74
|
+
dataId: String(value).replace("'", '_'),
|
|
75
|
+
onClick: !isDisabled && handleClick,
|
|
76
|
+
onMouseEnter: handleMouseEnter,
|
|
77
|
+
eleRef: getReference,
|
|
78
|
+
tagName: isLink ? 'a' : 'li',
|
|
79
|
+
"data-title": isDisabled ? disableTitle : null,
|
|
80
|
+
tabindex: isDisabled ? '-1' : '0'
|
|
81
|
+
}, options), /*#__PURE__*/React.createElement(Box, {
|
|
82
|
+
className: `${style.statusType} ${style[bulletColor]}`
|
|
83
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
84
|
+
"data-title": isDisabled ? null : title,
|
|
85
|
+
flexible: true,
|
|
86
|
+
shrink: true,
|
|
87
|
+
className: needMultiLineText ? style.multiLineValue : style.value
|
|
88
|
+
}, value), needTick && active ? /*#__PURE__*/React.createElement("div", {
|
|
89
|
+
className: style.tickIcon,
|
|
90
|
+
"aria-hidden": ariaHidden
|
|
91
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
92
|
+
name: "ZD-ticknew",
|
|
93
|
+
size: "8"
|
|
94
|
+
})) : null);
|
|
115
95
|
}
|
|
116
96
|
StatusListItem.defaultProps = defaultProps;
|
|
117
|
-
StatusListItem.propTypes = propTypes;
|
|
118
|
-
// StatusListItem.docs = {
|
|
119
|
-
// componentGroup: 'StatusListItem',
|
|
120
|
-
// folderName: 'List'
|
|
121
|
-
// };
|
|
122
|
-
// }
|
|
97
|
+
StatusListItem.propTypes = propTypes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*** Libraries ***/
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { defaultProps } from '../../../lookup/EmptyPage/props/defaultProps';
|
|
4
4
|
import { propTypes } from '../../../lookup/EmptyPage/props/propTypes';
|
|
5
5
|
import EmptySearch from '@zohodesk/svg/lib/emptystate/version3/EmptySearch';
|
|
@@ -9,13 +9,13 @@ import EmptyProducts from '@zohodesk/svg/lib/emptystate/version3/EmptyProducts';
|
|
|
9
9
|
/*** CSS ***/
|
|
10
10
|
|
|
11
11
|
import style from '../../../lookup/EmptyPage/LookupEmptyPage.module.css';
|
|
12
|
-
export default
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
12
|
+
export default function EmptyPage(props) {
|
|
13
|
+
let {
|
|
14
|
+
type,
|
|
15
|
+
title
|
|
16
|
+
} = props;
|
|
17
17
|
|
|
18
|
-
renderEmptyState(type) {
|
|
18
|
+
function renderEmptyState(type) {
|
|
19
19
|
switch (type) {
|
|
20
20
|
case 'search':
|
|
21
21
|
return /*#__PURE__*/React.createElement(EmptySearch, {
|
|
@@ -42,24 +42,13 @@ export default class EmptyPage extends Component {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"data-id": `empty_${type}`,
|
|
53
|
-
"data-test-id": `empty_${type}`
|
|
54
|
-
}, this.renderEmptyState(type), /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className: style.contentDiv
|
|
56
|
-
}, title));
|
|
57
|
-
}
|
|
58
|
-
|
|
45
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: style.container,
|
|
47
|
+
"data-id": `empty_${type}`,
|
|
48
|
+
"data-test-id": `empty_${type}`
|
|
49
|
+
}, renderEmptyState(type), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: style.contentDiv
|
|
51
|
+
}, title));
|
|
59
52
|
}
|
|
60
53
|
EmptyPage.propTypes = propTypes;
|
|
61
|
-
EmptyPage.defaultProps = defaultProps;
|
|
62
|
-
// EmptyPage.docs = {
|
|
63
|
-
// componentGroup: 'Lookup'
|
|
64
|
-
// };
|
|
65
|
-
// }
|
|
54
|
+
EmptyPage.defaultProps = defaultProps;
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { propTypes } from '../../../lookup/Section/props/propTypes';
|
|
3
3
|
import { Container, Box } from '@zohodesk/components/es/v1/Layout';
|
|
4
4
|
import style from '../../../lookup/Section/LookupSection.module.css';
|
|
5
|
-
export default
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
className: `${style.section} ${className ? className : ''}`
|
|
19
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
20
|
-
flexible: true
|
|
21
|
-
}, this.props.children));
|
|
22
|
-
}
|
|
23
|
-
|
|
5
|
+
export default function Section(props) {
|
|
6
|
+
let {
|
|
7
|
+
alignBox,
|
|
8
|
+
className,
|
|
9
|
+
children
|
|
10
|
+
} = props;
|
|
11
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
12
|
+
"data-drag-container": "true",
|
|
13
|
+
alignBox: alignBox,
|
|
14
|
+
className: `${style.section} ${className ? className : ''}`
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
16
|
+
flexible: true
|
|
17
|
+
}, children));
|
|
24
18
|
}
|
|
25
19
|
Section.propTypes = propTypes;
|
package/es/v1/svg/PlusIcon.js
CHANGED
|
@@ -1,32 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PlusIcon_defaultProps } from '../../svg/props/defaultProps';
|
|
3
3
|
import { PlusIcon_propTypes } from '../../svg/props/propTypes';
|
|
4
|
-
import SVG from '@zohodesk/svg/lib/SVG/SVG';
|
|
5
|
-
export default
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})));
|
|
24
|
-
}
|
|
25
|
-
|
|
4
|
+
import SVG from '@zohodesk/svg/lib/v1/SVG/SVG';
|
|
5
|
+
export default function PlusIcon(props) {
|
|
6
|
+
let {
|
|
7
|
+
isRender,
|
|
8
|
+
isSymbol,
|
|
9
|
+
className
|
|
10
|
+
} = props;
|
|
11
|
+
return /*#__PURE__*/React.createElement(SVG, {
|
|
12
|
+
viewBox: "0 0 32 32",
|
|
13
|
+
name: "PlusIcon",
|
|
14
|
+
isRender: isRender,
|
|
15
|
+
isSymbol: isSymbol,
|
|
16
|
+
className: className
|
|
17
|
+
}, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
18
|
+
style: {
|
|
19
|
+
fill: '#767d89'
|
|
20
|
+
},
|
|
21
|
+
d: "M16,2.7c0.4,0,0.7,0.1,0.9,0.4s0.4,0.6,0.4,0.9v10.7H28c0.4,0,0.7,0.1,0.9,0.4c0.3,0.3,0.4,0.6,0.4,0.9 c0,0.4-0.1,0.7-0.4,0.9c-0.3,0.3-0.6,0.4-0.9,0.4H17.3V28c0,0.4-0.1,0.7-0.4,0.9c-0.3,0.3-0.6,0.4-0.9,0.4c-0.4,0-0.7-0.1-0.9-0.4 c-0.3-0.3-0.4-0.6-0.4-0.9V17.3H4c-0.4,0-0.7-0.1-0.9-0.4S2.7,16.4,2.7,16s0.1-0.7,0.4-0.9c0.3-0.3,0.6-0.4,0.9-0.4h10.7V4 c0-0.4,0.1-0.7,0.4-0.9C15.3,2.8,15.6,2.7,16,2.7z"
|
|
22
|
+
})));
|
|
26
23
|
}
|
|
27
24
|
PlusIcon.propTypes = PlusIcon_propTypes;
|
|
28
|
-
PlusIcon.defaultProps = PlusIcon_defaultProps;
|
|
29
|
-
// PlusIcon.docs = {
|
|
30
|
-
// componentGroup: 'SVG'
|
|
31
|
-
// };
|
|
32
|
-
// }
|
|
25
|
+
PlusIcon.defaultProps = PlusIcon_defaultProps;
|
package/es/v1/svg/SnippetIcon.js
CHANGED
|
@@ -1,34 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SnippetIcon_defaultProps } from '../../svg/props/defaultProps';
|
|
3
3
|
import { SnippetIcon_propTypes } from '../../svg/props/propTypes';
|
|
4
|
-
import SVG from '@zohodesk/svg/lib/SVG/SVG';
|
|
5
|
-
export default
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})));
|
|
26
|
-
}
|
|
27
|
-
|
|
4
|
+
import SVG from '@zohodesk/svg/lib/v1/SVG/SVG';
|
|
5
|
+
export default function SnippetIcon(props) {
|
|
6
|
+
let {
|
|
7
|
+
isRender,
|
|
8
|
+
isSymbol,
|
|
9
|
+
className
|
|
10
|
+
} = props;
|
|
11
|
+
return /*#__PURE__*/React.createElement(SVG, {
|
|
12
|
+
viewBox: "0 0 31 32",
|
|
13
|
+
name: "SnippetIcon",
|
|
14
|
+
isRender: isRender,
|
|
15
|
+
isSymbol: isSymbol,
|
|
16
|
+
className: className
|
|
17
|
+
}, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("path", {
|
|
18
|
+
d: "M14.4,8.2L15.6,9L16,8.4l-1-0.7l2.5-3.7L11.5,0L8.9,3.8L7.9,3L7.6,3.6l1.2,0.8c-2.3,3-5.9,0.8-6,0.7L2.3,4.9L0,23.8 l16.6-9.3l-0.4-0.3C15.9,13.9,12.6,11.5,14.4,8.2L14.4,8.2z M1.5,22l5.2-7.7c0.3,0.1,0.6,0.2,0.9,0.2c1.2,0,2.1-0.9,2.2-2.1 c0-1.2-0.9-2.1-2.1-2.2c-1.2,0-2.1,0.9-2.2,2.1c0,0.6,0.2,1.2,0.7,1.6L1,21.6L2.8,6c1.2,0.6,4.4,1.7,6.5-1.1l4.5,3 c-1.8,3,0.4,5.6,1.4,6.5L1.5,22L1.5,22z M6.7,13.6c-0.7-0.4-0.8-1.3-0.4-2s1.3-0.8,2-0.4c0.7,0.4,0.8,1.3,0.4,2 c-0.2,0.3-0.5,0.5-0.9,0.6C7.5,13.9,7.1,13.8,6.7,13.6L6.7,13.6z"
|
|
19
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
style: {
|
|
21
|
+
fill: '#03A3FE'
|
|
22
|
+
},
|
|
23
|
+
d: "M30.9,25c-4.9,0.7-5.4,1.2-5.9,6.7c-0.6-5.4-1.1-6-6.1-6.5c4.9-0.7,5.4-1.2,5.9-6.7 C25.4,23.9,25.9,24.5,30.9,25z M30.3,8.2c-4.5,0.6-4.9,1.1-5.5,6.3c-0.5-5.3-0.9-5.8-5.4-6.4c4.5-0.6,4.9-1.1,5.5-6.3 C25.4,7.1,25.8,7.6,30.3,8.2z M16.2,25.7c-4.5,0.6-4.9,1.1-5.5,6.3c-0.5-5.3-0.9-5.8-5.4-6.4c4.5-0.6,4.9-1.1,5.5-6.3 C11.3,24.6,11.7,25.1,16.2,25.7z"
|
|
24
|
+
})));
|
|
28
25
|
}
|
|
29
26
|
SnippetIcon.propTypes = SnippetIcon_propTypes;
|
|
30
|
-
SnippetIcon.defaultProps = SnippetIcon_defaultProps;
|
|
31
|
-
// SnippetIcon.docs = {
|
|
32
|
-
// componentGroup: 'SVG'
|
|
33
|
-
// };
|
|
34
|
-
// }
|
|
27
|
+
SnippetIcon.defaultProps = SnippetIcon_defaultProps;
|
|
@@ -1,35 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TemplateIcon_defaultProps } from '../../svg/props/defaultProps';
|
|
3
3
|
import { TemplateIcon_propTypes } from '../../svg/props/propTypes';
|
|
4
|
-
import SVG from '@zohodesk/svg/lib/SVG/SVG';
|
|
5
|
-
export default
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
|
|
4
|
+
import SVG from '@zohodesk/svg/lib/v1/SVG/SVG';
|
|
5
|
+
export default function TemplateIcon(props) {
|
|
6
|
+
let {
|
|
7
|
+
isRender,
|
|
8
|
+
isSymbol,
|
|
9
|
+
className
|
|
10
|
+
} = props;
|
|
11
|
+
return /*#__PURE__*/React.createElement(SVG, {
|
|
12
|
+
viewBox: "0 0 40 40",
|
|
13
|
+
name: "TemplateIcon",
|
|
14
|
+
isRender: isRender,
|
|
15
|
+
isSymbol: isSymbol,
|
|
16
|
+
className: className
|
|
17
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
18
|
+
d: "M33.09,3H6.91A3.91,3.91,0,0,0,3,6.91V33.09A3.91,3.91,0,0,0,6.91,37H33.09A3.91,3.91,0,0,0,37,33.09V6.91A3.92,3.92,0,0,0,33.09,3ZM6.91,5H33.09A1.92,1.92,0,0,1,35,6.91v4.62H5V6.91A1.92,1.92,0,0,1,6.91,5ZM33.09,35H6.91A1.92,1.92,0,0,1,5,33.09V13.53H35V33.09A1.92,1.92,0,0,1,33.09,35Z"
|
|
19
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
d: "M9.33,9.33A1.07,1.07,0,1,0,8.27,8.27,1.06,1.06,0,0,0,9.33,9.33Z"
|
|
21
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
d: "M13.6,9.33a1.07,1.07,0,1,0-1.07-1.06A1.06,1.06,0,0,0,13.6,9.33Z"
|
|
23
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24
|
+
d: "M24.87,23H21V19.13a1,1,0,1,0-2,0V23H15.13a1,1,0,0,0,0,2H19v3.86a1,1,0,0,0,2,0V25h3.87a1,1,0,1,0,0-2Z"
|
|
25
|
+
}));
|
|
29
26
|
}
|
|
30
27
|
TemplateIcon.propTypes = TemplateIcon_propTypes;
|
|
31
|
-
TemplateIcon.defaultProps = TemplateIcon_defaultProps;
|
|
32
|
-
// TemplateIcon.docs = {
|
|
33
|
-
// componentGroup: 'SVG'
|
|
34
|
-
// };
|
|
35
|
-
// }
|
|
28
|
+
TemplateIcon.defaultProps = TemplateIcon_defaultProps;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _react2 = require("@testing-library/react");
|
|
6
|
+
|
|
7
|
+
var _IconButton = _interopRequireDefault(require("../IconButton.js"));
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
|
|
11
|
+
describe('IconButton', function () {
|
|
12
|
+
test('rendering the defult props', function () {
|
|
13
|
+
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], null)),
|
|
14
|
+
asFragment = _render.asFragment;
|
|
15
|
+
|
|
16
|
+
expect(asFragment()).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
var palette = ['primary', 'primaryFilled', 'default'];
|
|
19
|
+
test.each(palette)('rendering the palette of- %s', function (palette) {
|
|
20
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
21
|
+
palette: palette
|
|
22
|
+
})),
|
|
23
|
+
asFragment = _render2.asFragment;
|
|
24
|
+
|
|
25
|
+
expect(asFragment()).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
test.each(palette)('rendering the isActive true with palette of- %s', function (palette) {
|
|
28
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
29
|
+
isActive: true,
|
|
30
|
+
palette: palette
|
|
31
|
+
})),
|
|
32
|
+
asFragment = _render3.asFragment;
|
|
33
|
+
|
|
34
|
+
expect(asFragment()).toMatchSnapshot();
|
|
35
|
+
});
|
|
36
|
+
var hoverType = ['default', 'border', 'bg'];
|
|
37
|
+
test.each(hoverType)('rendering the hovertypes- %s', function (hoverType) {
|
|
38
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
39
|
+
hoverType: hoverType
|
|
40
|
+
})),
|
|
41
|
+
asFragment = _render4.asFragment;
|
|
42
|
+
|
|
43
|
+
expect(asFragment()).toMatchSnapshot();
|
|
44
|
+
});
|
|
45
|
+
test('rendering isNeedEffect is False', function () {
|
|
46
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
47
|
+
isNeedEffect: false
|
|
48
|
+
})),
|
|
49
|
+
asFragment = _render5.asFragment;
|
|
50
|
+
|
|
51
|
+
expect(asFragment()).toMatchSnapshot();
|
|
52
|
+
});
|
|
53
|
+
test('rendering ally', function () {
|
|
54
|
+
var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
55
|
+
a11y: {
|
|
56
|
+
ariaLabel: 'ariaLabel',
|
|
57
|
+
ariaControls: 'ariaControls',
|
|
58
|
+
ariaLabelledby: 'ariaLabelledby',
|
|
59
|
+
ariaHaspopup: true,
|
|
60
|
+
ariaExpanded: true
|
|
61
|
+
}
|
|
62
|
+
})),
|
|
63
|
+
asFragment = _render6.asFragment;
|
|
64
|
+
|
|
65
|
+
expect(asFragment()).toMatchSnapshot();
|
|
66
|
+
});
|
|
67
|
+
test('rendering ally', function () {
|
|
68
|
+
var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
69
|
+
a11y: {
|
|
70
|
+
ariaHaspopup: false,
|
|
71
|
+
ariaExpanded: false
|
|
72
|
+
}
|
|
73
|
+
})),
|
|
74
|
+
asFragment = _render7.asFragment;
|
|
75
|
+
|
|
76
|
+
expect(asFragment()).toMatchSnapshot();
|
|
77
|
+
});
|
|
78
|
+
test('rendering needButtonTag', function () {
|
|
79
|
+
var _render8 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
80
|
+
needButtonTag: false
|
|
81
|
+
})),
|
|
82
|
+
asFragment = _render8.asFragment;
|
|
83
|
+
|
|
84
|
+
expect(asFragment()).toMatchSnapshot();
|
|
85
|
+
});
|
|
86
|
+
test('rendering tourId', function () {
|
|
87
|
+
var _render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
88
|
+
tourId: "tourId"
|
|
89
|
+
})),
|
|
90
|
+
asFragment = _render9.asFragment;
|
|
91
|
+
|
|
92
|
+
expect(asFragment()).toMatchSnapshot();
|
|
93
|
+
});
|
|
94
|
+
test('rendering in Icon', function () {
|
|
95
|
+
var _render10 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
96
|
+
iconName: "ZD-GN-infoStroke",
|
|
97
|
+
isBold: true,
|
|
98
|
+
iconSize: "13",
|
|
99
|
+
iconClass: "iconClass"
|
|
100
|
+
})),
|
|
101
|
+
asFragment = _render10.asFragment;
|
|
102
|
+
|
|
103
|
+
expect(asFragment()).toMatchSnapshot();
|
|
104
|
+
});
|
|
105
|
+
test('rendering in dataIsHtml is True', function () {
|
|
106
|
+
var _render11 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
107
|
+
dataIsHtml: true
|
|
108
|
+
})),
|
|
109
|
+
asFragment = _render11.asFragment;
|
|
110
|
+
|
|
111
|
+
expect(asFragment()).toMatchSnapshot();
|
|
112
|
+
});
|
|
113
|
+
test('rendering in isDisabled is True', function () {
|
|
114
|
+
var _render12 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
115
|
+
isDisabled: true
|
|
116
|
+
})),
|
|
117
|
+
asFragment = _render12.asFragment;
|
|
118
|
+
|
|
119
|
+
expect(asFragment()).toMatchSnapshot();
|
|
120
|
+
});
|
|
121
|
+
test('rendering in ClassName', function () {
|
|
122
|
+
var _render13 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
123
|
+
className: "IconButtonClass"
|
|
124
|
+
})),
|
|
125
|
+
asFragment = _render13.asFragment;
|
|
126
|
+
|
|
127
|
+
expect(asFragment()).toMatchSnapshot();
|
|
128
|
+
});
|
|
129
|
+
test('rendering in title', function () {
|
|
130
|
+
var _render14 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
131
|
+
title: "IconTitle"
|
|
132
|
+
})),
|
|
133
|
+
asFragment = _render14.asFragment;
|
|
134
|
+
|
|
135
|
+
expect(asFragment()).toMatchSnapshot();
|
|
136
|
+
});
|
|
137
|
+
test('eleRef prop is a function', function () {
|
|
138
|
+
// Create a mock function
|
|
139
|
+
var mockEleRef = jest.fn();
|
|
140
|
+
|
|
141
|
+
var _render15 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
142
|
+
eleRef: mockEleRef
|
|
143
|
+
})),
|
|
144
|
+
asFragment = _render15.asFragment;
|
|
145
|
+
|
|
146
|
+
expect(asFragment()).toMatchSnapshot();
|
|
147
|
+
});
|
|
148
|
+
test('Checking the "Children"', function () {
|
|
149
|
+
var _render16 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
150
|
+
customClass: "customClassButtonGroup"
|
|
151
|
+
}, /*#__PURE__*/_react["default"].createElement("span", null, "Element 1"), /*#__PURE__*/_react["default"].createElement("span", null, "Element 2"), /*#__PURE__*/_react["default"].createElement("span", null, "Element 3"))),
|
|
152
|
+
asFragment = _render16.asFragment;
|
|
153
|
+
|
|
154
|
+
expect(asFragment()).toMatchSnapshot();
|
|
155
|
+
});
|
|
156
|
+
});
|