@zohodesk/dot 1.0.0-temp-89 → 1.0.0-temp.888
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 +13 -0
- package/es/ActionButton/ActionButton.js +7 -4
- package/es/ActionButton/ActionButton.module.css +9 -25
- package/es/AlphabeticList/AlphabeticList.module.css +4 -7
- package/es/Attachment/Attachment.module.css +9 -20
- package/es/AttachmentViewer/AttachmentViewer.module.css +27 -89
- package/es/ChannelIcon/ChannelIcon.module.css +21 -30
- package/es/Drawer/Drawer.module.css +11 -59
- package/es/FlipCard/FlipCard.module.css +5 -14
- package/es/FormAction/FormAction.module.css +9 -34
- package/es/FreezeLayer/FreezeLayer.module.css +2 -6
- package/es/IconButton/IconButton.module.css +1 -1
- package/es/ImportantNotes/ImportantNotes.module.css +2 -7
- package/es/Loader/Loader.module.css +4 -25
- package/es/Message/Message.module.css +9 -42
- package/es/MessageBanner/MessageBanner.module.css +4 -12
- package/es/NewStar/NewStar.module.css +5 -42
- package/es/Provider.js +5 -105
- package/es/ToastMessage/ToastMessage.module.css +25 -96
- package/es/Upload/Upload.module.css +8 -27
- package/es/alert/AlertHeader/AlertHeader.module.css +3 -21
- package/es/alert/AlertLookup/AlertLookup.module.css +2 -6
- package/es/avatar/AvatarClose/AvatarClose.module.css +3 -9
- package/es/avatar/AvatarCollision/AvatarCollision.module.css +4 -18
- package/es/avatar/AvatarIcon/AvatarIcon.module.css +4 -3
- package/es/avatar/AvatarStatus/AvatarStatus.module.css +9 -59
- package/es/avatar/AvatarThread/AvatarThread.module.css +5 -55
- package/es/avatar/AvatarUser/AvatarUser.module.css +10 -81
- package/es/avatar/AvatarWithTeam/AvatarWithTeam.module.css +3 -10
- package/es/common/dot_animation.module.css +3 -16
- package/es/deprecated/SelectDropdown/SelectDropdown.module.css +3 -11
- package/es/docs/formDocs.js +5 -1
- package/es/docs/generalDocs.js +5 -2
- package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +9 -21
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -12
- package/es/emptystate/EditionPage/EditionPage.css +3 -9
- package/es/errorstate/EmptyStates.module.css +10 -13
- package/es/errorstate/Inconvenience/Inconvenience.module.css +0 -3
- package/es/errorstate/LinkText/LinkText.module.css +1 -1
- package/es/errorstate/PermissionPlay/PermissionPlay.module.css +2 -2
- package/es/errorstate/WillBack/WillBack.module.css +3 -1
- package/es/form/fields/CheckBoxField/CheckBoxField.js +16 -28
- package/es/form/fields/CheckBoxField/docs/CheckBoxField__default.docs.js +8 -1
- package/es/form/fields/CurrencyField/CurrencyField.js +16 -29
- package/es/form/fields/CurrencyField/docs/CurrencyField__default.docs.js +36 -0
- package/es/form/fields/DateField/DateField.js +16 -28
- package/es/form/fields/DateField/docs/DateField__default.docs.js +8 -1
- package/es/form/fields/FieldContainer/FieldContainer.js +82 -0
- package/es/form/fields/FieldContainer/docs/FieldContainer__default.docs.js +49 -0
- package/es/form/fields/Fields.module.css +14 -49
- package/es/form/fields/MultiSelectField/MultiSelectField.js +16 -28
- package/es/form/fields/MultiSelectField/docs/MultiSelectField__default.docs.js +8 -1
- package/es/form/fields/SelectField/SelectField.js +16 -28
- package/es/form/fields/SelectField/docs/SelectField__default.docs.js +8 -1
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +7 -4
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +7 -19
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +32 -28
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +1 -4
- package/es/form/fields/TextBoxField/TextBoxField.js +18 -43
- package/es/form/fields/TextBoxField/docs/TextBoxField__default.docs.js +28 -1
- package/es/form/fields/TextEditor/TextEditor.module.css +72 -149
- package/es/form/fields/TextEditorField/TextEditorField.js +27 -44
- package/es/form/fields/TextEditorField/docs/TextEditorField__default.docs.js +9 -2
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +2 -13
- package/es/form/fields/TextareaField/TextareaField.js +16 -28
- package/es/form/fields/TextareaField/docs/TextareaField__default.docs.js +8 -1
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +4 -9
- package/es/form/fields/props/FieldCommonDefaultProps.js +10 -0
- package/es/form/fields/props/FieldCommonPropTypes.js +22 -0
- package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +16 -52
- package/es/layout/SubtabLayout/SubtabLayout.module.css +29 -55
- package/es/list/BluePrintStatus/BluePrintStatus.module.css +1 -4
- package/es/list/Comment/Comment.module.css +0 -5
- package/es/list/DotNew/DotNew.module.css +3 -3
- package/es/list/GridStencils/GridStencils.module.css +21 -82
- package/es/list/Icons/Icons.module.css +1 -1
- package/es/list/ListLayout/ListLayout.module.css +14 -22
- package/es/list/ListStencils/ListStencils.module.css +6 -11
- package/es/list/SecondaryText/AccountName.js +34 -38
- package/es/list/SecondaryText/ContactName.js +18 -13
- package/es/list/SecondaryText/SecondaryText.module.css +14 -39
- package/es/list/SecondaryText/docs/SecondaryText__default.docs.js +114 -0
- package/es/list/SecondryPanel/docs/SecondryPanelDocs.module.css +2 -2
- package/es/list/SentimentStatus/SentimentStatus.module.css +1 -4
- package/es/list/TagNew/TagNew.module.css +7 -14
- package/es/list/Thread/Thread.module.css +1 -13
- package/es/list/UserTime/UserTime.module.css +0 -6
- package/es/list/listCommon.module.css +1 -9
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +6 -19
- package/es/list/status/StatusListItem/StatusListItem.module.css +15 -38
- package/es/lookup/Lookup/Lookup.module.css +2 -2
- package/es/lookup/Section/LookupSection.module.css +2 -2
- package/es/lookup/header/Close/LookupClose.module.css +4 -4
- package/es/lookup/header/Search/LookupSearch.module.css +12 -21
- package/es/lookup/header/TicketHeader/TicketHeader.module.css +2 -5
- package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +3 -8
- package/es/lookup/header/lookupHeaderCommon.module.css +5 -15
- package/es/lookup/header/lookupHeaderCommonResponsive.module.css +3 -12
- package/es/setup/header/Button/HeaderButton.module.css +1 -3
- package/es/setup/header/Link/HeaderLink.module.css +1 -7
- package/es/setup/header/Search/Search.module.css +8 -19
- package/es/setup/header/Views/Views.module.css +5 -15
- package/es/setup/helptips/Link/HelpTipsLink.module.css +0 -1
- package/es/setup/helptips/ListGroup/ListGroup.module.css +1 -6
- package/es/setup/table/TableData/SetupTableData.module.css +3 -11
- package/es/setup/table/TableHead/SetupTableHead.module.css +0 -4
- package/es/setup/table/TableRow/SetupTableRow.module.css +2 -6
- package/es/utils/KeyboardApi.js +294 -0
- package/es/version2/AlertClose/AlertClose.module.css +1 -1
- package/es/version2/GlobalNotification/GlobalNotification.module.css +9 -44
- package/es/version2/lookup/AlertHeader/AlertHeaderNew.module.css +2 -25
- package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +3 -7
- package/es/version2/lookup/alertLookupCommonNew.module.css +1 -8
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -26
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +10 -47
- package/lib/ActionButton/ActionButton.js +3 -7
- package/lib/ActionButton/ActionButton.module.css +1 -0
- package/lib/FreezeLayer/FreezeLayer.js +4 -29
- package/lib/ImportantNotes/ImportantNotes.js +3 -5
- package/lib/Provider.js +38 -115
- package/lib/deprecated/SelectDropdown/SelectDropdown.js +38 -60
- package/lib/deprecated/SelectDropdown/SelectDropdown.module.css +0 -1
- package/lib/docs/generalDocs.js +0 -16
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +161 -182
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +0 -3
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +1 -1
- package/lib/form/fields/CurrencyField/CurrencyField.js +8 -9
- package/lib/form/fields/DateField/DateField.js +1 -1
- package/lib/form/fields/MultiSelectField/MultiSelectField.js +1 -1
- package/lib/form/fields/PhoneField/PhoneField.js +1 -1
- package/lib/form/fields/RadioField/RadioField.js +1 -1
- package/lib/form/fields/SelectField/SelectField.js +1 -1
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +73 -110
- package/lib/form/fields/TextBoxField/TextBoxField.js +1 -1
- package/lib/form/fields/TextEditor/TextEditor.js +1 -4
- package/lib/form/fields/TextEditor/TextEditor.module.css +2 -13
- package/lib/form/fields/TextareaField/TextareaField.js +1 -1
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +1 -1
- package/lib/list/GridStencils/GridStencils.module.css +1 -3
- package/lib/list/SecondaryText/AccountName.js +34 -38
- package/lib/list/SecondaryText/ContactName.js +18 -13
- package/lib/list/SecondaryText/SecondaryText.module.css +14 -29
- package/lib/list/status/StatusDropdown/StatusDropdown.js +118 -146
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +0 -3
- package/lib/lookup/header/ModuleHeader/ModuleHeader.js +3 -8
- package/lib/lookup/header/ModuleHeader/docs/ModuleHeader__default.docs.js +3 -13
- package/lib/lookup/header/TicketHeader/TicketHeader.js +4 -7
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +52 -75
- package/lib/lookup/header/lookupHeaderCommon.module.css +2 -8
- package/lib/setup/header/Views/Views.js +2 -2
- package/lib/utils/General.js +24 -0
- package/lib/{deprecated/utils → utils}/KeyboardApi.js +0 -0
- package/package.json +5 -5
- package/lib/AttachmentViewer/Attachment.js +0 -28
- package/lib/AttachmentViewer/AttachmentImage.js +0 -133
- package/lib/AttachmentViewer/AttachmentViewer.js +0 -646
- package/lib/AttachmentViewer/AttachmentViewer.module.css +0 -354
- package/lib/AttachmentViewer/docs/AttachmentViewer__default.docs.js +0 -123
- package/lib/AttachmentViewer/utils.js +0 -134
- package/lib/Provider/Config.js +0 -21
- package/lib/common/dot_animation.module.css +0 -27
- package/lib/common/dot_common.module.css +0 -4
- package/lib/deprecated/utils/General.js +0 -29
|
@@ -13,6 +13,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
15
15
|
|
|
16
|
+
var _DropBox = _interopRequireDefault(require("@zohodesk/components/lib/DropBox/DropBox"));
|
|
17
|
+
|
|
16
18
|
var _Popup = _interopRequireDefault(require("@zohodesk/components/lib/Popup/Popup"));
|
|
17
19
|
|
|
18
20
|
var _Layout = require("@zohodesk/components/lib/Layout");
|
|
@@ -35,10 +37,6 @@ var _StatusListItem = _interopRequireDefault(require("../StatusListItem/StatusLi
|
|
|
35
37
|
|
|
36
38
|
var _commonModule = _interopRequireDefault(require("@zohodesk/components/lib/common/common.module.css"));
|
|
37
39
|
|
|
38
|
-
var _ResponsiveDropBox = _interopRequireDefault(require("@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox"));
|
|
39
|
-
|
|
40
|
-
var _CustomResponsive = require("@zohodesk/components/lib/Responsive/CustomResponsive");
|
|
41
|
-
|
|
42
40
|
var _IdProvider = require("@zohodesk/components/lib/Provider/IdProvider");
|
|
43
41
|
|
|
44
42
|
var _semanticButtonModule = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/semanticButton.module.css"));
|
|
@@ -184,7 +182,7 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
184
182
|
|
|
185
183
|
if (prevProps.isPopupOpen != isPopupOpen) {
|
|
186
184
|
setTimeout(function () {
|
|
187
|
-
isPopupOpen
|
|
185
|
+
isPopupOpen ? isSearch ? _this2.searchInput && _this2.searchInput.focus() : _this2.hiddenInput && _this2.hiddenInput.focus() : _this2.hiddenInput && _this2.hiddenInput.focus();
|
|
188
186
|
}, 10);
|
|
189
187
|
}
|
|
190
188
|
|
|
@@ -213,61 +211,54 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
213
211
|
togglePopup = _this$props4.togglePopup,
|
|
214
212
|
onClick = _this$props4.onClick,
|
|
215
213
|
boxPosition = _this$props4.boxPosition,
|
|
216
|
-
|
|
214
|
+
isPopupOpen = _this$props4.isPopupOpen,
|
|
217
215
|
isNextOptions = _this$props4.isNextOptions,
|
|
218
216
|
getNextOptions = _this$props4.getNextOptions,
|
|
219
|
-
onTogglePopup = _this$props4.onTogglePopup
|
|
220
|
-
isPopupOpen = _this$props4.isPopupOpen;
|
|
217
|
+
onTogglePopup = _this$props4.onTogglePopup;
|
|
221
218
|
|
|
222
|
-
if (
|
|
219
|
+
if (isPopupOpen && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
|
|
223
220
|
e.preventDefault(); //prevent body scroll
|
|
224
221
|
}
|
|
225
222
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
isNextOptions && getNextOptions && getNextOptions();
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
this.setState({
|
|
239
|
-
selectedIndex: selectedIndex + 1
|
|
240
|
-
});
|
|
223
|
+
switch (keyCode) {
|
|
224
|
+
case 40:
|
|
225
|
+
if (selectedIndex === totalIndex - 1) {
|
|
226
|
+
this.setState({
|
|
227
|
+
selectedIndex: 0
|
|
228
|
+
});
|
|
229
|
+
} else {
|
|
230
|
+
if (selectedIndex === totalIndex - 3) {
|
|
231
|
+
isNextOptions && getNextOptions && getNextOptions();
|
|
241
232
|
}
|
|
242
233
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.setState({
|
|
248
|
-
selectedIndex: totalIndex - 1
|
|
249
|
-
});
|
|
250
|
-
} else {
|
|
251
|
-
this.setState({
|
|
252
|
-
selectedIndex: selectedIndex - 1
|
|
253
|
-
});
|
|
254
|
-
}
|
|
234
|
+
this.setState({
|
|
235
|
+
selectedIndex: selectedIndex + 1
|
|
236
|
+
});
|
|
237
|
+
}
|
|
255
238
|
|
|
256
|
-
|
|
239
|
+
break;
|
|
240
|
+
|
|
241
|
+
case 38:
|
|
242
|
+
if (selectedIndex === 0) {
|
|
243
|
+
this.setState({
|
|
244
|
+
selectedIndex: totalIndex - 1
|
|
245
|
+
});
|
|
246
|
+
} else {
|
|
247
|
+
this.setState({
|
|
248
|
+
selectedIndex: selectedIndex - 1
|
|
249
|
+
});
|
|
250
|
+
}
|
|
257
251
|
|
|
258
|
-
|
|
259
|
-
onClick && onClick(options[selectedIndex].name, e);
|
|
260
|
-
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
261
|
-
togglePopup(e, boxPosition);
|
|
262
|
-
break;
|
|
252
|
+
break;
|
|
263
253
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
} else {
|
|
268
|
-
if (keyCode === 13 || keyCode === 40) {
|
|
254
|
+
case 13:
|
|
255
|
+
onClick && onClick(options[selectedIndex].name, e);
|
|
256
|
+
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
269
257
|
togglePopup(e, boxPosition);
|
|
270
|
-
|
|
258
|
+
break;
|
|
259
|
+
|
|
260
|
+
default:
|
|
261
|
+
break;
|
|
271
262
|
}
|
|
272
263
|
}
|
|
273
264
|
}, {
|
|
@@ -318,16 +309,6 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
318
309
|
isNextOptions && getNextOptions && getNextOptions(e);
|
|
319
310
|
}
|
|
320
311
|
}
|
|
321
|
-
}, {
|
|
322
|
-
key: "responsiveFunc",
|
|
323
|
-
value: function responsiveFunc(_ref) {
|
|
324
|
-
var mediaQueryOR = _ref.mediaQueryOR;
|
|
325
|
-
return {
|
|
326
|
-
tabletMode: mediaQueryOR([{
|
|
327
|
-
maxWidth: 700
|
|
328
|
-
}])
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
312
|
}, {
|
|
332
313
|
key: "render",
|
|
333
314
|
value: function render() {
|
|
@@ -420,96 +401,87 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
420
401
|
name: "ZD-down",
|
|
421
402
|
iconClass: 'toggleDropIcon'.concat(" ", _StatusDropdownModule["default"].arrow, " ").concat(_StatusDropdownModule["default"]["".concat(arrowIconPosition, "_arrow")]),
|
|
422
403
|
dataId: "statusdownarrow"
|
|
423
|
-
}) : null), isPopupOpen && isEditable ? /*#__PURE__*/_react["default"].createElement(
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
404
|
+
}) : null), isPopupOpen && isEditable ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
|
|
405
|
+
boxPosition: position,
|
|
406
|
+
isActive: isPopupReady,
|
|
407
|
+
onClick: removeClose,
|
|
408
|
+
size: boxSize,
|
|
409
|
+
right: right,
|
|
410
|
+
left: left,
|
|
411
|
+
top: top,
|
|
412
|
+
bottom: bottom,
|
|
413
|
+
isArrow: isArrow,
|
|
414
|
+
isAnimate: true,
|
|
415
|
+
getRef: getContainerRef,
|
|
416
|
+
customClass: {
|
|
417
|
+
customDropBoxWrap: _StatusDropdownModule["default"].dropBoxContainer
|
|
418
|
+
},
|
|
419
|
+
needResponsive: needResponsive
|
|
420
|
+
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isSearch ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
421
|
+
className: _StatusDropdownModule["default"].search
|
|
422
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
423
|
+
placeHolder: placeHolderText,
|
|
424
|
+
onChange: this.handleChange,
|
|
425
|
+
value: searchString,
|
|
426
|
+
onClear: this.onSearchClear,
|
|
427
|
+
size: searchBoxSize,
|
|
428
|
+
inputRef: this.searchInputRef,
|
|
429
|
+
onKeyDown: this.handleKeyDown,
|
|
430
|
+
a11y: {
|
|
431
|
+
ariaHaspopup: true,
|
|
432
|
+
ariaExpanded: true,
|
|
433
|
+
role: 'combobox',
|
|
434
|
+
ariaActivedescendant: value,
|
|
435
|
+
ariaOwns: ariaTitleId
|
|
436
|
+
}
|
|
437
|
+
})) : null, title && options.length != 0 && /*#__PURE__*/_react["default"].createElement("div", {
|
|
438
|
+
className: _StatusDropdownModule["default"].title
|
|
439
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDownHeading["default"], {
|
|
440
|
+
htmlId: ariaTitleId,
|
|
441
|
+
text: title,
|
|
442
|
+
a11y: {
|
|
443
|
+
role: 'heading'
|
|
444
|
+
}
|
|
445
|
+
})), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
446
|
+
scroll: "vertical",
|
|
447
|
+
dataId: "".concat(dataId, "_list"),
|
|
448
|
+
className: _StatusDropdownModule["default"].maxHgt,
|
|
449
|
+
eleRef: this.scrollContentRef,
|
|
450
|
+
onScroll: this.handleScroll,
|
|
451
|
+
role: isSearch ? 'listbox' : 'menu',
|
|
452
|
+
"aria-labelledby": ariaTitleId,
|
|
453
|
+
tabindex: "0"
|
|
454
|
+
}, options.length != 0 && isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, options.map(function (item, i) {
|
|
455
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
456
|
+
key: i
|
|
457
|
+
}, /*#__PURE__*/_react["default"].createElement(_StatusListItem["default"], {
|
|
458
|
+
dataId: "dataid_".concat(i),
|
|
459
|
+
value: item[keyName],
|
|
460
|
+
id: item[idName],
|
|
461
|
+
active: value === item[keyName],
|
|
462
|
+
onClick: _this3.onSelect.bind(_this3, item),
|
|
463
|
+
index: i,
|
|
464
|
+
highlight: selectedIndex === i,
|
|
465
|
+
needTick: needTick,
|
|
466
|
+
needBorder: false,
|
|
467
|
+
onMouseEnter: _this3.handleMouseEnter,
|
|
468
|
+
getRef: _this3.itemRef,
|
|
469
|
+
bulletColor: item[statusColor],
|
|
470
|
+
title: item[keyName],
|
|
467
471
|
a11y: {
|
|
468
|
-
role: '
|
|
472
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
473
|
+
ariaSelected: value === item[keyName]
|
|
469
474
|
}
|
|
470
|
-
}))
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
tabindex: "0"
|
|
481
|
-
}, options.length != 0 && isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, options.map(function (item, i) {
|
|
482
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
483
|
-
key: i
|
|
484
|
-
}, /*#__PURE__*/_react["default"].createElement(_StatusListItem["default"], {
|
|
485
|
-
dataId: "dataid_".concat(i),
|
|
486
|
-
value: item[keyName],
|
|
487
|
-
id: item[idName],
|
|
488
|
-
active: value === item[keyName],
|
|
489
|
-
onClick: _this3.onSelect.bind(_this3, item),
|
|
490
|
-
index: i,
|
|
491
|
-
highlight: selectedIndex === i,
|
|
492
|
-
needTick: needTick,
|
|
493
|
-
needBorder: false,
|
|
494
|
-
onMouseEnter: _this3.handleMouseEnter,
|
|
495
|
-
getRef: _this3.itemRef,
|
|
496
|
-
bulletColor: item[statusColor],
|
|
497
|
-
title: item[keyName],
|
|
498
|
-
a11y: {
|
|
499
|
-
role: isSearch ? 'option' : 'menuitem',
|
|
500
|
-
ariaSelected: value === item[keyName]
|
|
501
|
-
}
|
|
502
|
-
}));
|
|
503
|
-
})) : isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_CommonEmptyState["default"], {
|
|
504
|
-
className: _StatusDropdownModule["default"].svgWrapper,
|
|
505
|
-
title: searchErrorText || 'No results',
|
|
506
|
-
description: searchEmptyHint,
|
|
507
|
-
size: "small",
|
|
508
|
-
getEmptyState: _this3.emptySearchSVG
|
|
509
|
-
}) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
510
|
-
className: _StatusDropdownModule["default"].loader
|
|
511
|
-
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)))));
|
|
512
|
-
}) : null);
|
|
475
|
+
}));
|
|
476
|
+
})) : isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_CommonEmptyState["default"], {
|
|
477
|
+
className: _StatusDropdownModule["default"].svgWrapper,
|
|
478
|
+
title: searchErrorText || 'oops !',
|
|
479
|
+
description: searchEmptyHint,
|
|
480
|
+
size: "small",
|
|
481
|
+
getEmptyState: this.emptySearchSVG
|
|
482
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
483
|
+
className: _StatusDropdownModule["default"].loader
|
|
484
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null))))) : null);
|
|
513
485
|
}
|
|
514
486
|
}]);
|
|
515
487
|
|
|
@@ -80,12 +80,11 @@ var ModuleHeader = /*#__PURE__*/function (_PureComponent) {
|
|
|
80
80
|
miniDescription = _this$props.miniDescription,
|
|
81
81
|
dataId = _this$props.dataId,
|
|
82
82
|
closeTitle = _this$props.closeTitle,
|
|
83
|
-
onSearchKeyDown = _this$props.onSearchKeyDown
|
|
84
|
-
palette = _this$props.palette;
|
|
83
|
+
onSearchKeyDown = _this$props.onSearchKeyDown;
|
|
85
84
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
86
85
|
align: "vertical",
|
|
87
86
|
alignBox: "row",
|
|
88
|
-
className: "".concat(_lookupHeaderCommonModule["default"].container
|
|
87
|
+
className: "".concat(_lookupHeaderCommonModule["default"].container),
|
|
89
88
|
isCover: false,
|
|
90
89
|
wrap: "wrap",
|
|
91
90
|
dataId: dataId
|
|
@@ -135,11 +134,7 @@ ModuleHeader.propTypes = {
|
|
|
135
134
|
title: _propTypes["default"].string,
|
|
136
135
|
dataId: _propTypes["default"].string,
|
|
137
136
|
closeTitle: _propTypes["default"].string,
|
|
138
|
-
onSearchKeyDown: _propTypes["default"].func
|
|
139
|
-
palette: _propTypes["default"].oneOf(['default', 'white'])
|
|
140
|
-
};
|
|
141
|
-
ModuleHeader.defaultProps = {
|
|
142
|
-
palette: 'default'
|
|
137
|
+
onSearchKeyDown: _propTypes["default"].func
|
|
143
138
|
};
|
|
144
139
|
|
|
145
140
|
if (false) {
|
|
@@ -66,24 +66,14 @@ var ModuleHeader__default = /*#__PURE__*/function (_Component) {
|
|
|
66
66
|
key: "render",
|
|
67
67
|
value: function render() {
|
|
68
68
|
var searchStr = this.state.searchStr;
|
|
69
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
69
|
+
return /*#__PURE__*/_react["default"].createElement(_ModuleHeader["default"], {
|
|
70
70
|
title: "Find Duplicate",
|
|
71
71
|
needSearch: true,
|
|
72
72
|
searchStr: searchStr,
|
|
73
73
|
onSearchChange: this.handleSearch,
|
|
74
74
|
searchPlaceHolder: "Search",
|
|
75
|
-
miniDescription: "Select a field to search for duplicate records"
|
|
76
|
-
|
|
77
|
-
}), /*#__PURE__*/_react["default"].createElement(_ModuleHeader["default"], {
|
|
78
|
-
title: "Find Duplicate",
|
|
79
|
-
needSearch: true,
|
|
80
|
-
searchStr: searchStr,
|
|
81
|
-
onSearchChange: this.handleSearch,
|
|
82
|
-
searchPlaceHolder: "Search",
|
|
83
|
-
miniDescription: "Select a field to search for duplicate records",
|
|
84
|
-
onLookupClose: function onLookupClose() {},
|
|
85
|
-
palette: "white"
|
|
86
|
-
}));
|
|
75
|
+
miniDescription: "Select a field to search for duplicate records"
|
|
76
|
+
});
|
|
87
77
|
}
|
|
88
78
|
}]);
|
|
89
79
|
|
|
@@ -82,14 +82,13 @@ var TicketHeader = /*#__PURE__*/function (_Component) {
|
|
|
82
82
|
needOnTypeSearch = _this$props.needOnTypeSearch,
|
|
83
83
|
getSearchBoxRef = _this$props.getSearchBoxRef,
|
|
84
84
|
needViewsList = _this$props.needViewsList,
|
|
85
|
-
i18nKeys = _this$props.i18nKeys
|
|
86
|
-
palette = _this$props.palette;
|
|
85
|
+
i18nKeys = _this$props.i18nKeys;
|
|
87
86
|
var _i18nKeys$menuEmptyMe = i18nKeys.menuEmptyMessage,
|
|
88
87
|
menuEmptyMessage = _i18nKeys$menuEmptyMe === void 0 ? 'No matches found' : _i18nKeys$menuEmptyMe;
|
|
89
88
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
90
89
|
align: "vertical",
|
|
91
90
|
alignBox: "row",
|
|
92
|
-
className: "".concat(_lookupHeaderCommonModule["default"].container, " ").concat(
|
|
91
|
+
className: "".concat(_lookupHeaderCommonModule["default"].container, " ").concat(_lookupHeaderCommonResponsiveModule["default"].container, " ").concat(_TicketHeaderModule["default"].container),
|
|
93
92
|
isCover: false,
|
|
94
93
|
wrap: "wrap"
|
|
95
94
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -157,12 +156,10 @@ TicketHeader.propTypes = {
|
|
|
157
156
|
title: _propTypes["default"].string,
|
|
158
157
|
i18nKeys: _propTypes["default"].shape({
|
|
159
158
|
menuEmptyMessage: _propTypes["default"].string
|
|
160
|
-
})
|
|
161
|
-
palette: _propTypes["default"].oneOf(['default', 'white'])
|
|
159
|
+
})
|
|
162
160
|
};
|
|
163
161
|
TicketHeader.defaultProps = {
|
|
164
|
-
i18nKeys: {}
|
|
165
|
-
palette: 'default'
|
|
162
|
+
i18nKeys: {}
|
|
166
163
|
};
|
|
167
164
|
|
|
168
165
|
if (false) {
|
|
@@ -15,16 +15,14 @@ var _Select = require("@zohodesk/components/lib/Select/Select");
|
|
|
15
15
|
|
|
16
16
|
var _Popup = _interopRequireDefault(require("@zohodesk/components/lib/Popup/Popup"));
|
|
17
17
|
|
|
18
|
+
var _DropBox = _interopRequireDefault(require("@zohodesk/components/lib/DropBox/DropBox"));
|
|
19
|
+
|
|
18
20
|
var _ListItem = _interopRequireDefault(require("@zohodesk/components/lib/ListItem/ListItem"));
|
|
19
21
|
|
|
20
22
|
var _DropDownSearch = _interopRequireDefault(require("@zohodesk/components/lib/DropDown/DropDownSearch"));
|
|
21
23
|
|
|
22
24
|
var _Card = require("@zohodesk/components/lib/Card");
|
|
23
25
|
|
|
24
|
-
var _ResponsiveDropBox = _interopRequireDefault(require("@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox"));
|
|
25
|
-
|
|
26
|
-
var _CustomResponsive = require("@zohodesk/components/lib/Responsive/CustomResponsive");
|
|
27
|
-
|
|
28
26
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
29
27
|
|
|
30
28
|
var _Layout = require("@zohodesk/components/lib/Layout");
|
|
@@ -84,16 +82,6 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
|
|
|
84
82
|
this.handleKeyDown(e);
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
|
-
}, {
|
|
88
|
-
key: "responsiveFunc",
|
|
89
|
-
value: function responsiveFunc(_ref) {
|
|
90
|
-
var mediaQueryOR = _ref.mediaQueryOR;
|
|
91
|
-
return {
|
|
92
|
-
tabletMode: mediaQueryOR([{
|
|
93
|
-
maxWidth: 700
|
|
94
|
-
}])
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
85
|
}, {
|
|
98
86
|
key: "render",
|
|
99
87
|
value: function render() {
|
|
@@ -137,67 +125,56 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
|
|
|
137
125
|
name: "ZD-down",
|
|
138
126
|
size: "7",
|
|
139
127
|
iconClass: _ViewDropDownModule["default"].arrowIcon
|
|
140
|
-
}))), isPopupOpen ? /*#__PURE__*/_react["default"].createElement(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
needBorder: false
|
|
191
|
-
});
|
|
192
|
-
})) : isFetchingOptions ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
193
|
-
align: "both",
|
|
194
|
-
className: _ViewDropDownModule["default"].loader
|
|
195
|
-
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)) : searchStr ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
196
|
-
className: _ViewDropDownModule["default"].emptyState
|
|
197
|
-
}, searchEmptyMessage || emptyMessage) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
198
|
-
className: _ViewDropDownModule["default"].emptyState
|
|
199
|
-
}, emptyMessage)))));
|
|
200
|
-
}) : null);
|
|
128
|
+
}))), isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
|
|
129
|
+
isAnimate: true,
|
|
130
|
+
isArrow: false,
|
|
131
|
+
isActive: isPopupReady,
|
|
132
|
+
boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
|
|
133
|
+
getRef: getContainerRef,
|
|
134
|
+
onClick: removeClose,
|
|
135
|
+
animationStyle: animationStyle,
|
|
136
|
+
size: "large"
|
|
137
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card.Card, null, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement(_DropDownSearch["default"], {
|
|
138
|
+
value: searchStr,
|
|
139
|
+
onChange: this.handleSearch,
|
|
140
|
+
onKeyDown: this.onSearchKeyDown,
|
|
141
|
+
getRef: this.searchInputRef,
|
|
142
|
+
size: searchBoxSize,
|
|
143
|
+
variant: searchBoxVariant,
|
|
144
|
+
placeHolder: searchBoxPlaceHolder,
|
|
145
|
+
maxLength: maxLength
|
|
146
|
+
})) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
147
|
+
eleRef: this.suggestionContainerRef,
|
|
148
|
+
customClass: dropBoxSize ? _ViewDropDownModule["default"][dropBoxSize] : ''
|
|
149
|
+
}, suggestions.length ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
150
|
+
className: _ViewDropDownModule["default"].listItemContainer
|
|
151
|
+
}, suggestions.map(function () {
|
|
152
|
+
var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
153
|
+
var index = arguments.length > 1 ? arguments[1] : undefined;
|
|
154
|
+
var id = option.id,
|
|
155
|
+
value = option.value;
|
|
156
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
|
|
157
|
+
active: id === selectedId,
|
|
158
|
+
getRef: _this2.suggestionItemRef,
|
|
159
|
+
highlight: hoverIndex === index ? true : false,
|
|
160
|
+
id: id,
|
|
161
|
+
key: "".concat(id, "dropDown"),
|
|
162
|
+
onClick: _this2.handleChange,
|
|
163
|
+
onMouseEnter: _this2.handleMouseEnter,
|
|
164
|
+
size: "medium",
|
|
165
|
+
value: value,
|
|
166
|
+
index: index,
|
|
167
|
+
needTick: true,
|
|
168
|
+
needBorder: false
|
|
169
|
+
});
|
|
170
|
+
})) : isFetchingOptions ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
171
|
+
align: "both",
|
|
172
|
+
className: _ViewDropDownModule["default"].loader
|
|
173
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)) : searchStr ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
174
|
+
className: _ViewDropDownModule["default"].emptyState
|
|
175
|
+
}, searchEmptyMessage || emptyMessage) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
|
+
className: _ViewDropDownModule["default"].emptyState
|
|
177
|
+
}, emptyMessage)))) : null);
|
|
201
178
|
}
|
|
202
179
|
}]);
|
|
203
180
|
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
.container {
|
|
2
2
|
min-height: var(--zd_size51);
|
|
3
3
|
position: relative;
|
|
4
|
+
background-color: var(--zdt_lookupheader_default_bg);
|
|
5
|
+
border-bottom: solid 1px var(--zdt_lookupheader_default_border);
|
|
4
6
|
}[dir=ltr] .container {
|
|
5
7
|
padding: 0 var(--zd_size52) 0 var(--zd_size10);
|
|
6
8
|
}[dir=rtl] .container {
|
|
7
9
|
padding: 0 var(--zd_size10) 0 var(--zd_size52);
|
|
8
10
|
}
|
|
9
|
-
.default {
|
|
10
|
-
background-color: var(--zdt_lookupheader_default_bg);
|
|
11
|
-
border-bottom: solid 1px var(--zdt_lookupheader_default_border);
|
|
12
|
-
}
|
|
13
|
-
.white {
|
|
14
|
-
background-color: var(--zdt_lookupheader_white_bg);
|
|
15
|
-
border-bottom: solid 1px var(--zdt_lookupheader_white_border);
|
|
16
|
-
}
|
|
17
11
|
.searchContainer, .title {
|
|
18
12
|
margin: 0 var(--zd_size20);
|
|
19
13
|
}
|
|
@@ -62,14 +62,14 @@ var Views = /*#__PURE__*/function (_React$Component) {
|
|
|
62
62
|
className: _ViewsModule["default"].container
|
|
63
63
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
64
64
|
className: "".concat(_ViewsModule["default"].icon, " ").concat(_ViewsModule["default"].first, " ").concat(isList ? _ViewsModule["default"].active : ''),
|
|
65
|
-
"data-title": !isList ? listTitle :
|
|
65
|
+
"data-title": !isList ? listTitle : '',
|
|
66
66
|
onClick: onListClick
|
|
67
67
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
68
68
|
name: "ZD-list22",
|
|
69
69
|
size: "10"
|
|
70
70
|
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
71
71
|
className: "".concat(_ViewsModule["default"].icon, " ").concat(_ViewsModule["default"].last, " ").concat(isGrid ? _ViewsModule["default"].active : ''),
|
|
72
|
-
"data-title": !isGrid ? gridTitle :
|
|
72
|
+
"data-title": !isGrid ? gridTitle : '',
|
|
73
73
|
onClick: onGridClick
|
|
74
74
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
75
75
|
name: "ZD-grid",
|