@zohodesk/dot 1.0.0-temp-111 → 1.0.0-temp-113
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 +1 -2
- package/css_error.log +0 -0
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +8 -4
- package/es/form/fields/CheckBoxField/CheckBoxField.js +2 -3
- package/es/form/fields/CurrencyField/CurrencyField.js +8 -43
- package/es/form/fields/CurrencyField/props/defaultProps.js +0 -1
- package/es/form/fields/DateField/DateField.js +8 -93
- package/es/form/fields/DateField/props/defaultProps.js +0 -1
- package/es/form/fields/Fields.module.css +0 -65
- package/es/form/fields/MultiSelectField/MultiSelectField.js +9 -91
- package/es/form/fields/MultiSelectField/props/defaultProps.js +0 -1
- package/es/form/fields/PhoneField/PhoneField.js +1 -3
- package/es/form/fields/PhoneField/props/defaultProps.js +1 -2
- package/es/form/fields/RadioField/RadioField.js +1 -1
- package/es/form/fields/SelectField/SelectField.js +12 -99
- package/es/form/fields/SelectField/props/defaultProps.js +0 -1
- package/es/form/fields/TextBoxField/TextBoxField.js +8 -59
- package/es/form/fields/TextBoxField/props/defaultProps.js +0 -1
- package/es/form/fields/TextareaField/TextareaField.js +12 -58
- package/es/form/fields/TextareaField/props/defaultProps.js +0 -1
- package/es/list/ListLayout/ListLayout.js +1 -0
- package/lib/ActionButton/ActionButton.js +1 -3
- package/lib/AlphabeticList/AlphabeticList.js +1 -3
- package/lib/Attachment/Attachment.js +1 -3
- package/lib/AttachmentViewer/AttachmentImage.js +1 -3
- package/lib/AttachmentViewer/AttachmentViewer.js +1 -3
- package/lib/AttachmentViewer/utils.js +1 -4
- package/lib/ChannelIcon/ChannelIcon.js +1 -3
- package/lib/Drawer/Drawer.js +1 -3
- package/lib/ExternalLink/ExternalLink.js +1 -3
- package/lib/FlipCard/FlipCard.js +1 -3
- package/lib/FormAction/FormAction.js +1 -3
- package/lib/FreezeLayer/FreezeLayer.js +1 -3
- package/lib/IconButton/IconButton.js +1 -3
- package/lib/IconButton/props/propTypes.js +1 -4
- package/lib/Image/Image.js +1 -3
- package/lib/ImportantNotes/ImportantNotes.js +1 -3
- package/lib/Link/Link.js +1 -3
- package/lib/Loader/Loader.js +1 -3
- package/lib/Message/Message.js +1 -3
- package/lib/MessageBanner/MessageBanner.js +1 -3
- package/lib/NewStar/NewStar.js +1 -3
- package/lib/PlusIcon/PlusIcon.js +1 -3
- package/lib/ToastMessage/ToastMessage.js +1 -1
- package/lib/Upload/Upload.js +1 -3
- package/lib/actions/AutoClose.js +1 -1
- package/lib/alert/AlertHeader/AlertHeader.js +1 -3
- package/lib/alert/AlertLookup/AlertLookup.js +1 -3
- package/lib/avatar/AvatarClose/AvatarClose.js +1 -3
- package/lib/avatar/AvatarCollision/AvatarCollision.js +1 -3
- package/lib/avatar/AvatarIcon/AvatarIcon.js +1 -3
- package/lib/avatar/AvatarStatus/AvatarStatus.js +1 -3
- package/lib/avatar/AvatarThread/AvatarThread.js +1 -3
- package/lib/avatar/AvatarUser/AvatarUser.js +2 -5
- package/lib/avatar/AvatarWithTeam/AvatarWithTeam.js +1 -3
- package/lib/deprecated/SelectDropdown/SelectDropdown.js +1 -3
- package/lib/deprecated/utils/KeyboardApi.js +1 -4
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +10 -8
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.js +1 -3
- package/lib/emptystate/EditionPage/EditionPage.js +1 -3
- package/lib/errorstate/Inconvenience/Inconvenience.js +1 -3
- package/lib/errorstate/LinkText/LinkText.js +1 -3
- package/lib/errorstate/NoRequestFound/NoRequestFound.js +1 -3
- package/lib/errorstate/PermissionPlay/PermissionPlay.js +1 -3
- package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +1 -3
- package/lib/errorstate/UnableToProcess/UnableToProcess.js +1 -3
- package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +1 -3
- package/lib/errorstate/WillBack/WillBack.js +1 -3
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +3 -6
- package/lib/form/fields/CheckBoxField/props/defaultProps.js +1 -4
- package/lib/form/fields/CheckBoxField/props/propTypes.js +1 -4
- package/lib/form/fields/CurrencyField/CurrencyField.js +42 -79
- package/lib/form/fields/CurrencyField/props/defaultProps.js +1 -5
- package/lib/form/fields/CurrencyField/props/propTypes.js +1 -4
- package/lib/form/fields/DateField/DateField.js +41 -131
- package/lib/form/fields/DateField/props/defaultProps.js +1 -4
- package/lib/form/fields/DateField/props/propTypes.js +1 -4
- package/lib/form/fields/FieldContainer/FieldContainer.js +1 -3
- package/lib/form/fields/FieldContainer/props/defaultProps.js +1 -4
- package/lib/form/fields/FieldContainer/props/propTypes.js +1 -4
- package/lib/form/fields/Fields.module.css +0 -65
- package/lib/form/fields/MultiSelectField/MultiSelectField.js +53 -138
- package/lib/form/fields/MultiSelectField/props/defaultProps.js +1 -4
- package/lib/form/fields/MultiSelectField/props/propTypes.js +1 -4
- package/lib/form/fields/PhoneField/PhoneField.js +2 -6
- package/lib/form/fields/PhoneField/props/defaultProps.js +1 -2
- package/lib/form/fields/RadioField/RadioField.js +2 -4
- package/lib/form/fields/SelectField/SelectField.js +61 -153
- package/lib/form/fields/SelectField/props/defaultProps.js +2 -6
- package/lib/form/fields/SelectField/props/propTypes.js +1 -4
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +1 -3
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +1 -1
- package/lib/form/fields/TagsMultiSelectField/props/defaultProps.js +1 -4
- package/lib/form/fields/TagsMultiSelectField/props/propTypes.js +1 -4
- package/lib/form/fields/TextBoxField/TextBoxField.js +44 -97
- package/lib/form/fields/TextBoxField/props/defaultProps.js +2 -6
- package/lib/form/fields/TextBoxField/props/propTypes.js +1 -4
- package/lib/form/fields/TextEditor/TextEditor.js +2 -4
- package/lib/form/fields/TextEditorField/TextEditorField.js +1 -3
- package/lib/form/fields/TextEditorField/props/defaultProps.js +1 -4
- package/lib/form/fields/TextEditorField/props/propTypes.js +1 -4
- package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.js +2 -5
- package/lib/form/fields/TextareaField/TextareaField.js +45 -92
- package/lib/form/fields/TextareaField/props/defaultProps.js +1 -4
- package/lib/form/fields/TextareaField/props/propTypes.js +1 -4
- package/lib/form/fields/ValidationMessage/ValidationMessage.js +1 -3
- package/lib/form/layout/Field/Field.js +1 -3
- package/lib/form/layout/Section/Section.js +1 -3
- package/lib/layout/SetupDetailLayout/SetupDetailLayout.js +1 -3
- package/lib/layout/SubtabLayout/SubtabLayout.js +1 -3
- package/lib/list/AvatarFlip/AvatarFlip.js +1 -3
- package/lib/list/BluePrintStatus/BluePrintStatus.js +1 -3
- package/lib/list/Comment/Comment.js +1 -3
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +1 -3
- package/lib/list/DepartmentDropDown/props/propTypes.js +1 -4
- package/lib/list/Dot/Dot.js +1 -3
- package/lib/list/DotNew/DotNew.js +1 -3
- package/lib/list/GridStencils/GridStencils.js +1 -3
- package/lib/list/Icons/AddNewIcon.js +1 -3
- package/lib/list/Icons/CompleteIcon.js +1 -3
- package/lib/list/Icons/DeleteIcon.js +1 -3
- package/lib/list/Icons/EditIcon.js +1 -3
- package/lib/list/Icons/FloatingIcons.js +1 -3
- package/lib/list/Icons/ReadUnreadIcon.js +1 -3
- package/lib/list/Icons/SmartIcon.js +1 -3
- package/lib/list/ListLayout/ListLayout.js +2 -3
- package/lib/list/ListLayout/props/propTypes.js +1 -4
- package/lib/list/ListStencils/ListStencils.js +1 -3
- package/lib/list/SecondaryText/AccountName.js +1 -3
- package/lib/list/SecondaryText/ContactName.js +1 -3
- package/lib/list/SecondaryText/DepartmentText.js +1 -3
- package/lib/list/SecondaryText/Email.js +1 -3
- package/lib/list/SecondaryText/HappinessRating.js +1 -3
- package/lib/list/SecondaryText/PhoneNumber.js +1 -3
- package/lib/list/SecondaryText/PriorityText.js +1 -3
- package/lib/list/SecondaryText/SecondaryText.js +1 -3
- package/lib/list/SecondaryText/StatusText.js +1 -3
- package/lib/list/SecondaryText/TicketId.js +1 -3
- package/lib/list/SecondaryText/Website.js +1 -3
- package/lib/list/SecondryPanel/SecondryPanel.js +1 -3
- package/lib/list/SentimentStatus/SentimentStatus.js +1 -3
- package/lib/list/Subject/Subject.js +1 -3
- package/lib/list/TagNew/TagNew.js +1 -3
- package/lib/list/Thread/Thread.js +1 -3
- package/lib/list/UserTime/UserTime.js +1 -3
- package/lib/list/status/StatusDropdown/StatusDropdown.js +1 -3
- package/lib/list/status/StatusDropdown/props/propTypes.js +1 -4
- package/lib/list/status/StatusListItem/StatusListItem.js +1 -3
- package/lib/lookup/EmptyPage/EmptyPage.js +1 -3
- package/lib/lookup/Lookup/Lookup.js +2 -5
- package/lib/lookup/Section/Section.js +1 -3
- package/lib/lookup/header/Close/Close.js +1 -3
- package/lib/lookup/header/ModuleHeader/ModuleHeader.js +2 -5
- package/lib/lookup/header/Search/Search.js +1 -3
- package/lib/lookup/header/TicketHeader/TicketHeader.js +2 -5
- package/lib/lookup/header/Title/Title.js +1 -3
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +1 -3
- package/lib/setup/header/Button/Button.js +1 -3
- package/lib/setup/header/Link/Link.js +1 -3
- package/lib/setup/header/Search/Search.js +1 -3
- package/lib/setup/header/Views/Views.js +1 -3
- package/lib/setup/helptips/Description/Description.js +1 -3
- package/lib/setup/helptips/Link/Link.js +1 -3
- package/lib/setup/helptips/ListGroup/ListGroup.js +1 -3
- package/lib/setup/helptips/Title/Title.js +1 -3
- package/lib/setup/table/Table/Table.js +1 -3
- package/lib/setup/table/TableBody/TableBody.js +1 -3
- package/lib/setup/table/TableData/TableData.js +1 -3
- package/lib/setup/table/TableHead/TableHead.js +1 -3
- package/lib/setup/table/TableRow/TableRow.js +1 -3
- package/lib/setup/table/Text/Text.js +1 -3
- package/lib/svg/PlusIcon.js +1 -3
- package/lib/svg/SnippetIcon.js +1 -3
- package/lib/svg/TemplateIcon.js +1 -3
- package/lib/version2/AlertClose/AlertClose.js +1 -3
- package/lib/version2/GlobalNotification/GlobalNotification.js +1 -3
- package/lib/version2/alertIcons/AlarmAlertIcon.js +1 -3
- package/lib/version2/alertIcons/AlertIcons.js +1 -3
- package/lib/version2/alertIcons/DangerAlertIcon.js +1 -3
- package/lib/version2/alertIcons/ErrorAlertIcon.js +1 -3
- package/lib/version2/alertIcons/InfoAlertIcon.js +1 -3
- package/lib/version2/alertIcons/NotificationAlertIcon.js +1 -3
- package/lib/version2/alertIcons/SuccessAlertIcon.js +1 -3
- package/lib/version2/alertIcons/WarningAlertIcon.js +1 -3
- package/lib/version2/errorstate/Inconvenience/Inconvenience.js +1 -3
- package/lib/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +1 -3
- package/lib/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -3
- package/lib/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +1 -3
- package/lib/version2/errorstate/UrlNotFound/UrlNotFound.js +1 -3
- package/lib/version2/errorstate/WillBeRightBack/WillBeRightBack.js +1 -3
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +1 -3
- package/lib/version2/lookup/AlertLookup/AlertLookup.js +1 -3
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +1 -3
- package/package.json +2 -2
package/README.md
CHANGED
package/css_error.log
ADDED
|
File without changes
|
|
@@ -711,7 +711,8 @@ export class ToggleDropDown extends Component {
|
|
|
711
711
|
palette: palette,
|
|
712
712
|
a11y: {
|
|
713
713
|
role: isSearch ? 'option' : 'menuitem',
|
|
714
|
-
ariaSelected: selectedId === item[idName]
|
|
714
|
+
ariaSelected: selectedId === item[idName],
|
|
715
|
+
ariaLabel: item[keyName]
|
|
715
716
|
}
|
|
716
717
|
}, ListItemWithIconProps)) : /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
717
718
|
key: listIndex,
|
|
@@ -732,7 +733,8 @@ export class ToggleDropDown extends Component {
|
|
|
732
733
|
palette: palette,
|
|
733
734
|
a11y: {
|
|
734
735
|
role: isSearch ? 'option' : 'menuitem',
|
|
735
|
-
ariaSelected: selectedId === item[idName]
|
|
736
|
+
ariaSelected: selectedId === item[idName],
|
|
737
|
+
ariaLabel: item[keyName]
|
|
736
738
|
}
|
|
737
739
|
}, ListItemProps));
|
|
738
740
|
}));
|
|
@@ -778,7 +780,8 @@ export class ToggleDropDown extends Component {
|
|
|
778
780
|
palette: palette,
|
|
779
781
|
a11y: {
|
|
780
782
|
role: isSearch ? 'option' : 'menuitem',
|
|
781
|
-
ariaSelected: selectedId === item[idName]
|
|
783
|
+
ariaSelected: selectedId === item[idName],
|
|
784
|
+
ariaLabel: item[keyName]
|
|
782
785
|
}
|
|
783
786
|
}, ListItemWithIconProps)) : /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
784
787
|
key: listIndex,
|
|
@@ -799,7 +802,8 @@ export class ToggleDropDown extends Component {
|
|
|
799
802
|
palette: palette,
|
|
800
803
|
a11y: {
|
|
801
804
|
role: isSearch ? 'option' : 'menuitem',
|
|
802
|
-
ariaSelected: selectedId === item[idName]
|
|
805
|
+
ariaSelected: selectedId === item[idName],
|
|
806
|
+
ariaLabel: item[keyName]
|
|
803
807
|
}
|
|
804
808
|
}, ListItemProps)));
|
|
805
809
|
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
@@ -64,8 +64,7 @@ export default class CheckBoxField extends PureComponent {
|
|
|
64
64
|
isLocked,
|
|
65
65
|
lockedInfoText,
|
|
66
66
|
customProps,
|
|
67
|
-
renderLabelProps
|
|
68
|
-
needFieldStyle
|
|
67
|
+
renderLabelProps
|
|
69
68
|
} = this.props;
|
|
70
69
|
const {
|
|
71
70
|
LabelProps = {},
|
|
@@ -93,7 +92,7 @@ export default class CheckBoxField extends PureComponent {
|
|
|
93
92
|
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
|
|
94
93
|
}, LabelProps)));
|
|
95
94
|
return /*#__PURE__*/React.createElement("div", {
|
|
96
|
-
className: `${style.container} ${
|
|
95
|
+
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
97
96
|
"data-title": isDisabled ? title : null
|
|
98
97
|
}, isDirectCol && labelElement, /*#__PURE__*/React.createElement("div", {
|
|
99
98
|
className: `${isDirectCol ? style.fieldContainer : style.checkboxFieldContainer} ${isDirectCol && labelName ? style[`fieldMargin_${fieldSize}`] : ''}`
|
|
@@ -10,7 +10,6 @@ import TextBox from '@zohodesk/components/lib/TextBox/TextBox';
|
|
|
10
10
|
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
11
11
|
import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
|
|
12
12
|
import FieldContainer from '../FieldContainer/FieldContainer';
|
|
13
|
-
import RippleEffect from '@zohodesk/components/lib/RippleEffect/RippleEffect';
|
|
14
13
|
|
|
15
14
|
/**** CSS ****/
|
|
16
15
|
import style from '../Fields.module.css';
|
|
@@ -18,11 +17,8 @@ export default class CurrencyField extends PureComponent {
|
|
|
18
17
|
constructor(props) {
|
|
19
18
|
super(props);
|
|
20
19
|
this.state = {
|
|
21
|
-
isActive: false
|
|
22
|
-
isFocused: false
|
|
20
|
+
isActive: false
|
|
23
21
|
};
|
|
24
|
-
this.handleParentClick = this.handleParentClick.bind(this);
|
|
25
|
-
this.handleFocusToggle = this.handleFocusToggle.bind(this);
|
|
26
22
|
this.handleChange = this.handleChange.bind(this);
|
|
27
23
|
this.handleGetRef = this.handleGetRef.bind(this);
|
|
28
24
|
this.getNextId = getUniqueId(this);
|
|
@@ -44,30 +40,10 @@ export default class CurrencyField extends PureComponent {
|
|
|
44
40
|
this.textBox = el;
|
|
45
41
|
getRef && getRef(el, id);
|
|
46
42
|
}
|
|
47
|
-
handleParentClick() {
|
|
48
|
-
const {
|
|
49
|
-
needFieldStyle
|
|
50
|
-
} = this.props;
|
|
51
|
-
if (needFieldStyle) {
|
|
52
|
-
this.textBox.focus();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
handleFocusToggle(value) {
|
|
56
|
-
const {
|
|
57
|
-
needFieldStyle
|
|
58
|
-
} = this.props;
|
|
59
|
-
if (needFieldStyle) {
|
|
60
|
-
this.setState({
|
|
61
|
-
isFocused: value
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
43
|
onFocus() {
|
|
66
44
|
let {
|
|
67
|
-
onFocus
|
|
68
|
-
needFieldStyle
|
|
45
|
+
onFocus
|
|
69
46
|
} = this.props;
|
|
70
|
-
needFieldStyle && this.handleFocusToggle(true);
|
|
71
47
|
this.setState({
|
|
72
48
|
isActive: true
|
|
73
49
|
});
|
|
@@ -75,10 +51,8 @@ export default class CurrencyField extends PureComponent {
|
|
|
75
51
|
}
|
|
76
52
|
onBlur() {
|
|
77
53
|
let {
|
|
78
|
-
onBlur
|
|
79
|
-
needFieldStyle
|
|
54
|
+
onBlur
|
|
80
55
|
} = this.props;
|
|
81
|
-
needFieldStyle && this.handleFocusToggle(false);
|
|
82
56
|
this.setState({
|
|
83
57
|
isActive: false
|
|
84
58
|
});
|
|
@@ -118,8 +92,7 @@ export default class CurrencyField extends PureComponent {
|
|
|
118
92
|
userCurrencyType,
|
|
119
93
|
customProps,
|
|
120
94
|
formatCurrency,
|
|
121
|
-
renderLabelProps
|
|
122
|
-
needFieldStyle
|
|
95
|
+
renderLabelProps
|
|
123
96
|
} = this.props;
|
|
124
97
|
const {
|
|
125
98
|
LabelProps = {},
|
|
@@ -137,17 +110,9 @@ export default class CurrencyField extends PureComponent {
|
|
|
137
110
|
formatValue = value;
|
|
138
111
|
}
|
|
139
112
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return /*#__PURE__*/React.createElement(RippleEffect, {
|
|
144
|
-
hoverType: "bg",
|
|
145
|
-
isActive: isFocused,
|
|
146
|
-
isNeedEffect: !isReadOnly && !isDisabled && needFieldStyle ? true : false
|
|
147
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
148
|
-
className: `${needFieldStyle ? style.highlightSpace : ''} ${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
149
|
-
"data-title": isDisabled ? title : null,
|
|
150
|
-
onClick: this.handleParentClick
|
|
113
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
114
|
+
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
115
|
+
"data-title": isDisabled ? title : null
|
|
151
116
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
152
117
|
infoText: infoText,
|
|
153
118
|
isLocked: isLocked,
|
|
@@ -195,7 +160,7 @@ export default class CurrencyField extends PureComponent {
|
|
|
195
160
|
type: errorType,
|
|
196
161
|
htmlFor: uniqueId,
|
|
197
162
|
dataId: `${dataId}_ValidationRuleMessage`
|
|
198
|
-
}, ValidationMessageProps2))))
|
|
163
|
+
}, ValidationMessageProps2))));
|
|
199
164
|
}
|
|
200
165
|
}
|
|
201
166
|
CurrencyField.propTypes = propTypes;
|
|
@@ -10,7 +10,6 @@ import DateWidget from '@zohodesk/components/lib/DateTime/DateWidget';
|
|
|
10
10
|
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
11
11
|
import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
|
|
12
12
|
import FieldContainer from '../FieldContainer/FieldContainer';
|
|
13
|
-
import RippleEffect from '@zohodesk/components/lib/RippleEffect/RippleEffect';
|
|
14
13
|
|
|
15
14
|
/**** CSS ****/
|
|
16
15
|
import style from '../Fields.module.css';
|
|
@@ -22,17 +21,6 @@ export default class DateField extends PureComponent {
|
|
|
22
21
|
this.handleLabelClick = this.handleLabelClick.bind(this);
|
|
23
22
|
this.getNextId = getUniqueId(this);
|
|
24
23
|
this.openPopup = this.openPopup.bind(this);
|
|
25
|
-
this.handleParentClick = this.handleParentClick.bind(this);
|
|
26
|
-
this.handleFocusToggle = this.handleFocusToggle.bind(this);
|
|
27
|
-
this.handleFocus = this.handleFocus.bind(this);
|
|
28
|
-
this.handleBlur = this.handleBlur.bind(this);
|
|
29
|
-
this.getPopupHandlers = this.getPopupHandlers.bind(this);
|
|
30
|
-
this.handleDropBoxOpen = this.handleDropBoxOpen.bind(this);
|
|
31
|
-
this.handleDropBoxClose = this.handleDropBoxClose.bind(this);
|
|
32
|
-
this.state = {
|
|
33
|
-
isFocused: false,
|
|
34
|
-
isPopupOpen: false
|
|
35
|
-
};
|
|
36
24
|
}
|
|
37
25
|
handleChange(value) {
|
|
38
26
|
let {
|
|
@@ -82,62 +70,6 @@ export default class DateField extends PureComponent {
|
|
|
82
70
|
this.dateField.focus();
|
|
83
71
|
}
|
|
84
72
|
}
|
|
85
|
-
handleParentClick(e) {
|
|
86
|
-
const {
|
|
87
|
-
needFieldStyle
|
|
88
|
-
} = this.props;
|
|
89
|
-
if (needFieldStyle) {
|
|
90
|
-
this.dateField.focus();
|
|
91
|
-
this.togglePopup(e);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
handleFocusToggle(value) {
|
|
95
|
-
this.setState({
|
|
96
|
-
isFocused: value
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
handleFocus(e) {
|
|
100
|
-
const {
|
|
101
|
-
onFocus,
|
|
102
|
-
needFieldStyle
|
|
103
|
-
} = this.props;
|
|
104
|
-
needFieldStyle && this.handleFocusToggle(true);
|
|
105
|
-
onFocus && onFocus(e);
|
|
106
|
-
}
|
|
107
|
-
handleBlur(e) {
|
|
108
|
-
const {
|
|
109
|
-
onBlur,
|
|
110
|
-
needFieldStyle
|
|
111
|
-
} = this.props;
|
|
112
|
-
needFieldStyle && this.handleFocusToggle(false);
|
|
113
|
-
onBlur && onBlur(e);
|
|
114
|
-
}
|
|
115
|
-
getPopupHandlers(methods) {
|
|
116
|
-
let {
|
|
117
|
-
togglePopup
|
|
118
|
-
} = methods;
|
|
119
|
-
this.togglePopup = togglePopup;
|
|
120
|
-
}
|
|
121
|
-
handleDropBoxOpen() {
|
|
122
|
-
let {
|
|
123
|
-
isPopupOpen
|
|
124
|
-
} = this.state;
|
|
125
|
-
if (isPopupOpen == false) {
|
|
126
|
-
this.setState({
|
|
127
|
-
isPopupOpen: true
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
handleDropBoxClose() {
|
|
132
|
-
let {
|
|
133
|
-
isPopupOpen
|
|
134
|
-
} = this.state;
|
|
135
|
-
if (isPopupOpen) {
|
|
136
|
-
this.setState({
|
|
137
|
-
isPopupOpen: false
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
73
|
render() {
|
|
142
74
|
let {
|
|
143
75
|
labelName,
|
|
@@ -171,8 +103,7 @@ export default class DateField extends PureComponent {
|
|
|
171
103
|
i18nKeys,
|
|
172
104
|
iconOnHover,
|
|
173
105
|
customProps,
|
|
174
|
-
renderLabelProps
|
|
175
|
-
needFieldStyle
|
|
106
|
+
renderLabelProps
|
|
176
107
|
} = this.props;
|
|
177
108
|
const {
|
|
178
109
|
LabelProps = {},
|
|
@@ -181,19 +112,9 @@ export default class DateField extends PureComponent {
|
|
|
181
112
|
ValidationMessageProps2 = {}
|
|
182
113
|
} = customProps;
|
|
183
114
|
let getAriaId = htmlId ? htmlId : this.getNextId();
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
} = this.state;
|
|
188
|
-
let isActive = isPopupOpen || isFocused;
|
|
189
|
-
return /*#__PURE__*/React.createElement(RippleEffect, {
|
|
190
|
-
hoverType: "bg",
|
|
191
|
-
isActive: isFocused,
|
|
192
|
-
isNeedEffect: !isReadOnly && !isDisabled && needFieldStyle ? true : false
|
|
193
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
194
|
-
className: ` ${needFieldStyle ? style.highlightSpace : ''} ${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''} ${style.hover}`,
|
|
195
|
-
"data-title": isDisabled ? title : null,
|
|
196
|
-
onClick: this.handleParentClick
|
|
115
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
116
|
+
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
117
|
+
"data-title": isDisabled ? title : null
|
|
197
118
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
198
119
|
infoText: infoText,
|
|
199
120
|
isLocked: isLocked,
|
|
@@ -205,12 +126,12 @@ export default class DateField extends PureComponent {
|
|
|
205
126
|
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
206
127
|
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
|
|
207
128
|
onClick: isDisabled || isReadOnly ? null : this.handleLabelClick,
|
|
208
|
-
customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}
|
|
129
|
+
customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
|
|
209
130
|
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
|
|
210
131
|
}, LabelProps, {
|
|
211
132
|
id: labelName
|
|
212
133
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
213
|
-
className: `${
|
|
134
|
+
className: `${style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''}`
|
|
214
135
|
}, isLocked && lockedValueText ? /*#__PURE__*/React.createElement("div", {
|
|
215
136
|
className: style.lockText
|
|
216
137
|
}, lockedValueText) : /*#__PURE__*/React.createElement(DateWidget, _extends({
|
|
@@ -220,8 +141,6 @@ export default class DateField extends PureComponent {
|
|
|
220
141
|
onSelect: this.handleChange,
|
|
221
142
|
timeZone: timeZone,
|
|
222
143
|
getRef: this.handleGetRef,
|
|
223
|
-
onFocus: this.handleFocus,
|
|
224
|
-
onBlur: this.handleBlur,
|
|
225
144
|
isReadOnly: isReadOnly,
|
|
226
145
|
value: value,
|
|
227
146
|
popupGroup: popupGroup,
|
|
@@ -233,11 +152,7 @@ export default class DateField extends PureComponent {
|
|
|
233
152
|
isEditable: true,
|
|
234
153
|
htmlId: getAriaId,
|
|
235
154
|
i18nKeys: i18nKeys,
|
|
236
|
-
iconOnHover: iconOnHover
|
|
237
|
-
getPopupHandlers: this.getPopupHandlers,
|
|
238
|
-
onDropBoxOpen: this.handleDropBoxOpen,
|
|
239
|
-
onDropBoxClose: this.handleDropBoxClose,
|
|
240
|
-
highlightPosition: needFieldStyle ? true : false
|
|
155
|
+
iconOnHover: iconOnHover
|
|
241
156
|
}, DateWidgetProps, {
|
|
242
157
|
a11y: {
|
|
243
158
|
ariaLabelledby: labelName
|
|
@@ -254,7 +169,7 @@ export default class DateField extends PureComponent {
|
|
|
254
169
|
type: errorType,
|
|
255
170
|
htmlFor: getAriaId,
|
|
256
171
|
dataId: `${dataId}_ValidationRuleMessage`
|
|
257
|
-
}, ValidationMessageProps2))))
|
|
172
|
+
}, ValidationMessageProps2))));
|
|
258
173
|
}
|
|
259
174
|
}
|
|
260
175
|
DateField.propTypes = propTypes;
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
.radiobdExxect
|
|
2
|
-
{
|
|
3
|
-
border-radius: var(--zd_size4);
|
|
4
|
-
padding:var(--zd_size15);
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
.radiobdExxect:hover
|
|
8
|
-
{
|
|
9
|
-
background-color: var(--zdt_rippleeffect_hover_bg);
|
|
10
|
-
}
|
|
11
|
-
.highlightStyle
|
|
12
|
-
{
|
|
13
|
-
padding:var(--zd_size15);
|
|
14
|
-
}
|
|
15
|
-
.highlightSpace
|
|
16
|
-
{
|
|
17
|
-
padding:var(--zd_size14);
|
|
18
|
-
}
|
|
19
|
-
.editetSpace
|
|
20
|
-
{
|
|
21
|
-
padding: var(--zd_size15);
|
|
22
|
-
}
|
|
23
1
|
.container,
|
|
24
2
|
.checkboxFieldContainer {
|
|
25
3
|
position: relative;
|
|
@@ -29,11 +7,6 @@
|
|
|
29
7
|
position: relative;
|
|
30
8
|
min-height: var(--zd_size25);
|
|
31
9
|
}
|
|
32
|
-
.highlightPosition
|
|
33
|
-
{
|
|
34
|
-
position: static;
|
|
35
|
-
min-height: var(--zd_size25);
|
|
36
|
-
}
|
|
37
10
|
.fieldMargin_medium {
|
|
38
11
|
margin-top: var(--zd_size5);
|
|
39
12
|
}
|
|
@@ -208,41 +181,3 @@
|
|
|
208
181
|
[dir=rtl] .ePhiTag {
|
|
209
182
|
margin-right: var(--zd_size8);
|
|
210
183
|
}
|
|
211
|
-
|
|
212
|
-
/* sample css */
|
|
213
|
-
|
|
214
|
-
/* .hover::before{
|
|
215
|
-
position: absolute;
|
|
216
|
-
content: '';
|
|
217
|
-
bottom: -10px;
|
|
218
|
-
left: -10px;
|
|
219
|
-
right: -10px;
|
|
220
|
-
top: -10px;
|
|
221
|
-
border-radius: 4px;
|
|
222
|
-
border: 1px solid transparent;
|
|
223
|
-
} */
|
|
224
|
-
/* .hover{
|
|
225
|
-
border-radius: 4px;
|
|
226
|
-
border: 1px solid transparent;
|
|
227
|
-
padding: 10px;
|
|
228
|
-
}
|
|
229
|
-
.hover:hover
|
|
230
|
-
{
|
|
231
|
-
background-color: var(--zdt_rippleeffect_hover_bg);
|
|
232
|
-
}
|
|
233
|
-
.hover:focus-within{
|
|
234
|
-
background-color: var(--zdt_rippleeffect_primary_light_bg);
|
|
235
|
-
border-color: var(--zdt_rippleeffect_primary_light_border);
|
|
236
|
-
}
|
|
237
|
-
.labelindex
|
|
238
|
-
{
|
|
239
|
-
z-index: 1;
|
|
240
|
-
position: relative;
|
|
241
|
-
}
|
|
242
|
-
.position
|
|
243
|
-
{
|
|
244
|
-
position: relative;
|
|
245
|
-
} */
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
/* sample css */
|
|
@@ -10,7 +10,6 @@ import MultiSelect from '@zohodesk/components/lib/MultiSelect/MultiSelect';
|
|
|
10
10
|
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
11
11
|
import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
|
|
12
12
|
import FieldContainer from '../FieldContainer/FieldContainer';
|
|
13
|
-
import RippleEffect from '@zohodesk/components/lib/RippleEffect/RippleEffect';
|
|
14
13
|
|
|
15
14
|
/** CSS */
|
|
16
15
|
import style from '../Fields.module.css';
|
|
@@ -24,16 +23,6 @@ export default class MultiSelectField extends PureComponent {
|
|
|
24
23
|
this.onSearch = this.onSearch.bind(this);
|
|
25
24
|
this.getNextOptions = this.getNextOptions.bind(this);
|
|
26
25
|
this.getNextId = getUniqueId(this);
|
|
27
|
-
this.handleParentClick = this.handleParentClick.bind(this);
|
|
28
|
-
this.handleFocusToggle = this.handleFocusToggle.bind(this);
|
|
29
|
-
this.handleFocus = this.handleFocus.bind(this);
|
|
30
|
-
this.handleBlur = this.handleBlur.bind(this);
|
|
31
|
-
this.getPopupHandlers = this.getPopupHandlers.bind(this);
|
|
32
|
-
this.handleDropBoxClose = this.handleDropBoxClose.bind(this);
|
|
33
|
-
this.state = {
|
|
34
|
-
isFocused: false,
|
|
35
|
-
isPopupOpen: false
|
|
36
|
-
};
|
|
37
26
|
}
|
|
38
27
|
handleChange(selectedValueIds, selectedValues) {
|
|
39
28
|
let {
|
|
@@ -47,14 +36,6 @@ export default class MultiSelectField extends PureComponent {
|
|
|
47
36
|
onDropBoxOpen,
|
|
48
37
|
id
|
|
49
38
|
} = this.props;
|
|
50
|
-
let {
|
|
51
|
-
isPopupOpen
|
|
52
|
-
} = this.state;
|
|
53
|
-
if (isPopupOpen == false) {
|
|
54
|
-
this.setState({
|
|
55
|
-
isPopupOpen: true
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
39
|
return onDropBoxOpen && onDropBoxOpen(id);
|
|
59
40
|
}
|
|
60
41
|
onSearch(searchStr) {
|
|
@@ -83,53 +64,6 @@ export default class MultiSelectField extends PureComponent {
|
|
|
83
64
|
this.multiSelectBox = el;
|
|
84
65
|
getRef && getRef(el, id);
|
|
85
66
|
}
|
|
86
|
-
handleParentClick(e) {
|
|
87
|
-
const {
|
|
88
|
-
needFieldStyle
|
|
89
|
-
} = this.props;
|
|
90
|
-
if (needFieldStyle) {
|
|
91
|
-
this.multiSelectBox.focus();
|
|
92
|
-
this.togglePopup(e);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
handleFocusToggle(value) {
|
|
96
|
-
this.setState({
|
|
97
|
-
isFocused: value
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
handleFocus(e) {
|
|
101
|
-
const {
|
|
102
|
-
onFocus,
|
|
103
|
-
needFieldStyle
|
|
104
|
-
} = this.props;
|
|
105
|
-
needFieldStyle && this.handleFocusToggle(true);
|
|
106
|
-
onFocus && onFocus(e);
|
|
107
|
-
}
|
|
108
|
-
handleBlur(e) {
|
|
109
|
-
const {
|
|
110
|
-
onBlur,
|
|
111
|
-
needFieldStyle
|
|
112
|
-
} = this.props;
|
|
113
|
-
needFieldStyle && this.handleFocusToggle(false);
|
|
114
|
-
onBlur && onBlur(e);
|
|
115
|
-
}
|
|
116
|
-
getPopupHandlers(methods) {
|
|
117
|
-
let {
|
|
118
|
-
togglePopup
|
|
119
|
-
} = methods;
|
|
120
|
-
this.togglePopup = togglePopup;
|
|
121
|
-
console.log('togglePopup', togglePopup);
|
|
122
|
-
}
|
|
123
|
-
handleDropBoxClose() {
|
|
124
|
-
let {
|
|
125
|
-
isPopupOpen
|
|
126
|
-
} = this.state;
|
|
127
|
-
if (isPopupOpen) {
|
|
128
|
-
this.setState({
|
|
129
|
-
isPopupOpen: false
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
67
|
|
|
134
68
|
// handleLabelClick() {
|
|
135
69
|
// let { isFocusOnLabelClick } = this.props;
|
|
@@ -186,8 +120,7 @@ export default class MultiSelectField extends PureComponent {
|
|
|
186
120
|
onFocus,
|
|
187
121
|
customProps,
|
|
188
122
|
i18nKeys,
|
|
189
|
-
renderLabelProps
|
|
190
|
-
needFieldStyle
|
|
123
|
+
renderLabelProps
|
|
191
124
|
} = this.props;
|
|
192
125
|
const {
|
|
193
126
|
LabelProps = {},
|
|
@@ -197,19 +130,9 @@ export default class MultiSelectField extends PureComponent {
|
|
|
197
130
|
} = customProps;
|
|
198
131
|
let isDarkPalette = palette === 'dark';
|
|
199
132
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
} = this.state;
|
|
204
|
-
// let isActive = isPopupOpen || isFocused;
|
|
205
|
-
return /*#__PURE__*/React.createElement(RippleEffect, {
|
|
206
|
-
hoverType: "bg",
|
|
207
|
-
isActive: isFocused,
|
|
208
|
-
isNeedEffect: !isReadOnly && !isDisabled && needFieldStyle ? true : false
|
|
209
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
210
|
-
className: `${needFieldStyle ? style.highlightSpace : ''} ${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
211
|
-
"data-title": isDisabled ? title : null,
|
|
212
|
-
onClick: this.handleParentClick
|
|
133
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
134
|
+
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
135
|
+
"data-title": isDisabled ? title : null
|
|
213
136
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
214
137
|
infoText: infoText,
|
|
215
138
|
isLocked: isLocked,
|
|
@@ -223,8 +146,8 @@ export default class MultiSelectField extends PureComponent {
|
|
|
223
146
|
// onClick={this.handleLabelClick}
|
|
224
147
|
,
|
|
225
148
|
customClass: `${style.fieldLabel} ${isMandatory ? style.labelMandatory : ''}`,
|
|
226
|
-
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label
|
|
227
|
-
|
|
149
|
+
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
|
|
150
|
+
htmlFor: uniqueId
|
|
228
151
|
}, LabelProps))), /*#__PURE__*/React.createElement(MultiSelect, _extends({
|
|
229
152
|
options: options,
|
|
230
153
|
onChange: this.handleChange,
|
|
@@ -255,13 +178,8 @@ export default class MultiSelectField extends PureComponent {
|
|
|
255
178
|
palette: palette,
|
|
256
179
|
i18nKeys: i18nKeys,
|
|
257
180
|
htmlId: uniqueId,
|
|
258
|
-
customChildrenClass: customChildrenClass
|
|
259
|
-
|
|
260
|
-
,
|
|
261
|
-
onFocus: this.handleFocus,
|
|
262
|
-
onBlur: this.handleBlur,
|
|
263
|
-
getPublicMethods: this.getPopupHandlers,
|
|
264
|
-
isPadding: needFieldStyle ? true : false
|
|
181
|
+
customChildrenClass: customChildrenClass,
|
|
182
|
+
onFocus: onFocus
|
|
265
183
|
}, MultiSelectProps, {
|
|
266
184
|
ariaLabelledby: uniqueId
|
|
267
185
|
}), children ? children : null), validationMessage && /*#__PURE__*/React.createElement(ValidationMessage, _extends({
|
|
@@ -276,7 +194,7 @@ export default class MultiSelectField extends PureComponent {
|
|
|
276
194
|
type: errorType,
|
|
277
195
|
dataId: `${dataId}_ValidationRuleMessage`,
|
|
278
196
|
htmlFor: uniqueId
|
|
279
|
-
}, ValidationMessageProps2)))
|
|
197
|
+
}, ValidationMessageProps2)));
|
|
280
198
|
}
|
|
281
199
|
}
|
|
282
200
|
MultiSelectField.propTypes = propTypes;
|
|
@@ -92,7 +92,6 @@ export default class PhoneField extends PureComponent {
|
|
|
92
92
|
onCall,
|
|
93
93
|
ePhiData,
|
|
94
94
|
type,
|
|
95
|
-
needFieldStyle,
|
|
96
95
|
customProps
|
|
97
96
|
} = this.props;
|
|
98
97
|
const {
|
|
@@ -150,8 +149,7 @@ export default class PhoneField extends PureComponent {
|
|
|
150
149
|
labelPalette: labelPalette,
|
|
151
150
|
labelCustomClass: labelCustomClass,
|
|
152
151
|
errorType: errorType,
|
|
153
|
-
ePhiData: ePhiData
|
|
154
|
-
needFieldStyle: needFieldStyle
|
|
152
|
+
ePhiData: ePhiData
|
|
155
153
|
}, TextBoxFieldProps))), /*#__PURE__*/React.createElement(Box, null, isTelephony && value ? /*#__PURE__*/React.createElement(Link, _extends({
|
|
156
154
|
className: style.phoneIcon,
|
|
157
155
|
callfrom: "phone",
|
|
@@ -53,7 +53,7 @@ export default class RadioField extends PureComponent {
|
|
|
53
53
|
ValidationMessageProps2 = {}
|
|
54
54
|
} = customProps;
|
|
55
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
className: `${style.container} ${
|
|
56
|
+
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
57
57
|
"data-title": isDisabled ? title : null
|
|
58
58
|
}, labelName && /*#__PURE__*/React.createElement(Label, _extends({
|
|
59
59
|
text: labelName,
|