@zohodesk/dot 1.0.0-temp-109 → 1.0.0-temp-111
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 +15 -0
- package/es/ActionButton/ActionButton.js +12 -5
- package/es/Drawer/Drawer.js +23 -9
- package/es/Drawer/Drawer.module.css +1 -1
- package/es/Drawer/props/defaultProps.js +2 -1
- package/es/Drawer/props/propTypes.js +2 -1
- package/es/alert/AlertLookup/AlertLookup.js +5 -53
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +15 -13
- package/es/form/fields/CheckBoxField/CheckBoxField.js +3 -2
- package/es/form/fields/CurrencyField/CurrencyField.js +43 -8
- package/es/form/fields/CurrencyField/props/defaultProps.js +1 -0
- package/es/form/fields/DateField/DateField.js +93 -8
- package/es/form/fields/DateField/props/defaultProps.js +1 -0
- package/es/form/fields/Fields.module.css +65 -0
- package/es/form/fields/MultiSelectField/MultiSelectField.js +91 -9
- package/es/form/fields/MultiSelectField/props/defaultProps.js +1 -0
- package/es/form/fields/PhoneField/PhoneField.js +3 -1
- package/es/form/fields/PhoneField/props/defaultProps.js +2 -1
- package/es/form/fields/RadioField/RadioField.js +1 -1
- package/es/form/fields/SelectField/SelectField.js +99 -12
- package/es/form/fields/SelectField/props/defaultProps.js +1 -0
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +3 -1
- package/es/form/fields/TextBoxField/TextBoxField.js +59 -8
- package/es/form/fields/TextBoxField/props/defaultProps.js +1 -0
- package/es/form/fields/TextareaField/TextareaField.js +58 -12
- package/es/form/fields/TextareaField/props/defaultProps.js +1 -0
- package/es/list/Icons/DeleteIcon.js +2 -1
- package/es/list/Icons/SmartIcon.js +0 -1
- package/es/lookup/Lookup/Lookup.js +24 -12
- package/es/lookup/Lookup/props/defaultProps.js +2 -1
- package/es/lookup/Lookup/props/propTypes.js +2 -1
- package/es/lookup/header/Search/Search.js +5 -0
- package/es/version2/GlobalNotification/GlobalNotification.js +2 -1
- package/es/version2/lookup/AlertLookup/AlertLookup.js +42 -52
- package/lib/ActionButton/ActionButton.js +15 -6
- package/lib/AlphabeticList/AlphabeticList.js +3 -1
- package/lib/Attachment/Attachment.js +3 -1
- package/lib/AttachmentViewer/AttachmentImage.js +3 -1
- package/lib/AttachmentViewer/AttachmentViewer.js +3 -1
- package/lib/AttachmentViewer/utils.js +4 -1
- package/lib/ChannelIcon/ChannelIcon.js +3 -1
- package/lib/Drawer/Drawer.js +26 -10
- package/lib/Drawer/Drawer.module.css +1 -1
- package/lib/Drawer/props/defaultProps.js +2 -1
- package/lib/Drawer/props/propTypes.js +2 -1
- package/lib/ExternalLink/ExternalLink.js +3 -1
- package/lib/FlipCard/FlipCard.js +3 -1
- package/lib/FormAction/FormAction.js +3 -1
- package/lib/FreezeLayer/FreezeLayer.js +3 -1
- package/lib/IconButton/IconButton.js +3 -1
- package/lib/IconButton/props/propTypes.js +4 -1
- package/lib/Image/Image.js +3 -1
- package/lib/ImportantNotes/ImportantNotes.js +3 -1
- package/lib/Link/Link.js +3 -1
- package/lib/Loader/Loader.js +3 -1
- package/lib/Message/Message.js +3 -1
- package/lib/MessageBanner/MessageBanner.js +3 -1
- package/lib/NewStar/NewStar.js +3 -1
- package/lib/PlusIcon/PlusIcon.js +3 -1
- package/lib/ToastMessage/ToastMessage.js +1 -1
- package/lib/Upload/Upload.js +3 -1
- package/lib/actions/AutoClose.js +1 -1
- package/lib/alert/AlertHeader/AlertHeader.js +3 -1
- package/lib/alert/AlertLookup/AlertLookup.js +35 -83
- package/lib/avatar/AvatarClose/AvatarClose.js +3 -1
- package/lib/avatar/AvatarCollision/AvatarCollision.js +3 -1
- package/lib/avatar/AvatarIcon/AvatarIcon.js +3 -1
- package/lib/avatar/AvatarStatus/AvatarStatus.js +3 -1
- package/lib/avatar/AvatarThread/AvatarThread.js +3 -1
- package/lib/avatar/AvatarUser/AvatarUser.js +5 -2
- package/lib/avatar/AvatarWithTeam/AvatarWithTeam.js +3 -1
- package/lib/deprecated/SelectDropdown/SelectDropdown.js +3 -1
- package/lib/deprecated/utils/KeyboardApi.js +4 -1
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +19 -15
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.js +3 -1
- package/lib/emptystate/EditionPage/EditionPage.js +3 -1
- package/lib/errorstate/Inconvenience/Inconvenience.js +3 -1
- package/lib/errorstate/LinkText/LinkText.js +3 -1
- package/lib/errorstate/NoRequestFound/NoRequestFound.js +3 -1
- package/lib/errorstate/PermissionPlay/PermissionPlay.js +3 -1
- package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +3 -1
- package/lib/errorstate/UnableToProcess/UnableToProcess.js +3 -1
- package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -1
- package/lib/errorstate/WillBack/WillBack.js +3 -1
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +6 -3
- package/lib/form/fields/CheckBoxField/props/defaultProps.js +4 -1
- package/lib/form/fields/CheckBoxField/props/propTypes.js +4 -1
- package/lib/form/fields/CurrencyField/CurrencyField.js +79 -42
- package/lib/form/fields/CurrencyField/props/defaultProps.js +5 -1
- package/lib/form/fields/CurrencyField/props/propTypes.js +4 -1
- package/lib/form/fields/DateField/DateField.js +131 -41
- package/lib/form/fields/DateField/props/defaultProps.js +4 -1
- package/lib/form/fields/DateField/props/propTypes.js +4 -1
- package/lib/form/fields/FieldContainer/FieldContainer.js +3 -1
- package/lib/form/fields/FieldContainer/props/defaultProps.js +4 -1
- package/lib/form/fields/FieldContainer/props/propTypes.js +4 -1
- package/lib/form/fields/Fields.module.css +65 -0
- package/lib/form/fields/MultiSelectField/MultiSelectField.js +138 -53
- package/lib/form/fields/MultiSelectField/props/defaultProps.js +4 -1
- package/lib/form/fields/MultiSelectField/props/propTypes.js +4 -1
- package/lib/form/fields/PhoneField/PhoneField.js +6 -2
- package/lib/form/fields/PhoneField/props/defaultProps.js +2 -1
- package/lib/form/fields/RadioField/RadioField.js +4 -2
- package/lib/form/fields/SelectField/SelectField.js +153 -61
- package/lib/form/fields/SelectField/props/defaultProps.js +6 -2
- package/lib/form/fields/SelectField/props/propTypes.js +4 -1
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +3 -1
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +4 -2
- package/lib/form/fields/TagsMultiSelectField/props/defaultProps.js +4 -1
- package/lib/form/fields/TagsMultiSelectField/props/propTypes.js +4 -1
- package/lib/form/fields/TextBoxField/TextBoxField.js +97 -44
- package/lib/form/fields/TextBoxField/props/defaultProps.js +6 -2
- package/lib/form/fields/TextBoxField/props/propTypes.js +4 -1
- package/lib/form/fields/TextEditor/TextEditor.js +4 -2
- package/lib/form/fields/TextEditorField/TextEditorField.js +3 -1
- package/lib/form/fields/TextEditorField/props/defaultProps.js +4 -1
- package/lib/form/fields/TextEditorField/props/propTypes.js +4 -1
- package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.js +5 -2
- package/lib/form/fields/TextareaField/TextareaField.js +92 -45
- package/lib/form/fields/TextareaField/props/defaultProps.js +4 -1
- package/lib/form/fields/TextareaField/props/propTypes.js +4 -1
- package/lib/form/fields/ValidationMessage/ValidationMessage.js +3 -1
- package/lib/form/layout/Field/Field.js +3 -1
- package/lib/form/layout/Section/Section.js +3 -1
- package/lib/layout/SetupDetailLayout/SetupDetailLayout.js +3 -1
- package/lib/layout/SubtabLayout/SubtabLayout.js +3 -1
- package/lib/list/AvatarFlip/AvatarFlip.js +3 -1
- package/lib/list/BluePrintStatus/BluePrintStatus.js +3 -1
- package/lib/list/Comment/Comment.js +3 -1
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +3 -1
- package/lib/list/DepartmentDropDown/props/propTypes.js +4 -1
- package/lib/list/Dot/Dot.js +3 -1
- package/lib/list/DotNew/DotNew.js +3 -1
- package/lib/list/GridStencils/GridStencils.js +3 -1
- package/lib/list/Icons/AddNewIcon.js +3 -1
- package/lib/list/Icons/CompleteIcon.js +3 -1
- package/lib/list/Icons/DeleteIcon.js +5 -2
- package/lib/list/Icons/EditIcon.js +3 -1
- package/lib/list/Icons/FloatingIcons.js +3 -1
- package/lib/list/Icons/ReadUnreadIcon.js +3 -1
- package/lib/list/Icons/SmartIcon.js +3 -2
- package/lib/list/ListLayout/ListLayout.js +3 -1
- package/lib/list/ListLayout/props/propTypes.js +4 -1
- package/lib/list/ListStencils/ListStencils.js +3 -1
- package/lib/list/SecondaryText/AccountName.js +3 -1
- package/lib/list/SecondaryText/ContactName.js +3 -1
- package/lib/list/SecondaryText/DepartmentText.js +3 -1
- package/lib/list/SecondaryText/Email.js +3 -1
- package/lib/list/SecondaryText/HappinessRating.js +3 -1
- package/lib/list/SecondaryText/PhoneNumber.js +3 -1
- package/lib/list/SecondaryText/PriorityText.js +3 -1
- package/lib/list/SecondaryText/SecondaryText.js +3 -1
- package/lib/list/SecondaryText/StatusText.js +3 -1
- package/lib/list/SecondaryText/TicketId.js +3 -1
- package/lib/list/SecondaryText/Website.js +3 -1
- package/lib/list/SecondryPanel/SecondryPanel.js +3 -1
- package/lib/list/SentimentStatus/SentimentStatus.js +3 -1
- package/lib/list/Subject/Subject.js +3 -1
- package/lib/list/TagNew/TagNew.js +3 -1
- package/lib/list/Thread/Thread.js +3 -1
- package/lib/list/UserTime/UserTime.js +3 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.js +3 -1
- package/lib/list/status/StatusDropdown/props/propTypes.js +4 -1
- package/lib/list/status/StatusListItem/StatusListItem.js +3 -1
- package/lib/lookup/EmptyPage/EmptyPage.js +3 -1
- package/lib/lookup/Lookup/Lookup.js +29 -13
- package/lib/lookup/Lookup/props/defaultProps.js +2 -1
- package/lib/lookup/Lookup/props/propTypes.js +2 -1
- package/lib/lookup/Section/Section.js +3 -1
- package/lib/lookup/header/Close/Close.js +3 -1
- package/lib/lookup/header/ModuleHeader/ModuleHeader.js +5 -2
- package/lib/lookup/header/Search/Search.js +8 -1
- package/lib/lookup/header/TicketHeader/TicketHeader.js +5 -2
- package/lib/lookup/header/Title/Title.js +3 -1
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +3 -1
- package/lib/setup/header/Button/Button.js +3 -1
- package/lib/setup/header/Link/Link.js +3 -1
- package/lib/setup/header/Search/Search.js +3 -1
- package/lib/setup/header/Views/Views.js +3 -1
- package/lib/setup/helptips/Description/Description.js +3 -1
- package/lib/setup/helptips/Link/Link.js +3 -1
- package/lib/setup/helptips/ListGroup/ListGroup.js +3 -1
- package/lib/setup/helptips/Title/Title.js +3 -1
- package/lib/setup/table/Table/Table.js +3 -1
- package/lib/setup/table/TableBody/TableBody.js +3 -1
- package/lib/setup/table/TableData/TableData.js +3 -1
- package/lib/setup/table/TableHead/TableHead.js +3 -1
- package/lib/setup/table/TableRow/TableRow.js +3 -1
- package/lib/setup/table/Text/Text.js +3 -1
- package/lib/svg/PlusIcon.js +3 -1
- package/lib/svg/SnippetIcon.js +3 -1
- package/lib/svg/TemplateIcon.js +3 -1
- package/lib/version2/AlertClose/AlertClose.js +3 -1
- package/lib/version2/GlobalNotification/GlobalNotification.js +5 -2
- package/lib/version2/alertIcons/AlarmAlertIcon.js +3 -1
- package/lib/version2/alertIcons/AlertIcons.js +3 -1
- package/lib/version2/alertIcons/DangerAlertIcon.js +3 -1
- package/lib/version2/alertIcons/ErrorAlertIcon.js +3 -1
- package/lib/version2/alertIcons/InfoAlertIcon.js +3 -1
- package/lib/version2/alertIcons/NotificationAlertIcon.js +3 -1
- package/lib/version2/alertIcons/SuccessAlertIcon.js +3 -1
- package/lib/version2/alertIcons/WarningAlertIcon.js +3 -1
- package/lib/version2/errorstate/Inconvenience/Inconvenience.js +3 -1
- package/lib/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +3 -1
- package/lib/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +3 -1
- package/lib/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -1
- package/lib/version2/errorstate/UrlNotFound/UrlNotFound.js +3 -1
- package/lib/version2/errorstate/WillBeRightBack/WillBeRightBack.js +3 -1
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +3 -1
- package/lib/version2/lookup/AlertLookup/AlertLookup.js +70 -83
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +3 -1
- package/package.json +10 -8
|
@@ -10,6 +10,7 @@ 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';
|
|
13
14
|
|
|
14
15
|
/** CSS */
|
|
15
16
|
import style from '../Fields.module.css';
|
|
@@ -23,6 +24,16 @@ export default class MultiSelectField extends PureComponent {
|
|
|
23
24
|
this.onSearch = this.onSearch.bind(this);
|
|
24
25
|
this.getNextOptions = this.getNextOptions.bind(this);
|
|
25
26
|
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
|
+
};
|
|
26
37
|
}
|
|
27
38
|
handleChange(selectedValueIds, selectedValues) {
|
|
28
39
|
let {
|
|
@@ -36,6 +47,14 @@ export default class MultiSelectField extends PureComponent {
|
|
|
36
47
|
onDropBoxOpen,
|
|
37
48
|
id
|
|
38
49
|
} = this.props;
|
|
50
|
+
let {
|
|
51
|
+
isPopupOpen
|
|
52
|
+
} = this.state;
|
|
53
|
+
if (isPopupOpen == false) {
|
|
54
|
+
this.setState({
|
|
55
|
+
isPopupOpen: true
|
|
56
|
+
});
|
|
57
|
+
}
|
|
39
58
|
return onDropBoxOpen && onDropBoxOpen(id);
|
|
40
59
|
}
|
|
41
60
|
onSearch(searchStr) {
|
|
@@ -64,6 +83,53 @@ export default class MultiSelectField extends PureComponent {
|
|
|
64
83
|
this.multiSelectBox = el;
|
|
65
84
|
getRef && getRef(el, id);
|
|
66
85
|
}
|
|
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
|
+
}
|
|
67
133
|
|
|
68
134
|
// handleLabelClick() {
|
|
69
135
|
// let { isFocusOnLabelClick } = this.props;
|
|
@@ -120,7 +186,8 @@ export default class MultiSelectField extends PureComponent {
|
|
|
120
186
|
onFocus,
|
|
121
187
|
customProps,
|
|
122
188
|
i18nKeys,
|
|
123
|
-
renderLabelProps
|
|
189
|
+
renderLabelProps,
|
|
190
|
+
needFieldStyle
|
|
124
191
|
} = this.props;
|
|
125
192
|
const {
|
|
126
193
|
LabelProps = {},
|
|
@@ -130,9 +197,19 @@ export default class MultiSelectField extends PureComponent {
|
|
|
130
197
|
} = customProps;
|
|
131
198
|
let isDarkPalette = palette === 'dark';
|
|
132
199
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
200
|
+
const {
|
|
201
|
+
isFocused,
|
|
202
|
+
isPopupOpen
|
|
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
|
|
136
213
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
137
214
|
infoText: infoText,
|
|
138
215
|
isLocked: isLocked,
|
|
@@ -146,8 +223,8 @@ export default class MultiSelectField extends PureComponent {
|
|
|
146
223
|
// onClick={this.handleLabelClick}
|
|
147
224
|
,
|
|
148
225
|
customClass: `${style.fieldLabel} ${isMandatory ? style.labelMandatory : ''}`,
|
|
149
|
-
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label
|
|
150
|
-
htmlFor
|
|
226
|
+
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
|
|
227
|
+
// htmlFor={uniqueId}
|
|
151
228
|
}, LabelProps))), /*#__PURE__*/React.createElement(MultiSelect, _extends({
|
|
152
229
|
options: options,
|
|
153
230
|
onChange: this.handleChange,
|
|
@@ -178,8 +255,13 @@ export default class MultiSelectField extends PureComponent {
|
|
|
178
255
|
palette: palette,
|
|
179
256
|
i18nKeys: i18nKeys,
|
|
180
257
|
htmlId: uniqueId,
|
|
181
|
-
customChildrenClass: customChildrenClass
|
|
182
|
-
|
|
258
|
+
customChildrenClass: customChildrenClass
|
|
259
|
+
// onFocus={onFocus}
|
|
260
|
+
,
|
|
261
|
+
onFocus: this.handleFocus,
|
|
262
|
+
onBlur: this.handleBlur,
|
|
263
|
+
getPublicMethods: this.getPopupHandlers,
|
|
264
|
+
isPadding: needFieldStyle ? true : false
|
|
183
265
|
}, MultiSelectProps, {
|
|
184
266
|
ariaLabelledby: uniqueId
|
|
185
267
|
}), children ? children : null), validationMessage && /*#__PURE__*/React.createElement(ValidationMessage, _extends({
|
|
@@ -194,7 +276,7 @@ export default class MultiSelectField extends PureComponent {
|
|
|
194
276
|
type: errorType,
|
|
195
277
|
dataId: `${dataId}_ValidationRuleMessage`,
|
|
196
278
|
htmlFor: uniqueId
|
|
197
|
-
}, ValidationMessageProps2)));
|
|
279
|
+
}, ValidationMessageProps2))));
|
|
198
280
|
}
|
|
199
281
|
}
|
|
200
282
|
MultiSelectField.propTypes = propTypes;
|
|
@@ -92,6 +92,7 @@ export default class PhoneField extends PureComponent {
|
|
|
92
92
|
onCall,
|
|
93
93
|
ePhiData,
|
|
94
94
|
type,
|
|
95
|
+
needFieldStyle,
|
|
95
96
|
customProps
|
|
96
97
|
} = this.props;
|
|
97
98
|
const {
|
|
@@ -149,7 +150,8 @@ export default class PhoneField extends PureComponent {
|
|
|
149
150
|
labelPalette: labelPalette,
|
|
150
151
|
labelCustomClass: labelCustomClass,
|
|
151
152
|
errorType: errorType,
|
|
152
|
-
ePhiData: ePhiData
|
|
153
|
+
ePhiData: ePhiData,
|
|
154
|
+
needFieldStyle: needFieldStyle
|
|
153
155
|
}, TextBoxFieldProps))), /*#__PURE__*/React.createElement(Box, null, isTelephony && value ? /*#__PURE__*/React.createElement(Link, _extends({
|
|
154
156
|
className: style.phoneIcon,
|
|
155
157
|
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} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
56
|
+
className: `${style.container} ${!isDisabled && !isReadOnly && style.radiobdExxect} ${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,
|
|
@@ -10,6 +10,7 @@ import Select from '@zohodesk/components/lib/Select/Select';
|
|
|
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';
|
|
13
14
|
|
|
14
15
|
/**** props ****/
|
|
15
16
|
|
|
@@ -22,6 +23,17 @@ export default class SelectField extends PureComponent {
|
|
|
22
23
|
this.handleGetRef = this.handleGetRef.bind(this);
|
|
23
24
|
// this.handleLabelClick = this.handleLabelClick.bind(this);
|
|
24
25
|
this.getNextId = getUniqueId(this);
|
|
26
|
+
this.handleParentClick = this.handleParentClick.bind(this);
|
|
27
|
+
this.handleFocusToggle = this.handleFocusToggle.bind(this);
|
|
28
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
29
|
+
this.handleBlur = this.handleBlur.bind(this);
|
|
30
|
+
this.getPopupHandlers = this.getPopupHandlers.bind(this);
|
|
31
|
+
this.handleDropBoxOpen = this.handleDropBoxOpen.bind(this);
|
|
32
|
+
this.handleDropBoxClose = this.handleDropBoxClose.bind(this);
|
|
33
|
+
this.state = {
|
|
34
|
+
isFocused: false,
|
|
35
|
+
isPopupOpen: false
|
|
36
|
+
};
|
|
25
37
|
}
|
|
26
38
|
handleChange(selctedId, selectedValue) {
|
|
27
39
|
let {
|
|
@@ -36,9 +48,65 @@ export default class SelectField extends PureComponent {
|
|
|
36
48
|
getRef,
|
|
37
49
|
id
|
|
38
50
|
} = this.props;
|
|
39
|
-
this.
|
|
51
|
+
this.textBox = el;
|
|
40
52
|
getRef && getRef(el, id);
|
|
41
53
|
}
|
|
54
|
+
handleParentClick(e) {
|
|
55
|
+
const {
|
|
56
|
+
needFieldStyle
|
|
57
|
+
} = this.props;
|
|
58
|
+
if (needFieldStyle) {
|
|
59
|
+
this.textBox.focus();
|
|
60
|
+
this.togglePopup(e);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
handleFocusToggle(value) {
|
|
64
|
+
this.setState({
|
|
65
|
+
isFocused: value
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
handleFocus(e) {
|
|
69
|
+
const {
|
|
70
|
+
onFocus,
|
|
71
|
+
needFieldStyle
|
|
72
|
+
} = this.props;
|
|
73
|
+
needFieldStyle && this.handleFocusToggle(true);
|
|
74
|
+
onFocus && onFocus(e);
|
|
75
|
+
}
|
|
76
|
+
handleBlur(e) {
|
|
77
|
+
const {
|
|
78
|
+
onBlur,
|
|
79
|
+
needFieldStyle
|
|
80
|
+
} = this.props;
|
|
81
|
+
needFieldStyle && this.handleFocusToggle(false);
|
|
82
|
+
onBlur && onBlur(e);
|
|
83
|
+
}
|
|
84
|
+
getPopupHandlers(methods) {
|
|
85
|
+
let {
|
|
86
|
+
togglePopup
|
|
87
|
+
} = methods;
|
|
88
|
+
this.togglePopup = togglePopup;
|
|
89
|
+
}
|
|
90
|
+
handleDropBoxOpen() {
|
|
91
|
+
let {
|
|
92
|
+
isPopupOpen
|
|
93
|
+
} = this.state;
|
|
94
|
+
if (isPopupOpen == false) {
|
|
95
|
+
this.setState({
|
|
96
|
+
isPopupOpen: true
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
handleDropBoxClose() {
|
|
101
|
+
let {
|
|
102
|
+
isPopupOpen
|
|
103
|
+
} = this.state;
|
|
104
|
+
if (isPopupOpen) {
|
|
105
|
+
this.setState({
|
|
106
|
+
isPopupOpen: false
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
42
110
|
|
|
43
111
|
// handleLabelClick() {
|
|
44
112
|
// let { isFocusOnLabelClick } = this.props;
|
|
@@ -95,6 +163,8 @@ export default class SelectField extends PureComponent {
|
|
|
95
163
|
iconOnHover,
|
|
96
164
|
customProps,
|
|
97
165
|
renderLabelProps,
|
|
166
|
+
handleDropBoxOpen,
|
|
167
|
+
needFieldStyle,
|
|
98
168
|
ariaLabelledby
|
|
99
169
|
} = this.props;
|
|
100
170
|
const {
|
|
@@ -104,9 +174,19 @@ export default class SelectField extends PureComponent {
|
|
|
104
174
|
ValidationMessageProps2 = {}
|
|
105
175
|
} = customProps;
|
|
106
176
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
177
|
+
const {
|
|
178
|
+
isFocused,
|
|
179
|
+
isPopupOpen
|
|
180
|
+
} = this.state;
|
|
181
|
+
let isActive = isPopupOpen || isFocused;
|
|
182
|
+
return /*#__PURE__*/React.createElement(RippleEffect, {
|
|
183
|
+
hoverType: "bg",
|
|
184
|
+
isActive: isActive,
|
|
185
|
+
isNeedEffect: !isReadOnly && !isDisabled && needFieldStyle ? true : false
|
|
186
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
187
|
+
className: `${style.container} ${needFieldStyle ? style.highlightSpace : ''} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
188
|
+
"data-title": isDisabled ? title : null,
|
|
189
|
+
onClick: this.handleParentClick
|
|
110
190
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
111
191
|
infoText: infoText,
|
|
112
192
|
isLocked: isLocked,
|
|
@@ -116,18 +196,20 @@ export default class SelectField extends PureComponent {
|
|
|
116
196
|
text: labelName,
|
|
117
197
|
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
118
198
|
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
|
|
119
|
-
customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}
|
|
120
|
-
htmlFor
|
|
199
|
+
customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''} ${style.labelindex}`
|
|
200
|
+
// htmlFor={uniqueId}
|
|
201
|
+
,
|
|
121
202
|
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
|
|
122
203
|
}, LabelProps, {
|
|
123
204
|
id: uniqueId
|
|
124
205
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className: `${style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''} ${fieldClass ? fieldClass : ''}`
|
|
206
|
+
className: `${needFieldStyle ? style.highlightPosition : style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''} ${fieldClass ? fieldClass : ''}`
|
|
126
207
|
}, /*#__PURE__*/React.createElement(Select, _extends({
|
|
127
208
|
options: options,
|
|
128
209
|
selectedValue: selectedValue,
|
|
129
210
|
onChange: this.handleChange,
|
|
130
|
-
onFocus:
|
|
211
|
+
onFocus: this.handleFocus,
|
|
212
|
+
onBlur: this.handleBlur,
|
|
131
213
|
getRef: this.handleGetRef,
|
|
132
214
|
needSearch: needSearch,
|
|
133
215
|
emptyMessage: emptyMessage,
|
|
@@ -147,12 +229,17 @@ export default class SelectField extends PureComponent {
|
|
|
147
229
|
isNextOptions: isNextOptions,
|
|
148
230
|
getNextOptions: getNextOptions,
|
|
149
231
|
popupGroup: popupGroup,
|
|
150
|
-
onSearch: onSearch
|
|
151
|
-
htmlId
|
|
232
|
+
onSearch: onSearch
|
|
233
|
+
// htmlId={uniqueId}
|
|
234
|
+
,
|
|
152
235
|
needLocalSearch: needLocalSearch,
|
|
153
236
|
isDefaultSelectValue: isDefaultSelectValue,
|
|
154
237
|
placeHolder: placeHolder,
|
|
155
|
-
iconOnHover: iconOnHover
|
|
238
|
+
iconOnHover: iconOnHover,
|
|
239
|
+
needPosition: needFieldStyle ? true : false,
|
|
240
|
+
getPopupHandlers: this.getPopupHandlers,
|
|
241
|
+
onDropBoxOpen: this.handleDropBoxOpen,
|
|
242
|
+
onDropBoxClose: this.handleDropBoxClose
|
|
156
243
|
}, SelectProps, {
|
|
157
244
|
ariaLabelledby: uniqueId
|
|
158
245
|
}), children ? children : null)), validationMessage && /*#__PURE__*/React.createElement(ValidationMessage, _extends({
|
|
@@ -167,7 +254,7 @@ export default class SelectField extends PureComponent {
|
|
|
167
254
|
type: errorType,
|
|
168
255
|
htmlFor: uniqueId,
|
|
169
256
|
dataId: `${dataId}_ValidationRuleMessage`
|
|
170
|
-
}, ValidationMessageProps2)));
|
|
257
|
+
}, ValidationMessageProps2))));
|
|
171
258
|
}
|
|
172
259
|
}
|
|
173
260
|
SelectField.propTypes = propTypes;
|
|
@@ -167,7 +167,9 @@ const TagsMultiSelectField = props => {
|
|
|
167
167
|
};
|
|
168
168
|
}, []);
|
|
169
169
|
return /*#__PURE__*/React.createElement("div", {
|
|
170
|
-
className: `${isDisabled ? fieldStyle.disabled : isReadOnly ? fieldStyle.readonly : ''}
|
|
170
|
+
className: `${isDisabled ? fieldStyle.disabled : isReadOnly ? fieldStyle.readonly : ''}`,
|
|
171
|
+
tabIndex: "0",
|
|
172
|
+
"aria-label": `${labelName}`
|
|
171
173
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
172
174
|
ePhiData: ePhiData,
|
|
173
175
|
alignContainer: "baseline",
|
|
@@ -10,6 +10,7 @@ import TextBoxIcon from '@zohodesk/components/lib/TextBoxIcon/TextBoxIcon';
|
|
|
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';
|
|
13
14
|
|
|
14
15
|
/**** CSS ****/
|
|
15
16
|
import style from '../Fields.module.css';
|
|
@@ -20,6 +21,13 @@ export default class TextBoxField extends PureComponent {
|
|
|
20
21
|
this.handleGetRef = this.handleGetRef.bind(this);
|
|
21
22
|
// this.handleLabelClick = this.handleLabelClick.bind(this);
|
|
22
23
|
this.getNextId = getUniqueId(this);
|
|
24
|
+
this.handleParentClick = this.handleParentClick.bind(this);
|
|
25
|
+
this.handleFocusToggle = this.handleFocusToggle.bind(this);
|
|
26
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
27
|
+
this.handleBlur = this.handleBlur.bind(this);
|
|
28
|
+
this.state = {
|
|
29
|
+
isFocused: false
|
|
30
|
+
};
|
|
23
31
|
}
|
|
24
32
|
handleChange(value) {
|
|
25
33
|
let {
|
|
@@ -44,6 +52,40 @@ export default class TextBoxField extends PureComponent {
|
|
|
44
52
|
// // }
|
|
45
53
|
// }
|
|
46
54
|
|
|
55
|
+
handleParentClick() {
|
|
56
|
+
const {
|
|
57
|
+
needFieldStyle
|
|
58
|
+
} = this.props;
|
|
59
|
+
if (needFieldStyle) {
|
|
60
|
+
this.textBox.focus();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
handleFocusToggle(value) {
|
|
64
|
+
const {
|
|
65
|
+
needFieldStyle
|
|
66
|
+
} = this.props;
|
|
67
|
+
if (needFieldStyle) {
|
|
68
|
+
this.setState({
|
|
69
|
+
isFocused: value
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
handleFocus(e) {
|
|
74
|
+
const {
|
|
75
|
+
onFocus,
|
|
76
|
+
needFieldStyle
|
|
77
|
+
} = this.props;
|
|
78
|
+
needFieldStyle && this.handleFocusToggle(true);
|
|
79
|
+
onFocus && onFocus(e);
|
|
80
|
+
}
|
|
81
|
+
handleBlur(e) {
|
|
82
|
+
const {
|
|
83
|
+
onBlur,
|
|
84
|
+
needFieldStyle
|
|
85
|
+
} = this.props;
|
|
86
|
+
needFieldStyle && this.handleFocusToggle(false);
|
|
87
|
+
onBlur && onBlur(e);
|
|
88
|
+
}
|
|
47
89
|
render() {
|
|
48
90
|
let {
|
|
49
91
|
labelName,
|
|
@@ -80,7 +122,8 @@ export default class TextBoxField extends PureComponent {
|
|
|
80
122
|
ePhiData,
|
|
81
123
|
children,
|
|
82
124
|
customProps,
|
|
83
|
-
renderLabelProps
|
|
125
|
+
renderLabelProps,
|
|
126
|
+
needFieldStyle
|
|
84
127
|
} = this.props;
|
|
85
128
|
const {
|
|
86
129
|
LabelProps = {},
|
|
@@ -89,9 +132,17 @@ export default class TextBoxField extends PureComponent {
|
|
|
89
132
|
ValidationMessageProps2 = {}
|
|
90
133
|
} = customProps;
|
|
91
134
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
135
|
+
const {
|
|
136
|
+
isFocused
|
|
137
|
+
} = this.state;
|
|
138
|
+
return /*#__PURE__*/React.createElement(RippleEffect, {
|
|
139
|
+
hoverType: "bg",
|
|
140
|
+
isActive: isFocused,
|
|
141
|
+
isNeedEffect: !isReadOnly && !isDisabled && needFieldStyle ? true : false
|
|
142
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: `${style.container} ${needFieldStyle ? style.highlightSpace : ''} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
144
|
+
"data-title": isDisabled ? title : null,
|
|
145
|
+
onClick: this.handleParentClick
|
|
95
146
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
96
147
|
infoText: infoText,
|
|
97
148
|
isLocked: isLocked,
|
|
@@ -103,7 +154,7 @@ export default class TextBoxField extends PureComponent {
|
|
|
103
154
|
text: labelName,
|
|
104
155
|
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
105
156
|
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
|
|
106
|
-
customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
|
|
157
|
+
customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''} ${style.labelindex}`,
|
|
107
158
|
htmlFor: uniqueId,
|
|
108
159
|
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
|
|
109
160
|
}, LabelProps, {
|
|
@@ -122,11 +173,11 @@ export default class TextBoxField extends PureComponent {
|
|
|
122
173
|
value: value,
|
|
123
174
|
onChange: this.handleChange,
|
|
124
175
|
dataId: dataId,
|
|
125
|
-
onBlur:
|
|
176
|
+
onBlur: this.handleBlur,
|
|
126
177
|
onKeyDown: onKeyDown,
|
|
127
178
|
placeHolder: placeHolder,
|
|
128
179
|
borderColor: borderColor,
|
|
129
|
-
onFocus:
|
|
180
|
+
onFocus: this.handleFocus,
|
|
130
181
|
isDisabled: isDisabled,
|
|
131
182
|
needEffect: isReadOnly || isDisabled ? false : true,
|
|
132
183
|
isClickable: isClickable,
|
|
@@ -147,7 +198,7 @@ export default class TextBoxField extends PureComponent {
|
|
|
147
198
|
type: errorType,
|
|
148
199
|
htmlFor: uniqueId,
|
|
149
200
|
dataId: `${dataId}_ValidationRuleMessage`
|
|
150
|
-
}, ValidationMessageProps2))));
|
|
201
|
+
}, ValidationMessageProps2)))));
|
|
151
202
|
}
|
|
152
203
|
}
|
|
153
204
|
TextBoxField.propTypes = propTypes;
|
|
@@ -10,6 +10,7 @@ import Textarea from '@zohodesk/components/lib/Textarea/Textarea';
|
|
|
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';
|
|
13
14
|
|
|
14
15
|
/**** CSS ****/
|
|
15
16
|
import style from '../Fields.module.css';
|
|
@@ -21,6 +22,13 @@ export default class TextareaField extends PureComponent {
|
|
|
21
22
|
this.handleGetRef = this.handleGetRef.bind(this);
|
|
22
23
|
// this.handleLabelClick = this.handleLabelClick.bind(this);
|
|
23
24
|
this.getNextId = getUniqueId(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.state = {
|
|
30
|
+
isFocused: false
|
|
31
|
+
};
|
|
24
32
|
}
|
|
25
33
|
handleChange(value) {
|
|
26
34
|
let {
|
|
@@ -29,13 +37,6 @@ export default class TextareaField extends PureComponent {
|
|
|
29
37
|
} = this.props;
|
|
30
38
|
onChange && onChange(id, value);
|
|
31
39
|
}
|
|
32
|
-
handleBlur(value) {
|
|
33
|
-
let {
|
|
34
|
-
id,
|
|
35
|
-
onBlur
|
|
36
|
-
} = this.props;
|
|
37
|
-
onBlur && onBlur(id, value);
|
|
38
|
-
}
|
|
39
40
|
handleGetRef(el) {
|
|
40
41
|
let {
|
|
41
42
|
getRef,
|
|
@@ -44,6 +45,41 @@ export default class TextareaField extends PureComponent {
|
|
|
44
45
|
this.textarea = el;
|
|
45
46
|
getRef && getRef(el, id);
|
|
46
47
|
}
|
|
48
|
+
handleParentClick() {
|
|
49
|
+
const {
|
|
50
|
+
needFieldStyle
|
|
51
|
+
} = this.props;
|
|
52
|
+
if (needFieldStyle) {
|
|
53
|
+
this.textarea.focus();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
handleFocusToggle(value) {
|
|
57
|
+
const {
|
|
58
|
+
needFieldStyle
|
|
59
|
+
} = this.props;
|
|
60
|
+
if (needFieldStyle) {
|
|
61
|
+
this.setState({
|
|
62
|
+
isFocused: value
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
handleFocus(e) {
|
|
67
|
+
const {
|
|
68
|
+
onFocus,
|
|
69
|
+
needFieldStyle
|
|
70
|
+
} = this.props;
|
|
71
|
+
needFieldStyle && this.handleFocusToggle(true);
|
|
72
|
+
onFocus && onFocus(e);
|
|
73
|
+
}
|
|
74
|
+
handleBlur(value) {
|
|
75
|
+
let {
|
|
76
|
+
id,
|
|
77
|
+
onBlur,
|
|
78
|
+
needFieldStyle
|
|
79
|
+
} = this.props;
|
|
80
|
+
needFieldStyle && this.handleFocusToggle(false);
|
|
81
|
+
onBlur && onBlur(id, value);
|
|
82
|
+
}
|
|
47
83
|
|
|
48
84
|
// handleLabelClick() {
|
|
49
85
|
// let { isFocusOnLabelClick } = this.props;
|
|
@@ -82,7 +118,8 @@ export default class TextareaField extends PureComponent {
|
|
|
82
118
|
lockedInfoText,
|
|
83
119
|
isLocked,
|
|
84
120
|
customProps,
|
|
85
|
-
renderLabelProps
|
|
121
|
+
renderLabelProps,
|
|
122
|
+
needFieldStyle
|
|
86
123
|
} = this.props;
|
|
87
124
|
const {
|
|
88
125
|
LabelProps = {},
|
|
@@ -91,9 +128,17 @@ export default class TextareaField extends PureComponent {
|
|
|
91
128
|
ValidationMessageProps2 = {}
|
|
92
129
|
} = customProps;
|
|
93
130
|
let uniqueId = htmlId ? htmlId : this.getNextId();
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
131
|
+
const {
|
|
132
|
+
isFocused
|
|
133
|
+
} = this.state;
|
|
134
|
+
return /*#__PURE__*/React.createElement(RippleEffect, {
|
|
135
|
+
hoverType: "bg",
|
|
136
|
+
isActive: isFocused,
|
|
137
|
+
isNeedEffect: needFieldStyle ? true : false
|
|
138
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: `${style.container} ${needFieldStyle ? style.highlightSpace : ''} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
140
|
+
"data-title": isDisabled ? title : null,
|
|
141
|
+
onClick: this.handleParentClick
|
|
97
142
|
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
98
143
|
infoText: infoText,
|
|
99
144
|
isLocked: isLocked,
|
|
@@ -122,6 +167,7 @@ export default class TextareaField extends PureComponent {
|
|
|
122
167
|
placeHolder: placeHolder,
|
|
123
168
|
dataId: `property(${dataId})`,
|
|
124
169
|
onBlur: this.handleBlur,
|
|
170
|
+
onFocus: this.handleFocus,
|
|
125
171
|
borderColor: borderColor,
|
|
126
172
|
needEffect: isReadOnly || isDisabled ? false : true,
|
|
127
173
|
resize: "vertical"
|
|
@@ -144,7 +190,7 @@ export default class TextareaField extends PureComponent {
|
|
|
144
190
|
type: errorType,
|
|
145
191
|
htmlFor: uniqueId,
|
|
146
192
|
dataId: `${dataId}_ValidationRuleMessage`
|
|
147
|
-
}, ValidationMessageProps2))));
|
|
193
|
+
}, ValidationMessageProps2)))));
|
|
148
194
|
}
|
|
149
195
|
}
|
|
150
196
|
TextareaField.propTypes = propTypes;
|
|
@@ -16,7 +16,8 @@ export default class DeleteComponent extends React.Component {
|
|
|
16
16
|
onClick: onClick,
|
|
17
17
|
className: `${style.iconStyle} ${style.redHover} ${className ? className : ''}`,
|
|
18
18
|
"data-id": dataId,
|
|
19
|
-
"data-title": dataTitle
|
|
19
|
+
"data-title": dataTitle,
|
|
20
|
+
tabIndex: 0
|
|
20
21
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
21
22
|
name: "ZD-GN-delete",
|
|
22
23
|
iconClass: iconClass ? iconClass : '',
|
|
@@ -2,7 +2,6 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import { SmartIcon_propTypes } from './props/propTypes';
|
|
3
3
|
import style from './Icons.module.css';
|
|
4
4
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
5
|
-
import btnStyle from '@zohodesk/components/lib/semantic/Button/semanticButton.module.css';
|
|
6
5
|
export default class SmartIcon extends Component {
|
|
7
6
|
render() {
|
|
8
7
|
let {
|