@zohodesk/dot 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cli/PropLessFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +15 -0
- package/coverage/ExternalLink/ExternalLink.js.html +1 -1
- package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
- package/coverage/ExternalLink/index.html +1 -1
- package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
- package/coverage/ExternalLink/props/index.html +1 -1
- package/coverage/ExternalLink/props/propTypes.js.html +1 -1
- package/coverage/Image/Image.js.html +1 -1
- package/coverage/Image/Image.module.css.html +1 -1
- package/coverage/Image/index.html +1 -1
- package/coverage/Image/props/defaultProps.js.html +1 -1
- package/coverage/Image/props/index.html +1 -1
- package/coverage/Image/props/propTypes.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
- package/coverage/avatar/AvatarWithTeam/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
- package/coverage/index.html +1 -1
- package/es/Attachment/Attachment.js +2 -1
- package/es/Attachment/Attachment.module.css +10 -6
- package/es/Link/Link.js +2 -1
- package/es/TagWithIcon/props/propTypes.js +1 -1
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +5 -2
- package/es/emptystate/CommonEmptyState/CommonEmptyState.js +1 -0
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -3
- package/es/layout/SubtabLayout/props/propTypes.js +1 -1
- package/es/list/Icons/AddNewIcon.js +3 -2
- package/es/list/Icons/CompleteIcon.js +3 -2
- package/es/list/Icons/DeleteIcon.js +4 -3
- package/es/list/Icons/EditIcon.js +5 -3
- package/es/list/Icons/ReadUnreadIcon.js +5 -3
- package/es/list/Icons/SmartIcon.js +5 -3
- package/es/list/ListLayout/ListLayout.module.css +24 -8
- package/es/list/listCommon.module.css +23 -5
- package/es/list/status/StatusDropdown/StatusDropdown.js +16 -3
- package/es/list/status/StatusDropdown/props/propTypes.js +2 -1
- package/es/lookup/Lookup/Lookup.js +2 -0
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +2 -1
- package/es/setup/helptips/ListGroup/ListGroup.js +1 -1
- package/es/v1/Attachment/Attachment.js +88 -0
- package/es/v1/AttachmentViewer/AttachmentImage.js +79 -0
- package/es/v1/AttachmentViewer/AttachmentViewer.js +541 -0
- package/es/v1/ChannelIcon/ChannelIcon.js +1 -1
- package/es/v1/Drawer/Drawer.js +1 -1
- package/es/v1/FlipCard/FlipCard.js +3 -3
- package/es/v1/FreezeLayer/FreezeLayer.js +74 -0
- package/es/v1/Image/Image.js +39 -0
- package/es/v1/Link/Link.js +2 -1
- package/es/v1/Loader/Loader.js +21 -0
- package/es/v1/Message/Message.js +118 -0
- package/es/v1/MessageBanner/MessageBanner.js +1 -1
- package/es/v1/PlusIcon/PlusIcon.js +44 -0
- package/es/v1/Separator/Separator.js +60 -0
- package/es/v1/ToastMessage/ToastMessage.js +203 -0
- package/es/v1/Upload/Upload.js +76 -0
- package/es/v1/actions/AutoClose.js +43 -0
- package/es/v1/alert/index.js +2 -0
- package/es/v1/avatar/AvatarClose/AvatarClose.js +53 -0
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +62 -0
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +54 -0
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +72 -0
- package/es/v1/avatar/AvatarThread/AvatarThread.js +79 -0
- package/es/v1/avatar/AvatarUser/AvatarUser.js +116 -0
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +98 -0
- package/es/v1/avatar/index.js +7 -0
- package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +861 -0
- package/es/v1/emptystate/CommonEmptyState/CommonEmptyState.js +1 -0
- package/es/v1/errorstate/Inconvenience/Inconvenience.js +86 -0
- package/es/v1/errorstate/LinkText/LinkText.js +29 -0
- package/es/v1/errorstate/NoRequestFound/NoRequestFound.js +84 -0
- package/es/v1/errorstate/PermissionPlay/PermissionPlay.js +83 -0
- package/es/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +84 -0
- package/es/v1/errorstate/UnableToProcess/UnableToProcess.js +86 -0
- package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +84 -0
- package/es/v1/errorstate/WillBack/WillBack.js +75 -0
- package/es/v1/errorstate/index.js +8 -0
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +141 -0
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +183 -0
- package/es/v1/form/fields/DateField/DateField.js +195 -0
- package/es/v1/form/fields/FieldContainer/FieldContainer.js +71 -0
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +213 -0
- package/es/v1/form/fields/PhoneField/PhoneField.js +189 -0
- package/es/v1/form/fields/RadioField/RadioField.js +116 -0
- package/es/v1/form/fields/SelectField/SelectField.js +183 -0
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +292 -0
- package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +258 -0
- package/es/v1/form/fields/TextBoxField/TextBoxField.js +164 -0
- package/es/v1/form/fields/TextEditor/TextEditor.js +418 -0
- package/es/v1/form/fields/TextEditorField/TextEditorField.js +178 -0
- package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +203 -0
- package/es/v1/form/fields/TextareaField/TextareaField.js +161 -0
- package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +58 -0
- package/es/v1/form/fields/index.js +16 -0
- package/es/v1/form/layout/Field/Field.js +33 -0
- package/es/v1/form/layout/Section/Section.js +37 -0
- package/es/v1/form/layout/index.js +2 -0
- package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +217 -0
- package/es/v1/layout/SetupDetailLayout/index.js +4 -0
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +144 -0
- package/es/v1/layout/SubtabLayout/index.js +4 -0
- package/es/v1/list/AvatarFlip/AvatarFlip.js +76 -0
- package/es/v1/list/BluePrintStatus/BluePrintStatus.js +28 -0
- package/es/v1/list/Comment/Comment.js +45 -0
- package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +100 -0
- package/es/v1/list/Dot/Dot.js +22 -0
- package/es/v1/list/DotNew/DotNew.js +29 -0
- package/es/v1/list/GridStencils/GridStencils.js +34 -0
- package/es/v1/list/Icons/AddNewIcon.js +28 -0
- package/es/v1/list/Icons/CompleteIcon.js +30 -0
- package/es/v1/list/Icons/DeleteIcon.js +31 -0
- package/es/v1/list/Icons/EditIcon.js +31 -0
- package/es/v1/list/Icons/FloatingIcons.js +30 -0
- package/es/v1/list/Icons/ReadUnreadIcon.js +35 -0
- package/es/v1/list/Icons/SmartIcon.js +28 -0
- package/es/v1/list/Icons/index.js +7 -0
- package/es/v1/list/ListLayout/ListLayout.js +83 -0
- package/es/v1/list/ListStencils/ListStencils.js +47 -0
- package/es/v1/list/SecondaryText/AccountName.js +85 -0
- package/es/v1/list/SecondaryText/ContactName.js +85 -0
- package/es/v1/list/SecondaryText/DepartmentText.js +30 -0
- package/es/v1/list/SecondaryText/Email.js +55 -0
- package/es/v1/list/SecondaryText/HappinessRating.js +31 -0
- package/es/v1/list/SecondaryText/PhoneNumber.js +59 -0
- package/es/v1/list/SecondaryText/PriorityText.js +33 -0
- package/es/v1/list/SecondaryText/SecondaryText.js +40 -0
- package/es/v1/list/SecondaryText/StatusText.js +34 -0
- package/es/v1/list/SecondaryText/TicketId.js +53 -0
- package/es/v1/list/SecondaryText/Website.js +43 -0
- package/es/v1/list/SecondaryText/index.js +11 -0
- package/es/v1/list/SecondryPanel/SecondryPanel.js +105 -0
- package/es/v1/list/SentimentStatus/SentimentStatus.js +34 -0
- package/es/v1/list/Subject/Subject.js +57 -0
- package/es/v1/list/TagNew/TagNew.js +33 -0
- package/es/v1/list/Thread/Thread.js +43 -0
- package/es/v1/list/UserTime/UserTime.js +83 -0
- package/es/v1/list/index.js +17 -0
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +465 -0
- package/es/v1/list/status/StatusListItem/StatusListItem.js +122 -0
- package/es/v1/list/status/index.js +2 -0
- package/es/v1/lookup/EmptyPage/EmptyPage.js +65 -0
- package/es/v1/lookup/Lookup/Lookup.js +2 -0
- package/es/v1/lookup/Section/Section.js +25 -0
- package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +176 -0
- package/es/v1/lookup/header/index.js +5 -0
- package/es/v1/setup/header/Button/Button.js +36 -0
- package/es/v1/setup/header/Link/Link.js +44 -0
- package/es/v1/setup/header/Search/Search.js +81 -0
- package/es/v1/setup/header/Views/Views.js +46 -0
- package/es/v1/setup/header/index.js +4 -0
- package/es/v1/setup/helptips/Description/Description.js +24 -0
- package/es/v1/setup/helptips/Link/Link.js +41 -0
- package/es/v1/setup/helptips/ListGroup/ListGroup.js +39 -0
- package/es/v1/setup/helptips/Title/Title.js +24 -0
- package/es/v1/setup/helptips/index.js +4 -0
- package/es/v1/setup/index.js +6 -0
- package/es/v1/setup/table/index.js +5 -0
- package/es/v1/svg/PlusIcon.js +32 -0
- package/es/v1/svg/SnippetIcon.js +34 -0
- package/es/v1/svg/TemplateIcon.js +35 -0
- package/es/v1/svg/index.js +3 -0
- package/es/v1/version2/alertIcons/index.js +8 -0
- package/es/v1/version2/index.js +12 -0
- package/es/v1/version2/lookup/AlertHeader/AlertHeader.js +79 -0
- package/es/v1/version2/lookup/AlertLookup/AlertLookup.js +17 -5
- package/es/v1/version2/notification/DesktopNotification/DesktopNotification.js +164 -0
- package/es/version2/lookup/AlertLookup/AlertLookup.js +14 -2
- package/lib/Attachment/Attachment.js +2 -1
- package/lib/Attachment/Attachment.module.css +10 -6
- package/lib/Link/Link.js +2 -1
- package/lib/TagWithIcon/props/propTypes.js +1 -1
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +5 -3
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.js +1 -0
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +8 -5
- package/lib/layout/SubtabLayout/props/propTypes.js +1 -1
- package/lib/list/Icons/AddNewIcon.js +4 -2
- package/lib/list/Icons/CompleteIcon.js +4 -2
- package/lib/list/Icons/DeleteIcon.js +5 -3
- package/lib/list/Icons/EditIcon.js +6 -3
- package/lib/list/Icons/ReadUnreadIcon.js +6 -3
- package/lib/list/Icons/SmartIcon.js +6 -3
- package/lib/list/ListLayout/ListLayout.module.css +24 -8
- package/lib/list/listCommon.module.css +23 -5
- package/lib/list/status/StatusDropdown/StatusDropdown.js +16 -5
- package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/lib/lookup/Lookup/Lookup.js +2 -0
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +2 -1
- package/lib/setup/helptips/ListGroup/ListGroup.js +1 -1
- package/lib/v1/Attachment/Attachment.js +140 -0
- package/lib/v1/AttachmentViewer/AttachmentImage.js +124 -0
- package/lib/v1/AttachmentViewer/AttachmentViewer.js +625 -0
- package/lib/v1/ChannelIcon/ChannelIcon.js +1 -1
- package/lib/v1/Drawer/Drawer.js +1 -1
- package/lib/v1/FlipCard/FlipCard.js +3 -3
- package/lib/v1/FreezeLayer/FreezeLayer.js +94 -0
- package/lib/v1/Image/Image.js +89 -0
- package/lib/v1/Link/Link.js +2 -1
- package/lib/v1/Loader/Loader.js +70 -0
- package/lib/v1/Message/Message.js +170 -0
- package/lib/v1/MessageBanner/MessageBanner.js +1 -1
- package/lib/v1/PlusIcon/PlusIcon.js +91 -0
- package/lib/v1/Separator/Separator.js +107 -0
- package/lib/v1/ToastMessage/ToastMessage.js +246 -0
- package/lib/v1/Upload/Upload.js +128 -0
- package/lib/v1/actions/AutoClose.js +75 -0
- package/lib/v1/alert/index.js +23 -0
- package/lib/v1/avatar/AvatarClose/AvatarClose.js +101 -0
- package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +110 -0
- package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +106 -0
- package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +119 -0
- package/lib/v1/avatar/AvatarThread/AvatarThread.js +130 -0
- package/lib/v1/avatar/AvatarUser/AvatarUser.js +167 -0
- package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +154 -0
- package/lib/v1/avatar/index.js +63 -0
- package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +932 -0
- package/lib/v1/emptystate/CommonEmptyState/CommonEmptyState.js +1 -0
- package/lib/v1/errorstate/Inconvenience/Inconvenience.js +137 -0
- package/lib/v1/errorstate/LinkText/LinkText.js +80 -0
- package/lib/v1/errorstate/NoRequestFound/NoRequestFound.js +135 -0
- package/lib/v1/errorstate/PermissionPlay/PermissionPlay.js +134 -0
- package/lib/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +135 -0
- package/lib/v1/errorstate/UnableToProcess/UnableToProcess.js +137 -0
- package/lib/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +135 -0
- package/lib/v1/errorstate/WillBack/WillBack.js +125 -0
- package/lib/v1/errorstate/index.js +71 -0
- package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +197 -0
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +234 -0
- package/lib/v1/form/fields/DateField/DateField.js +249 -0
- package/lib/v1/form/fields/FieldContainer/FieldContainer.js +118 -0
- package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +268 -0
- package/lib/v1/form/fields/PhoneField/PhoneField.js +236 -0
- package/lib/v1/form/fields/RadioField/RadioField.js +169 -0
- package/lib/v1/form/fields/SelectField/SelectField.js +236 -0
- package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +346 -0
- package/lib/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +299 -0
- package/lib/v1/form/fields/TextBoxField/TextBoxField.js +219 -0
- package/lib/v1/form/fields/TextEditor/TextEditor.js +463 -0
- package/lib/v1/form/fields/TextEditorField/TextEditorField.js +230 -0
- package/lib/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +256 -0
- package/lib/v1/form/fields/TextareaField/TextareaField.js +215 -0
- package/lib/v1/form/fields/ValidationMessage/ValidationMessage.js +110 -0
- package/lib/{docs/formDocs.js → v1/form/fields/index.js} +33 -25
- package/lib/v1/form/layout/Field/Field.js +87 -0
- package/lib/v1/form/layout/Section/Section.js +86 -0
- package/lib/v1/form/layout/index.js +23 -0
- package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +305 -0
- package/lib/v1/layout/SetupDetailLayout/index.js +37 -0
- package/lib/v1/layout/SubtabLayout/SubtabLayout.js +245 -0
- package/lib/v1/layout/SubtabLayout/index.js +37 -0
- package/lib/v1/list/AvatarFlip/AvatarFlip.js +131 -0
- package/lib/v1/list/BluePrintStatus/BluePrintStatus.js +73 -0
- package/lib/v1/list/Comment/Comment.js +98 -0
- package/lib/v1/list/DepartmentDropDown/DepartmentDropDown.js +157 -0
- package/lib/v1/list/Dot/Dot.js +72 -0
- package/lib/v1/list/DotNew/DotNew.js +79 -0
- package/lib/v1/list/GridStencils/GridStencils.js +83 -0
- package/lib/v1/list/Icons/AddNewIcon.js +79 -0
- package/lib/v1/list/Icons/CompleteIcon.js +81 -0
- package/lib/v1/list/Icons/DeleteIcon.js +82 -0
- package/lib/v1/list/Icons/EditIcon.js +82 -0
- package/lib/v1/list/Icons/FloatingIcons.js +87 -0
- package/lib/v1/list/Icons/ReadUnreadIcon.js +87 -0
- package/lib/v1/list/Icons/SmartIcon.js +83 -0
- package/lib/v1/list/Icons/index.js +63 -0
- package/lib/v1/list/ListLayout/ListLayout.js +145 -0
- package/lib/v1/list/ListStencils/ListStencils.js +96 -0
- package/lib/v1/list/SecondaryText/AccountName.js +136 -0
- package/lib/v1/list/SecondaryText/ContactName.js +144 -0
- package/lib/v1/list/SecondaryText/DepartmentText.js +79 -0
- package/lib/v1/list/SecondaryText/Email.js +103 -0
- package/lib/v1/list/SecondaryText/HappinessRating.js +81 -0
- package/lib/v1/list/SecondaryText/PhoneNumber.js +107 -0
- package/lib/v1/list/SecondaryText/PriorityText.js +83 -0
- package/lib/v1/list/SecondaryText/SecondaryText.js +88 -0
- package/lib/v1/list/SecondaryText/StatusText.js +84 -0
- package/lib/v1/list/SecondaryText/TicketId.js +104 -0
- package/lib/v1/list/SecondaryText/Website.js +91 -0
- package/lib/v1/list/SecondaryText/index.js +95 -0
- package/lib/v1/list/SecondryPanel/SecondryPanel.js +205 -0
- package/lib/v1/list/SentimentStatus/SentimentStatus.js +80 -0
- package/lib/v1/list/Subject/Subject.js +108 -0
- package/lib/v1/list/TagNew/TagNew.js +83 -0
- package/lib/v1/list/Thread/Thread.js +95 -0
- package/lib/v1/list/UserTime/UserTime.js +136 -0
- package/lib/v1/list/index.js +173 -0
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +541 -0
- package/lib/v1/list/status/StatusListItem/StatusListItem.js +168 -0
- package/lib/v1/list/status/index.js +23 -0
- package/lib/v1/lookup/EmptyPage/EmptyPage.js +120 -0
- package/lib/v1/lookup/Lookup/Lookup.js +2 -0
- package/lib/v1/lookup/Section/Section.js +75 -0
- package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +221 -0
- package/lib/v1/lookup/header/index.js +47 -0
- package/lib/v1/setup/header/Button/Button.js +83 -0
- package/lib/v1/setup/header/Link/Link.js +93 -0
- package/lib/v1/setup/header/Search/Search.js +126 -0
- package/lib/v1/setup/header/Views/Views.js +93 -0
- package/lib/v1/setup/header/index.js +39 -0
- package/lib/v1/setup/helptips/Description/Description.js +68 -0
- package/lib/v1/setup/helptips/Link/Link.js +88 -0
- package/lib/v1/setup/helptips/ListGroup/ListGroup.js +88 -0
- package/lib/v1/setup/helptips/Title/Title.js +68 -0
- package/lib/v1/setup/helptips/index.js +39 -0
- package/lib/v1/setup/index.js +24 -0
- package/lib/v1/setup/table/index.js +47 -0
- package/lib/v1/svg/PlusIcon.js +82 -0
- package/lib/v1/svg/SnippetIcon.js +84 -0
- package/lib/v1/svg/TemplateIcon.js +85 -0
- package/lib/v1/svg/index.js +31 -0
- package/lib/v1/version2/alertIcons/index.js +71 -0
- package/lib/v1/version2/index.js +58 -0
- package/lib/v1/version2/lookup/AlertHeader/AlertHeader.js +104 -0
- package/lib/v1/version2/lookup/AlertLookup/AlertLookup.js +17 -5
- package/lib/v1/version2/notification/DesktopNotification/DesktopNotification.js +193 -0
- package/lib/version2/lookup/AlertLookup/AlertLookup.js +14 -2
- package/package.json +9 -9
- package/result.json +1 -1
- package/es/docs/formDocs.js +0 -15
- package/es/docs/generalDocs.js +0 -63
- package/es/docs/lookupDocs.js +0 -17
- package/es/docs/setupDocs.js +0 -11
- package/lib/docs/generalDocs.js +0 -479
- package/lib/docs/lookupDocs.js +0 -135
- package/lib/docs/setupDocs.js +0 -95
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = exports.StatusDropdown = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _defaultProps = require("../../../../list/status/StatusDropdown/props/defaultProps");
|
|
13
|
+
|
|
14
|
+
var _propTypes = require("../../../../list/status/StatusDropdown/props/propTypes");
|
|
15
|
+
|
|
16
|
+
var _icons = require("@zohodesk/icons");
|
|
17
|
+
|
|
18
|
+
var _Popup = _interopRequireDefault(require("@zohodesk/components/lib/Popup/Popup"));
|
|
19
|
+
|
|
20
|
+
var _Layout = require("@zohodesk/components/lib/Layout");
|
|
21
|
+
|
|
22
|
+
var _DropDownHeading = _interopRequireDefault(require("@zohodesk/components/lib/DropDown/DropDownHeading"));
|
|
23
|
+
|
|
24
|
+
var _TextBoxIcon = _interopRequireDefault(require("@zohodesk/components/lib/TextBoxIcon/TextBoxIcon"));
|
|
25
|
+
|
|
26
|
+
var _Loader = _interopRequireDefault(require("@zohodesk/svg/lib/Loader/Loader"));
|
|
27
|
+
|
|
28
|
+
var _EmptySearch = _interopRequireDefault(require("@zohodesk/svg/lib/emptystate/version3/EmptySearch"));
|
|
29
|
+
|
|
30
|
+
var _Common = require("@zohodesk/components/lib/utils/Common.js");
|
|
31
|
+
|
|
32
|
+
var _TextBox = _interopRequireDefault(require("@zohodesk/components/lib/TextBox/TextBox"));
|
|
33
|
+
|
|
34
|
+
var _CommonEmptyState = _interopRequireDefault(require("../../../emptystate/CommonEmptyState/CommonEmptyState"));
|
|
35
|
+
|
|
36
|
+
var _StatusListItem = _interopRequireDefault(require("../StatusListItem/StatusListItem"));
|
|
37
|
+
|
|
38
|
+
var _commonModule = _interopRequireDefault(require("@zohodesk/components/lib/common/common.module.css"));
|
|
39
|
+
|
|
40
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox"));
|
|
41
|
+
|
|
42
|
+
var _CustomResponsive = require("@zohodesk/components/lib/Responsive/CustomResponsive");
|
|
43
|
+
|
|
44
|
+
var _IdProvider = require("@zohodesk/components/lib/Provider/IdProvider");
|
|
45
|
+
|
|
46
|
+
var _semanticButtonModule = _interopRequireDefault(require("@zohodesk/components/lib/semantic/Button/semanticButton.module.css"));
|
|
47
|
+
|
|
48
|
+
var _StatusDropdownModule = _interopRequireDefault(require("../../../../list/status/StatusDropdown/StatusDropdown.module.css"));
|
|
49
|
+
|
|
50
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
51
|
+
|
|
52
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
53
|
+
|
|
54
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
55
|
+
|
|
56
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
57
|
+
|
|
58
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
59
|
+
|
|
60
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
61
|
+
|
|
62
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
63
|
+
|
|
64
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
65
|
+
|
|
66
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
67
|
+
|
|
68
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
69
|
+
|
|
70
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
71
|
+
|
|
72
|
+
var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
73
|
+
_inherits(StatusDropdown, _React$Component);
|
|
74
|
+
|
|
75
|
+
var _super = _createSuper(StatusDropdown);
|
|
76
|
+
|
|
77
|
+
function StatusDropdown(props) {
|
|
78
|
+
var _this;
|
|
79
|
+
|
|
80
|
+
_classCallCheck(this, StatusDropdown);
|
|
81
|
+
|
|
82
|
+
_this = _super.call(this, props);
|
|
83
|
+
_this.state = {
|
|
84
|
+
searchString: '',
|
|
85
|
+
selectedIndex: 0,
|
|
86
|
+
options: props.options
|
|
87
|
+
};
|
|
88
|
+
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
89
|
+
_this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_this));
|
|
90
|
+
_this.onSelect = _this.onSelect.bind(_assertThisInitialized(_this));
|
|
91
|
+
_this.handleTogglePopup = _this.handleTogglePopup.bind(_assertThisInitialized(_this));
|
|
92
|
+
_this.onSearchClear = _this.onSearchClear.bind(_assertThisInitialized(_this));
|
|
93
|
+
_this.searchList = _this.searchList.bind(_assertThisInitialized(_this));
|
|
94
|
+
_this.scrollContentRef = _this.scrollContentRef.bind(_assertThisInitialized(_this));
|
|
95
|
+
_this.handleMouseEnter = _this.handleMouseEnter.bind(_assertThisInitialized(_this));
|
|
96
|
+
_this.searchInputRef = _this.searchInputRef.bind(_assertThisInitialized(_this));
|
|
97
|
+
_this.itemRef = _this.itemRef.bind(_assertThisInitialized(_this));
|
|
98
|
+
_this.inputRef = _this.inputRef.bind(_assertThisInitialized(_this));
|
|
99
|
+
_this.handleScroll = _this.handleScroll.bind(_assertThisInitialized(_this));
|
|
100
|
+
_this.emptySearchSVG = _this.emptySearchSVG.bind(_assertThisInitialized(_this));
|
|
101
|
+
_this.getAriaId = (0, _IdProvider.getUniqueId)(_assertThisInitialized(_this));
|
|
102
|
+
return _this;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
_createClass(StatusDropdown, [{
|
|
106
|
+
key: "emptySearchSVG",
|
|
107
|
+
value: function emptySearchSVG() {
|
|
108
|
+
return /*#__PURE__*/_react["default"].createElement(_EmptySearch["default"], {
|
|
109
|
+
size: "small"
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "inputRef",
|
|
114
|
+
value: function inputRef(el) {
|
|
115
|
+
this.hiddenInput = el;
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
key: "itemRef",
|
|
119
|
+
value: function itemRef(ele, index, id) {
|
|
120
|
+
this["suggestion_".concat(id)] = ele;
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "searchInputRef",
|
|
124
|
+
value: function searchInputRef(el) {
|
|
125
|
+
this.searchInput = el;
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
key: "handleTogglePopup",
|
|
129
|
+
value: function handleTogglePopup(e) {
|
|
130
|
+
var _this$props = this.props,
|
|
131
|
+
togglePopup = _this$props.togglePopup,
|
|
132
|
+
boxPosition = _this$props.boxPosition,
|
|
133
|
+
onSelectLabel = _this$props.onSelectLabel,
|
|
134
|
+
isPopupOpen = _this$props.isPopupOpen,
|
|
135
|
+
onTogglePopup = _this$props.onTogglePopup;
|
|
136
|
+
!isPopupOpen && onSelectLabel && onSelectLabel(e);
|
|
137
|
+
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
138
|
+
togglePopup(e, boxPosition);
|
|
139
|
+
}
|
|
140
|
+
}, {
|
|
141
|
+
key: "scrollContentRef",
|
|
142
|
+
value: function scrollContentRef(el) {
|
|
143
|
+
var isPopupOpen = this.props.isPopupOpen;
|
|
144
|
+
|
|
145
|
+
if (isPopupOpen) {
|
|
146
|
+
this.optionsContainer = el;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}, {
|
|
150
|
+
key: "UNSAFE_componentWillReceiveProps",
|
|
151
|
+
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
152
|
+
if (nextProps.options.length != this.props.options.length) {
|
|
153
|
+
this.setState({
|
|
154
|
+
options: nextProps.options
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}, {
|
|
159
|
+
key: "onSelect",
|
|
160
|
+
value: function onSelect(element, e) {
|
|
161
|
+
var _this$props2 = this.props,
|
|
162
|
+
onClick = _this$props2.onClick,
|
|
163
|
+
togglePopup = _this$props2.togglePopup,
|
|
164
|
+
isPopupOpen = _this$props2.isPopupOpen,
|
|
165
|
+
onTogglePopup = _this$props2.onTogglePopup;
|
|
166
|
+
onClick && onClick(e, element);
|
|
167
|
+
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
168
|
+
togglePopup(e);
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
key: "componentDidUpdate",
|
|
172
|
+
value: function componentDidUpdate(prevProps) {
|
|
173
|
+
var _this2 = this;
|
|
174
|
+
|
|
175
|
+
var _this$props3 = this.props,
|
|
176
|
+
isPopupOpen = _this$props3.isPopupOpen,
|
|
177
|
+
isSearch = _this$props3.isSearch,
|
|
178
|
+
idName = _this$props3.idName;
|
|
179
|
+
var _this$state = this.state,
|
|
180
|
+
selectedIndex = _this$state.selectedIndex,
|
|
181
|
+
options = _this$state.options;
|
|
182
|
+
|
|
183
|
+
if (prevProps.isPopupOpen != isPopupOpen) {
|
|
184
|
+
setTimeout(function () {
|
|
185
|
+
isPopupOpen && isSearch ? _this2.searchInput && _this2.searchInput.focus() : _this2.hiddenInput && _this2.hiddenInput.focus();
|
|
186
|
+
}, 10);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
var mergeOptions = options;
|
|
190
|
+
var option = mergeOptions[selectedIndex];
|
|
191
|
+
var id = option && option[idName] || {};
|
|
192
|
+
var selSuggestion = this["suggestion_".concat(id)];
|
|
193
|
+
|
|
194
|
+
if (isPopupOpen) {
|
|
195
|
+
this.optionsContainer && (0, _Common.scrollTo)(this.optionsContainer, selSuggestion);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (!prevProps.isPopupOpen && this.props.isPopupOpen) {
|
|
199
|
+
this.onSearchClear();
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
key: "handleKeyDown",
|
|
204
|
+
value: function handleKeyDown(e) {
|
|
205
|
+
var keyCode = e.keyCode;
|
|
206
|
+
var _this$state2 = this.state,
|
|
207
|
+
selectedIndex = _this$state2.selectedIndex,
|
|
208
|
+
options = _this$state2.options;
|
|
209
|
+
var totalIndex = options.length;
|
|
210
|
+
var _this$props4 = this.props,
|
|
211
|
+
togglePopup = _this$props4.togglePopup,
|
|
212
|
+
onClick = _this$props4.onClick,
|
|
213
|
+
boxPosition = _this$props4.boxPosition,
|
|
214
|
+
isPopupReady = _this$props4.isPopupReady,
|
|
215
|
+
isNextOptions = _this$props4.isNextOptions,
|
|
216
|
+
getNextOptions = _this$props4.getNextOptions,
|
|
217
|
+
onTogglePopup = _this$props4.onTogglePopup,
|
|
218
|
+
isPopupOpen = _this$props4.isPopupOpen;
|
|
219
|
+
|
|
220
|
+
if (isPopupReady && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
|
|
221
|
+
e.preventDefault(); //prevent body scroll
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (isPopupReady) {
|
|
225
|
+
switch (keyCode) {
|
|
226
|
+
case 40:
|
|
227
|
+
if (selectedIndex === totalIndex - 1) {
|
|
228
|
+
this.setState({
|
|
229
|
+
selectedIndex: 0
|
|
230
|
+
});
|
|
231
|
+
} else {
|
|
232
|
+
if (selectedIndex === totalIndex - 3) {
|
|
233
|
+
isNextOptions && getNextOptions && getNextOptions();
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
this.setState({
|
|
237
|
+
selectedIndex: selectedIndex + 1
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
break;
|
|
242
|
+
|
|
243
|
+
case 38:
|
|
244
|
+
if (selectedIndex === 0) {
|
|
245
|
+
this.setState({
|
|
246
|
+
selectedIndex: totalIndex - 1
|
|
247
|
+
});
|
|
248
|
+
} else {
|
|
249
|
+
this.setState({
|
|
250
|
+
selectedIndex: selectedIndex - 1
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
break;
|
|
255
|
+
|
|
256
|
+
case 13:
|
|
257
|
+
onClick && onClick(options[selectedIndex].name, e);
|
|
258
|
+
onTogglePopup && onTogglePopup(isPopupOpen);
|
|
259
|
+
togglePopup(e, boxPosition);
|
|
260
|
+
break;
|
|
261
|
+
|
|
262
|
+
default:
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
} else {
|
|
266
|
+
if (keyCode === 13 || keyCode === 40) {
|
|
267
|
+
togglePopup(e, boxPosition);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}, {
|
|
272
|
+
key: "searchList",
|
|
273
|
+
value: function searchList(value) {
|
|
274
|
+
var _this$props5 = this.props,
|
|
275
|
+
options = _this$props5.options,
|
|
276
|
+
keyName = _this$props5.keyName;
|
|
277
|
+
var foptions = options.filter(function (dept) {
|
|
278
|
+
return dept[keyName].toLowerCase().indexOf(value.toLowerCase()) != -1;
|
|
279
|
+
});
|
|
280
|
+
return foptions;
|
|
281
|
+
}
|
|
282
|
+
}, {
|
|
283
|
+
key: "handleChange",
|
|
284
|
+
value: function handleChange(value, e) {
|
|
285
|
+
var foptions = this.searchList(value);
|
|
286
|
+
this.setState({
|
|
287
|
+
searchString: value,
|
|
288
|
+
selectedIndex: -1,
|
|
289
|
+
options: foptions
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}, {
|
|
293
|
+
key: "onSearchClear",
|
|
294
|
+
value: function onSearchClear() {
|
|
295
|
+
var foptions = this.searchList('');
|
|
296
|
+
this.setState({
|
|
297
|
+
searchString: '',
|
|
298
|
+
options: foptions
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}, {
|
|
302
|
+
key: "handleMouseEnter",
|
|
303
|
+
value: function handleMouseEnter(id, value, index, e) {
|
|
304
|
+
this.setState({
|
|
305
|
+
selectedIndex: index
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}, {
|
|
309
|
+
key: "handleScroll",
|
|
310
|
+
value: function handleScroll(e) {
|
|
311
|
+
var _this$props6 = this.props,
|
|
312
|
+
isNextOptions = _this$props6.isNextOptions,
|
|
313
|
+
getNextOptions = _this$props6.getNextOptions;
|
|
314
|
+
|
|
315
|
+
if (e.target.scrollTop + e.target.offsetHeight > e.target.scrollHeight - 1) {
|
|
316
|
+
isNextOptions && getNextOptions && getNextOptions(e);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}, {
|
|
320
|
+
key: "responsiveFunc",
|
|
321
|
+
value: function responsiveFunc(_ref) {
|
|
322
|
+
var mediaQueryOR = _ref.mediaQueryOR;
|
|
323
|
+
return {
|
|
324
|
+
tabletMode: mediaQueryOR([{
|
|
325
|
+
maxWidth: 700
|
|
326
|
+
}])
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
}, {
|
|
330
|
+
key: "render",
|
|
331
|
+
value: function render() {
|
|
332
|
+
var _this3 = this;
|
|
333
|
+
|
|
334
|
+
var _this$state3 = this.state,
|
|
335
|
+
options = _this$state3.options,
|
|
336
|
+
selectedIndex = _this$state3.selectedIndex;
|
|
337
|
+
var _this$props7 = this.props,
|
|
338
|
+
value = _this$props7.value,
|
|
339
|
+
removeClose = _this$props7.removeClose,
|
|
340
|
+
boxSize = _this$props7.boxSize,
|
|
341
|
+
keyName = _this$props7.keyName,
|
|
342
|
+
idName = _this$props7.idName,
|
|
343
|
+
title = _this$props7.title,
|
|
344
|
+
isSearch = _this$props7.isSearch,
|
|
345
|
+
isArrow = _this$props7.isArrow,
|
|
346
|
+
placeHolderText = _this$props7.placeHolderText,
|
|
347
|
+
className = _this$props7.className,
|
|
348
|
+
right = _this$props7.right,
|
|
349
|
+
left = _this$props7.left,
|
|
350
|
+
top = _this$props7.top,
|
|
351
|
+
bottom = _this$props7.bottom,
|
|
352
|
+
isOpen = _this$props7.isPopupOpen,
|
|
353
|
+
isPopupReady = _this$props7.isPopupReady,
|
|
354
|
+
position = _this$props7.position,
|
|
355
|
+
getTargetRef = _this$props7.getTargetRef,
|
|
356
|
+
getContainerRef = _this$props7.getContainerRef,
|
|
357
|
+
dataId = _this$props7.dataId,
|
|
358
|
+
searchBoxSize = _this$props7.searchBoxSize,
|
|
359
|
+
searchEmptyHint = _this$props7.searchEmptyHint,
|
|
360
|
+
searchErrorText = _this$props7.searchErrorText,
|
|
361
|
+
activeStyle = _this$props7.activeStyle,
|
|
362
|
+
_this$props7$showOnHo = _this$props7.showOnHover,
|
|
363
|
+
showOnHover = _this$props7$showOnHo === void 0 ? false : _this$props7$showOnHo,
|
|
364
|
+
isDisabled = _this$props7.isDisabled,
|
|
365
|
+
showIconOnHover = _this$props7.showIconOnHover,
|
|
366
|
+
isReadOnly = _this$props7.isReadOnly,
|
|
367
|
+
hoverStyle = _this$props7.hoverStyle,
|
|
368
|
+
isEditable = _this$props7.isEditable,
|
|
369
|
+
needTick = _this$props7.needTick,
|
|
370
|
+
dataTitle = _this$props7.dataTitle,
|
|
371
|
+
isDataLoaded = _this$props7.isDataLoaded,
|
|
372
|
+
children = _this$props7.children,
|
|
373
|
+
targetAlign = _this$props7.targetAlign,
|
|
374
|
+
needResponsive = _this$props7.needResponsive,
|
|
375
|
+
arrowIconPosition = _this$props7.arrowIconPosition,
|
|
376
|
+
statusColor = _this$props7.statusColor,
|
|
377
|
+
_this$props7$needExte = _this$props7.needExternalPopupState,
|
|
378
|
+
needExternalPopupState = _this$props7$needExte === void 0 ? false : _this$props7$needExte,
|
|
379
|
+
_this$props7$isPopupA = _this$props7.isPopupActive,
|
|
380
|
+
isPopupActive = _this$props7$isPopupA === void 0 ? false : _this$props7$isPopupA,
|
|
381
|
+
needMultiLineText = _this$props7.needMultiLineText,
|
|
382
|
+
_this$props7$a11y = _this$props7.a11y,
|
|
383
|
+
a11y = _this$props7$a11y === void 0 ? {} : _this$props7$a11y;
|
|
384
|
+
var _a11y$tabIndex = a11y.tabIndex,
|
|
385
|
+
tabIndex = _a11y$tabIndex === void 0 ? 0 : _a11y$tabIndex,
|
|
386
|
+
ariaLabelledby = a11y.ariaLabelledby,
|
|
387
|
+
ariaLabel = a11y.ariaLabel;
|
|
388
|
+
var isPopupOpen = needExternalPopupState ? isPopupActive && isOpen : isOpen;
|
|
389
|
+
var searchString = this.state.searchString;
|
|
390
|
+
var containerClass = "".concat(className ? className : '', " ").concat(isPopupReady ? activeStyle ? activeStyle : '' : showIconOnHover ? _StatusDropdownModule["default"].hoverIcon : '', " ").concat(isDisabled ? _commonModule["default"].disabled : isReadOnly ? _StatusDropdownModule["default"].readOnly : !isEditable ? _StatusDropdownModule["default"].cursorDefault : !showOnHover ? "".concat(_StatusDropdownModule["default"].cursor, " ").concat(hoverStyle ? hoverStyle : '') : "".concat(hoverStyle ? hoverStyle : '', " ").concat(_StatusDropdownModule["default"].cursorDefault));
|
|
391
|
+
var ariaTitleId = this.getAriaId();
|
|
392
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
393
|
+
className: _StatusDropdownModule["default"].posRel,
|
|
394
|
+
onMouseEnter: showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : undefined,
|
|
395
|
+
onMouseLeave: showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : undefined
|
|
396
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
397
|
+
tagName: "button",
|
|
398
|
+
alignBox: "row",
|
|
399
|
+
className: "".concat(_StatusDropdownModule["default"].container, " ").concat(containerClass, " ").concat(_semanticButtonModule["default"].buttonReset),
|
|
400
|
+
onMouseDown: !showOnHover && !isDisabled && !isReadOnly && isEditable ? this.handleTogglePopup : null,
|
|
401
|
+
eleRef: getTargetRef,
|
|
402
|
+
align: targetAlign,
|
|
403
|
+
isCover: false,
|
|
404
|
+
dataId: dataId,
|
|
405
|
+
onClick: removeClose,
|
|
406
|
+
disabled: isDisabled || isReadOnly ? true : false,
|
|
407
|
+
"aria-haspopup": true,
|
|
408
|
+
"aria-expanded": isPopupOpen && isEditable ? true : false,
|
|
409
|
+
tabIndex: tabIndex,
|
|
410
|
+
"aria-labelledby": ariaLabelledby,
|
|
411
|
+
"aria-label": ariaLabel,
|
|
412
|
+
"aria-disabled": isDisabled || isReadOnly
|
|
413
|
+
}, isEditable ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
414
|
+
className: _StatusDropdownModule["default"].hiddenInput
|
|
415
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBox["default"], {
|
|
416
|
+
type: "text",
|
|
417
|
+
inputRef: this.inputRef,
|
|
418
|
+
onKeyDown: this.handleKeyDown,
|
|
419
|
+
needAppearance: false,
|
|
420
|
+
placeHolder: placeHolderText
|
|
421
|
+
})) : null, children ? children : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
422
|
+
className: "".concat(_StatusDropdownModule["default"].value, " toggleDropText"),
|
|
423
|
+
shrink: true,
|
|
424
|
+
tagName: "span",
|
|
425
|
+
"data-title": dataTitle
|
|
426
|
+
}, value), isEditable ? /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
427
|
+
"aria-hidden": true,
|
|
428
|
+
size: "7",
|
|
429
|
+
name: "ZD-down",
|
|
430
|
+
iconClass: 'toggleDropIcon'.concat(" ", _StatusDropdownModule["default"].arrow, " ").concat(_StatusDropdownModule["default"]["".concat(arrowIconPosition, "_arrow")]),
|
|
431
|
+
dataId: "statusdownarrow"
|
|
432
|
+
}) : null), isPopupOpen && isEditable ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
433
|
+
query: this.responsiveFunc,
|
|
434
|
+
responsiveId: "Helmet"
|
|
435
|
+
}, function (_ref2) {
|
|
436
|
+
var tabletMode = _ref2.tabletMode;
|
|
437
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
438
|
+
boxPosition: position,
|
|
439
|
+
isActive: isPopupReady,
|
|
440
|
+
onClick: removeClose,
|
|
441
|
+
size: boxSize,
|
|
442
|
+
right: right,
|
|
443
|
+
left: left,
|
|
444
|
+
top: top,
|
|
445
|
+
bottom: bottom,
|
|
446
|
+
isArrow: isArrow,
|
|
447
|
+
isAnimate: true,
|
|
448
|
+
getRef: getContainerRef,
|
|
449
|
+
customClass: {
|
|
450
|
+
customDropBoxWrap: _StatusDropdownModule["default"].dropBoxContainer
|
|
451
|
+
},
|
|
452
|
+
needResponsive: needResponsive,
|
|
453
|
+
isResponsivePadding: true
|
|
454
|
+
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isSearch ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
455
|
+
className: _StatusDropdownModule["default"].search
|
|
456
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
457
|
+
placeHolder: placeHolderText,
|
|
458
|
+
onChange: _this3.handleChange,
|
|
459
|
+
value: searchString,
|
|
460
|
+
onClear: _this3.onSearchClear,
|
|
461
|
+
size: searchBoxSize,
|
|
462
|
+
inputRef: _this3.searchInputRef,
|
|
463
|
+
onKeyDown: _this3.handleKeyDown,
|
|
464
|
+
a11y: {
|
|
465
|
+
ariaHaspopup: true,
|
|
466
|
+
ariaExpanded: true,
|
|
467
|
+
role: 'combobox',
|
|
468
|
+
ariaActivedescendant: value,
|
|
469
|
+
ariaOwns: ariaTitleId
|
|
470
|
+
}
|
|
471
|
+
})) : null, title && options.length != 0 && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
472
|
+
className: _StatusDropdownModule["default"].title
|
|
473
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDownHeading["default"], {
|
|
474
|
+
htmlId: ariaTitleId,
|
|
475
|
+
text: title,
|
|
476
|
+
a11y: {
|
|
477
|
+
role: 'heading'
|
|
478
|
+
}
|
|
479
|
+
})), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
480
|
+
scroll: "vertical",
|
|
481
|
+
flexible: true,
|
|
482
|
+
shrink: true,
|
|
483
|
+
dataId: "".concat(dataId, "_list"),
|
|
484
|
+
preventParentScroll: "vertical",
|
|
485
|
+
className: "".concat(tabletMode ? _StatusDropdownModule["default"].responsivemaxHgt : _StatusDropdownModule["default"].maxHgt),
|
|
486
|
+
eleRef: _this3.scrollContentRef,
|
|
487
|
+
onScroll: _this3.handleScroll,
|
|
488
|
+
role: isSearch ? 'listbox' : 'menu',
|
|
489
|
+
"aria-labelledby": ariaTitleId,
|
|
490
|
+
tabindex: "0"
|
|
491
|
+
}, options.length != 0 && isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, options.map(function (item, i) {
|
|
492
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
493
|
+
key: i
|
|
494
|
+
}, /*#__PURE__*/_react["default"].createElement(_StatusListItem["default"], {
|
|
495
|
+
dataId: "dataid_".concat(i),
|
|
496
|
+
value: item[keyName],
|
|
497
|
+
id: item[idName],
|
|
498
|
+
active: value === item[keyName],
|
|
499
|
+
onClick: _this3.onSelect.bind(_this3, item),
|
|
500
|
+
index: i,
|
|
501
|
+
highlight: selectedIndex === i,
|
|
502
|
+
needTick: needTick,
|
|
503
|
+
needBorder: false,
|
|
504
|
+
onMouseEnter: _this3.handleMouseEnter,
|
|
505
|
+
getRef: _this3.itemRef,
|
|
506
|
+
bulletColor: item[statusColor],
|
|
507
|
+
title: item[keyName],
|
|
508
|
+
needMultiLineText: needMultiLineText,
|
|
509
|
+
a11y: {
|
|
510
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
511
|
+
ariaSelected: value === item[keyName]
|
|
512
|
+
}
|
|
513
|
+
}));
|
|
514
|
+
})) : isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_CommonEmptyState["default"], {
|
|
515
|
+
className: _StatusDropdownModule["default"].svgWrapper,
|
|
516
|
+
title: searchErrorText || 'No results',
|
|
517
|
+
description: searchEmptyHint,
|
|
518
|
+
size: "small",
|
|
519
|
+
getEmptyState: _this3.emptySearchSVG
|
|
520
|
+
}) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
521
|
+
className: _StatusDropdownModule["default"].loader
|
|
522
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)))));
|
|
523
|
+
}) : null);
|
|
524
|
+
}
|
|
525
|
+
}]);
|
|
526
|
+
|
|
527
|
+
return StatusDropdown;
|
|
528
|
+
}(_react["default"].Component); // if (__DOCS__) {
|
|
529
|
+
// StatusDropdown.docs = {
|
|
530
|
+
// componentGroup: 'Molecule'
|
|
531
|
+
// };
|
|
532
|
+
// }
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
exports.StatusDropdown = StatusDropdown;
|
|
536
|
+
StatusDropdown.defaultProps = _defaultProps.defaultProps;
|
|
537
|
+
StatusDropdown.propTypes = _propTypes.propTypes;
|
|
538
|
+
|
|
539
|
+
var _default = (0, _Popup["default"])(StatusDropdown);
|
|
540
|
+
|
|
541
|
+
exports["default"] = _default;
|