@zohodesk/dot 1.0.0-temp-206.2 → 1.0.0-temp-200.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/es/ActionButton/ActionButton.js +3 -3
- package/es/ActionButton/__tests__/ActionButton.spec.js +1 -1
- package/es/AlphabeticList/AlphabeticList.js +3 -3
- package/es/AlphabeticList/__tests__/AlphabeticList.spec.js +1 -1
- package/es/Attachment/Attachment.js +4 -4
- package/es/Attachment/Attachment.module.css +7 -3
- package/es/Attachment/__tests__/Attachment.spec.js +1 -1
- package/es/AttachmentViewer/Attachment.js +60 -1
- package/es/AttachmentViewer/AttachmentImage.js +5 -5
- package/es/AttachmentViewer/AttachmentViewer.js +276 -22
- package/es/AttachmentViewer/AttachmentViewer.module.css +125 -5
- package/es/AttachmentViewer/__tests__/AttachmentImage.spec.js +1 -1
- package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +1 -1
- package/es/AttachmentViewer/utils.js +22 -0
- package/es/ChannelIcon/ChannelIcon.js +5 -5
- package/es/ChannelIcon/__tests__/ChannelIcon.spec.js +1 -1
- package/es/DotProvider/DotProvider.js +2 -2
- package/es/DotProvider/__tests__/DotProvider.spec.js +1 -1
- package/es/DotProvider/hooks/useDotProvider.js +2 -2
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +4 -4
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +1 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +1 -1
- package/es/DotProvider/props/propTypes.js +1 -1
- package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +4 -4
- package/es/DotProvider/utils/themeColorAssetsConfig.js +46 -46
- package/es/Drawer/Drawer.js +6 -6
- package/es/Drawer/__tests__/Drawer.spec.js +1 -1
- package/es/Drawer/index.js +1 -1
- package/es/ExternalLink/ExternalLink.js +3 -3
- package/es/ExternalLink/__tests__/ExternalLink.spec.js +1 -1
- package/es/FlipCard/FlipCard.js +7 -7
- package/es/FlipCard/__tests__/FlipCard.spec.js +1 -1
- package/es/FormAction/FormAction.js +3 -3
- package/es/FormAction/__tests__/FormAction.spec.js +1 -1
- package/es/FreezeLayer/FreezeLayer.js +5 -5
- package/es/FreezeLayer/__tests__/FreezeLayer.spec.js +1 -1
- package/es/FreezeLayer/index.js +2 -2
- package/es/Hooks/Dragger/useDragger.js +5 -5
- package/es/Hooks/useFreezeLayer.js +1 -1
- package/es/IconButton/IconButton.js +3 -3
- package/es/IconButton/__tests__/IconButton.spec.js +1 -1
- package/es/Image/Image.js +3 -3
- package/es/Image/__tests__/Image.spec.js +1 -1
- package/es/ImportantNotes/ImportantNotes.js +3 -3
- package/es/ImportantNotes/__tests__/ImportantNotes.spec.js +1 -1
- package/es/Link/Link.js +4 -4
- package/es/Link/__tests__/Link.spec.js +1 -1
- package/es/Loader/Loader.js +1 -1
- package/es/Loader/__tests__/Loader.spec.js +1 -1
- package/es/Message/Message.js +4 -4
- package/es/Message/__tests__/Message.spec.js +1 -1
- package/es/Message/props/propTypes.js +1 -1
- package/es/MessageBanner/MessageBanner.js +4 -4
- package/es/MessageBanner/__tests__/MessageBanner.spec.js +1 -1
- package/es/NewStar/NewStar.js +3 -3
- package/es/NewStar/__tests__/NewStar.spec.js +1 -1
- package/es/PlusIcon/PlusIcon.js +4 -4
- package/es/PlusIcon/__tests__/PlusIcon.spec.js +1 -1
- package/es/Separator/Separator.js +3 -3
- package/es/Separator/__tests__/Separator.spec.js +1 -1
- package/es/TagWithIcon/TagWithIcon.js +3 -3
- package/es/TagWithIcon/__tests__/TagWithIcon.spec.js +1 -1
- package/es/ToastMessage/ToastMessage.js +4 -4
- package/es/ToastMessage/__tests__/ToastMessage.spec.js +1 -1
- package/es/Upload/Upload.js +4 -4
- package/es/Upload/__tests__/Upload.spec.js +1 -1
- package/es/actions/AutoClose.js +2 -2
- package/es/alert/AlertHeader/AlertHeader.js +5 -5
- package/es/alert/AlertHeader/__tests__/AlertHeader.spec.js +1 -1
- package/es/alert/AlertLookup/AlertLookup.js +7 -7
- package/es/alert/AlertLookup/__tests__/AlertLookup.spec.js +1 -1
- package/es/alert/index.js +2 -2
- package/es/avatar/AvatarClose/AvatarClose.js +3 -3
- package/es/avatar/AvatarClose/__tests__/AvatarClose.spec.js +1 -1
- package/es/avatar/AvatarCollision/AvatarCollision.js +3 -3
- package/es/avatar/AvatarCollision/__tests__/AvatarCollision.spec.js +1 -1
- package/es/avatar/AvatarIcon/AvatarIcon.js +3 -3
- package/es/avatar/AvatarIcon/__tests__/AvatarIcon.spec.js +1 -1
- package/es/avatar/AvatarStatus/AvatarStatus.js +3 -3
- package/es/avatar/AvatarStatus/__tests__/AvatarStatus.spec.js +1 -1
- package/es/avatar/AvatarThread/AvatarThread.js +3 -3
- package/es/avatar/AvatarThread/__tests__/AvatarThread.spec.js +1 -1
- package/es/avatar/AvatarUser/AvatarUser.js +4 -4
- package/es/avatar/AvatarUser/__tests__/AvatarUser.spec.js +1 -1
- package/es/avatar/AvatarWithTeam/AvatarWithTeam.js +3 -3
- package/es/avatar/AvatarWithTeam/__tests__/AvatarWithTeam.spec.js +1 -1
- package/es/avatar/index.js +7 -7
- package/es/common/dot_common.module.css +37 -2
- package/es/deprecated/FreezeLayer/FreezeLayer.js +4 -4
- package/es/deprecated/SelectDropdown/SelectDropdown.js +1 -1
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +4 -4
- package/es/dropdown/ToggleDropDown/__tests__/ToggleDropDown.spec.js +1 -1
- package/es/emptystate/CommonEmptyState/CommonEmptyState.js +4 -4
- package/es/emptystate/CommonEmptyState/__tests__/CommonEmptyState.spec.js +1 -1
- package/es/emptystate/EditionPage/EditionPage.js +3 -3
- package/es/emptystate/EditionPage/__tests__/EditionPage.spec.js +1 -1
- package/es/errorstate/Inconvenience/Inconvenience.js +5 -5
- package/es/errorstate/Inconvenience/__tests__/Inconvenience.spec.js +1 -1
- package/es/errorstate/LinkText/LinkText.js +4 -4
- package/es/errorstate/LinkText/__tests__/LinkText.spec.js +1 -1
- package/es/errorstate/NoRequestFound/NoRequestFound.js +5 -5
- package/es/errorstate/NoRequestFound/__tests__/NoRequestFound.spec.js +1 -1
- package/es/errorstate/PermissionPlay/PermissionPlay.js +5 -5
- package/es/errorstate/PermissionPlay/__tests__/PermissionPlay.spec.js +1 -1
- package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +5 -5
- package/es/errorstate/RequestUrlNotFound/__tests__/RequestUrlNotFound.spec.js +1 -1
- package/es/errorstate/UnableToProcess/UnableToProcess.js +5 -5
- package/es/errorstate/UnableToProcess/__tests__/UnableToProcess.spec.js +1 -1
- package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +5 -5
- package/es/errorstate/UnauthorizedLogin/__tests__/UnauthorizedLogin.spec.js +1 -1
- package/es/errorstate/WillBack/WillBack.js +4 -4
- package/es/errorstate/WillBack/__tests__/WillBack.spec.js +1 -1
- package/es/errorstate/index.js +8 -8
- package/es/form/fields/CheckBoxField/CheckBoxField.js +5 -5
- package/es/form/fields/CheckBoxField/__tests__/CheckBoxField.spec.js +1 -1
- package/es/form/fields/CheckBoxField/props/defaultProps.js +1 -1
- package/es/form/fields/CheckBoxField/props/propTypes.js +1 -1
- package/es/form/fields/CurrencyField/CurrencyField.js +5 -5
- package/es/form/fields/CurrencyField/__tests__/CurrencyField.spec.js +1 -1
- package/es/form/fields/CurrencyField/props/defaultProps.js +1 -1
- package/es/form/fields/CurrencyField/props/propTypes.js +1 -1
- package/es/form/fields/DateField/DateField.js +5 -5
- package/es/form/fields/DateField/__tests__/DateField.spec.js +1 -1
- package/es/form/fields/DateField/props/defaultProps.js +1 -1
- package/es/form/fields/DateField/props/propTypes.js +1 -1
- package/es/form/fields/FieldContainer/FieldContainer.js +3 -3
- package/es/form/fields/FieldContainer/__tests__/FieldContainer.spec.js +1 -1
- package/es/form/fields/FieldContainer/props/defaultProps.js +1 -1
- package/es/form/fields/MultiSelectField/MultiSelectField.js +5 -5
- package/es/form/fields/MultiSelectField/__tests__/MultiSelectField.spec.js +1 -1
- package/es/form/fields/MultiSelectField/props/defaultProps.js +1 -1
- package/es/form/fields/MultiSelectField/props/propTypes.js +1 -1
- package/es/form/fields/PhoneField/PhoneField.js +6 -6
- package/es/form/fields/PhoneField/__tests__/PhoneField.spec.js +1 -1
- package/es/form/fields/RadioField/RadioField.js +4 -4
- package/es/form/fields/RadioField/__tests__/RadioField.spec.js +1 -1
- package/es/form/fields/SelectField/SelectField.js +5 -5
- package/es/form/fields/SelectField/__tests__/SelectField.spec.js +1 -1
- package/es/form/fields/SelectField/props/defaultProps.js +1 -1
- package/es/form/fields/SelectField/props/propTypes.js +1 -1
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -5
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +116 -116
- package/es/form/fields/TagsMultiSelect/__tests__/TagsMultiSelect.spec.js +1 -1
- package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -7
- package/es/form/fields/TagsMultiSelectField/__tests__/TagsMultiSelectField.spec.js +1 -1
- package/es/form/fields/TagsMultiSelectField/props/defaultProps.js +1 -1
- package/es/form/fields/TagsMultiSelectField/props/propTypes.js +1 -1
- package/es/form/fields/TextBoxField/TextBoxField.js +5 -5
- package/es/form/fields/TextBoxField/__tests__/TextBoxField.spec.js +1 -1
- package/es/form/fields/TextBoxField/props/defaultProps.js +1 -1
- package/es/form/fields/TextBoxField/props/propTypes.js +1 -1
- package/es/form/fields/TextEditor/TextEditor.js +6 -11
- package/es/form/fields/TextEditor/__tests__/TextEditor.spec.js +1 -1
- package/es/form/fields/TextEditorField/TextEditorField.js +6 -6
- package/es/form/fields/TextEditorField/__tests__/TextEditorField.spec.js +1 -1
- package/es/form/fields/TextEditorField/props/defaultProps.js +1 -1
- package/es/form/fields/TextEditorField/props/propTypes.js +1 -1
- package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +5 -5
- package/es/form/fields/TextEditorWrapper/__tests__/TextEditorWrapper.spec.js +1 -1
- package/es/form/fields/TextareaField/TextareaField.js +5 -5
- package/es/form/fields/TextareaField/__tests__/TextareaField.spec.js +1 -1
- package/es/form/fields/TextareaField/props/defaultProps.js +1 -1
- package/es/form/fields/TextareaField/props/propTypes.js +1 -1
- package/es/form/fields/ValidationMessage/ValidationMessage.js +3 -3
- package/es/form/fields/ValidationMessage/__tests__/ValidationMessage.spec.js +1 -1
- package/es/form/fields/index.js +16 -16
- package/es/form/layout/Field/Field.js +3 -3
- package/es/form/layout/Field/__tests__/Field.spec.js +1 -1
- package/es/form/layout/Section/Section.js +2 -2
- package/es/form/layout/Section/__tests__/Section.spec.js +1 -1
- package/es/form/layout/index.js +2 -2
- package/es/index.js +39 -39
- package/es/layout/SetupDetailLayout/SetupDetailLayout.js +3 -3
- package/es/layout/SetupDetailLayout/__tests__/SetupDetailLayout.spec.js +1 -1
- package/es/layout/SetupDetailLayout/index.js +4 -4
- package/es/layout/SubtabLayout/SubtabLayout.js +4 -4
- package/es/layout/SubtabLayout/__tests__/SubtabLayout.spec.js +1 -1
- package/es/layout/SubtabLayout/index.js +4 -4
- package/es/list/AvatarFlip/AvatarFlip.js +4 -4
- package/es/list/AvatarFlip/__tests__/AvatarFlip.spec.js +1 -1
- package/es/list/BluePrintStatus/BluePrintStatus.js +2 -2
- package/es/list/BluePrintStatus/__tests__/BluePrintStatus.spec.js +1 -1
- package/es/list/Comment/Comment.js +3 -3
- package/es/list/Comment/__tests__/Comment.spec.js +1 -1
- package/es/list/DepartmentDropDown/DepartmentDropDown.js +5 -5
- package/es/list/DepartmentDropDown/__tests__/DepartmentDropDown.spec.js +1 -1
- package/es/list/Dot/Dot.js +3 -3
- package/es/list/Dot/__tests__/Dot.spec.js +1 -1
- package/es/list/DotNew/DotNew.js +3 -3
- package/es/list/DotNew/__tests__/DotNew.spec.js +1 -1
- package/es/list/GridStencils/GridStencils.js +2 -2
- package/es/list/GridStencils/__tests__/GridStencils.spec.js +1 -1
- package/es/list/Icons/AddNewIcon.js +2 -2
- package/es/list/Icons/CompleteIcon.js +2 -2
- package/es/list/Icons/DeleteIcon.js +2 -2
- package/es/list/Icons/EditIcon.js +2 -2
- package/es/list/Icons/FloatingIcons.js +3 -3
- package/es/list/Icons/ReadUnreadIcon.js +3 -3
- package/es/list/Icons/SmartIcon.js +2 -2
- package/es/list/Icons/__tests__/AddNewIcon.spec.js +1 -1
- package/es/list/Icons/__tests__/CompleteIcon.spec.js +1 -1
- package/es/list/Icons/__tests__/DeleteIcon.spec.js +1 -1
- package/es/list/Icons/__tests__/EditIcon.spec.js +1 -1
- package/es/list/Icons/__tests__/FloatingIcons.spec.js +1 -1
- package/es/list/Icons/__tests__/ReadUnreadIcon.spec.js +1 -1
- package/es/list/Icons/__tests__/SmartIcon.spec.js +1 -1
- package/es/list/Icons/index.js +7 -7
- package/es/list/ListLayout/ListLayout.js +3 -3
- package/es/list/ListLayout/__tests__/ListLayout.spec.js +1 -1
- package/es/list/ListStencils/ListStencils.js +3 -3
- package/es/list/ListStencils/__tests__/ListStencils.spec.js +1 -1
- package/es/list/SecondaryText/AccountName.js +4 -4
- package/es/list/SecondaryText/ContactName.js +5 -5
- package/es/list/SecondaryText/DepartmentText.js +2 -2
- package/es/list/SecondaryText/Email.js +4 -4
- package/es/list/SecondaryText/HappinessRating.js +2 -2
- package/es/list/SecondaryText/PhoneNumber.js +4 -4
- package/es/list/SecondaryText/PriorityText.js +3 -3
- package/es/list/SecondaryText/SecondaryText.js +3 -3
- package/es/list/SecondaryText/StatusText.js +3 -3
- package/es/list/SecondaryText/TicketId.js +4 -4
- package/es/list/SecondaryText/Website.js +4 -4
- package/es/list/SecondaryText/__tests__/AccountName.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/ContactName.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/DepartmentText.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/Email.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/HappinessRating.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/PhoneNumber.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/PriorityText.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/SecondaryText.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/StatusText.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/TicketId.spec.js +1 -1
- package/es/list/SecondaryText/__tests__/Website.spec.js +1 -1
- package/es/list/SecondaryText/index.js +11 -11
- package/es/list/SecondryPanel/SecondryPanel.js +4 -4
- package/es/list/SecondryPanel/__tests__/SecondryPanel.spec.js +1 -1
- package/es/list/SentimentStatus/SentimentStatus.js +2 -2
- package/es/list/SentimentStatus/__tests__/SentimentStatus.spec.js +1 -1
- package/es/list/Subject/Subject.js +4 -4
- package/es/list/Subject/__tests__/Subject.spec.js +1 -1
- package/es/list/TagNew/TagNew.js +3 -3
- package/es/list/TagNew/__tests__/TagNew.spec.js +1 -1
- package/es/list/Thread/Thread.js +3 -3
- package/es/list/Thread/__tests__/Thread.spec.js +1 -1
- package/es/list/index.js +16 -16
- package/es/list/status/StatusDropdown/StatusDropdown.js +5 -5
- package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +1 -1
- package/es/list/status/StatusListItem/StatusListItem.js +3 -3
- package/es/list/status/StatusListItem/__tests__/StatusListItem.spec.js +1 -1
- package/es/list/status/index.js +2 -2
- package/es/lookup/EmptyPage/EmptyPage.js +3 -3
- package/es/lookup/EmptyPage/__tests__/EmptyPage.spec.js +1 -1
- package/es/lookup/Lookup/Lookup.js +4 -4
- package/es/lookup/Lookup/__tests__/Lookup.spec.js +1 -1
- package/es/lookup/Section/Section.js +2 -2
- package/es/lookup/Section/__tests__/Section.spec.js +1 -1
- package/es/lookup/header/Close/Close.js +3 -3
- package/es/lookup/header/Close/__tests__/Close.spec.js +1 -1
- package/es/lookup/header/ModuleHeader/ModuleHeader.js +8 -8
- package/es/lookup/header/ModuleHeader/__tests__/ModuleHeader.spec.js +1 -1
- package/es/lookup/header/Search/Search.js +4 -4
- package/es/lookup/header/Search/__tests__/Search.spec.js +1 -1
- package/es/lookup/header/TicketHeader/TicketHeader.js +10 -10
- package/es/lookup/header/TicketHeader/__tests__/TicketHeader.spec.js +1 -1
- package/es/lookup/header/Title/Title.js +3 -3
- package/es/lookup/header/Title/__tests__/Titles.spec.js +1 -1
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +3 -3
- package/es/lookup/header/ViewDropDown/__test__/ViewDropDown.spec.js +1 -1
- package/es/lookup/header/index.js +5 -5
- package/es/lookup/index.js +4 -4
- package/es/setup/header/Button/Button.js +3 -3
- package/es/setup/header/Button/__tests__/Button.spec.js +1 -1
- package/es/setup/header/Link/Link.js +4 -4
- package/es/setup/header/Link/__tests__/Link.spec.js +1 -1
- package/es/setup/header/Search/Search.js +3 -3
- package/es/setup/header/Search/__tests__/Search.spec.js +1 -1
- package/es/setup/header/Views/Views.js +3 -3
- package/es/setup/header/Views/__tests__/Views.spec.js +1 -1
- package/es/setup/header/index.js +4 -4
- package/es/setup/helptips/Description/Description.js +2 -2
- package/es/setup/helptips/Description/__tests__/Description.spec.js +1 -1
- package/es/setup/helptips/Link/Link.js +3 -3
- package/es/setup/helptips/Link/__tests__/Link.spec.js +1 -1
- package/es/setup/helptips/ListGroup/ListGroup.js +2 -2
- package/es/setup/helptips/ListGroup/__tests__/ListGroup.spec.js +1 -1
- package/es/setup/helptips/Title/Title.js +2 -2
- package/es/setup/helptips/Title/__tests__/Title.spec.js +1 -1
- package/es/setup/helptips/index.js +4 -4
- package/es/setup/index.js +3 -3
- package/es/setup/table/Table/Table.js +2 -2
- package/es/setup/table/Table/__tests__/Table.spec.js +1 -1
- package/es/setup/table/TableBody/TableBody.js +2 -2
- package/es/setup/table/TableBody/__tests__/TableBody.spec.js +1 -1
- package/es/setup/table/TableData/TableData.js +3 -3
- package/es/setup/table/TableData/__tests__/TableData.spec.js +1 -1
- package/es/setup/table/TableHead/TableHead.js +3 -3
- package/es/setup/table/TableHead/__tests__/TableHead.spec.js +1 -1
- package/es/setup/table/TableRow/TableRow.js +3 -3
- package/es/setup/table/TableRow/__tests__/TableRow.spec.js +1 -1
- package/es/setup/table/Text/Text.js +4 -4
- package/es/setup/table/Text/__tests__/Text.spec.js +1 -1
- package/es/setup/table/index.js +5 -5
- package/es/svg/PlusIcon.js +2 -2
- package/es/svg/SnippetIcon.js +2 -2
- package/es/svg/TemplateIcon.js +2 -2
- package/es/svg/__tests__/PlusIcon.spec.js +1 -1
- package/es/svg/__tests__/SnippetIcon.spec.js +1 -1
- package/es/svg/__tests__/TemplateIcon.spec.js +1 -1
- package/es/svg/index.js +3 -3
- package/es/v1/ActionButton/ActionButton.js +3 -3
- package/es/v1/AlphabeticList/AlphabeticList.js +3 -3
- package/es/v1/Attachment/Attachment.js +4 -4
- package/es/v1/AttachmentViewer/AttachmentImage.js +5 -5
- package/es/v1/AttachmentViewer/AttachmentViewer.js +11 -11
- package/es/v1/ChannelIcon/ChannelIcon.js +5 -5
- package/es/v1/Drawer/Drawer.js +6 -6
- package/es/v1/ExternalLink/ExternalLink.js +3 -3
- package/es/v1/FlipCard/FlipCard.js +7 -7
- package/es/v1/FormAction/FormAction.js +3 -3
- package/es/v1/FreezeLayer/FreezeLayer.js +5 -5
- package/es/v1/GlobalNotification/GlobalNotification.js +6 -6
- package/es/v1/IconButton/IconButton.js +3 -3
- package/es/v1/Image/Image.js +3 -3
- package/es/v1/ImportantNotes/ImportantNotes.js +3 -3
- package/es/v1/Link/Link.js +4 -4
- package/es/v1/Loader/Loader.js +1 -1
- package/es/v1/Message/Message.js +4 -4
- package/es/v1/Message/props/propTypes.js +1 -1
- package/es/v1/MessageBanner/MessageBanner.js +4 -4
- package/es/v1/NewStar/NewStar.js +3 -3
- package/es/v1/PlusIcon/PlusIcon.js +4 -4
- package/es/v1/Separator/Separator.js +3 -3
- package/es/v1/TagWithIcon/TagWithIcon.js +3 -3
- package/es/v1/ToastMessage/ToastMessage.js +4 -4
- package/es/v1/Upload/Upload.js +4 -4
- package/es/v1/actions/AutoClose.js +2 -2
- package/es/v1/alert/AlertClose/AlertClose.js +2 -2
- package/es/v1/alert/AlertHeader/AlertHeader.js +7 -7
- package/es/v1/alert/AlertLookup/AlertLookup.js +7 -7
- package/es/v1/alert/alertIcons/AlarmAlertIcon.js +3 -3
- package/es/v1/alert/alertIcons/AlertIcons.js +9 -9
- package/es/v1/alert/alertIcons/DangerAlertIcon.js +3 -3
- package/es/v1/alert/alertIcons/ErrorAlertIcon.js +3 -3
- package/es/v1/alert/alertIcons/InfoAlertIcon.js +3 -3
- package/es/v1/alert/alertIcons/NotificationAlertIcon.js +3 -3
- package/es/v1/alert/alertIcons/SuccessAlertIcon.js +3 -3
- package/es/v1/alert/alertIcons/WarningAlertIcon.js +3 -3
- package/es/v1/alert/alertIcons/index.js +8 -8
- package/es/v1/alert/index.js +2 -2
- package/es/v1/avatar/AvatarClose/AvatarClose.js +3 -3
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +3 -3
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +3 -3
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +3 -3
- package/es/v1/avatar/AvatarThread/AvatarThread.js +3 -3
- package/es/v1/avatar/AvatarUser/AvatarUser.js +4 -4
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +3 -3
- package/es/v1/avatar/index.js +7 -7
- package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +4 -4
- package/es/v1/emptystate/CommonEmptyState/CommonEmptyState.js +4 -4
- package/es/v1/emptystate/EditionPage/EditionPage.js +3 -3
- package/es/v1/errorstate/Inconvenience/Inconvenience.js +4 -4
- package/es/v1/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +4 -4
- package/es/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +4 -4
- package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +4 -4
- package/es/v1/errorstate/UrlNotFound/UrlNotFound.js +4 -4
- package/es/v1/errorstate/WillBeRightBack/WillBeRightBack.js +4 -4
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +5 -5
- package/es/v1/form/fields/CheckBoxField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/CheckBoxField/props/propTypes.js +1 -1
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +5 -5
- package/es/v1/form/fields/CurrencyField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/CurrencyField/props/propTypes.js +1 -1
- package/es/v1/form/fields/DateField/DateField.js +5 -5
- package/es/v1/form/fields/DateField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/DateField/props/propTypes.js +1 -1
- package/es/v1/form/fields/FieldContainer/FieldContainer.js +3 -3
- package/es/v1/form/fields/FieldContainer/props/defaultProps.js +1 -1
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +5 -5
- package/es/v1/form/fields/MultiSelectField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/MultiSelectField/props/propTypes.js +1 -1
- package/es/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/es/v1/form/fields/RadioField/RadioField.js +5 -5
- package/es/v1/form/fields/SelectField/SelectField.js +5 -5
- package/es/v1/form/fields/SelectField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/SelectField/props/propTypes.js +1 -1
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -5
- package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -7
- package/es/v1/form/fields/TagsMultiSelectField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/TagsMultiSelectField/props/propTypes.js +1 -1
- package/es/v1/form/fields/TextBoxField/TextBoxField.js +5 -5
- package/es/v1/form/fields/TextBoxField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/TextBoxField/props/propTypes.js +1 -1
- package/es/v1/form/fields/TextEditor/TextEditor.js +4 -4
- package/es/v1/form/fields/TextEditorField/TextEditorField.js +6 -6
- package/es/v1/form/fields/TextEditorField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/TextEditorField/props/propTypes.js +1 -1
- package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +5 -5
- package/es/v1/form/fields/TextareaField/TextareaField.js +5 -5
- package/es/v1/form/fields/TextareaField/props/defaultProps.js +1 -1
- package/es/v1/form/fields/TextareaField/props/propTypes.js +1 -1
- package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +3 -3
- package/es/v1/form/fields/index.js +16 -16
- package/es/v1/form/layout/Field/Field.js +3 -3
- package/es/v1/form/layout/Section/Section.js +2 -2
- package/es/v1/form/layout/index.js +2 -2
- package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +3 -3
- package/es/v1/layout/SetupDetailLayout/index.js +4 -4
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +4 -4
- package/es/v1/layout/SubtabLayout/index.js +4 -4
- package/es/v1/list/AvatarFlip/AvatarFlip.js +4 -4
- package/es/v1/list/BluePrintStatus/BluePrintStatus.js +2 -2
- package/es/v1/list/Comment/Comment.js +3 -3
- package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +5 -5
- package/es/v1/list/Dot/Dot.js +3 -3
- package/es/v1/list/DotNew/DotNew.js +3 -3
- package/es/v1/list/GridStencils/GridStencils.js +2 -2
- package/es/v1/list/Icons/AddNewIcon.js +2 -2
- package/es/v1/list/Icons/CompleteIcon.js +2 -2
- package/es/v1/list/Icons/DeleteIcon.js +2 -2
- package/es/v1/list/Icons/EditIcon.js +2 -2
- package/es/v1/list/Icons/FloatingIcons.js +3 -3
- package/es/v1/list/Icons/ReadUnreadIcon.js +3 -3
- package/es/v1/list/Icons/SmartIcon.js +2 -2
- package/es/v1/list/Icons/index.js +7 -7
- package/es/v1/list/ListLayout/ListLayout.js +3 -3
- package/es/v1/list/ListStencils/ListStencils.js +3 -3
- package/es/v1/list/SecondaryText/AccountName.js +4 -4
- package/es/v1/list/SecondaryText/ContactName.js +5 -5
- package/es/v1/list/SecondaryText/DepartmentText.js +2 -2
- package/es/v1/list/SecondaryText/Email.js +4 -4
- package/es/v1/list/SecondaryText/HappinessRating.js +2 -2
- package/es/v1/list/SecondaryText/PhoneNumber.js +4 -4
- package/es/v1/list/SecondaryText/PriorityText.js +3 -3
- package/es/v1/list/SecondaryText/SecondaryText.js +3 -3
- package/es/v1/list/SecondaryText/StatusText.js +3 -3
- package/es/v1/list/SecondaryText/TicketId.js +4 -4
- package/es/v1/list/SecondaryText/Website.js +4 -4
- package/es/v1/list/SecondaryText/index.js +11 -11
- package/es/v1/list/SecondryPanel/SecondryPanel.js +4 -4
- package/es/v1/list/SentimentStatus/SentimentStatus.js +2 -2
- package/es/v1/list/Subject/Subject.js +4 -4
- package/es/v1/list/TagNew/TagNew.js +3 -3
- package/es/v1/list/Thread/Thread.js +3 -3
- package/es/v1/list/index.js +16 -16
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +5 -5
- package/es/v1/list/status/StatusListItem/StatusListItem.js +3 -3
- package/es/v1/list/status/index.js +2 -2
- package/es/v1/lookup/EmptyPage/EmptyPage.js +3 -3
- package/es/v1/lookup/Lookup/Lookup.js +4 -4
- package/es/v1/lookup/Section/Section.js +2 -2
- package/es/v1/lookup/header/Close/Close.js +3 -3
- package/es/v1/lookup/header/ModuleHeader/ModuleHeader.js +8 -8
- package/es/v1/lookup/header/Search/Search.js +4 -4
- package/es/v1/lookup/header/TicketHeader/TicketHeader.js +10 -10
- package/es/v1/lookup/header/Title/Title.js +3 -3
- package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +3 -3
- package/es/v1/lookup/header/index.js +5 -5
- package/es/v1/notification/DesktopNotification/DesktopNotification.js +6 -6
- package/es/v1/notification/DesktopNotification/props/defaultProps.js +1 -1
- package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +5 -5
- package/es/v1/notification/DesktopNotificationHeader/props/defaultProps.js +1 -1
- package/es/v1/setup/header/Button/Button.js +3 -3
- package/es/v1/setup/header/Link/Link.js +4 -4
- package/es/v1/setup/header/Search/Search.js +3 -3
- package/es/v1/setup/header/Views/Views.js +3 -3
- package/es/v1/setup/header/index.js +4 -4
- package/es/v1/setup/helptips/Description/Description.js +2 -2
- package/es/v1/setup/helptips/Link/Link.js +3 -3
- package/es/v1/setup/helptips/ListGroup/ListGroup.js +2 -2
- package/es/v1/setup/helptips/Title/Title.js +2 -2
- package/es/v1/setup/helptips/index.js +4 -4
- package/es/v1/setup/index.js +3 -3
- package/es/v1/setup/table/Table/Table.js +2 -2
- package/es/v1/setup/table/TableBody/TableBody.js +2 -2
- package/es/v1/setup/table/TableData/TableData.js +3 -3
- package/es/v1/setup/table/TableHead/TableHead.js +3 -3
- package/es/v1/setup/table/TableRow/TableRow.js +3 -3
- package/es/v1/setup/table/Text/Text.js +4 -4
- package/es/v1/setup/table/index.js +5 -5
- package/es/v1/svg/PlusIcon.js +2 -2
- package/es/v1/svg/SnippetIcon.js +2 -2
- package/es/v1/svg/TemplateIcon.js +2 -2
- package/es/v1/svg/index.js +3 -3
- package/es/version2/AlertClose/AlertClose.js +2 -2
- package/es/version2/AlertClose/__tests__/AlertClose.spec.js +1 -1
- package/es/version2/GlobalNotification/GlobalNotification.js +6 -6
- package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +1 -1
- package/es/version2/alertIcons/AlarmAlertIcon.js +3 -3
- package/es/version2/alertIcons/AlertIcons.js +9 -9
- package/es/version2/alertIcons/DangerAlertIcon.js +3 -3
- package/es/version2/alertIcons/ErrorAlertIcon.js +3 -3
- package/es/version2/alertIcons/InfoAlertIcon.js +3 -3
- package/es/version2/alertIcons/NotificationAlertIcon.js +3 -3
- package/es/version2/alertIcons/SuccessAlertIcon.js +3 -3
- package/es/version2/alertIcons/WarningAlertIcon.js +3 -3
- package/es/version2/alertIcons/__tests__/AlarmAlertIcon.spec.js +1 -1
- package/es/version2/alertIcons/__tests__/AlertIcons.spec.js +1 -1
- package/es/version2/alertIcons/__tests__/DangerAlertIcon.spec.js +1 -1
- package/es/version2/alertIcons/__tests__/ErrorAlertIcon.spec.js +1 -1
- package/es/version2/alertIcons/__tests__/InfoAlertIcon.spec.js +1 -1
- package/es/version2/alertIcons/__tests__/NotificationAlertIcon.spec.js +1 -1
- package/es/version2/alertIcons/__tests__/SuccessAlertIcon.spec.js +1 -1
- package/es/version2/alertIcons/__tests__/WarningAlertIcon.spec.js +1 -1
- package/es/version2/alertIcons/index.js +8 -8
- package/es/version2/errorstate/Inconvenience/Inconvenience.js +4 -4
- package/es/version2/errorstate/Inconvenience/__tests__/Inconvenience.spec.js +1 -1
- package/es/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +4 -4
- package/es/version2/errorstate/OopsSomethingMiss/__tests__/OopsSomethingMiss.spec.js +1 -1
- package/es/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +4 -4
- package/es/version2/errorstate/UnableToProcessRequest/__tests__/UnableToProcessRequest.spec.js +1 -1
- package/es/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +4 -4
- package/es/version2/errorstate/UnauthorizedLogin/__tests__/UnauthorizedLogin.spec.js +1 -1
- package/es/version2/errorstate/UrlNotFound/UrlNotFound.js +4 -4
- package/es/version2/errorstate/UrlNotFound/__tests__/UrlNotFound.spec.js +1 -1
- package/es/version2/errorstate/WillBeRightBack/WillBeRightBack.js +4 -4
- package/es/version2/errorstate/WillBeRightBack/__tests__/WillBeRightBack.spec.js +1 -1
- package/es/version2/errorstate/index.js +6 -6
- package/es/version2/index.js +8 -8
- package/es/version2/lookup/AlertHeader/AlertHeader.js +7 -7
- package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +1 -1
- package/es/version2/lookup/AlertLookup/AlertLookup.js +7 -7
- package/es/version2/lookup/AlertLookup/__tests__/AlertLookup.spec.js +1 -1
- package/es/version2/lookup/index.js +2 -2
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +6 -6
- package/es/version2/notification/DesktopNotification/__tests__/DesktopNotification.spec.js +1 -1
- package/es/version2/notification/DesktopNotification/props/defaultProps.js +1 -1
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +5 -5
- package/es/version2/notification/DesktopNotificationHeader/__tests__/DesktopNotificationHeader.spec.js +1 -1
- package/es/version2/notification/DesktopNotificationHeader/props/defaultProps.js +1 -1
- package/es/version2/notification/index.js +3 -3
- package/lib/Attachment/Attachment.module.css +7 -3
- package/lib/AttachmentViewer/Attachment.js +78 -1
- package/lib/AttachmentViewer/AttachmentViewer.js +262 -16
- package/lib/AttachmentViewer/AttachmentViewer.module.css +125 -5
- package/lib/AttachmentViewer/utils.js +24 -0
- package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +3 -3
- package/lib/DotProvider/utils/themeColorAssetsConfig.js +45 -45
- package/lib/common/dot_common.module.css +37 -2
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +116 -116
- package/lib/form/fields/TextEditor/TextEditor.js +2 -7
- package/package.json +2 -2
- package/result.json +1 -1
- package/unittest/index.html +2 -2
- /package/images/{audio_thumbnail.png → audio_thumbnail_old.png} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { defaultProps } from
|
|
3
|
-
import { propTypes } from
|
|
2
|
+
import { defaultProps } from "./props/defaultProps";
|
|
3
|
+
import { propTypes } from "./props/propTypes";
|
|
4
4
|
import Popup from '@zohodesk/components/lib/Popup/Popup';
|
|
5
5
|
import { Icon } from '@zohodesk/icons';
|
|
6
6
|
import Button from '@zohodesk/components/lib/Button/Button';
|
|
7
7
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
8
8
|
import ResponsiveDropBox from '@zohodesk/components/lib/ResponsiveDropBox/ResponsiveDropBox';
|
|
9
9
|
import CssProvider from '@zohodesk/components/lib/Provider/CssProvider';
|
|
10
|
-
import style from
|
|
10
|
+
import style from "./ActionButton.module.css";
|
|
11
11
|
import btnStyle from '@zohodesk/components/lib/semantic/Button/semanticButton.module.css';
|
|
12
12
|
export class ActionButton extends React.Component {
|
|
13
13
|
constructor(props) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*** Libraries ***/
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { AlphabeticList_defaultProps, AlphabeticListItem_defaultProps } from
|
|
4
|
-
import { AlphabeticList_propTypes, AlphabeticListItem_propTypes, AlphabeticCharacters, NumberList, AlphabeticCharactersWithHash } from
|
|
3
|
+
import { AlphabeticList_defaultProps, AlphabeticListItem_defaultProps } from "./props/defaultProps";
|
|
4
|
+
import { AlphabeticList_propTypes, AlphabeticListItem_propTypes, AlphabeticCharacters, NumberList, AlphabeticCharactersWithHash } from "./props/propTypes";
|
|
5
5
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
6
6
|
/*** CSS ***/
|
|
7
7
|
|
|
8
|
-
import style from
|
|
8
|
+
import style from "./AlphabeticList.module.css";
|
|
9
9
|
export default class AlphabeticList extends React.PureComponent {
|
|
10
10
|
constructor(props) {
|
|
11
11
|
super(props);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
|
-
import AlphabeticList from
|
|
3
|
+
import AlphabeticList from "../AlphabeticList";
|
|
4
4
|
describe('AlphabeticList', () => {
|
|
5
5
|
test('rendering the defult props', () => {
|
|
6
6
|
const {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { defaultProps } from
|
|
3
|
-
import { propTypes } from
|
|
2
|
+
import { defaultProps } from "./props/defaultProps";
|
|
3
|
+
import { propTypes } from "./props/propTypes";
|
|
4
4
|
import { Icon } from '@zohodesk/icons';
|
|
5
5
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
6
|
-
import Link from
|
|
7
|
-
import style from
|
|
6
|
+
import Link from "../Link/Link";
|
|
7
|
+
import style from "./Attachment.module.css";
|
|
8
8
|
export default class Attachment extends React.Component {
|
|
9
9
|
render() {
|
|
10
10
|
let {
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
height: 100% ;
|
|
15
15
|
width: 100% ;
|
|
16
16
|
position: absolute;
|
|
17
|
-
top:0
|
|
17
|
+
top: 0
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
[dir=ltr] .disableLayer {
|
|
21
|
-
left:0
|
|
21
|
+
left: 0
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
[dir=rtl] .disableLayer {
|
|
25
|
-
right:0
|
|
25
|
+
right: 0
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.attachmentHover {
|
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
height: var(--zd_size40) ;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
.attachleft {
|
|
70
|
+
padding: var(--zd_size3) ;
|
|
71
|
+
}
|
|
72
|
+
|
|
69
73
|
[dir=ltr] .attachleft {
|
|
70
74
|
border-right: 1px solid var(--zdt_attachment_default_border);
|
|
71
75
|
}
|
|
@@ -2,8 +2,56 @@ const UNASSIGNED = 'Unassigned';
|
|
|
2
2
|
const BROWSER_SUPPORTED_FILES = ['pdf', 'text', 'txt', 'css', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'ico', 'sh', 'mp3', 'wav', 'ogg'];
|
|
3
3
|
export function isAudioFile(fileName) {
|
|
4
4
|
const extension = getExtensionFromFileName(fileName);
|
|
5
|
-
return /mp3|wav|ogg/i.test(extension);
|
|
5
|
+
return /mp3|wav|ogg|oga|m4a|weba|opus|m4b|webma|aac/i.test(extension);
|
|
6
6
|
}
|
|
7
|
+
export function isVideoFile(fileName) {
|
|
8
|
+
const extension = getExtensionFromFileName(fileName);
|
|
9
|
+
return /mp4|webm|ogg/i.test(extension);
|
|
10
|
+
}
|
|
11
|
+
export function isPdfFile(fileName) {
|
|
12
|
+
const extension = getExtensionFromFileName(fileName);
|
|
13
|
+
return /pdf/i.test(extension);
|
|
14
|
+
}
|
|
15
|
+
export function isDocsFile(fileName) {
|
|
16
|
+
const extension = getExtensionFromFileName(fileName);
|
|
17
|
+
return /docx|doc|docm|rtf|odt|dot|dotm|dotx|pages/i.test(extension);
|
|
18
|
+
}
|
|
19
|
+
export function isSheetFile(fileName) {
|
|
20
|
+
const extension = getExtensionFromFileName(fileName);
|
|
21
|
+
return /xlsx|numbers/i.test(extension);
|
|
22
|
+
}
|
|
23
|
+
export function isShowFile(fileName) {
|
|
24
|
+
const extension = getExtensionFromFileName(fileName);
|
|
25
|
+
return /pptx|ppt|pps|ppsx|key/i.test(extension);
|
|
26
|
+
}
|
|
27
|
+
export function isEmailFile(fileName) {
|
|
28
|
+
const extension = getExtensionFromFileName(fileName);
|
|
29
|
+
return /eml|msg/i.test(extension);
|
|
30
|
+
}
|
|
31
|
+
export function isImageFile(fileName) {
|
|
32
|
+
const extension = getExtensionFromFileName(fileName);
|
|
33
|
+
return /jpeg|jpg|png|gif|bmp|tiff|tif|ico/i.test(extension);
|
|
34
|
+
} // export function docsFileTypes(fileName){
|
|
35
|
+
// const extension = getExtensionFromFileName(fileName);
|
|
36
|
+
// return /docx|doc|docm|rtf|odt|dot|dotm|dotx|sxw|odt|ott|txt|pages/i.test(extension);
|
|
37
|
+
// }
|
|
38
|
+
// export function sheetFileTypes(fileName){
|
|
39
|
+
// const extension = getExtensionFromFileName(fileName);
|
|
40
|
+
// return /xls|xlsx|sxc|ods|csv|tsv|ots|xlsm|xlsb|xlt|xltx|xltm|numbers/i.test(extension);
|
|
41
|
+
// }
|
|
42
|
+
// export function showFileTypes(fileName){
|
|
43
|
+
// const extension = getExtensionFromFileName(fileName);
|
|
44
|
+
// return /pptx|ppt|pps|ppsx|odp|sxi|key|pot|potx/i.test(extension);
|
|
45
|
+
// }
|
|
46
|
+
// export function designFileTypes(fileName) {
|
|
47
|
+
// const extension = getExtensionFromFileName(fileName);
|
|
48
|
+
// return /sketch|xd|psd|ai|fig|svg/i.test(extension);
|
|
49
|
+
// }
|
|
50
|
+
// export function zipFileType(fileName) {
|
|
51
|
+
// const extension = getExtensionFromFileName(fileName);
|
|
52
|
+
// return /zip/i.test(extension);
|
|
53
|
+
// }
|
|
54
|
+
|
|
7
55
|
export function getExtensionFromFileName(fileName) {
|
|
8
56
|
if (fileName && fileName.indexOf(".") !== -1) {
|
|
9
57
|
return fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length).toLowerCase();
|
|
@@ -14,4 +62,15 @@ export function getExtensionFromFileName(fileName) {
|
|
|
14
62
|
export function isBrowserSupportedFile(fileName) {
|
|
15
63
|
const extension = getExtensionFromFileName(fileName);
|
|
16
64
|
return BROWSER_SUPPORTED_FILES.indexOf(extension) !== -1;
|
|
65
|
+
}
|
|
66
|
+
export function openInNewTabWithNoopener(url) {
|
|
67
|
+
let targetnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_blank';
|
|
68
|
+
const aTag = document.createElement('a');
|
|
69
|
+
aTag.rel = 'noopener noreferrer';
|
|
70
|
+
aTag.target = targetnName;
|
|
71
|
+
aTag.href = url;
|
|
72
|
+
aTag.click();
|
|
73
|
+
}
|
|
74
|
+
export function openNewTab(href) {
|
|
75
|
+
openInNewTabWithNoopener(href);
|
|
17
76
|
}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
/** * Libraries ** */
|
|
4
4
|
import React, { Component } from 'react';
|
|
5
5
|
import { Container } from '@zohodesk/components/es/Layout';
|
|
6
|
-
import { AttachmentImage_defaultProps } from
|
|
7
|
-
import { AttachmentImage_propTypes } from
|
|
8
|
-
import { checkImageValidity } from
|
|
9
|
-
import Image from
|
|
6
|
+
import { AttachmentImage_defaultProps } from "./props/defaultProps";
|
|
7
|
+
import { AttachmentImage_propTypes } from "./props/propTypes";
|
|
8
|
+
import { checkImageValidity } from "./utils";
|
|
9
|
+
import Image from "../Image/Image";
|
|
10
10
|
/** * CSS ** */
|
|
11
11
|
|
|
12
|
-
import style from
|
|
12
|
+
import style from "./AttachmentViewer.module.css";
|
|
13
13
|
export default class AttachmentImage extends Component {
|
|
14
14
|
constructor(props) {
|
|
15
15
|
super(props);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { AttachmentViewer_defaultProps } from
|
|
3
|
-
import { AttachmentViewer_propTypes } from
|
|
2
|
+
import { AttachmentViewer_defaultProps } from "./props/defaultProps";
|
|
3
|
+
import { AttachmentViewer_propTypes } from "./props/propTypes";
|
|
4
4
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
5
5
|
import { Icon } from '@zohodesk/icons';
|
|
6
6
|
import Avatar from '@zohodesk/components/lib/Avatar/Avatar';
|
|
7
7
|
import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
|
|
8
8
|
import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
|
|
9
|
-
import AttachmentImage from
|
|
10
|
-
import Link from
|
|
11
|
-
import IconButton from
|
|
12
|
-
import FreezeLayer from
|
|
13
|
-
import { isAudioFile, getExtensionFromFileName } from
|
|
14
|
-
import { shallowDiff } from
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
|
|
9
|
+
import AttachmentImage from "./AttachmentImage";
|
|
10
|
+
import Link from "../Link/Link";
|
|
11
|
+
import IconButton from "../IconButton/IconButton";
|
|
12
|
+
import FreezeLayer from "../FreezeLayer/FreezeLayer";
|
|
13
|
+
import { isAudioFile, getExtensionFromFileName, isVideoFile, isPdfFile, isDocsFile, isSheetFile, isShowFile, isEmailFile, isImageFile, openNewTab } from "./Attachment";
|
|
14
|
+
import { shallowDiff } from "../utils/General";
|
|
15
|
+
import { checkFileSourcesValidation, getBrowserWithVersion } from "./utils";
|
|
16
|
+
import style from "./AttachmentViewer.module.css"; // import audioThumbNail from '../../images/audio_thumbnail.png'
|
|
17
|
+
|
|
18
18
|
export default class AttachmentViewer extends Component {
|
|
19
19
|
constructor(props) {
|
|
20
20
|
super(props);
|
|
@@ -42,6 +42,7 @@ export default class AttachmentViewer extends Component {
|
|
|
42
42
|
this.getNextId = getUniqueId(this);
|
|
43
43
|
this.getUpdateDataList = this.getUpdateDataList.bind(this);
|
|
44
44
|
this.zoomMaintain = this.zoomMaintain.bind(this);
|
|
45
|
+
this.getAttachmentIconDetails = this.getAttachmentIconDetails.bind(this);
|
|
45
46
|
this.handleMenuValidation = this.handleMenuValidation.bind(this);
|
|
46
47
|
}
|
|
47
48
|
|
|
@@ -107,6 +108,183 @@ export default class AttachmentViewer extends Component {
|
|
|
107
108
|
});
|
|
108
109
|
}
|
|
109
110
|
|
|
111
|
+
getAttachmentIconDetails(fileName, size) {
|
|
112
|
+
const extension = getExtensionFromFileName(fileName);
|
|
113
|
+
const browserName = getBrowserWithVersion().toLowerCase() || '';
|
|
114
|
+
const OSName = navigator.platform.toLowerCase() || '';
|
|
115
|
+
|
|
116
|
+
switch (extension) {
|
|
117
|
+
case 'jpeg':
|
|
118
|
+
case 'jpg':
|
|
119
|
+
case 'png':
|
|
120
|
+
case 'apng':
|
|
121
|
+
case 'gif':
|
|
122
|
+
case 'bmp':
|
|
123
|
+
case 'tiff':
|
|
124
|
+
case 'tif':
|
|
125
|
+
case 'ico':
|
|
126
|
+
case 'webp':
|
|
127
|
+
return {
|
|
128
|
+
iconName: 'ZD-EF-fileImage',
|
|
129
|
+
iconSize: size || '30'
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
case 'txt':
|
|
133
|
+
return {
|
|
134
|
+
iconName: 'ZD-GN-fileDoc',
|
|
135
|
+
iconSize: size || '30'
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
case 'pdf':
|
|
139
|
+
return {
|
|
140
|
+
iconName: 'ZD-EF-filePdf',
|
|
141
|
+
iconSize: size || '30'
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
case 'html':
|
|
145
|
+
case 'htm':
|
|
146
|
+
case 'xhtml':
|
|
147
|
+
if (browserName.indexOf('chrome') !== -1 || browserName.indexOf('safari') !== -1) {
|
|
148
|
+
return {
|
|
149
|
+
iconName: 'ZD-EF-fileXml',
|
|
150
|
+
iconSize: size || '30'
|
|
151
|
+
};
|
|
152
|
+
} else if (browserName.indexOf('ie') !== -1 || browserName.indexOf('edge') !== -1) {
|
|
153
|
+
return {
|
|
154
|
+
iconName: 'ZD-EF-explorer',
|
|
155
|
+
iconSize: size || '30'
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
iconName: 'ZD-EF-firebox',
|
|
161
|
+
iconSize: size || '30'
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
case 'ppt':
|
|
165
|
+
case 'pps':
|
|
166
|
+
case 'odp':
|
|
167
|
+
case 'sxi':
|
|
168
|
+
case 'pptx':
|
|
169
|
+
case 'ppsx':
|
|
170
|
+
case 'key':
|
|
171
|
+
return {
|
|
172
|
+
iconName: 'ZD-GN-filePpt',
|
|
173
|
+
iconSize: size || '40'
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
case 'rar':
|
|
177
|
+
case 'jar':
|
|
178
|
+
case 'zip':
|
|
179
|
+
return {
|
|
180
|
+
iconName: 'ZD-EF-fileZip',
|
|
181
|
+
iconSize: size || '30'
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
case 'doc':
|
|
185
|
+
case 'docx':
|
|
186
|
+
case 'sxw':
|
|
187
|
+
case 'odt':
|
|
188
|
+
case 'docm':
|
|
189
|
+
case 'dot':
|
|
190
|
+
case 'dotm':
|
|
191
|
+
case 'dotx':
|
|
192
|
+
case 'rtf':
|
|
193
|
+
case 'pages':
|
|
194
|
+
if (OSName.indexOf('mac') !== -1 || OSName.indexOf('linux') !== -1) {
|
|
195
|
+
return {
|
|
196
|
+
iconName: 'ZD-EF-fileOffice',
|
|
197
|
+
iconSize: size || '30'
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return {
|
|
202
|
+
iconName: 'ZD-EF-fileWord',
|
|
203
|
+
iconSize: size || '30'
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
case 'xml':
|
|
207
|
+
return {
|
|
208
|
+
iconName: 'ZD-EF-fileXml',
|
|
209
|
+
iconSize: size || '30'
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
case 'xls':
|
|
213
|
+
case 'xlsx':
|
|
214
|
+
case 'sxc':
|
|
215
|
+
case 'ods':
|
|
216
|
+
case 'csv':
|
|
217
|
+
case 'tsv':
|
|
218
|
+
case 'numbers':
|
|
219
|
+
return {
|
|
220
|
+
iconName: 'ZD-GN-fileSheet',
|
|
221
|
+
iconSize: size || '30'
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
case 'ics':
|
|
225
|
+
return {
|
|
226
|
+
iconName: 'ZD-TK-event',
|
|
227
|
+
iconSize: size || '30'
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
case 'exe':
|
|
231
|
+
return {
|
|
232
|
+
iconName: 'ZD-EF-exe',
|
|
233
|
+
iconSize: size || '30'
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
case 'sh':
|
|
237
|
+
case 'bin':
|
|
238
|
+
return {
|
|
239
|
+
iconName: 'ZD-EF-linux',
|
|
240
|
+
iconSize: size || '30'
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
case 'css':
|
|
244
|
+
return {
|
|
245
|
+
iconName: 'ZD-EF-clrCss',
|
|
246
|
+
iconSize: size || '30'
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
case 'mp3':
|
|
250
|
+
case 'wav':
|
|
251
|
+
case 'wma':
|
|
252
|
+
case 'aac':
|
|
253
|
+
case 'm4r':
|
|
254
|
+
case 'ogg':
|
|
255
|
+
return {
|
|
256
|
+
iconName: 'ZD-EF-fileMp3',
|
|
257
|
+
iconSize: size || '30'
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
case 'mp4':
|
|
261
|
+
case 'mkv':
|
|
262
|
+
case 'mov':
|
|
263
|
+
case 'mpeg':
|
|
264
|
+
case 'flv':
|
|
265
|
+
case 'avi':
|
|
266
|
+
case 'webm':
|
|
267
|
+
case 'oga':
|
|
268
|
+
return {
|
|
269
|
+
iconName: 'ZD-EF-fileMp4',
|
|
270
|
+
iconSize: size || '30'
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
case 'eml':
|
|
274
|
+
case 'msg':
|
|
275
|
+
return {
|
|
276
|
+
iconName: 'ZD-GN-fileMail',
|
|
277
|
+
iconSize: size || '40'
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
default:
|
|
281
|
+
return {
|
|
282
|
+
iconName: 'ZD-GN-fileUnknown',
|
|
283
|
+
iconSize: size || '40'
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
110
288
|
togglePViewList() {
|
|
111
289
|
this.setState(prevState => ({
|
|
112
290
|
isPViewListOpen: !prevState.isPViewListOpen
|
|
@@ -310,6 +488,35 @@ export default class AttachmentViewer extends Component {
|
|
|
310
488
|
customChildrenClass = ''
|
|
311
489
|
} = customClass;
|
|
312
490
|
const retainZoom = canZoom && selectedIndex == i && maintainZoom;
|
|
491
|
+
const {
|
|
492
|
+
previewurl
|
|
493
|
+
} = data;
|
|
494
|
+
const getFrameOrigin = new URL(window.location.href).origin;
|
|
495
|
+
const frameOrigin = `&frameorigin=${getFrameOrigin}`;
|
|
496
|
+
const iframeSrc = `${previewurl}${frameOrigin}`;
|
|
497
|
+
|
|
498
|
+
const PreviewFileIcon = _ref3 => {
|
|
499
|
+
let {
|
|
500
|
+
data
|
|
501
|
+
} = _ref3;
|
|
502
|
+
const fileUnknown = {
|
|
503
|
+
iconName: 'ZD-GN-fileUnknown',
|
|
504
|
+
iconSize: '50'
|
|
505
|
+
}; // console.log("....data PreviewFileIcon",data)
|
|
506
|
+
|
|
507
|
+
const fileDetails = data ? _this.getAttachmentIconDetails(data, '50') : fileUnknown;
|
|
508
|
+
const {
|
|
509
|
+
iconName,
|
|
510
|
+
iconSize
|
|
511
|
+
} = fileDetails;
|
|
512
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
513
|
+
iconClass: style.prevIcon,
|
|
514
|
+
name: iconName,
|
|
515
|
+
size: iconSize
|
|
516
|
+
});
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
console.log("...previewUrl", previewurl, "...data", data);
|
|
313
520
|
return /*#__PURE__*/React.createElement(Container, {
|
|
314
521
|
className: style.imgBox,
|
|
315
522
|
id: `imgBox${i}`,
|
|
@@ -328,12 +535,25 @@ export default class AttachmentViewer extends Component {
|
|
|
328
535
|
"data-test-id": `${dataId}_videoPreview`,
|
|
329
536
|
...audioProps
|
|
330
537
|
}, /*#__PURE__*/React.createElement("source", {
|
|
331
|
-
src:
|
|
538
|
+
src: previewurl,
|
|
332
539
|
type: `audio/${getExtensionFromFileName(name)}`
|
|
333
|
-
})) : null : /*#__PURE__*/React.createElement(
|
|
540
|
+
})) : null : isVideoFile(data.name) ? selectedIndex == i ? /*#__PURE__*/React.createElement("video", {
|
|
541
|
+
autoPlay: true,
|
|
542
|
+
controls: true,
|
|
543
|
+
className: style.zoomIn
|
|
544
|
+
}, /*#__PURE__*/React.createElement("source", {
|
|
545
|
+
src: previewurl,
|
|
546
|
+
type: `video/${getExtensionFromFileName(data.name)}`
|
|
547
|
+
})) : null : isDocsFile(data.name) || isSheetFile(data.name) || isShowFile(data.name) ? selectedIndex == i ? (console.log("...previewurl", previewurl), /*#__PURE__*/React.createElement("iframe", {
|
|
548
|
+
src: iframeSrc,
|
|
549
|
+
className: style.previewFrame
|
|
550
|
+
})) : null : isPdfFile(data.name) || isEmailFile(data.name) ? selectedIndex == i ? /*#__PURE__*/React.createElement("iframe", {
|
|
551
|
+
src: iframeSrc,
|
|
552
|
+
className: style.previewFrame
|
|
553
|
+
}) : null : isImageFile(data.name) ? /*#__PURE__*/React.createElement(AttachmentImage, {
|
|
334
554
|
customClass: {
|
|
335
555
|
customImageClass: `${style.img} ${style.altText}
|
|
336
|
-
|
|
556
|
+
${canZoom || retainZoom ? isZoomed ? `${style.zoomedImg} ${style.zoomOutCursor}` : `${style.normalImg} ${style.zoomInCursor}` : ''} ${customImageClass}`,
|
|
337
557
|
customChildrenClass
|
|
338
558
|
},
|
|
339
559
|
src: viewUrl,
|
|
@@ -345,7 +565,18 @@ export default class AttachmentViewer extends Component {
|
|
|
345
565
|
id: `img${i}`,
|
|
346
566
|
isCover: false,
|
|
347
567
|
...imageProps
|
|
348
|
-
}, children)
|
|
568
|
+
}, children) : /*#__PURE__*/React.createElement("div", {
|
|
569
|
+
className: style.previewNone
|
|
570
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
571
|
+
className: style.fileTypeImg
|
|
572
|
+
}, /*#__PURE__*/React.createElement(PreviewFileIcon, {
|
|
573
|
+
data: data.name,
|
|
574
|
+
getAttachmentIconDetails: _this.getAttachmentIconDetails
|
|
575
|
+
})), "Preview not available for the selected file type.", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Link, {
|
|
576
|
+
href: data.href,
|
|
577
|
+
className: style.downloadLink,
|
|
578
|
+
onClick: () => openNewTab(data.href)
|
|
579
|
+
}, "Download"))));
|
|
349
580
|
});
|
|
350
581
|
}
|
|
351
582
|
|
|
@@ -388,10 +619,10 @@ export default class AttachmentViewer extends Component {
|
|
|
388
619
|
}, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
389
620
|
responsiveId: responsiveId,
|
|
390
621
|
query: this.responsiveFunc
|
|
391
|
-
},
|
|
622
|
+
}, _ref4 => {
|
|
392
623
|
let {
|
|
393
624
|
uptoTablet
|
|
394
|
-
} =
|
|
625
|
+
} = _ref4;
|
|
395
626
|
return /*#__PURE__*/React.createElement(Container, {
|
|
396
627
|
scroll: "none",
|
|
397
628
|
"data-scroll-palette": "dark"
|
|
@@ -580,17 +811,37 @@ export default class AttachmentViewer extends Component {
|
|
|
580
811
|
const {
|
|
581
812
|
customImageClass = '',
|
|
582
813
|
customChildrenClass = ''
|
|
583
|
-
} = customClass;
|
|
584
|
-
|
|
814
|
+
} = customClass; // thumbnail= isAudioFile(name) ? thumbnail || audioThumbNail : thumbnail //fallback thumbnail for audio
|
|
815
|
+
|
|
816
|
+
const PreviewFileIcon = _ref5 => {
|
|
817
|
+
let {
|
|
818
|
+
data
|
|
819
|
+
} = _ref5;
|
|
820
|
+
const fileUnknown = {
|
|
821
|
+
iconName: 'ZD-GN-fileUnknown',
|
|
822
|
+
iconSize: '40'
|
|
823
|
+
}; // console.log("....data PreviewFileIcon render",data)
|
|
824
|
+
|
|
825
|
+
const fileDetails = data ? this.getAttachmentIconDetails(data) : fileUnknown;
|
|
826
|
+
const {
|
|
827
|
+
iconName,
|
|
828
|
+
iconSize
|
|
829
|
+
} = fileDetails;
|
|
830
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
831
|
+
iconClass: style.prevFooterIcon,
|
|
832
|
+
name: iconName,
|
|
833
|
+
size: iconSize
|
|
834
|
+
});
|
|
835
|
+
};
|
|
585
836
|
|
|
586
837
|
return /*#__PURE__*/React.createElement(Box, {
|
|
587
|
-
className: `${style.imgItem} ${index === selectedIndex ? style.selected : ''}`,
|
|
838
|
+
className: `${style.imgItem} ${index === selectedIndex ? style.selected : ''} ${isImageFile(name) || thumbnail ? '' : style.previewIconDiv}`,
|
|
588
839
|
key: index,
|
|
589
840
|
onClick: this.changeSelectedIndex.bind(this, index),
|
|
590
841
|
eleRef: el => this[`img_${index}`] = el,
|
|
591
842
|
dataId: "attachPreviewList",
|
|
592
843
|
"data-title": name
|
|
593
|
-
}, /*#__PURE__*/React.createElement(AttachmentImage, {
|
|
844
|
+
}, isImageFile(name) || thumbnail ? /*#__PURE__*/React.createElement(AttachmentImage, {
|
|
594
845
|
src: thumbnail || viewUrl,
|
|
595
846
|
size: "small",
|
|
596
847
|
alt: name,
|
|
@@ -600,7 +851,10 @@ export default class AttachmentViewer extends Component {
|
|
|
600
851
|
},
|
|
601
852
|
dataId: dataId,
|
|
602
853
|
...customProps
|
|
603
|
-
}, children)
|
|
854
|
+
}, children) : /*#__PURE__*/React.createElement(PreviewFileIcon, {
|
|
855
|
+
data: name,
|
|
856
|
+
getAttachmentIconDetails: this.getAttachmentIconDetails
|
|
857
|
+
}));
|
|
604
858
|
}))))), totalLen !== 1 && /*#__PURE__*/React.createElement(IconButton, {
|
|
605
859
|
dataId: "attachToggle",
|
|
606
860
|
onClick: this.togglePViewList,
|