@zohodesk/dot 1.0.0-temp-195.2 → 1.0.0-temp-197.5
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 +11 -0
- 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/__tests__/Attachment.spec.js +1 -1
- package/es/AttachmentViewer/AttachmentImage.js +4 -4
- package/es/AttachmentViewer/AttachmentViewer.js +9 -9
- package/es/AttachmentViewer/__tests__/AttachmentImage.spec.js +1 -1
- package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +1 -1
- package/es/ChannelIcon/ChannelIcon.js +5 -5
- package/es/ChannelIcon/__tests__/ChannelIcon.spec.js +1 -1
- 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/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/__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 +64 -65
- package/es/form/fields/TextEditor/__tests__/TextEditor.spec.js +1 -1
- package/es/form/fields/TextEditor/props/defaultProps.js +3 -1
- package/es/form/fields/TextEditor/props/propTypes.js +9 -2
- 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/utils/editorUtils.js +6 -6
- 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 +4 -4
- package/es/v1/AttachmentViewer/AttachmentViewer.js +9 -9
- 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 +63 -65
- package/es/v1/form/fields/TextEditor/props/defaultProps.js +3 -1
- package/es/v1/form/fields/TextEditor/props/propTypes.js +9 -2
- 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/v1/utils/editorUtils.js +6 -6
- 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/form/fields/TextEditor/TextEditor.js +70 -71
- package/lib/form/fields/TextEditor/props/defaultProps.js +3 -1
- package/lib/form/fields/TextEditor/props/propTypes.js +9 -2
- package/lib/utils/editorUtils.js +6 -5
- package/lib/v1/form/fields/TextEditor/TextEditor.js +69 -71
- package/lib/v1/form/fields/TextEditor/props/defaultProps.js +3 -1
- package/lib/v1/form/fields/TextEditor/props/propTypes.js +9 -2
- package/lib/v1/utils/editorUtils.js +6 -5
- package/package.json +8 -8
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/***** Libraries *****/
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
|
-
import { defaultProps } from
|
|
4
|
-
import { propTypes } from
|
|
3
|
+
import { defaultProps } from './props/defaultProps';
|
|
4
|
+
import { propTypes } from './props/propTypes';
|
|
5
5
|
import selectn from 'selectn';
|
|
6
6
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
7
7
|
/***** Methods *****/
|
|
8
8
|
|
|
9
|
-
import { bind, editorContentValidate, fixEncoding, isFileNameSizeInvalid, isImageFormat, triggerKeyup, getRichEditorContent, changeContent, validateEditorContentOnInsertHtml, loadResource } from
|
|
9
|
+
import { bind, editorContentValidate, fixEncoding, isFileNameSizeInvalid, isImageFormat, triggerKeyup, getRichEditorContent, changeContent, validateEditorContentOnInsertHtml, loadResource } from '../../../utils/editorUtils'; //import './ZohoDeskEditor_Init';
|
|
10
10
|
|
|
11
11
|
/***** components *****/
|
|
12
12
|
|
|
13
|
-
import styles from
|
|
13
|
+
import styles from './TextEditor.module.css';
|
|
14
14
|
/* eslint-disable camelcase */
|
|
15
15
|
|
|
16
16
|
/* eslint-disable no-undef */
|
|
@@ -25,7 +25,8 @@ export default class TextEditor extends Component {
|
|
|
25
25
|
isResourceLoaded: false,
|
|
26
26
|
isEditorShow: false
|
|
27
27
|
};
|
|
28
|
-
let methods = ['editorCallback', 'handleUpload', 'handleChange', 'focusCallback', 'handleInlineUpload', 'handleDropUpload',
|
|
28
|
+
let methods = ['editorCallback', 'handleUpload', 'handleChange', 'focusCallback', 'handleInlineUpload', // 'handleDropUpload',
|
|
29
|
+
'blurCallback', 'handleGetContent', 'initializeEditor', 'clearEditorData', 'plainTextSwitchCallback', 'onWindowClick', 'toggleEditor'];
|
|
29
30
|
bind.apply(this, methods);
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -53,12 +54,13 @@ export default class TextEditor extends Component {
|
|
|
53
54
|
editorMode = '',
|
|
54
55
|
editorOptions = {},
|
|
55
56
|
needEditorFocus = true,
|
|
56
|
-
handleDropUpload,
|
|
57
|
+
// handleDropUpload,
|
|
57
58
|
fontFamily,
|
|
58
59
|
fontSize,
|
|
59
60
|
initCallback,
|
|
60
61
|
handleAlertMessage,
|
|
61
|
-
needInlineAttachment
|
|
62
|
+
needInlineAttachment,
|
|
63
|
+
customInitOption
|
|
62
64
|
} = this.props;
|
|
63
65
|
|
|
64
66
|
if (id && global.ZohoDeskEditor) {
|
|
@@ -67,7 +69,7 @@ export default class TextEditor extends Component {
|
|
|
67
69
|
content: fixEncoding(value),
|
|
68
70
|
callback: this.editorCallback,
|
|
69
71
|
imageuploadcallback: this.handleInlineUpload,
|
|
70
|
-
handleInlineDropImage: handleDropUpload ? this.handleDropUpload : undefined,
|
|
72
|
+
// handleInlineDropImage: handleDropUpload ? this.handleDropUpload : undefined,
|
|
71
73
|
contentChanged: this.handleChange,
|
|
72
74
|
focusCallback: this.focusCallback,
|
|
73
75
|
lineHeight: 'Normal',
|
|
@@ -90,13 +92,17 @@ export default class TextEditor extends Component {
|
|
|
90
92
|
htmlVersion: '<!Doctype html>'
|
|
91
93
|
};
|
|
92
94
|
|
|
93
|
-
if (!
|
|
94
|
-
|
|
95
|
+
if (!customInitOption) {
|
|
96
|
+
if (!ZohoDeskEditor_Init.init) {
|
|
97
|
+
global.editorInitialize && global.editorInitialize();
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
ZohoDeskEditor_Init.init(editorMode, fontFamily, initCallback, fontSize);
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
defaultObj = Object.assign(defaultObj, editorOptions);
|
|
98
|
-
|
|
99
|
-
|
|
104
|
+
const globalEditor = global.ZohoDeskEditor;
|
|
105
|
+
globalEditor && typeof globalEditor.create == 'function' && globalEditor.create(defaultObj, customInitOption);
|
|
100
106
|
}
|
|
101
107
|
}
|
|
102
108
|
|
|
@@ -121,7 +127,7 @@ export default class TextEditor extends Component {
|
|
|
121
127
|
getRef && getRef(null);
|
|
122
128
|
}
|
|
123
129
|
|
|
124
|
-
|
|
130
|
+
UNSAFE_componentWillReceiveProps(np) {
|
|
125
131
|
let {
|
|
126
132
|
changeEditorContent
|
|
127
133
|
} = this.props;
|
|
@@ -203,7 +209,8 @@ export default class TextEditor extends Component {
|
|
|
203
209
|
let {
|
|
204
210
|
editorCallback,
|
|
205
211
|
getRef,
|
|
206
|
-
isCustomScroll
|
|
212
|
+
isCustomScroll,
|
|
213
|
+
customCSS
|
|
207
214
|
} = this.props;
|
|
208
215
|
this.setState({
|
|
209
216
|
isEditorLoad: true,
|
|
@@ -218,18 +225,6 @@ export default class TextEditor extends Component {
|
|
|
218
225
|
global.editor[id] = editorObj;
|
|
219
226
|
}
|
|
220
227
|
|
|
221
|
-
const css = 'pre {white-space: pre-wrap}',
|
|
222
|
-
head = editorObj.doc.head || editorObj.doc.getElementsByTagName('head')[0],
|
|
223
|
-
style = document.createElement('style');
|
|
224
|
-
style.type = 'text/css';
|
|
225
|
-
|
|
226
|
-
if (style.styleSheet) {
|
|
227
|
-
style.styleSheet.cssText = css;
|
|
228
|
-
} else {
|
|
229
|
-
style.appendChild(editorObj.doc.createTextNode(css));
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
head.appendChild(style);
|
|
233
228
|
editorCallback && editorCallback(editorObj);
|
|
234
229
|
const iframe = selectn('iframe.contentDocument.body', editorObj) || null;
|
|
235
230
|
const iframeHead = selectn('iframe.contentDocument.head', editorObj) || null;
|
|
@@ -245,9 +240,12 @@ export default class TextEditor extends Component {
|
|
|
245
240
|
iframe.classList.add('scroll');
|
|
246
241
|
}
|
|
247
242
|
|
|
248
|
-
let
|
|
249
|
-
|
|
250
|
-
|
|
243
|
+
let customStyleTag = document.createElement('style');
|
|
244
|
+
customStyleTag.type = 'text/css';
|
|
245
|
+
const customizedCSS = `pre {white-space: pre-wrap} ${customCSS}`;
|
|
246
|
+
const fontCSS = `@font-face {font-family: 'ZohoPuviRegular';src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Regular.woff2') format('woff2');font-style: normal;font-weight: normal;text-rendering: optimizeLegibility;font-display: swap}@font-face {font-family: Regular;src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');font-weight: 400;font-style: normal;font-display: swap}@font-face {font-family: 'RobotoRegular';font-weight: 400;font-style: normal;font-display: swa;src: url('https://static.zohocdn.com/webfonts/robotoregular/font.woff2')}`;
|
|
247
|
+
customStyleTag.textContent = `${customizedCSS} ${fontCSS}`;
|
|
248
|
+
iframeHead.appendChild(customStyleTag);
|
|
251
249
|
}
|
|
252
250
|
}
|
|
253
251
|
|
|
@@ -255,13 +253,26 @@ export default class TextEditor extends Component {
|
|
|
255
253
|
let {
|
|
256
254
|
id,
|
|
257
255
|
setInlineAttachmentInProgress: progress,
|
|
258
|
-
i18nKeys
|
|
256
|
+
i18nKeys,
|
|
257
|
+
inlineImageProps
|
|
259
258
|
} = this.props;
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
const {
|
|
260
|
+
fileUploadError,
|
|
261
|
+
fileNotSupported,
|
|
262
|
+
fileSizeLimitExceed,
|
|
263
|
+
fileEmptyError,
|
|
264
|
+
fileNameLimitExceed
|
|
265
|
+
} = i18nKeys;
|
|
266
|
+
const {
|
|
267
|
+
allowedFileExtensions = ["jpeg", "jpg", "png", "gif", "bmp", "ico"],
|
|
268
|
+
fileNameMaxCharacters = 200,
|
|
269
|
+
fileSizeMaxBytes = 3 * 1024 * 1024
|
|
270
|
+
} = inlineImageProps;
|
|
271
|
+
|
|
272
|
+
if (!isFileNameSizeInvalid(file.name, fileNameMaxCharacters)) {
|
|
262
273
|
if (file.size != 0) {
|
|
263
|
-
if (file.size <=
|
|
264
|
-
if (isImageFormat(file.name)) {
|
|
274
|
+
if (file.size <= fileSizeMaxBytes) {
|
|
275
|
+
if (isImageFormat(file.name, allowedFileExtensions)) {
|
|
265
276
|
progress && progress(true);
|
|
266
277
|
this.handleUpload(file).then(res => {
|
|
267
278
|
successCallback(res);
|
|
@@ -271,37 +282,33 @@ export default class TextEditor extends Component {
|
|
|
271
282
|
triggerKeyup(editorObj.doc);
|
|
272
283
|
}
|
|
273
284
|
}, () => {
|
|
274
|
-
failureCallback(
|
|
285
|
+
failureCallback(fileUploadError);
|
|
275
286
|
});
|
|
276
287
|
} else {
|
|
277
|
-
failureCallback(
|
|
288
|
+
failureCallback(fileNotSupported);
|
|
278
289
|
}
|
|
279
290
|
} else {
|
|
280
|
-
failureCallback(
|
|
291
|
+
failureCallback(fileSizeLimitExceed);
|
|
281
292
|
}
|
|
282
293
|
} else {
|
|
283
|
-
failureCallback(
|
|
294
|
+
failureCallback(fileEmptyError);
|
|
284
295
|
}
|
|
285
296
|
} else {
|
|
286
|
-
failureCallback(
|
|
297
|
+
failureCallback(fileNameLimitExceed);
|
|
287
298
|
}
|
|
288
|
-
}
|
|
299
|
+
} // handleDropUpload(file, successCallback, failureCallback) {
|
|
300
|
+
// let e = { target: { files: [file] } };
|
|
301
|
+
// let { handleDropUpload } = this.props;
|
|
302
|
+
// handleDropUpload(e).then(
|
|
303
|
+
// (res) => {
|
|
304
|
+
// successCallback(res);
|
|
305
|
+
// },
|
|
306
|
+
// () => {
|
|
307
|
+
// failureCallback();
|
|
308
|
+
// }
|
|
309
|
+
// );
|
|
310
|
+
// }
|
|
289
311
|
|
|
290
|
-
handleDropUpload(file, successCallback, failureCallback) {
|
|
291
|
-
let e = {
|
|
292
|
-
target: {
|
|
293
|
-
files: [file]
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
let {
|
|
297
|
-
handleDropUpload
|
|
298
|
-
} = this.props;
|
|
299
|
-
handleDropUpload(e).then(res => {
|
|
300
|
-
successCallback(res);
|
|
301
|
-
}, () => {
|
|
302
|
-
failureCallback();
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
312
|
|
|
306
313
|
blurCallback() {
|
|
307
314
|
let {
|
|
@@ -327,15 +334,7 @@ export default class TextEditor extends Component {
|
|
|
327
334
|
formData.append(getCSRFCookieName(), getCSRFCookie());
|
|
328
335
|
}
|
|
329
336
|
|
|
330
|
-
return onUpload(formData, file)
|
|
331
|
-
if (editorMode === 'TicketReply') {
|
|
332
|
-
return `${res.data}&from=r`;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return res.data;
|
|
336
|
-
}, err => {
|
|
337
|
-
throw err;
|
|
338
|
-
});
|
|
337
|
+
return onUpload(formData, file);
|
|
339
338
|
} catch (err) {
|
|
340
339
|
return Promise.reject();
|
|
341
340
|
}
|
|
@@ -403,7 +402,7 @@ export default class TextEditor extends Component {
|
|
|
403
402
|
}), editorDoc && ImgLazyLoad ? /*#__PURE__*/React.createElement(ImgLazyLoad, {
|
|
404
403
|
node: editorDoc
|
|
405
404
|
}) : null, isReadOnly ? /*#__PURE__*/React.createElement("div", {
|
|
406
|
-
|
|
405
|
+
className: styles.readOnlyMask
|
|
407
406
|
}) : null);
|
|
408
407
|
}
|
|
409
408
|
|
|
@@ -21,7 +21,7 @@ export const propTypes = {
|
|
|
21
21
|
fileSizeLimitExceed: PropTypes.string
|
|
22
22
|
}),
|
|
23
23
|
id: PropTypes.string,
|
|
24
|
-
initCallback: PropTypes.func
|
|
24
|
+
initCallback: PropTypes.func,
|
|
25
25
|
isCustomScroll: PropTypes.bool,
|
|
26
26
|
loadingComponent: PropTypes.node,
|
|
27
27
|
mode: PropTypes.string,
|
|
@@ -42,5 +42,12 @@ export const propTypes = {
|
|
|
42
42
|
getCSRFCookie: PropTypes.string,
|
|
43
43
|
isEditorDefaultOpen: PropTypes.bool,
|
|
44
44
|
toggleEdit: PropTypes.func,
|
|
45
|
-
dataSelectorId: PropTypes.string
|
|
45
|
+
dataSelectorId: PropTypes.string,
|
|
46
|
+
customInitOption: PropTypes.object,
|
|
47
|
+
customCSS: PropTypes.string,
|
|
48
|
+
inlineImageProps: PropTypes.shape({
|
|
49
|
+
allowedFileExtensions: PropTypes.array,
|
|
50
|
+
fileNameMaxCharacters: PropTypes.number,
|
|
51
|
+
fileSizeMaxBytes: PropTypes.number
|
|
52
|
+
})
|
|
46
53
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**** Libraries ****/
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
|
-
import { defaultProps } from
|
|
4
|
-
import { propTypes } from
|
|
3
|
+
import { defaultProps } from './props/defaultProps';
|
|
4
|
+
import { propTypes } from './props/propTypes';
|
|
5
5
|
/**** Components ****/
|
|
6
6
|
|
|
7
7
|
import Label from '@zohodesk/components/lib/Label/Label';
|
|
8
|
-
import ValidationMessage from
|
|
9
|
-
import TextEditorWrapper from
|
|
10
|
-
import FieldContainer from
|
|
8
|
+
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
9
|
+
import TextEditorWrapper from '../TextEditorWrapper/TextEditorWrapper';
|
|
10
|
+
import FieldContainer from '../FieldContainer/FieldContainer';
|
|
11
11
|
/** Css */
|
|
12
12
|
|
|
13
|
-
import style from
|
|
13
|
+
import style from '../Fields.module.css';
|
|
14
14
|
export default class TextEditorField extends PureComponent {
|
|
15
15
|
constructor(props) {
|
|
16
16
|
super(props);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
|
-
import TextEditorField from
|
|
3
|
+
import TextEditorField from '../TextEditorField';
|
|
4
4
|
describe('TextEditorField', () => {
|
|
5
5
|
test('rendering the defult props', () => {
|
|
6
6
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { FieldCommonPropTypes } from
|
|
2
|
+
import { FieldCommonPropTypes } from '../../props/FieldCommonPropTypes';
|
|
3
3
|
export const propTypes = {
|
|
4
4
|
dataId: PropTypes.string,
|
|
5
5
|
fieldSize: PropTypes.oneOf(['small', 'medium']),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { defaultProps } from
|
|
3
|
-
import { propTypes } from
|
|
2
|
+
import { defaultProps } from './props/defaultProps';
|
|
3
|
+
import { propTypes } from './props/propTypes';
|
|
4
4
|
/**** Components ****/
|
|
5
5
|
|
|
6
|
-
import TextEditor from
|
|
6
|
+
import TextEditor from '../TextEditor/TextEditor';
|
|
7
7
|
import Textarea from '@zohodesk/components/lib/Textarea/Textarea';
|
|
8
8
|
import VelocityAnimationGroup from '@zohodesk/components/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup';
|
|
9
|
-
import { editorContentValidate } from
|
|
10
|
-
import style from
|
|
9
|
+
import { editorContentValidate } from '../../../utils/editorUtils';
|
|
10
|
+
import style from './TextEditorWrapper.module.css';
|
|
11
11
|
/* eslint-disable react/no-deprecated */
|
|
12
12
|
|
|
13
13
|
export default class TextEditorWrapper extends Component {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
|
-
import TextEditorWrapper from
|
|
3
|
+
import TextEditorWrapper from '../TextEditorWrapper';
|
|
4
4
|
describe('TextEditorWrapper', () => {
|
|
5
5
|
test('rendering the defult props', () => {
|
|
6
6
|
const {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**** Libraries ****/
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
|
-
import { defaultProps } from
|
|
4
|
-
import { propTypes } from
|
|
3
|
+
import { defaultProps } from './props/defaultProps';
|
|
4
|
+
import { propTypes } from './props/propTypes';
|
|
5
5
|
/**** Components ****/
|
|
6
6
|
|
|
7
7
|
import Label from '@zohodesk/components/lib/Label/Label';
|
|
8
8
|
import Textarea from '@zohodesk/components/lib/Textarea/Textarea';
|
|
9
|
-
import ValidationMessage from
|
|
9
|
+
import ValidationMessage from '../ValidationMessage/ValidationMessage';
|
|
10
10
|
import { getUniqueId } from '@zohodesk/components/lib/Provider/IdProvider';
|
|
11
|
-
import FieldContainer from
|
|
11
|
+
import FieldContainer from '../FieldContainer/FieldContainer';
|
|
12
12
|
/**** CSS ****/
|
|
13
13
|
|
|
14
|
-
import style from
|
|
14
|
+
import style from '../Fields.module.css';
|
|
15
15
|
export default class TextareaField extends PureComponent {
|
|
16
16
|
constructor(props) {
|
|
17
17
|
super(props);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
import { FieldCommonPropTypes } from
|
|
2
|
+
import { FieldCommonPropTypes } from '../../props/FieldCommonPropTypes';
|
|
3
3
|
export const propTypes = {
|
|
4
4
|
animated: PropTypes.bool,
|
|
5
5
|
borderColor: PropTypes.oneOf(['transparent', 'default']),
|
|
@@ -1,9 +1,9 @@
|
|
|
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 Label from '@zohodesk/components/lib/Label/Label';
|
|
5
5
|
import colors from '@zohodesk/components/lib/Label/LabelColors.module.css';
|
|
6
|
-
import style from
|
|
6
|
+
import style from './ValidationMessage.module.css';
|
|
7
7
|
import { Icon } from '@zohodesk/icons';
|
|
8
8
|
export default class ValidationMessage extends React.Component {
|
|
9
9
|
render() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
|
-
import ValidationMessage from
|
|
3
|
+
import ValidationMessage from '../ValidationMessage';
|
|
4
4
|
describe('ValidationMessage', () => {
|
|
5
5
|
test('rendering the defult props', () => {
|
|
6
6
|
const {
|
package/es/form/fields/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { default as CheckBoxField } from
|
|
2
|
-
export { default as CurrencyField } from
|
|
3
|
-
export { default as DateField } from
|
|
4
|
-
export { default as FieldContainer } from
|
|
5
|
-
export { default as MultiSelectField } from
|
|
6
|
-
export { default as PhoneField } from
|
|
7
|
-
export { default as RadioField } from
|
|
8
|
-
export { default as SelectField } from
|
|
9
|
-
export { default as TagsMultiSelect } from
|
|
10
|
-
export { default as TagsMultiSelectField } from
|
|
11
|
-
export { default as TextareaField } from
|
|
12
|
-
export { default as TextBoxField } from
|
|
13
|
-
export { default as TextEditor } from
|
|
14
|
-
export { default as TextEditorField } from
|
|
15
|
-
export { default as TextEditorWrapper } from
|
|
16
|
-
export { default as ValidationMessage } from
|
|
1
|
+
export { default as CheckBoxField } from './CheckBoxField/CheckBoxField';
|
|
2
|
+
export { default as CurrencyField } from './CurrencyField/CurrencyField';
|
|
3
|
+
export { default as DateField } from './DateField/DateField';
|
|
4
|
+
export { default as FieldContainer } from './FieldContainer/FieldContainer';
|
|
5
|
+
export { default as MultiSelectField } from './MultiSelectField/MultiSelectField';
|
|
6
|
+
export { default as PhoneField } from './PhoneField/PhoneField';
|
|
7
|
+
export { default as RadioField } from './RadioField/RadioField';
|
|
8
|
+
export { default as SelectField } from './SelectField/SelectField';
|
|
9
|
+
export { default as TagsMultiSelect } from './TagsMultiSelect/TagsMultiSelect';
|
|
10
|
+
export { default as TagsMultiSelectField } from './TagsMultiSelectField/TagsMultiSelectField';
|
|
11
|
+
export { default as TextareaField } from './TextareaField/TextareaField';
|
|
12
|
+
export { default as TextBoxField } from './TextBoxField/TextBoxField';
|
|
13
|
+
export { default as TextEditor } from './TextEditor/TextEditor';
|
|
14
|
+
export { default as TextEditorField } from './TextEditorField/TextEditorField';
|
|
15
|
+
export { default as TextEditorWrapper } from './TextEditorWrapper/TextEditorWrapper';
|
|
16
|
+
export { default as ValidationMessage } from './ValidationMessage/ValidationMessage';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { defaultProps } from
|
|
3
|
-
import { propTypes } from
|
|
4
|
-
import style from
|
|
2
|
+
import { defaultProps } from './props/defaultProps';
|
|
3
|
+
import { propTypes } from './props/propTypes';
|
|
4
|
+
import style from './Field.module.css';
|
|
5
5
|
export default class Field extends Component {
|
|
6
6
|
render() {
|
|
7
7
|
let {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { propTypes } from
|
|
3
|
-
import style from
|
|
2
|
+
import { propTypes } from './props/propTypes';
|
|
3
|
+
import style from './ModuleFormSection.module.css';
|
|
4
4
|
export default class Section extends Component {
|
|
5
5
|
constructor(props) {
|
|
6
6
|
super(props);
|
package/es/form/layout/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Field } from
|
|
2
|
-
export { default as Section } from
|
|
1
|
+
export { default as Field } from './Field/Field';
|
|
2
|
+
export { default as Section } from './Section/Section';
|
package/es/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
export { default as ActionButton } from
|
|
2
|
-
export { default as AutoClose } from
|
|
3
|
-
export * from
|
|
4
|
-
export { default as AlphabeticList } from
|
|
5
|
-
export { default as Attachment } from
|
|
6
|
-
export { default as AttachmentViewer } from
|
|
7
|
-
export * from
|
|
8
|
-
export { default as ChannelIcon } from
|
|
9
|
-
import * as _Drawer from
|
|
1
|
+
export { default as ActionButton } from './ActionButton/ActionButton';
|
|
2
|
+
export { default as AutoClose } from './actions/AutoClose';
|
|
3
|
+
export * from './alert';
|
|
4
|
+
export { default as AlphabeticList } from './AlphabeticList/AlphabeticList';
|
|
5
|
+
export { default as Attachment } from './Attachment/Attachment';
|
|
6
|
+
export { default as AttachmentViewer } from './AttachmentViewer/AttachmentViewer';
|
|
7
|
+
export * from './avatar';
|
|
8
|
+
export { default as ChannelIcon } from './ChannelIcon/ChannelIcon';
|
|
9
|
+
import * as _Drawer from './Drawer/Drawer';
|
|
10
10
|
export { _Drawer as Drawer };
|
|
11
|
-
export { default as ToggleDropDown } from
|
|
12
|
-
export { default as CommonEmptyState } from
|
|
13
|
-
export { default as EditionPage } from
|
|
14
|
-
import * as _errorstate from
|
|
11
|
+
export { default as ToggleDropDown } from './dropdown/ToggleDropDown/ToggleDropDown';
|
|
12
|
+
export { default as CommonEmptyState } from './emptystate/CommonEmptyState/CommonEmptyState';
|
|
13
|
+
export { default as EditionPage } from './emptystate/EditionPage/EditionPage';
|
|
14
|
+
import * as _errorstate from './errorstate';
|
|
15
15
|
export { _errorstate as errorstate };
|
|
16
|
-
export { default as ExternalLink } from
|
|
17
|
-
export { default as FlipCard } from
|
|
18
|
-
import * as _fields from
|
|
16
|
+
export { default as ExternalLink } from './ExternalLink/ExternalLink';
|
|
17
|
+
export { default as FlipCard } from './FlipCard/FlipCard';
|
|
18
|
+
import * as _fields from './form/fields';
|
|
19
19
|
export { _fields as fields };
|
|
20
|
-
import * as _fields_layout from
|
|
20
|
+
import * as _fields_layout from './form/layout/';
|
|
21
21
|
export { _fields_layout as fields_layout };
|
|
22
|
-
export { default as FormAction } from
|
|
23
|
-
export { default as FreezeLayer } from
|
|
24
|
-
export { default as IconButton } from
|
|
25
|
-
export { default as Image } from
|
|
26
|
-
export { default as ImportantNotes } from
|
|
27
|
-
import * as _SetupDetailLayout from
|
|
22
|
+
export { default as FormAction } from './FormAction/FormAction';
|
|
23
|
+
export { default as FreezeLayer } from './FreezeLayer/FreezeLayer';
|
|
24
|
+
export { default as IconButton } from './IconButton/IconButton';
|
|
25
|
+
export { default as Image } from './Image/Image';
|
|
26
|
+
export { default as ImportantNotes } from './ImportantNotes/ImportantNotes';
|
|
27
|
+
import * as _SetupDetailLayout from './layout/SetupDetailLayout';
|
|
28
28
|
export { _SetupDetailLayout as SetupDetailLayout };
|
|
29
|
-
import * as _SubtabLayout from
|
|
29
|
+
import * as _SubtabLayout from './layout/SubtabLayout';
|
|
30
30
|
export { _SubtabLayout as SubtabLayout };
|
|
31
|
-
export { default as Link } from
|
|
32
|
-
import * as _list from
|
|
31
|
+
export { default as Link } from './Link/Link';
|
|
32
|
+
import * as _list from './list';
|
|
33
33
|
export { _list as list };
|
|
34
|
-
export { default as Loader } from
|
|
35
|
-
export { default as Message, MessageUI, MessageNew } from
|
|
36
|
-
export { default as MessageBanner } from
|
|
37
|
-
export { default as NewStar } from
|
|
38
|
-
export { default as PlusIcon } from
|
|
39
|
-
import * as _Provider from
|
|
34
|
+
export { default as Loader } from './Loader/Loader';
|
|
35
|
+
export { default as Message, MessageUI, MessageNew } from './Message/Message';
|
|
36
|
+
export { default as MessageBanner } from './MessageBanner/MessageBanner';
|
|
37
|
+
export { default as NewStar } from './NewStar/NewStar';
|
|
38
|
+
export { default as PlusIcon } from './PlusIcon/PlusIcon';
|
|
39
|
+
import * as _Provider from './Provider/Config';
|
|
40
40
|
export { _Provider as Provider };
|
|
41
|
-
import * as _lookup from
|
|
41
|
+
import * as _lookup from './lookup';
|
|
42
42
|
export { _lookup as lookup };
|
|
43
|
-
export { default as Separator } from
|
|
44
|
-
import * as _setup from
|
|
43
|
+
export { default as Separator } from './Separator/Separator';
|
|
44
|
+
import * as _setup from './setup';
|
|
45
45
|
export { _setup as setup };
|
|
46
|
-
import * as _svg from
|
|
46
|
+
import * as _svg from './svg';
|
|
47
47
|
export { _svg as svg };
|
|
48
|
-
export { default as ToastMessage } from
|
|
49
|
-
export { default as Upload } from
|
|
50
|
-
import * as _version from
|
|
48
|
+
export { default as ToastMessage } from './ToastMessage/ToastMessage';
|
|
49
|
+
export { default as Upload } from './Upload/Upload';
|
|
50
|
+
import * as _version from './version2';
|
|
51
51
|
export { _version as version2 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { SetupDetailLayout_defaultProps, SetupHeader_defaultProps, SetupContent_defaultProps, SetupFooter_defaultProps } from
|
|
3
|
-
import { SetupDetailLayout_propTypes, SetupHeader_propTypes, SetupContent_propTypes, SetupFooter_propTypes } from
|
|
2
|
+
import { SetupDetailLayout_defaultProps, SetupHeader_defaultProps, SetupContent_defaultProps, SetupFooter_defaultProps } from './props/defaultProps';
|
|
3
|
+
import { SetupDetailLayout_propTypes, SetupHeader_propTypes, SetupContent_propTypes, SetupFooter_propTypes } from './props/propTypes';
|
|
4
4
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
5
5
|
import { Icon } from '@zohodesk/icons';
|
|
6
|
-
import style from
|
|
6
|
+
import style from './SetupDetailLayout.module.css';
|
|
7
7
|
export default class SetupDetailLayout extends React.Component {
|
|
8
8
|
constructor(props) {
|
|
9
9
|
super(props);
|