@zohodesk/dot 1.7.19 → 1.7.20-exp.2
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 +28 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +11 -1
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +11 -1
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +11 -1
- package/es/ActionButton/ActionButton.js +6 -6
- package/es/ActionButton/ActionButton.module.css +1 -1
- package/es/AlphabeticList/AlphabeticList.js +1 -1
- package/es/AlphabeticList/AlphabeticList.module.css +1 -1
- package/es/Attachment/Attachment.js +7 -4
- package/es/Attachment/__tests__/Attachment.spec.js +24 -0
- package/es/Attachment/__tests__/__snapshots__/Attachment.spec.js.snap +105 -0
- package/es/AttachmentViewer/AttachmentViewer.js +5 -5
- package/es/AttachmentViewer/AttachmentViewer.module.css +1 -1
- package/es/AudioPlayer/AudioPlayer.js +580 -0
- package/es/AudioPlayer/AudioPlayer.module.css +146 -0
- package/es/AudioPlayer/Timer/Timer.js +67 -0
- package/es/AudioPlayer/Timer/Timer.module.css +5 -0
- package/es/AudioPlayer/Timer/__tests__/Timer.spec.js +20 -0
- package/es/AudioPlayer/Timer/__tests__/__snapshots__/Timer.spec.js.snap +14 -0
- package/es/AudioPlayer/Timer/propTypes/defaultProps.js +4 -0
- package/es/AudioPlayer/Timer/propTypes/propTypes.js +11 -0
- package/es/AudioPlayer/__tests__/AudioPlayer.spec.js +192 -0
- package/es/AudioPlayer/__tests__/__snapshots__/AudioPlayer.spec.js.snap +1995 -0
- package/es/AudioPlayer/propTypes/defaultProps.js +14 -0
- package/es/AudioPlayer/propTypes/propTypes.js +33 -0
- package/es/AudioPlayer/utils/utils.js +24 -0
- package/es/ChannelIcon/ChannelIcon.js +1 -1
- package/es/DotProvider/hooks/useDotProvider.js +1 -0
- package/es/Drawer/Drawer.js +6 -6
- package/es/Drawer/Drawer.module.css +1 -1
- package/es/FlipCard/FlipCard.js +3 -3
- package/es/FormAction/FormAction.js +1 -1
- package/es/FreezeLayer/FreezeLayer.js +3 -3
- package/es/Hooks/Dragger/useDragger.js +52 -33
- package/es/IconButton/IconButton.js +3 -3
- package/es/ImportantNotes/ImportantNotes.js +1 -1
- package/es/Loader/Loader.js +1 -1
- package/es/MessageBanner/MessageBanner.js +1 -1
- package/es/NewStar/NewStar.js +1 -1
- package/es/Onboarding/Onboarding.js +3 -3
- package/es/Separator/Separator.js +1 -1
- package/es/ToastMessage/ToastMessage.js +4 -4
- package/es/Upload/Upload.js +1 -1
- package/es/VideoLookup/VideoLookup.js +1 -1
- package/es/alert/AlertHeader/AlertHeader.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 +2 -2
- 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 +2 -2
- package/es/deprecated/FreezeLayer/FreezeLayer.js +3 -3
- package/es/deprecated/SelectDropdown/SelectDropdown.js +7 -7
- package/es/dot_layer.module.css +1 -0
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +14 -14
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
- package/es/emptystate/EditionPage/EditionPage.css +2 -2
- package/es/emptystate/EditionPage/EditionPage.js +1 -1
- package/es/errorstate/Inconvenience/Inconvenience.js +3 -3
- package/es/errorstate/NoRequestFound/NoRequestFound.js +3 -3
- package/es/errorstate/PermissionPlay/PermissionPlay.js +3 -3
- package/es/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
- package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +3 -3
- package/es/errorstate/UnableToProcess/UnableToProcess.js +3 -3
- package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -3
- package/es/errorstate/WillBack/WillBack.js +3 -3
- package/es/form/fields/CheckBoxField/CheckBoxField.js +3 -3
- package/es/form/fields/CurrencyField/CurrencyField.js +3 -3
- package/es/form/fields/DateField/DateField.js +3 -3
- package/es/form/fields/FieldContainer/FieldContainer.js +1 -1
- package/es/form/fields/Fields.module.css +4 -0
- package/es/form/fields/MultiSelectField/MultiSelectField.js +3 -3
- package/es/form/fields/PhoneField/PhoneField.js +3 -2
- package/es/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -1
- package/es/form/fields/RadioField/RadioField.js +2 -2
- package/es/form/fields/SelectField/SelectField.js +3 -3
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +11 -11
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +3 -3
- package/es/form/fields/TextBoxField/TextBoxField.js +3 -3
- package/es/form/fields/TextEditor/TextEditor.js +3 -2
- package/es/form/fields/TextEditor/TextEditor.module.css +2 -2
- package/es/form/fields/TextEditorField/TextEditorField.js +1 -1
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +2 -2
- package/es/form/fields/TextareaField/TextareaField.js +3 -3
- package/es/form/fields/ValidationMessage/ValidationMessage.js +2 -2
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
- package/es/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
- package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
- package/es/layout/SubtabLayout/SubtabLayout.js +2 -2
- package/es/list/Comment/Comment.js +1 -1
- package/es/list/Icons/AddNewIcon.js +1 -1
- package/es/list/Icons/CompleteIcon.js +1 -1
- package/es/list/Icons/DeleteIcon.js +1 -1
- package/es/list/Icons/EditIcon.js +1 -1
- package/es/list/Icons/ReadUnreadIcon.js +1 -1
- package/es/list/Icons/SmartIcon.js +1 -1
- package/es/list/ListLayout/ListLayout.js +1 -1
- package/es/list/ListStencils/ListStencils.js +1 -1
- package/es/list/SecondaryText/AccountName.js +1 -1
- package/es/list/SecondaryText/ContactName.js +1 -1
- package/es/list/SecondaryText/SecondaryText.module.css +8 -8
- package/es/list/SecondryPanel/SecondryPanel.js +2 -2
- package/es/list/Subject/Subject.module.css +3 -3
- package/es/list/Thread/Thread.js +1 -1
- package/es/list/status/StatusDropdown/StatusDropdown.js +10 -10
- package/es/list/status/StatusListItem/StatusListItem.js +2 -2
- package/es/lookup/EmptyPage/EmptyPage.js +4 -4
- package/es/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
- package/es/lookup/Lookup/Lookup.js +1 -1
- package/es/lookup/Section/Section.js +1 -1
- package/es/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
- package/es/lookup/header/Search/Search.js +3 -3
- package/es/lookup/header/TicketHeader/TicketHeader.js +1 -1
- package/es/lookup/header/Title/LookupTitle.module.css +7 -3
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +9 -9
- package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
- package/es/setup/header/Button/Button.js +1 -1
- package/es/setup/header/Link/Link.js +1 -1
- package/es/setup/header/Search/Search.js +1 -1
- package/es/setup/header/Search/Search.module.css +1 -1
- package/es/setup/table/Table/Table.js +1 -1
- package/es/setup/table/TableBody/TableBody.js +1 -1
- package/es/setup/table/TableData/TableData.js +1 -1
- package/es/setup/table/TableHead/TableHead.js +1 -1
- package/es/setup/table/TableRow/TableRow.js +1 -1
- package/es/svg/PlusIcon.js +1 -1
- package/es/svg/SnippetIcon.js +1 -1
- package/es/svg/TemplateIcon.js +1 -1
- package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +2 -2
- package/es/v1/emptystate/EditionPage/EditionPage.js +1 -1
- package/es/v1/errorstate/Inconvenience/Inconvenience.js +1 -1
- package/es/v1/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +1 -1
- package/es/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -1
- package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +1 -1
- package/es/v1/errorstate/UrlNotFound/UrlNotFound.js +1 -1
- package/es/v1/errorstate/WillBeRightBack/WillBeRightBack.js +1 -1
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -2
- package/es/v1/form/fields/TextEditor/TextEditor.js +2 -1
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/es/v1/lookup/EmptyPage/EmptyPage.js +4 -4
- package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +1 -1
- package/es/v1/notification/DesktopNotification/DesktopNotification.js +1 -1
- package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +1 -1
- package/es/v1/svg/PlusIcon.js +1 -1
- package/es/v1/svg/SnippetIcon.js +1 -1
- package/es/v1/svg/TemplateIcon.js +1 -1
- package/es/version2/AlertClose/AlertClose.js +1 -1
- package/es/version2/GlobalNotification/GlobalNotification.js +1 -1
- package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -2
- package/es/version2/errorstate/Inconvenience/Inconvenience.js +3 -3
- package/es/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +3 -3
- package/es/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +3 -3
- package/es/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -3
- package/es/version2/errorstate/UrlNotFound/UrlNotFound.js +3 -3
- package/es/version2/errorstate/V2_ErrorStates.module.css +1 -1
- package/es/version2/errorstate/WillBeRightBack/WillBeRightBack.js +3 -3
- package/es/version2/lookup/AlertHeader/AlertHeader.js +1 -1
- package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
- package/es/version2/lookup/AlertLookup/AlertLookup.js +3 -3
- package/es/version2/lookup/alertLookupCommonNew.module.css +1 -1
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +4 -4
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +2 -2
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +1 -0
- package/lib/ActionButton/ActionButton.js +6 -6
- package/lib/ActionButton/ActionButton.module.css +1 -1
- package/lib/AlphabeticList/AlphabeticList.js +1 -1
- package/lib/AlphabeticList/AlphabeticList.module.css +1 -1
- package/lib/Attachment/Attachment.js +7 -4
- package/lib/Attachment/__tests__/Attachment.spec.js +24 -0
- package/lib/Attachment/__tests__/__snapshots__/Attachment.spec.js.snap +105 -0
- package/lib/AttachmentViewer/AttachmentViewer.js +5 -5
- package/lib/AttachmentViewer/AttachmentViewer.module.css +1 -1
- package/lib/AudioPlayer/AudioPlayer.js +662 -0
- package/lib/AudioPlayer/AudioPlayer.module.css +146 -0
- package/lib/AudioPlayer/Timer/Timer.js +117 -0
- package/lib/AudioPlayer/Timer/Timer.module.css +5 -0
- package/lib/AudioPlayer/Timer/__tests__/Timer.spec.js +26 -0
- package/lib/AudioPlayer/Timer/__tests__/__snapshots__/Timer.spec.js.snap +14 -0
- package/lib/AudioPlayer/Timer/propTypes/defaultProps.js +11 -0
- package/lib/AudioPlayer/Timer/propTypes/propTypes.js +22 -0
- package/lib/AudioPlayer/__tests__/AudioPlayer.spec.js +210 -0
- package/lib/AudioPlayer/__tests__/__snapshots__/AudioPlayer.spec.js.snap +1995 -0
- package/lib/AudioPlayer/propTypes/defaultProps.js +24 -0
- package/lib/AudioPlayer/propTypes/propTypes.js +44 -0
- package/lib/AudioPlayer/utils/utils.js +33 -0
- package/lib/ChannelIcon/ChannelIcon.js +1 -1
- package/lib/DotProvider/hooks/useDotProvider.js +2 -0
- package/lib/Drawer/Drawer.js +6 -6
- package/lib/Drawer/Drawer.module.css +1 -1
- package/lib/FlipCard/FlipCard.js +3 -3
- package/lib/FormAction/FormAction.js +1 -1
- package/lib/FreezeLayer/FreezeLayer.js +3 -3
- package/lib/Hooks/Dragger/useDragger.js +51 -28
- package/lib/IconButton/IconButton.js +3 -3
- package/lib/ImportantNotes/ImportantNotes.js +1 -1
- package/lib/Loader/Loader.js +1 -1
- package/lib/MessageBanner/MessageBanner.js +1 -1
- package/lib/NewStar/NewStar.js +1 -1
- package/lib/Onboarding/Onboarding.js +3 -3
- package/lib/Separator/Separator.js +1 -1
- package/lib/ToastMessage/ToastMessage.js +4 -4
- package/lib/Upload/Upload.js +1 -1
- package/lib/VideoLookup/VideoLookup.js +1 -1
- package/lib/alert/AlertHeader/AlertHeader.js +1 -1
- package/lib/alert/AlertLookup/AlertLookup.js +1 -1
- package/lib/avatar/AvatarClose/AvatarClose.js +1 -1
- package/lib/avatar/AvatarCollision/AvatarCollision.js +1 -1
- package/lib/avatar/AvatarIcon/AvatarIcon.js +2 -2
- package/lib/avatar/AvatarStatus/AvatarStatus.js +1 -1
- package/lib/avatar/AvatarThread/AvatarThread.js +1 -1
- package/lib/avatar/AvatarUser/AvatarUser.js +1 -1
- package/lib/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
- package/lib/deprecated/FreezeLayer/FreezeLayer.js +3 -3
- package/lib/deprecated/SelectDropdown/SelectDropdown.js +7 -7
- package/lib/dot_layer.module.css +1 -0
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +14 -14
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
- package/lib/emptystate/EditionPage/EditionPage.css +2 -2
- package/lib/emptystate/EditionPage/EditionPage.js +1 -1
- package/lib/errorstate/Inconvenience/Inconvenience.js +3 -3
- package/lib/errorstate/NoRequestFound/NoRequestFound.js +3 -3
- package/lib/errorstate/PermissionPlay/PermissionPlay.js +3 -3
- package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
- package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +3 -3
- package/lib/errorstate/UnableToProcess/UnableToProcess.js +3 -3
- package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -3
- package/lib/errorstate/WillBack/WillBack.js +3 -3
- package/lib/form/fields/CheckBoxField/CheckBoxField.js +3 -3
- package/lib/form/fields/CurrencyField/CurrencyField.js +3 -3
- package/lib/form/fields/DateField/DateField.js +3 -3
- package/lib/form/fields/FieldContainer/FieldContainer.js +1 -1
- package/lib/form/fields/Fields.module.css +4 -0
- package/lib/form/fields/MultiSelectField/MultiSelectField.js +3 -3
- package/lib/form/fields/PhoneField/PhoneField.js +3 -2
- package/lib/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -1
- package/lib/form/fields/RadioField/RadioField.js +2 -2
- package/lib/form/fields/SelectField/SelectField.js +3 -3
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +11 -11
- package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +3 -3
- package/lib/form/fields/TextBoxField/TextBoxField.js +3 -3
- package/lib/form/fields/TextEditor/TextEditor.js +2 -2
- package/lib/form/fields/TextEditor/TextEditor.module.css +2 -2
- package/lib/form/fields/TextEditorField/TextEditorField.js +1 -1
- package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.js +2 -2
- package/lib/form/fields/TextareaField/TextareaField.js +3 -3
- package/lib/form/fields/ValidationMessage/ValidationMessage.js +2 -2
- package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
- package/lib/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
- package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
- package/lib/layout/SubtabLayout/SubtabLayout.js +2 -2
- package/lib/list/Comment/Comment.js +1 -1
- package/lib/list/Icons/AddNewIcon.js +1 -1
- package/lib/list/Icons/CompleteIcon.js +1 -1
- package/lib/list/Icons/DeleteIcon.js +1 -1
- package/lib/list/Icons/EditIcon.js +1 -1
- package/lib/list/Icons/ReadUnreadIcon.js +1 -1
- package/lib/list/Icons/SmartIcon.js +1 -1
- package/lib/list/ListLayout/ListLayout.js +1 -1
- package/lib/list/ListStencils/ListStencils.js +1 -1
- package/lib/list/SecondaryText/AccountName.js +1 -1
- package/lib/list/SecondaryText/ContactName.js +1 -1
- package/lib/list/SecondaryText/SecondaryText.module.css +8 -8
- package/lib/list/SecondryPanel/SecondryPanel.js +2 -2
- package/lib/list/Subject/Subject.module.css +3 -3
- package/lib/list/Thread/Thread.js +1 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.js +10 -10
- package/lib/list/status/StatusListItem/StatusListItem.js +2 -2
- package/lib/lookup/EmptyPage/EmptyPage.js +4 -4
- package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
- package/lib/lookup/Lookup/Lookup.js +1 -1
- package/lib/lookup/Section/Section.js +1 -1
- package/lib/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
- package/lib/lookup/header/Search/Search.js +3 -3
- package/lib/lookup/header/TicketHeader/TicketHeader.js +1 -1
- package/lib/lookup/header/Title/LookupTitle.module.css +7 -3
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +9 -9
- package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
- package/lib/setup/header/Button/Button.js +1 -1
- package/lib/setup/header/Link/Link.js +1 -1
- package/lib/setup/header/Search/Search.js +1 -1
- package/lib/setup/header/Search/Search.module.css +1 -1
- package/lib/setup/table/Table/Table.js +1 -1
- package/lib/setup/table/TableBody/TableBody.js +1 -1
- package/lib/setup/table/TableData/TableData.js +1 -1
- package/lib/setup/table/TableHead/TableHead.js +1 -1
- package/lib/setup/table/TableRow/TableRow.js +1 -1
- package/lib/svg/PlusIcon.js +1 -1
- package/lib/svg/SnippetIcon.js +1 -1
- package/lib/svg/TemplateIcon.js +1 -1
- package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +2 -2
- package/lib/v1/emptystate/EditionPage/EditionPage.js +1 -1
- package/lib/v1/errorstate/Inconvenience/Inconvenience.js +1 -1
- package/lib/v1/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +1 -1
- package/lib/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -1
- package/lib/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +1 -1
- package/lib/v1/errorstate/UrlNotFound/UrlNotFound.js +1 -1
- package/lib/v1/errorstate/WillBeRightBack/WillBeRightBack.js +1 -1
- package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -2
- package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/lib/v1/lookup/EmptyPage/EmptyPage.js +4 -4
- package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +1 -1
- package/lib/v1/notification/DesktopNotification/DesktopNotification.js +1 -1
- package/lib/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +1 -1
- package/lib/v1/svg/PlusIcon.js +1 -1
- package/lib/v1/svg/SnippetIcon.js +1 -1
- package/lib/v1/svg/TemplateIcon.js +1 -1
- package/lib/version2/AlertClose/AlertClose.js +1 -1
- package/lib/version2/GlobalNotification/GlobalNotification.js +1 -1
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -2
- package/lib/version2/errorstate/Inconvenience/Inconvenience.js +3 -3
- package/lib/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +3 -3
- package/lib/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +3 -3
- package/lib/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -3
- package/lib/version2/errorstate/UrlNotFound/UrlNotFound.js +3 -3
- package/lib/version2/errorstate/V2_ErrorStates.module.css +1 -1
- package/lib/version2/errorstate/WillBeRightBack/WillBeRightBack.js +3 -3
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +1 -1
- package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
- package/lib/version2/lookup/AlertLookup/AlertLookup.js +3 -3
- package/lib/version2/lookup/alertLookupCommonNew.module.css +1 -1
- package/lib/version2/notification/DesktopNotification/DesktopNotification.js +4 -4
- package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +2 -2
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +1 -0
- package/package.json +23 -14
- package/.cli/MissedPropType_Keys.html +0 -101
- package/.cli/PropLessFiles.html +0 -101
- package/.cli/PropUnificationExcludeFilesArray.js +0 -345
- package/.cli/PropValidationExcludeFilesArray.js +0 -8
- package/.cli/ThemeValidationExcludeFiles.js +0 -1
- package/.cli/UnValidatedFiles.html +0 -101
- package/.cli/propValidation_report.html +0 -182
- package/.cli/stringContains.js +0 -1
- package/css_error.log +0 -1
- package/images/audio_thumbnail.png +0 -0
- package/install.md +0 -12
- package/postPublish.js +0 -8
- package/prePublish.js +0 -70
- package/propValidationArg.json +0 -12
- package/react-cli.config.js +0 -24
- package/result.json +0 -1
- package/unittest/index.html +0 -37
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Timer_propTypes } from "./propTypes/propTypes";
|
|
3
|
+
import { Timer_defaultProps } from "./propTypes/defaultProps";
|
|
4
|
+
import { Container } from '@zohodesk/components/lib/Layout';
|
|
5
|
+
import { addLeadingZeros } from "../utils/utils";
|
|
6
|
+
import style from "./Timer.module.css";
|
|
7
|
+
export default class Timer extends React.Component {
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
this.constructTimer = this.constructTimer.bind(this);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
constructTimer() {
|
|
14
|
+
let {
|
|
15
|
+
hour,
|
|
16
|
+
minute,
|
|
17
|
+
second,
|
|
18
|
+
amPm,
|
|
19
|
+
separator,
|
|
20
|
+
timerFormat,
|
|
21
|
+
needCharacter
|
|
22
|
+
} = this.props;
|
|
23
|
+
const timeSeparator = separator == 'space' ? ' ' : ':';
|
|
24
|
+
let timerValue = '';
|
|
25
|
+
const format = timerFormat.toLowerCase().split(':');
|
|
26
|
+
hour = addLeadingZeros(hour);
|
|
27
|
+
minute = addLeadingZeros(minute);
|
|
28
|
+
second = addLeadingZeros(second);
|
|
29
|
+
|
|
30
|
+
if (needCharacter) {
|
|
31
|
+
hour = `${hour}h`;
|
|
32
|
+
minute = `${minute}m`;
|
|
33
|
+
second = `${second}s`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
format.map(type => {
|
|
37
|
+
if (type == 'hh') {
|
|
38
|
+
timerValue += hour;
|
|
39
|
+
} else if (type == 'mm') {
|
|
40
|
+
timerValue += minute;
|
|
41
|
+
} else if (type == 'ss') {
|
|
42
|
+
timerValue += second;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
timerValue += timeSeparator;
|
|
46
|
+
});
|
|
47
|
+
timerValue = timerValue.slice(0, -1);
|
|
48
|
+
amPm && (timerValue = `${timerValue} ${amPm}`);
|
|
49
|
+
return timerValue;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
render() {
|
|
53
|
+
const {
|
|
54
|
+
dataId
|
|
55
|
+
} = this.props;
|
|
56
|
+
const timerValue = this.constructTimer();
|
|
57
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
58
|
+
dataId: dataId,
|
|
59
|
+
alignBox: "row",
|
|
60
|
+
className: style.container,
|
|
61
|
+
flexible: true
|
|
62
|
+
}, timerValue);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
Timer.defaultProps = Timer_defaultProps;
|
|
67
|
+
Timer.propTypes = Timer_propTypes;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import Timer from "../Timer";
|
|
4
|
+
const defaultProps = {
|
|
5
|
+
dataId: 'CBTimer'
|
|
6
|
+
};
|
|
7
|
+
describe('Timer test Cases', () => {
|
|
8
|
+
// const {props,renderedDOM} = setup(Timer,Object.assign({},defaultProps))
|
|
9
|
+
// it('Should render Component',()=>{
|
|
10
|
+
// const component = TestUtils.scryRenderedComponentsWithTestid(renderedDOM,'CBTimer');
|
|
11
|
+
// expect(component.length).toBe(1);
|
|
12
|
+
// })
|
|
13
|
+
test('rendering the defult props', () => {
|
|
14
|
+
const {
|
|
15
|
+
asFragment
|
|
16
|
+
} = render( /*#__PURE__*/React.createElement(Timer, { ...defaultProps
|
|
17
|
+
}));
|
|
18
|
+
expect(asFragment()).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Timer test Cases rendering the defult props 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="container flex cover rowdir"
|
|
7
|
+
data-id="CBTimer"
|
|
8
|
+
data-selector-id="container"
|
|
9
|
+
data-test-id="CBTimer"
|
|
10
|
+
>
|
|
11
|
+
undefined:undefined
|
|
12
|
+
</div>
|
|
13
|
+
</DocumentFragment>
|
|
14
|
+
`;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export const Timer_propTypes = {
|
|
3
|
+
dataId: PropTypes.string,
|
|
4
|
+
amPm: PropTypes.string,
|
|
5
|
+
hour: PropTypes.string,
|
|
6
|
+
minute: PropTypes.string,
|
|
7
|
+
needCharacter: PropTypes.bool,
|
|
8
|
+
second: PropTypes.string,
|
|
9
|
+
separator: PropTypes.oneOf(['space', 'colon']),
|
|
10
|
+
timerFormat: PropTypes.string
|
|
11
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, fireEvent, screen } from '@testing-library/react';
|
|
3
|
+
import AudioPlayer from "../AudioPlayer";
|
|
4
|
+
const DEFAULT_PROPS = {
|
|
5
|
+
minute: '02',
|
|
6
|
+
second: '03',
|
|
7
|
+
durationInSec: '203',
|
|
8
|
+
src: 'https://ypvnxx00-a.akamaihd.net/downloads/ringtones/files/mp3/yuvanringtone-44640.mp3'
|
|
9
|
+
};
|
|
10
|
+
describe('AudioPlayer - Snapshot', () => {
|
|
11
|
+
test('Render with default props', () => {
|
|
12
|
+
const {
|
|
13
|
+
asFragment
|
|
14
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS
|
|
15
|
+
}));
|
|
16
|
+
expect(asFragment()).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
test('Render with customId and testId', () => {
|
|
19
|
+
const {
|
|
20
|
+
asFragment
|
|
21
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
22
|
+
customId: "audio-player-customId",
|
|
23
|
+
testId: "audio-player-testId"
|
|
24
|
+
}));
|
|
25
|
+
expect(asFragment()).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
test('Render with tag attributes', () => {
|
|
28
|
+
const {
|
|
29
|
+
asFragment
|
|
30
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
31
|
+
tagAttributes: {
|
|
32
|
+
'data-custom-attr': 'true'
|
|
33
|
+
}
|
|
34
|
+
}));
|
|
35
|
+
expect(asFragment()).toMatchSnapshot();
|
|
36
|
+
});
|
|
37
|
+
test('Render with a11y attributes', () => {
|
|
38
|
+
const {
|
|
39
|
+
asFragment
|
|
40
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
41
|
+
a11yAttributes: {
|
|
42
|
+
role: 'region'
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
expect(asFragment()).toMatchSnapshot();
|
|
46
|
+
});
|
|
47
|
+
test('Render with customClass', () => {
|
|
48
|
+
const {
|
|
49
|
+
asFragment
|
|
50
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
51
|
+
customClass: "my-audio-player"
|
|
52
|
+
}));
|
|
53
|
+
expect(asFragment()).toMatchSnapshot();
|
|
54
|
+
});
|
|
55
|
+
test('Render with i18nKeys', () => {
|
|
56
|
+
const {
|
|
57
|
+
asFragment
|
|
58
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
59
|
+
i18nKeys: {
|
|
60
|
+
play: 'Play',
|
|
61
|
+
pause: 'Pause'
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
expect(asFragment()).toMatchSnapshot();
|
|
65
|
+
});
|
|
66
|
+
test('Render with needClose=false', () => {
|
|
67
|
+
const {
|
|
68
|
+
asFragment
|
|
69
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
70
|
+
needClose: false
|
|
71
|
+
}));
|
|
72
|
+
expect(asFragment()).toMatchSnapshot();
|
|
73
|
+
});
|
|
74
|
+
test('Render with needDownload=false', () => {
|
|
75
|
+
const {
|
|
76
|
+
asFragment
|
|
77
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
78
|
+
needDownload: false
|
|
79
|
+
}));
|
|
80
|
+
expect(asFragment()).toMatchSnapshot();
|
|
81
|
+
});
|
|
82
|
+
test('Render with needMuteIcon=true', () => {
|
|
83
|
+
const {
|
|
84
|
+
asFragment
|
|
85
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
86
|
+
needMuteIcon: true
|
|
87
|
+
}));
|
|
88
|
+
expect(asFragment()).toMatchSnapshot();
|
|
89
|
+
});
|
|
90
|
+
test('Render with isPlay=true', () => {
|
|
91
|
+
const {
|
|
92
|
+
asFragment
|
|
93
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
94
|
+
isPlay: true
|
|
95
|
+
}));
|
|
96
|
+
expect(asFragment()).toMatchSnapshot();
|
|
97
|
+
});
|
|
98
|
+
test('Render with timerFormat=ss:mm', () => {
|
|
99
|
+
const {
|
|
100
|
+
asFragment
|
|
101
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
102
|
+
timerFormat: "ss:mm"
|
|
103
|
+
}));
|
|
104
|
+
expect(asFragment()).toMatchSnapshot();
|
|
105
|
+
});
|
|
106
|
+
test('Render with forwardStepInSec=10', () => {
|
|
107
|
+
const {
|
|
108
|
+
asFragment
|
|
109
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
110
|
+
forwardStepInSec: 10
|
|
111
|
+
}));
|
|
112
|
+
expect(asFragment()).toMatchSnapshot();
|
|
113
|
+
});
|
|
114
|
+
test('Render with backwardStepInSec=10', () => {
|
|
115
|
+
const {
|
|
116
|
+
asFragment
|
|
117
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
118
|
+
backwardStepInSec: 10
|
|
119
|
+
}));
|
|
120
|
+
expect(asFragment()).toMatchSnapshot();
|
|
121
|
+
});
|
|
122
|
+
test('Render with range=50', () => {
|
|
123
|
+
const {
|
|
124
|
+
asFragment
|
|
125
|
+
} = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
126
|
+
range: 50
|
|
127
|
+
}));
|
|
128
|
+
expect(asFragment()).toMatchSnapshot();
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
describe('AudioPlayer - Unit', () => {
|
|
132
|
+
test('Should call togglePlayer on close button click', () => {
|
|
133
|
+
const togglePlayer = jest.fn();
|
|
134
|
+
render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
135
|
+
togglePlayer: togglePlayer
|
|
136
|
+
}));
|
|
137
|
+
const closeBtn = screen.queryByTestId('audioPlayerClose');
|
|
138
|
+
|
|
139
|
+
if (closeBtn) {
|
|
140
|
+
fireEvent.click(closeBtn);
|
|
141
|
+
expect(togglePlayer).toHaveBeenCalled();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
test('Should call downloadFile on download button click', () => {
|
|
145
|
+
const downloadFile = jest.fn();
|
|
146
|
+
render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
147
|
+
downloadFile: downloadFile
|
|
148
|
+
}));
|
|
149
|
+
const downloadBtn = screen.queryByTestId('audioDownload');
|
|
150
|
+
|
|
151
|
+
if (downloadBtn) {
|
|
152
|
+
fireEvent.click(downloadBtn);
|
|
153
|
+
expect(downloadFile).toHaveBeenCalled();
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
test('Should toggle play/pause on play button click', () => {
|
|
157
|
+
const togglePlayer = jest.fn();
|
|
158
|
+
render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
159
|
+
togglePlayer: togglePlayer
|
|
160
|
+
}));
|
|
161
|
+
const playBtn = screen.queryByTestId('audioPlayPause');
|
|
162
|
+
|
|
163
|
+
if (playBtn) {
|
|
164
|
+
fireEvent.click(playBtn);
|
|
165
|
+
expect(togglePlayer).toHaveBeenCalled();
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
test('Should mute/unmute on mute button click', () => {
|
|
169
|
+
render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
170
|
+
needMuteIcon: true
|
|
171
|
+
}));
|
|
172
|
+
const muteBtn = screen.queryByTestId('audioMute');
|
|
173
|
+
|
|
174
|
+
if (muteBtn) {
|
|
175
|
+
fireEvent.click(muteBtn); // Add assertion if mute state is exposed via prop or DOM
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
test('Should change range on slider input', () => {
|
|
179
|
+
render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
|
|
180
|
+
range: 0
|
|
181
|
+
}));
|
|
182
|
+
const rangeInput = screen.queryByTestId('audioRange');
|
|
183
|
+
|
|
184
|
+
if (rangeInput) {
|
|
185
|
+
fireEvent.change(rangeInput, {
|
|
186
|
+
target: {
|
|
187
|
+
value: 50
|
|
188
|
+
}
|
|
189
|
+
}); // Add assertion if range change is exposed via prop or DOM
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|