@zohodesk/dot 1.0.0-beta.227 → 1.0.0-beta.230
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 +12 -0
- package/es/ActionButton/ActionButton.js +7 -3
- package/es/ExternalLink/ExternalLink.js +1 -1
- package/es/FlipCard/FlipCard.js +1 -1
- package/es/Link/Link.js +1 -1
- package/es/Message/Message.js +1 -1
- package/es/Provider.js +6 -104
- package/es/ToastMessage/ToastMessage.js +1 -1
- package/es/alert/AlertLookup/AlertLookup.js +1 -1
- package/es/avatar/AvatarClose/AvatarClose.js +1 -1
- package/es/avatar/AvatarCollision/AvatarCollision.js +1 -1
- package/es/avatar/AvatarIcon/AvatarIcon.js +1 -1
- package/es/avatar/AvatarStatus/AvatarStatus.js +1 -1
- package/es/avatar/AvatarThread/AvatarThread.js +1 -1
- package/es/avatar/AvatarUser/AvatarUser.js +1 -1
- package/es/avatar/AvatarWithTeam/AvatarWithTeam.js +1 -1
- package/es/deprecated/SelectDropdown/SelectDropdown.js +59 -35
- package/es/deprecated/SelectDropdown/SelectDropdown.module.css +1 -0
- package/es/docs/formDocs.js +5 -1
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +184 -161
- package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +3 -0
- package/es/form/fields/CheckBoxField/CheckBoxField.js +17 -29
- package/es/form/fields/CheckBoxField/docs/CheckBoxField__default.docs.js +8 -1
- package/es/form/fields/CurrencyField/CurrencyField.js +17 -30
- package/es/form/fields/CurrencyField/docs/CurrencyField__default.docs.js +36 -0
- package/es/form/fields/DateField/DateField.js +17 -29
- 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/MultiSelectField/MultiSelectField.js +17 -29
- package/es/form/fields/MultiSelectField/docs/MultiSelectField__default.docs.js +8 -1
- package/es/form/fields/PhoneField/PhoneField.js +1 -1
- package/es/form/fields/RadioField/RadioField.js +1 -1
- package/es/form/fields/SelectField/SelectField.js +17 -29
- package/es/form/fields/SelectField/docs/SelectField__default.docs.js +8 -1
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +93 -65
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +33 -29
- package/es/form/fields/TextBoxField/TextBoxField.js +19 -44
- package/es/form/fields/TextBoxField/docs/TextBoxField__default.docs.js +28 -1
- package/es/form/fields/TextEditorField/TextEditorField.js +28 -45
- package/es/form/fields/TextEditorField/docs/TextEditorField__default.docs.js +9 -2
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +1 -1
- package/es/form/fields/TextareaField/TextareaField.js +17 -29
- package/es/form/fields/TextareaField/docs/TextareaField__default.docs.js +8 -1
- package/es/form/fields/props/FieldCommonDefaultProps.js +10 -0
- package/es/form/fields/props/FieldCommonPropTypes.js +22 -0
- package/es/layout/SubtabLayout/SubtabLayout.js +1 -1
- package/es/list/GridStencils/GridStencils.module.css +7 -18
- package/es/list/ListLayout/ListLayout.js +1 -1
- package/es/list/SecondaryText/AccountName.js +1 -1
- package/es/list/SecondaryText/ContactName.js +1 -1
- package/es/list/SecondaryText/Email.js +1 -1
- package/es/list/SecondaryText/PhoneNumber.js +1 -1
- package/es/list/SecondaryText/SecondaryText.js +1 -1
- package/es/list/SecondaryText/TicketId.js +1 -1
- package/es/list/Subject/Subject.js +1 -1
- package/es/list/status/StatusDropdown/StatusDropdown.js +103 -80
- package/es/list/status/StatusDropdown/StatusDropdown.module.css +3 -0
- package/es/list/status/StatusListItem/StatusListItem.js +1 -1
- package/es/lookup/header/Search/Search.js +1 -1
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +79 -54
- package/es/version2/GlobalNotification/GlobalNotification.js +1 -1
- package/es/version2/lookup/AlertLookup/AlertLookup.js +1 -1
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +1 -1
- package/lib/ActionButton/ActionButton.js +9 -5
- package/lib/ActionButton/docs/ActionButton__default.docs.js +2 -2
- package/lib/AlphabeticList/AlphabeticList.js +2 -2
- package/lib/AlphabeticList/docs/AlphabeticList__default.docs.js +2 -2
- package/lib/AlphabeticList/docs/AlphabeticList__horizontal.docs.js +2 -2
- package/lib/Attachment/Attachment.js +2 -2
- package/lib/Attachment/docs/Attachment__default.docs.js +2 -2
- package/lib/AttachmentViewer/AttachmentImage.js +2 -2
- package/lib/AttachmentViewer/AttachmentViewer.js +2 -2
- package/lib/AttachmentViewer/docs/AttachmentViewer__default.docs.js +2 -2
- package/lib/ChannelIcon/ChannelIcon.js +2 -2
- package/lib/ChannelIcon/docs/ChannelIcon__default.docs.js +2 -2
- package/lib/Drawer/Drawer.js +2 -2
- package/lib/Drawer/docs/Drawer__default.docs.js +2 -2
- package/lib/Drawer/docs/Drawer__multiDrawer.docs.js +2 -2
- package/lib/Drawer/docs/Drawer__noFreeze.docs.js +2 -2
- package/lib/Drawer/docs/Drawer__withModal.docs.js +2 -2
- package/lib/ExternalLink/ExternalLink.js +3 -3
- package/lib/ExternalLink/docs/ExternalLink__default.docs.js +2 -2
- package/lib/FlipCard/FlipCard.js +3 -3
- package/lib/FlipCard/docs/FlipCard__default.docs.js +2 -2
- package/lib/FormAction/FormAction.js +2 -2
- package/lib/FormAction/docs/FormAction__default.docs.js +2 -2
- package/lib/FreezeLayer/FreezeLayer.js +2 -2
- package/lib/FreezeLayer/docs/FreezeLayer__dark.docs.js +2 -2
- package/lib/FreezeLayer/docs/FreezeLayer__default.docs.js +2 -2
- package/lib/IconButton/IconButton.js +2 -2
- package/lib/IconButton/docs/IconButton__default.docs.js +2 -2
- package/lib/Image/Image.js +2 -2
- package/lib/Image/docs/Image__default.docs.js +2 -2
- package/lib/ImportantNotes/ImportantNotes.js +2 -2
- package/lib/ImportantNotes/docs/ImportantNotes__default.docs.js +2 -2
- package/lib/Link/Link.js +3 -3
- package/lib/Link/docs/Link__default.docs.js +2 -2
- package/lib/Loader/Loader.js +2 -2
- package/lib/Loader/docs/Loader__default.docs.js +2 -2
- package/lib/Message/Message.js +3 -3
- package/lib/Message/docs/Message__default.docs.js +2 -2
- package/lib/MessageBanner/MessageBanner.js +2 -2
- package/lib/MessageBanner/docs/MessageBanner__default.docs.js +2 -2
- package/lib/NewStar/NewStar.js +2 -2
- package/lib/NewStar/docs/NewStar__default.docs.js +2 -2
- package/lib/PlusIcon/PlusIcon.js +2 -2
- package/lib/PlusIcon/docs/PlusIcon__default.docs.js +2 -2
- package/lib/Provider.js +9 -124
- package/lib/ToastMessage/ToastMessage.js +1 -1
- package/lib/ToastMessage/docs/ToastMessage__custom.docs.js +2 -2
- package/lib/ToastMessage/docs/ToastMessage__information.docs.js +2 -2
- package/lib/ToastMessage/docs/ToastMessage__primary.docs.js +2 -2
- package/lib/ToastMessage/docs/ToastMessage__secondary.docs.js +2 -2
- package/lib/ToastMessage/docs/ToastMessage__success.docs.js +2 -2
- package/lib/Upload/Upload.js +2 -2
- package/lib/Upload/docs/Upload__default.docs.js +2 -2
- package/lib/alert/AlertHeader/AlertHeader.js +2 -2
- package/lib/alert/AlertHeader/docs/AlertHeader__default.docs.js +2 -2
- package/lib/alert/AlertLookup/AlertLookup.js +3 -3
- package/lib/alert/AlertLookup/docs/AlertLookup__default.docs.js +2 -2
- package/lib/avatar/AvatarClose/AvatarClose.js +3 -3
- package/lib/avatar/AvatarClose/docs/AvatarClose__default.docs.js +2 -2
- package/lib/avatar/AvatarCollision/AvatarCollision.js +3 -3
- package/lib/avatar/AvatarCollision/docs/AvatarCollision__default.docs.js +2 -2
- package/lib/avatar/AvatarIcon/AvatarIcon.js +3 -3
- package/lib/avatar/AvatarIcon/docs/AvatarIcon__palette.docs.js +2 -2
- package/lib/avatar/AvatarIcon/docs/AvatarIcon__size.docs.js +2 -2
- package/lib/avatar/AvatarStatus/AvatarStatus.js +3 -3
- package/lib/avatar/AvatarStatus/docs/AvatarStatus__size.docs.js +2 -2
- package/lib/avatar/AvatarStatus/docs/AvatarStatus__state.docs.js +2 -2
- package/lib/avatar/AvatarThread/AvatarThread.js +3 -3
- package/lib/avatar/AvatarThread/docs/AvatarThread__default.docs.js +2 -2
- package/lib/avatar/AvatarUser/AvatarUser.js +3 -3
- package/lib/avatar/AvatarUser/docs/AvatarUser__default.docs.js +2 -2
- package/lib/avatar/AvatarWithTeam/AvatarWithTeam.js +3 -3
- package/lib/avatar/AvatarWithTeam/docs/AvatarWithTeam__default.docs.js +2 -2
- package/lib/deprecated/SelectDropdown/SelectDropdown.js +62 -40
- package/lib/deprecated/SelectDropdown/SelectDropdown.module.css +1 -0
- package/lib/deprecated/SelectDropdown/docs/SelectDropdown__default.docs.js +2 -2
- package/lib/docs/formDocs.js +32 -0
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +185 -164
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.module.css +3 -0
- package/lib/dropdown/ToggleDropDown/docs/ToggleDropDown__default.docs.js +2 -2
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.js +2 -2
- package/lib/emptystate/CommonEmptyState/docs/CommonEmptyState__default.docs.js +2 -2
- package/lib/emptystate/EditionPage/EditionPage.js +2 -2
- package/lib/emptystate/EditionPage/docs/EditionPage__default.docs.js +2 -2
- package/lib/errorstate/Inconvenience/Inconvenience.js +2 -2
- package/lib/errorstate/Inconvenience/docs/Inconvenience__default.docs.js +2 -2
- package/lib/errorstate/LinkText/LinkText.js +2 -2
- package/lib/errorstate/LinkText/docs/LinkText__default.docs.js +2 -2
- package/lib/errorstate/NoRequestFound/NoRequestFound.js +2 -2
- package/lib/errorstate/NoRequestFound/docs/NoRequestFound__default.docs.js +2 -2
- package/lib/errorstate/PermissionPlay/PermissionPlay.js +2 -2
- package/lib/errorstate/PermissionPlay/docs/PermissionPlay__default.docs.js +2 -2
- package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +2 -2
- package/lib/errorstate/RequestUrlNotFound/docs/RequestUrlNotFound__default.docs.js +2 -2
- package/lib/errorstate/UnableToProcess/UnableToProcess.js +2 -2
- package/lib/errorstate/UnableToProcess/docs/UnableToProcess__default.docs.js +2 -2
- package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +2 -2
- package/lib/errorstate/UnauthorizedLogin/docs/UnauthorizedLogin__insufficient.docs.js +2 -2
- package/lib/errorstate/UnauthorizedLogin/docs/UnauthorizedLogin__unauthorizedLogin.docs.js +2 -2
- package/lib/errorstate/WillBack/WillBack.js +2 -2
- package/lib/errorstate/WillBack/docs/WillBack__default.docs.js +2 -2
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +26 -32
- package/lib/form/fields/CheckBoxField/docs/CheckBoxField__default.docs.js +10 -3
- package/lib/form/fields/CurrencyField/CurrencyField.js +26 -33
- package/lib/form/fields/CurrencyField/docs/CurrencyField__default.docs.js +86 -0
- package/lib/form/fields/DateField/DateField.js +26 -32
- package/lib/form/fields/DateField/docs/DateField__default.docs.js +10 -3
- package/lib/form/fields/FieldContainer/FieldContainer.js +136 -0
- package/lib/form/fields/FieldContainer/docs/FieldContainer__default.docs.js +104 -0
- package/lib/form/fields/MultiSelectField/MultiSelectField.js +26 -32
- package/lib/form/fields/MultiSelectField/docs/MultiSelectField__default.docs.js +10 -3
- package/lib/form/fields/PhoneField/PhoneField.js +3 -3
- package/lib/form/fields/PhoneField/docs/PhoneField__default.docs.js +2 -2
- package/lib/form/fields/RadioField/RadioField.js +3 -3
- package/lib/form/fields/SelectField/SelectField.js +26 -32
- package/lib/form/fields/SelectField/docs/SelectField__default.docs.js +10 -3
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +93 -67
- package/lib/form/fields/TagsMultiSelect/docs/TagsMultiSelect__default.docs.js +2 -2
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +37 -31
- package/lib/form/fields/TextBoxField/TextBoxField.js +28 -48
- package/lib/form/fields/TextBoxField/docs/TextBoxField__default.docs.js +37 -4
- package/lib/form/fields/TextEditor/TextEditor.js +2 -2
- package/lib/form/fields/TextEditorField/TextEditorField.js +36 -50
- package/lib/form/fields/TextEditorField/docs/TextEditorField__default.docs.js +11 -4
- package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
- package/lib/form/fields/TextareaField/TextareaField.js +26 -32
- package/lib/form/fields/TextareaField/docs/TextareaField__default.docs.js +10 -3
- package/lib/form/fields/ValidationMessage/ValidationMessage.js +2 -2
- package/lib/form/fields/ValidationMessage/docs/ValidationMessage__default.docs.js +2 -2
- package/lib/form/fields/props/FieldCommonDefaultProps.js +19 -0
- package/lib/form/fields/props/FieldCommonPropTypes.js +34 -0
- package/lib/form/layout/Field/Field.js +2 -2
- package/lib/form/layout/Field/docs/Field__default.docs.js +2 -2
- package/lib/form/layout/Section/Section.js +2 -2
- package/lib/form/layout/Section/docs/Section__default.docs.js +2 -2
- package/lib/layout/SetupDetailLayout/SetupDetailLayout.js +2 -2
- package/lib/layout/SetupDetailLayout/docs/SetupDetailLayout__default.docs.js +2 -2
- package/lib/layout/SubtabLayout/SubtabLayout.js +3 -3
- package/lib/layout/SubtabLayout/docs/SubtabLayout__default.docs.js +2 -2
- package/lib/list/AvatarFlip/AvatarFlip.js +2 -2
- package/lib/list/AvatarFlip/docs/AvatarFlip__default.docs.js +2 -2
- package/lib/list/BluePrintStatus/BluePrintStatus.js +2 -2
- package/lib/list/BluePrintStatus/docs/BluePrintStatus__default.docs.js +2 -2
- package/lib/list/Comment/Comment.js +2 -2
- package/lib/list/Comment/docs/Comment__default.docs.js +2 -2
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +2 -2
- package/lib/list/Dot/Dot.js +2 -2
- package/lib/list/DotNew/DotNew.js +2 -2
- package/lib/list/DotNew/docs/DotNew__default.docs.js +2 -2
- package/lib/list/GridStencils/GridStencils.js +2 -2
- package/lib/list/GridStencils/GridStencils.module.css +7 -18
- package/lib/list/GridStencils/docs/GridStencils__default.docs.js +2 -2
- package/lib/list/Icons/AddNewIcon.js +2 -2
- package/lib/list/Icons/CompleteIcon.js +2 -2
- package/lib/list/Icons/DeleteIcon.js +2 -2
- package/lib/list/Icons/EditIcon.js +2 -2
- package/lib/list/Icons/FloatingIcons.js +2 -2
- package/lib/list/Icons/ReadUnreadIcon.js +2 -2
- package/lib/list/Icons/SmartIcon.js +2 -2
- package/lib/list/Icons/docs/FloatingIcons__default.docs.js +2 -2
- package/lib/list/ListLayout/ListLayout.js +3 -3
- package/lib/list/ListLayout/docs/ListLayout__default.docs.js +2 -2
- package/lib/list/ListStencils/ListStencils.js +2 -2
- package/lib/list/ListStencils/docs/ListStencils__default.docs.js +2 -2
- package/lib/list/SecondaryText/AccountName.js +3 -3
- package/lib/list/SecondaryText/ContactName.js +3 -3
- package/lib/list/SecondaryText/DepartmentText.js +2 -2
- package/lib/list/SecondaryText/Email.js +3 -3
- package/lib/list/SecondaryText/HappinessRating.js +2 -2
- package/lib/list/SecondaryText/PhoneNumber.js +3 -3
- package/lib/list/SecondaryText/PriorityText.js +2 -2
- package/lib/list/SecondaryText/SecondaryText.js +3 -3
- package/lib/list/SecondaryText/StatusText.js +2 -2
- package/lib/list/SecondaryText/TicketId.js +3 -3
- package/lib/list/SecondaryText/Website.js +2 -2
- package/lib/list/SecondaryText/docs/ContactName__default.docs.js +2 -2
- package/lib/list/SecondryPanel/SecondryPanel.js +2 -2
- package/lib/list/SecondryPanel/docs/SecondryPanel__default.docs.js +2 -2
- package/lib/list/SentimentStatus/SentimentStatus.js +2 -2
- package/lib/list/SentimentStatus/docs/SentimentStatus__default.docs.js +2 -2
- package/lib/list/Subject/Subject.js +3 -3
- package/lib/list/Subject/docs/Subject__default.docs.js +2 -2
- package/lib/list/TagNew/TagNew.js +2 -2
- package/lib/list/TagNew/docs/TagNew__default.docs.js +2 -2
- package/lib/list/Thread/Thread.js +2 -2
- package/lib/list/Thread/docs/Thread__default.docs.js +2 -2
- package/lib/list/UserTime/UserTime.js +2 -2
- package/lib/list/UserTime/docs/UserTime__default.docs.js +2 -2
- package/lib/list/status/StatusDropdown/StatusDropdown.js +104 -83
- package/lib/list/status/StatusDropdown/StatusDropdown.module.css +3 -0
- package/lib/list/status/StatusDropdown/docs/StatusDropdown__default.docs.js +2 -2
- package/lib/list/status/StatusListItem/StatusListItem.js +3 -3
- package/lib/list/status/StatusListItem/docs/StatusListItem__default.docs.js +2 -2
- package/lib/lookup/EmptyPage/EmptyPage.js +2 -2
- package/lib/lookup/EmptyPage/docs/EmptyPage__account.docs.js +2 -2
- package/lib/lookup/EmptyPage/docs/EmptyPage__contact.docs.js +2 -2
- package/lib/lookup/EmptyPage/docs/EmptyPage__default.docs.js +2 -2
- package/lib/lookup/EmptyPage/docs/EmptyPage__product.docs.js +2 -2
- package/lib/lookup/Lookup/Lookup.js +2 -2
- package/lib/lookup/Lookup/docs/Lookup__contact.docs.js +2 -2
- package/lib/lookup/Lookup/docs/Lookup__default.docs.js +2 -2
- package/lib/lookup/Section/Section.js +2 -2
- package/lib/lookup/header/Close/Close.js +2 -2
- package/lib/lookup/header/Close/docs/Close__default.docs.js +2 -2
- package/lib/lookup/header/ModuleHeader/ModuleHeader.js +2 -2
- package/lib/lookup/header/ModuleHeader/docs/ModuleHeader__default.docs.js +2 -2
- package/lib/lookup/header/Search/Search.js +3 -3
- package/lib/lookup/header/Search/docs/Search__default.docs.js +2 -2
- package/lib/lookup/header/TicketHeader/TicketHeader.js +2 -2
- package/lib/lookup/header/TicketHeader/docs/TicketHeader__default.docs.js +2 -2
- package/lib/lookup/header/Title/Title.js +2 -2
- package/lib/lookup/header/Title/docs/Title__default.docs.js +2 -2
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +77 -54
- package/lib/lookup/header/ViewDropDown/docs/ViewDropDown__default.docs.js +2 -2
- package/lib/setup/header/Button/Button.js +2 -2
- package/lib/setup/header/Button/docs/Button__default.docs.js +2 -2
- package/lib/setup/header/Link/Link.js +2 -2
- package/lib/setup/header/Link/docs/Link__default.docs.js +2 -2
- package/lib/setup/header/Search/Search.js +2 -2
- package/lib/setup/header/Search/docs/Search__default.docs.js +2 -2
- package/lib/setup/header/Views/Views.js +2 -2
- package/lib/setup/header/Views/docs/Views__default.docs.js +2 -2
- package/lib/setup/helptips/Description/Description.js +2 -2
- package/lib/setup/helptips/Description/docs/Description__default.docs.js +2 -2
- package/lib/setup/helptips/Link/Link.js +2 -2
- package/lib/setup/helptips/Link/docs/Link__default.docs.js +2 -2
- package/lib/setup/helptips/ListGroup/ListGroup.js +2 -2
- package/lib/setup/helptips/ListGroup/docs/ListGroup__default.docs.js +2 -2
- package/lib/setup/helptips/Title/Title.js +2 -2
- package/lib/setup/helptips/Title/docs/Title__default.docs.js +2 -2
- package/lib/setup/table/Table/Table.js +2 -2
- package/lib/setup/table/Table/docs/Table__default.docs.js +2 -2
- package/lib/setup/table/TableBody/TableBody.js +2 -2
- package/lib/setup/table/TableData/TableData.js +2 -2
- package/lib/setup/table/TableHead/TableHead.js +2 -2
- package/lib/setup/table/TableRow/TableRow.js +2 -2
- package/lib/setup/table/Text/Text.js +2 -2
- package/lib/setup/table/Text/docs/Text__default.docs.js +2 -2
- package/lib/svg/PlusIcon.js +2 -2
- package/lib/svg/SnippetIcon.js +2 -2
- package/lib/svg/TemplateIcon.js +2 -2
- package/lib/svg/docs/SVG__default.docs.js +2 -2
- package/lib/version2/AlertClose/AlertClose.js +2 -2
- package/lib/version2/AlertClose/docs/AlertClose__default.docs.js +2 -2
- package/lib/version2/GlobalNotification/GlobalNotification.js +3 -3
- package/lib/version2/GlobalNotification/docs/GlobalNotification__default.docs.js +2 -2
- package/lib/version2/alertIcons/AlarmAlertIcon.js +2 -2
- package/lib/version2/alertIcons/AlertIcons.js +2 -2
- package/lib/version2/alertIcons/DangerAlertIcon.js +2 -2
- package/lib/version2/alertIcons/ErrorAlertIcon.js +2 -2
- package/lib/version2/alertIcons/InfoAlertIcon.js +2 -2
- package/lib/version2/alertIcons/NotificationAlertIcon.js +2 -2
- package/lib/version2/alertIcons/SuccessAlertIcon.js +2 -2
- package/lib/version2/alertIcons/WarningAlertIcon.js +2 -2
- package/lib/version2/alertIcons/docs/AlertIcons__default.docs.js +2 -2
- package/lib/version2/errorstate/Inconvenience/Inconvenience.js +2 -2
- package/lib/version2/errorstate/Inconvenience/docs/Inconvenience__default.docs.js +2 -2
- package/lib/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +2 -2
- package/lib/version2/errorstate/OopsSomethingMiss/docs/OopsSomethingMiss__default.docs.js +2 -2
- package/lib/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +2 -2
- package/lib/version2/errorstate/UnableToProcessRequest/docs/UnableToProcessRequest__default.docs.js +2 -2
- package/lib/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +2 -2
- package/lib/version2/errorstate/UnauthorizedLogin/docs/UnauthorizedLogin__default.docs.js +2 -2
- package/lib/version2/errorstate/UrlNotFound/UrlNotFound.js +2 -2
- package/lib/version2/errorstate/UrlNotFound/docs/UrlNotFound__default.docs.js +2 -2
- package/lib/version2/errorstate/WillBeRightBack/WillBeRightBack.js +2 -2
- package/lib/version2/errorstate/WillBeRightBack/docs/WillBeRightBack__default.docs.js +2 -2
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +2 -2
- package/lib/version2/lookup/AlertHeader/docs/AlertHeader__default.docs.js +2 -2
- package/lib/version2/lookup/AlertLookup/AlertLookup.js +3 -3
- package/lib/version2/lookup/AlertLookup/docs/AlertLookup__default.docs.js +2 -2
- package/lib/version2/notification/DesktopNotification/DesktopNotification.js +1 -1
- package/lib/version2/notification/DesktopNotification/docs/DesktopNotification__default.docs.js +2 -2
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +2 -2
- package/lib/version2/notification/DesktopNotificationHeader/docs/DesktopNotificationHeader__default.docs.js +2 -2
- package/package.json +5 -5
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import "core-js/modules/es.array.includes";
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
import React, { Component, Fragment } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import Icon from '@zohodesk/icons/lib/Icon';
|
|
8
|
-
import DropBox from '@zohodesk/components/lib/DropBox/DropBox';
|
|
9
8
|
import Popup from '@zohodesk/components/lib/Popup/Popup';
|
|
10
9
|
import { Box, Container } from '@zohodesk/components/lib/Layout';
|
|
11
10
|
import ListItem from '@zohodesk/components/lib/ListItem/ListItem';
|
|
@@ -20,6 +19,8 @@ import { scrollTo } from '@zohodesk/components/lib/utils/Common';
|
|
|
20
19
|
import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
|
|
21
20
|
import btnStyle from '@zohodesk/components/lib/semantic/Button/semanticButton.module.css';
|
|
22
21
|
import RippleEffect from '@zohodesk/components/lib/RippleEffect/RippleEffect';
|
|
22
|
+
import ResponsiveDropBox from '@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox';
|
|
23
|
+
import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
|
|
23
24
|
import { shallowDiff } from '../../utils/General';
|
|
24
25
|
import style from './ToggleDropDown.module.css';
|
|
25
26
|
export class ToggleDropDown extends Component {
|
|
@@ -472,6 +473,17 @@ export class ToggleDropDown extends Component {
|
|
|
472
473
|
}
|
|
473
474
|
}
|
|
474
475
|
|
|
476
|
+
responsiveFunc(_ref3) {
|
|
477
|
+
let {
|
|
478
|
+
mediaQueryOR
|
|
479
|
+
} = _ref3;
|
|
480
|
+
return {
|
|
481
|
+
tabletMode: mediaQueryOR([{
|
|
482
|
+
maxWidth: 700
|
|
483
|
+
}])
|
|
484
|
+
};
|
|
485
|
+
}
|
|
486
|
+
|
|
475
487
|
render() {
|
|
476
488
|
const {
|
|
477
489
|
options,
|
|
@@ -599,105 +611,180 @@ export class ToggleDropDown extends Component {
|
|
|
599
611
|
name: "ZD-down",
|
|
600
612
|
iconClass: `${'toggleDropIcon'} ${style.arrow} ${style[`${arrowIconPosition}_arrow`]}`,
|
|
601
613
|
dataId: "statusdownarrow"
|
|
602
|
-
}) : null)))), isPopupOpen ? /*#__PURE__*/React.createElement(
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
},
|
|
652
|
-
|
|
653
|
-
})), /*#__PURE__*/React.createElement(Box, {
|
|
654
|
-
id: ariaTitleId,
|
|
655
|
-
scroll: "vertical",
|
|
656
|
-
dataId: `${dataId}_list`,
|
|
657
|
-
className: style.maxHgt,
|
|
658
|
-
eleRef: this.scrollContentRef,
|
|
659
|
-
onScroll: this.handleScroll,
|
|
660
|
-
role: isSearch ? 'listbox' : undefined,
|
|
661
|
-
"aria-labelledby": isSearch ? ariaTitleId : undefined
|
|
662
|
-
}, isDataLoaded ? options && options.length != 0 ? isGroupDropDown ? /*#__PURE__*/React.createElement(Fragment, null, options.map(group => {
|
|
663
|
-
const groupName = group[groupNameKey];
|
|
664
|
-
const groupOptions = group[groupOptionsKey];
|
|
665
|
-
const {
|
|
666
|
-
needDivider
|
|
667
|
-
} = group;
|
|
668
|
-
return /*#__PURE__*/React.createElement(Fragment, {
|
|
669
|
-
key: `index${groupName}`
|
|
670
|
-
}, needDivider && /*#__PURE__*/React.createElement("div", {
|
|
671
|
-
className: style.seperatedLine
|
|
672
|
-
}), groupName && /*#__PURE__*/React.createElement("div", {
|
|
673
|
-
className: style.groupName
|
|
614
|
+
}) : null)))), isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
615
|
+
query: this.responsiveFunc,
|
|
616
|
+
responsiveId: "Helmet"
|
|
617
|
+
}, _ref4 => {
|
|
618
|
+
let {
|
|
619
|
+
tabletMode
|
|
620
|
+
} = _ref4;
|
|
621
|
+
return /*#__PURE__*/React.createElement(ResponsiveDropBox, _extends({
|
|
622
|
+
boxPosition: position,
|
|
623
|
+
isActive: isPopupReady,
|
|
624
|
+
onClick: removeClose,
|
|
625
|
+
size: boxSize,
|
|
626
|
+
right: right,
|
|
627
|
+
left: left,
|
|
628
|
+
top: top,
|
|
629
|
+
bottom: bottom,
|
|
630
|
+
isArrow: isArrow,
|
|
631
|
+
isAnimate: true,
|
|
632
|
+
getRef: getContainerRef,
|
|
633
|
+
customClass: {
|
|
634
|
+
customDropBoxWrap: style.dropBoxContainer
|
|
635
|
+
},
|
|
636
|
+
needResponsive: needResponsive,
|
|
637
|
+
isPadding: isPadding,
|
|
638
|
+
tabindex: "0",
|
|
639
|
+
a11y: {
|
|
640
|
+
role: !isSearch ? 'menu' : undefined,
|
|
641
|
+
ariaLabelledby: !isSearch ? ariaTitleId : undefined
|
|
642
|
+
},
|
|
643
|
+
palette: palette,
|
|
644
|
+
isResponsivePadding: true
|
|
645
|
+
}, DropBoxProps), /*#__PURE__*/React.createElement(Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
|
|
646
|
+
className: style.search
|
|
647
|
+
}, /*#__PURE__*/React.createElement(TextBoxIcon, _extends({
|
|
648
|
+
placeHolder: placeHolderText,
|
|
649
|
+
onChange: this.handleChange,
|
|
650
|
+
value: searchValue,
|
|
651
|
+
onClear: this.onSearchClear,
|
|
652
|
+
size: searchBoxSize,
|
|
653
|
+
inputRef: this.searchInputRef,
|
|
654
|
+
onKeyDown: this.handleKeyDown,
|
|
655
|
+
a11y: {
|
|
656
|
+
role: 'combobox',
|
|
657
|
+
ariaOwns: ariaTitleId,
|
|
658
|
+
ariaActivedescendant: allyOptionsArr[selectedIndex] && allyOptionsArr[selectedIndex][keyName],
|
|
659
|
+
ariaAutocomplete: 'list',
|
|
660
|
+
ariaHaspopup: true,
|
|
661
|
+
ariaExpanded: true
|
|
662
|
+
}
|
|
663
|
+
}, TextBoxIconProps))) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
|
|
664
|
+
className: style.title
|
|
674
665
|
}, /*#__PURE__*/React.createElement(DropDownHeading, {
|
|
675
|
-
text:
|
|
666
|
+
text: title,
|
|
667
|
+
htmlId: ariaTitleId,
|
|
676
668
|
palette: palette,
|
|
677
669
|
a11y: {
|
|
678
670
|
role: 'heading'
|
|
679
|
-
}
|
|
680
|
-
|
|
671
|
+
},
|
|
672
|
+
customClass: style.dropdown
|
|
673
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
674
|
+
id: ariaTitleId,
|
|
675
|
+
flexible: true,
|
|
676
|
+
shrink: true,
|
|
677
|
+
scroll: "vertical",
|
|
678
|
+
dataId: `${dataId}_list`,
|
|
679
|
+
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
|
|
680
|
+
eleRef: this.scrollContentRef,
|
|
681
|
+
onScroll: this.handleScroll,
|
|
682
|
+
role: isSearch ? 'listbox' : undefined,
|
|
683
|
+
"aria-labelledby": isSearch ? ariaTitleId : undefined
|
|
684
|
+
}, isDataLoaded ? options && options.length != 0 ? isGroupDropDown ? /*#__PURE__*/React.createElement(Fragment, null, options.map(group => {
|
|
685
|
+
const groupName = group[groupNameKey];
|
|
686
|
+
const groupOptions = group[groupOptionsKey];
|
|
687
|
+
const {
|
|
688
|
+
needDivider
|
|
689
|
+
} = group;
|
|
690
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
691
|
+
key: `index${groupName}`
|
|
692
|
+
}, needDivider && /*#__PURE__*/React.createElement("div", {
|
|
693
|
+
className: style.seperatedLine
|
|
694
|
+
}), groupName && /*#__PURE__*/React.createElement("div", {
|
|
695
|
+
className: style.groupName
|
|
696
|
+
}, /*#__PURE__*/React.createElement(DropDownHeading, {
|
|
697
|
+
text: groupName,
|
|
698
|
+
palette: palette,
|
|
699
|
+
a11y: {
|
|
700
|
+
role: 'heading'
|
|
701
|
+
}
|
|
702
|
+
})), groupOptions && groupOptions.map(item => {
|
|
703
|
+
const {
|
|
704
|
+
iconName,
|
|
705
|
+
iconSize,
|
|
706
|
+
iconClass,
|
|
707
|
+
title,
|
|
708
|
+
disableTitle = '',
|
|
709
|
+
isDisabled = false
|
|
710
|
+
} = item;
|
|
711
|
+
listIndex += 1;
|
|
712
|
+
return iconName ? /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({
|
|
713
|
+
key: listIndex,
|
|
714
|
+
dataId: item[keyName],
|
|
715
|
+
value: item[keyName],
|
|
716
|
+
id: item[idName],
|
|
717
|
+
active: selectedId === item[idName],
|
|
718
|
+
onClick: this.onSelect.bind(this, item),
|
|
719
|
+
index: listIndex,
|
|
720
|
+
highlight: selectedIndex === listIndex,
|
|
721
|
+
disableTitle: disableTitle,
|
|
722
|
+
isDisabled: isDisabled,
|
|
723
|
+
iconName: iconName,
|
|
724
|
+
iconClass: iconClass,
|
|
725
|
+
iconSize: iconSize,
|
|
726
|
+
needTick: needTick,
|
|
727
|
+
needBorder: false,
|
|
728
|
+
onMouseEnter: this.handleMouseEnter,
|
|
729
|
+
getRef: this.itemRef,
|
|
730
|
+
title: title ? title : item[keyName],
|
|
731
|
+
palette: palette,
|
|
732
|
+
a11y: {
|
|
733
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
734
|
+
ariaSelected: selectedId === item[idName]
|
|
735
|
+
}
|
|
736
|
+
}, ListItemWithIconProps)) : /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
737
|
+
key: listIndex,
|
|
738
|
+
dataId: item[keyName],
|
|
739
|
+
value: item[keyName],
|
|
740
|
+
id: item[idName],
|
|
741
|
+
active: selectedId === item[idName],
|
|
742
|
+
onClick: this.onSelect.bind(this, item),
|
|
743
|
+
isDisabled: isDisabled,
|
|
744
|
+
disableTitle: disableTitle,
|
|
745
|
+
index: listIndex,
|
|
746
|
+
highlight: selectedIndex === listIndex,
|
|
747
|
+
needTick: needTick,
|
|
748
|
+
needBorder: false,
|
|
749
|
+
onMouseEnter: this.handleMouseEnter,
|
|
750
|
+
getRef: this.itemRef,
|
|
751
|
+
title: title ? title : item[keyName],
|
|
752
|
+
palette: palette,
|
|
753
|
+
a11y: {
|
|
754
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
755
|
+
ariaSelected: selectedId === item[idName]
|
|
756
|
+
}
|
|
757
|
+
}, ListItemProps));
|
|
758
|
+
}));
|
|
759
|
+
})) : /*#__PURE__*/React.createElement(Fragment, null, options.map((item, i) => {
|
|
681
760
|
const {
|
|
682
761
|
iconName,
|
|
683
762
|
iconSize,
|
|
684
763
|
iconClass,
|
|
685
764
|
title,
|
|
686
|
-
|
|
687
|
-
isDisabled = false
|
|
765
|
+
needDivider,
|
|
766
|
+
isDisabled = false,
|
|
767
|
+
disableTitle = ''
|
|
688
768
|
} = item;
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
769
|
+
|
|
770
|
+
if (!needDivider) {
|
|
771
|
+
listIndex += 1;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
return /*#__PURE__*/React.createElement(Fragment, {
|
|
775
|
+
key: i
|
|
776
|
+
}, needDivider ? /*#__PURE__*/React.createElement("div", {
|
|
777
|
+
className: style.seperatedLine
|
|
778
|
+
}) : iconName ? /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({
|
|
692
779
|
dataId: item[keyName],
|
|
693
780
|
value: item[keyName],
|
|
694
781
|
id: item[idName],
|
|
695
782
|
active: selectedId === item[idName],
|
|
696
783
|
onClick: this.onSelect.bind(this, item),
|
|
697
784
|
index: listIndex,
|
|
698
|
-
highlight: selectedIndex === listIndex,
|
|
699
785
|
disableTitle: disableTitle,
|
|
700
786
|
isDisabled: isDisabled,
|
|
787
|
+
highlight: selectedIndex === listIndex,
|
|
701
788
|
iconName: iconName,
|
|
702
789
|
iconClass: iconClass,
|
|
703
790
|
iconSize: iconSize,
|
|
@@ -706,6 +793,7 @@ export class ToggleDropDown extends Component {
|
|
|
706
793
|
onMouseEnter: this.handleMouseEnter,
|
|
707
794
|
getRef: this.itemRef,
|
|
708
795
|
title: title ? title : item[keyName],
|
|
796
|
+
key: listIndex,
|
|
709
797
|
palette: palette,
|
|
710
798
|
a11y: {
|
|
711
799
|
role: isSearch ? 'option' : 'menuitem',
|
|
@@ -716,10 +804,10 @@ export class ToggleDropDown extends Component {
|
|
|
716
804
|
dataId: item[keyName],
|
|
717
805
|
value: item[keyName],
|
|
718
806
|
id: item[idName],
|
|
807
|
+
disableTitle: disableTitle,
|
|
808
|
+
isDisabled: isDisabled,
|
|
719
809
|
active: selectedId === item[idName],
|
|
720
810
|
onClick: this.onSelect.bind(this, item),
|
|
721
|
-
isDisabled: isDisabled,
|
|
722
|
-
disableTitle: disableTitle,
|
|
723
811
|
index: listIndex,
|
|
724
812
|
highlight: selectedIndex === listIndex,
|
|
725
813
|
needTick: needTick,
|
|
@@ -732,82 +820,17 @@ export class ToggleDropDown extends Component {
|
|
|
732
820
|
role: isSearch ? 'option' : 'menuitem',
|
|
733
821
|
ariaSelected: selectedId === item[idName]
|
|
734
822
|
}
|
|
735
|
-
}, ListItemProps));
|
|
736
|
-
}))
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
} = item;
|
|
747
|
-
|
|
748
|
-
if (!needDivider) {
|
|
749
|
-
listIndex += 1;
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
return /*#__PURE__*/React.createElement(Fragment, {
|
|
753
|
-
key: i
|
|
754
|
-
}, needDivider ? /*#__PURE__*/React.createElement("div", {
|
|
755
|
-
className: style.seperatedLine
|
|
756
|
-
}) : iconName ? /*#__PURE__*/React.createElement(ListItemWithIcon, _extends({
|
|
757
|
-
dataId: item[keyName],
|
|
758
|
-
value: item[keyName],
|
|
759
|
-
id: item[idName],
|
|
760
|
-
active: selectedId === item[idName],
|
|
761
|
-
onClick: this.onSelect.bind(this, item),
|
|
762
|
-
index: listIndex,
|
|
763
|
-
disableTitle: disableTitle,
|
|
764
|
-
isDisabled: isDisabled,
|
|
765
|
-
highlight: selectedIndex === listIndex,
|
|
766
|
-
iconName: iconName,
|
|
767
|
-
iconClass: iconClass,
|
|
768
|
-
iconSize: iconSize,
|
|
769
|
-
needTick: needTick,
|
|
770
|
-
needBorder: false,
|
|
771
|
-
onMouseEnter: this.handleMouseEnter,
|
|
772
|
-
getRef: this.itemRef,
|
|
773
|
-
title: title ? title : item[keyName],
|
|
774
|
-
key: listIndex,
|
|
775
|
-
palette: palette,
|
|
776
|
-
a11y: {
|
|
777
|
-
role: isSearch ? 'option' : 'menuitem',
|
|
778
|
-
ariaSelected: selectedId === item[idName]
|
|
779
|
-
}
|
|
780
|
-
}, ListItemWithIconProps)) : /*#__PURE__*/React.createElement(ListItem, _extends({
|
|
781
|
-
key: listIndex,
|
|
782
|
-
dataId: item[keyName],
|
|
783
|
-
value: item[keyName],
|
|
784
|
-
id: item[idName],
|
|
785
|
-
disableTitle: disableTitle,
|
|
786
|
-
isDisabled: isDisabled,
|
|
787
|
-
active: selectedId === item[idName],
|
|
788
|
-
onClick: this.onSelect.bind(this, item),
|
|
789
|
-
index: listIndex,
|
|
790
|
-
highlight: selectedIndex === listIndex,
|
|
791
|
-
needTick: needTick,
|
|
792
|
-
needBorder: false,
|
|
793
|
-
onMouseEnter: this.handleMouseEnter,
|
|
794
|
-
getRef: this.itemRef,
|
|
795
|
-
title: title ? title : item[keyName],
|
|
796
|
-
palette: palette,
|
|
797
|
-
a11y: {
|
|
798
|
-
role: isSearch ? 'option' : 'menuitem',
|
|
799
|
-
ariaSelected: selectedId === item[idName]
|
|
800
|
-
}
|
|
801
|
-
}, ListItemProps)));
|
|
802
|
-
})) : /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
803
|
-
className: style.svgWrapper,
|
|
804
|
-
description: searchEmptyHint,
|
|
805
|
-
title: searchErrorText || 'No results',
|
|
806
|
-
size: "small",
|
|
807
|
-
getEmptyState: this.emptySearchSVG
|
|
808
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
809
|
-
className: style.loader
|
|
810
|
-
}, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement("div", null, getFooter()) : null)) : null);
|
|
823
|
+
}, ListItemProps)));
|
|
824
|
+
})) : /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
825
|
+
className: style.svgWrapper,
|
|
826
|
+
description: searchEmptyHint,
|
|
827
|
+
title: searchErrorText || 'No results',
|
|
828
|
+
size: "small",
|
|
829
|
+
getEmptyState: this.emptySearchSVG
|
|
830
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
831
|
+
className: style.loader
|
|
832
|
+
}, /*#__PURE__*/React.createElement(Loader, null))), getFooter ? /*#__PURE__*/React.createElement(Box, null, getFooter()) : null));
|
|
833
|
+
}) : null);
|
|
811
834
|
}
|
|
812
835
|
|
|
813
836
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
/**** Libraries ****/
|
|
4
4
|
import React, { PureComponent } from 'react';
|
|
@@ -9,9 +9,11 @@ import Label from '@zohodesk/components/lib/Label/Label';
|
|
|
9
9
|
import CheckBox from '@zohodesk/components/lib/CheckBox/CheckBox';
|
|
10
10
|
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
11
11
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
12
|
-
|
|
12
|
+
import FieldContainer from '../FieldContainer/FieldContainer';
|
|
13
|
+
/**** props ****/
|
|
13
14
|
|
|
14
|
-
import
|
|
15
|
+
import { FieldCommonDefaultProps } from '../props/FieldCommonDefaultProps';
|
|
16
|
+
import { FieldCommonPropTypes } from '../props/FieldCommonPropTypes';
|
|
15
17
|
/**** CSS ****/
|
|
16
18
|
|
|
17
19
|
import style from '../Fields.module.css';
|
|
@@ -69,7 +71,8 @@ export default class CheckBoxField extends PureComponent {
|
|
|
69
71
|
lineClamp,
|
|
70
72
|
isLocked,
|
|
71
73
|
lockedInfoText,
|
|
72
|
-
customProps
|
|
74
|
+
customProps,
|
|
75
|
+
renderLabelProps
|
|
73
76
|
} = this.props;
|
|
74
77
|
const {
|
|
75
78
|
LabelProps = {},
|
|
@@ -79,8 +82,11 @@ export default class CheckBoxField extends PureComponent {
|
|
|
79
82
|
} = customProps;
|
|
80
83
|
let removeEvent = isDisabled || isReadOnly;
|
|
81
84
|
let isDirectCol = direction === 'column';
|
|
82
|
-
let labelElement = /*#__PURE__*/React.createElement(
|
|
83
|
-
|
|
85
|
+
let labelElement = /*#__PURE__*/React.createElement(FieldContainer, {
|
|
86
|
+
isLocked: isLocked,
|
|
87
|
+
lockedInfoText: lockedInfoText,
|
|
88
|
+
infoText: infoText,
|
|
89
|
+
renderProps: renderLabelProps
|
|
84
90
|
}, /*#__PURE__*/React.createElement(Label, _extends({
|
|
85
91
|
text: labelName,
|
|
86
92
|
id: id,
|
|
@@ -92,17 +98,7 @@ export default class CheckBoxField extends PureComponent {
|
|
|
92
98
|
onClick: !removeEvent ? this.handleLabelClick : null,
|
|
93
99
|
variant: isDirectCol ? 'default' : 'primary',
|
|
94
100
|
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
|
|
95
|
-
}, LabelProps))
|
|
96
|
-
name: "ZD-GN-info",
|
|
97
|
-
iconClass: style.infoIcon,
|
|
98
|
-
title: infoText,
|
|
99
|
-
size: "15"
|
|
100
|
-
}) : null, isLocked ? /*#__PURE__*/React.createElement(Icon, {
|
|
101
|
-
name: "ZD-GN-lock",
|
|
102
|
-
size: "13",
|
|
103
|
-
iconClass: style.lockIcon,
|
|
104
|
-
title: lockedInfoText
|
|
105
|
-
}) : null);
|
|
101
|
+
}, LabelProps)));
|
|
106
102
|
return /*#__PURE__*/React.createElement("div", {
|
|
107
103
|
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
108
104
|
"data-title": isDisabled ? title : null
|
|
@@ -139,16 +135,11 @@ export default class CheckBoxField extends PureComponent {
|
|
|
139
135
|
}
|
|
140
136
|
CheckBoxField.propTypes = {
|
|
141
137
|
checked: PropTypes.bool,
|
|
142
|
-
dataId: PropTypes.string,
|
|
143
138
|
direction: PropTypes.oneOf(['row', 'column']),
|
|
144
139
|
errorType: PropTypes.oneOf(['primary', 'secondary']),
|
|
145
140
|
fieldSize: PropTypes.oneOf(['small', 'medium']),
|
|
146
141
|
getRef: PropTypes.func,
|
|
147
142
|
id: PropTypes.string.isRequired,
|
|
148
|
-
infoText: PropTypes.string,
|
|
149
|
-
isDisabled: PropTypes.bool,
|
|
150
|
-
isMandatory: PropTypes.bool,
|
|
151
|
-
isReadOnly: PropTypes.bool,
|
|
152
143
|
labelCustomClass: PropTypes.string,
|
|
153
144
|
labelName: PropTypes.string,
|
|
154
145
|
labelPalette: PropTypes.string,
|
|
@@ -159,26 +150,23 @@ CheckBoxField.propTypes = {
|
|
|
159
150
|
validationPalette: PropTypes.string,
|
|
160
151
|
validationRuleMessage: PropTypes.string,
|
|
161
152
|
validationRulePalette: PropTypes.string,
|
|
162
|
-
lockedInfoText: PropTypes.string,
|
|
163
|
-
isLocked: PropTypes.bool,
|
|
164
153
|
customProps: PropTypes.shape({
|
|
165
154
|
LabelProps: PropTypes.object,
|
|
166
155
|
CheckBoxProps: PropTypes.object,
|
|
167
156
|
ValidationMessageProps1: PropTypes.object,
|
|
168
157
|
ValidationMessageProps2: PropTypes.object
|
|
169
|
-
})
|
|
158
|
+
}),
|
|
159
|
+
...FieldCommonPropTypes()
|
|
170
160
|
};
|
|
171
161
|
CheckBoxField.defaultProps = {
|
|
172
|
-
isMandatory: false,
|
|
173
162
|
errorType: 'primary',
|
|
174
|
-
isDisabled: false,
|
|
175
|
-
isReadOnly: false,
|
|
176
163
|
fieldSize: 'medium',
|
|
177
164
|
labelPalette: 'default',
|
|
178
165
|
labelCustomClass: '',
|
|
179
166
|
direction: 'row',
|
|
180
167
|
lineClamp: '',
|
|
181
|
-
customProps: {}
|
|
168
|
+
customProps: {},
|
|
169
|
+
...FieldCommonDefaultProps()
|
|
182
170
|
};
|
|
183
171
|
|
|
184
172
|
if (false) {
|
|
@@ -16,7 +16,14 @@ export default class CheckBoxField__default extends Component {
|
|
|
16
16
|
id: "checkbox",
|
|
17
17
|
validationMessage: "Invalid Input",
|
|
18
18
|
isDisabled: true,
|
|
19
|
-
title: "Invalid Permission"
|
|
19
|
+
title: "Invalid Permission",
|
|
20
|
+
infoText: "infoText",
|
|
21
|
+
isLocked: true,
|
|
22
|
+
ePhiData: {
|
|
23
|
+
ePhiTitle: 'ePhiTitle',
|
|
24
|
+
ePhiText: 'ePhiText',
|
|
25
|
+
ePhiStatus: true
|
|
26
|
+
}
|
|
20
27
|
}));
|
|
21
28
|
}
|
|
22
29
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
/**** Libraries ****/
|
|
4
4
|
import React, { PureComponent } from 'react';
|
|
@@ -9,9 +9,11 @@ import Label from '@zohodesk/components/lib/Label/Label';
|
|
|
9
9
|
import TextBox from '@zohodesk/components/lib/TextBox/TextBox';
|
|
10
10
|
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
11
11
|
import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
|
|
12
|
-
|
|
12
|
+
import FieldContainer from '../FieldContainer/FieldContainer';
|
|
13
|
+
/**** props ****/
|
|
13
14
|
|
|
14
|
-
import
|
|
15
|
+
import { FieldCommonDefaultProps } from '../props/FieldCommonDefaultProps';
|
|
16
|
+
import { FieldCommonPropTypes } from '../props/FieldCommonPropTypes';
|
|
15
17
|
/**** CSS ****/
|
|
16
18
|
|
|
17
19
|
import style from '../Fields.module.css';
|
|
@@ -81,7 +83,6 @@ export default class CurrencyField extends PureComponent {
|
|
|
81
83
|
errorType,
|
|
82
84
|
isDisabled,
|
|
83
85
|
title,
|
|
84
|
-
onBlur,
|
|
85
86
|
dataId,
|
|
86
87
|
validationRuleMessage,
|
|
87
88
|
validationRulePalette,
|
|
@@ -99,7 +100,8 @@ export default class CurrencyField extends PureComponent {
|
|
|
99
100
|
isClickable,
|
|
100
101
|
userCurrencyType,
|
|
101
102
|
customProps,
|
|
102
|
-
formatCurrency
|
|
103
|
+
formatCurrency,
|
|
104
|
+
renderLabelProps
|
|
103
105
|
} = this.props;
|
|
104
106
|
const {
|
|
105
107
|
LabelProps = {},
|
|
@@ -122,8 +124,11 @@ export default class CurrencyField extends PureComponent {
|
|
|
122
124
|
return /*#__PURE__*/React.createElement("div", {
|
|
123
125
|
className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
|
|
124
126
|
"data-title": isDisabled ? title : null
|
|
125
|
-
}, labelName && /*#__PURE__*/React.createElement(
|
|
126
|
-
|
|
127
|
+
}, labelName && /*#__PURE__*/React.createElement(FieldContainer, {
|
|
128
|
+
infoText: infoText,
|
|
129
|
+
isLocked: isLocked,
|
|
130
|
+
lockedInfoText: lockedInfoText,
|
|
131
|
+
renderProps: renderLabelProps
|
|
127
132
|
}, /*#__PURE__*/React.createElement(Label, _extends({
|
|
128
133
|
text: labelName,
|
|
129
134
|
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
@@ -131,17 +136,7 @@ export default class CurrencyField extends PureComponent {
|
|
|
131
136
|
customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
|
|
132
137
|
htmlFor: uniqueId,
|
|
133
138
|
dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
|
|
134
|
-
}, LabelProps)),
|
|
135
|
-
name: "ZD-GN-info",
|
|
136
|
-
iconClass: style.infoIcon,
|
|
137
|
-
title: infoText,
|
|
138
|
-
size: "15"
|
|
139
|
-
}) : null, isLocked ? /*#__PURE__*/React.createElement(Icon, {
|
|
140
|
-
name: "ZD-GN-lock",
|
|
141
|
-
size: "13",
|
|
142
|
-
iconClass: style.lockIcon,
|
|
143
|
-
title: lockedInfoText
|
|
144
|
-
}) : null), /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
}, LabelProps))), /*#__PURE__*/React.createElement("div", {
|
|
145
140
|
className: `${style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''}`
|
|
146
141
|
}, /*#__PURE__*/React.createElement(TextBox, _extends({
|
|
147
142
|
htmlId: uniqueId,
|
|
@@ -182,15 +177,10 @@ export default class CurrencyField extends PureComponent {
|
|
|
182
177
|
}
|
|
183
178
|
CurrencyField.propTypes = {
|
|
184
179
|
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
185
|
-
dataId: PropTypes.string,
|
|
186
180
|
errorType: PropTypes.oneOf(['primary', 'secondary']),
|
|
187
181
|
fieldSize: PropTypes.oneOf(['small', 'medium']),
|
|
188
182
|
getRef: PropTypes.func,
|
|
189
183
|
id: PropTypes.string,
|
|
190
|
-
infoText: PropTypes.string,
|
|
191
|
-
isDisabled: PropTypes.bool,
|
|
192
|
-
isMandatory: PropTypes.bool,
|
|
193
|
-
isReadOnly: PropTypes.bool,
|
|
194
184
|
labelCustomClass: PropTypes.string,
|
|
195
185
|
labelName: PropTypes.string.isRequired,
|
|
196
186
|
labelPalette: PropTypes.string,
|
|
@@ -208,8 +198,6 @@ CurrencyField.propTypes = {
|
|
|
208
198
|
validationRuleMessage: PropTypes.string,
|
|
209
199
|
validationRulePalette: PropTypes.string,
|
|
210
200
|
value: PropTypes.string,
|
|
211
|
-
lockedInfoText: PropTypes.string,
|
|
212
|
-
isLocked: PropTypes.bool,
|
|
213
201
|
isClickable: PropTypes.bool,
|
|
214
202
|
needReadOnlyStyle: PropTypes.bool,
|
|
215
203
|
customProps: PropTypes.shape({
|
|
@@ -218,24 +206,23 @@ CurrencyField.propTypes = {
|
|
|
218
206
|
ValidationMessageProps1: PropTypes.object,
|
|
219
207
|
ValidationMessageProps2: PropTypes.object
|
|
220
208
|
}),
|
|
221
|
-
formatCurrency: PropTypes.func
|
|
209
|
+
formatCurrency: PropTypes.func,
|
|
210
|
+
...FieldCommonPropTypes()
|
|
222
211
|
};
|
|
223
212
|
CurrencyField.defaultProps = {
|
|
224
213
|
errorType: 'primary',
|
|
225
|
-
isMandatory: false,
|
|
226
214
|
textBoxSize: 'xmedium',
|
|
227
215
|
textBoxType: 'text',
|
|
228
216
|
textBoxVariant: 'primary',
|
|
229
217
|
borderColor: 'default',
|
|
230
|
-
isDisabled: false,
|
|
231
|
-
isReadOnly: false,
|
|
232
218
|
fieldSize: 'medium',
|
|
233
219
|
labelPalette: 'default',
|
|
234
220
|
labelCustomClass: '',
|
|
235
221
|
isClickable: false,
|
|
236
222
|
needReadOnlyStyle: true,
|
|
237
223
|
customProps: {},
|
|
238
|
-
formatCurrency: () => {}
|
|
224
|
+
formatCurrency: () => {},
|
|
225
|
+
...FieldCommonDefaultProps()
|
|
239
226
|
};
|
|
240
227
|
|
|
241
228
|
if (false) {
|