@zohodesk/dot 1.0.0-temp-197.6 → 1.0.0-temp-187.1

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.
Files changed (562) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +16 -0
  3. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +1 -0
  4. package/assets/Appearance/light/mode/Dot_LightMode.module.css +1 -0
  5. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +1 -0
  6. package/es/ActionButton/ActionButton.js +3 -3
  7. package/es/ActionButton/__tests__/ActionButton.spec.js +1 -1
  8. package/es/AlphabeticList/AlphabeticList.js +3 -3
  9. package/es/AlphabeticList/__tests__/AlphabeticList.spec.js +1 -1
  10. package/es/Attachment/Attachment.js +4 -4
  11. package/es/Attachment/__tests__/Attachment.spec.js +1 -1
  12. package/es/AttachmentViewer/AttachmentImage.js +72 -36
  13. package/es/AttachmentViewer/AttachmentViewer.js +129 -50
  14. package/es/AttachmentViewer/AttachmentViewer.module.css +15 -3
  15. package/es/AttachmentViewer/__tests__/AttachmentImage.spec.js +64 -14
  16. package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +1 -1
  17. package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentImage.spec.js.snap +9 -5
  18. package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +16 -117
  19. package/es/AttachmentViewer/props/defaultProps.js +5 -1
  20. package/es/AttachmentViewer/props/propTypes.js +7 -3
  21. package/es/AttachmentViewer/utils.js +49 -0
  22. package/es/ChannelIcon/ChannelIcon.js +5 -5
  23. package/es/ChannelIcon/__tests__/ChannelIcon.spec.js +1 -1
  24. package/es/Drawer/Drawer.js +6 -6
  25. package/es/Drawer/__tests__/Drawer.spec.js +1 -1
  26. package/es/Drawer/index.js +1 -1
  27. package/es/ExternalLink/ExternalLink.js +3 -3
  28. package/es/ExternalLink/__tests__/ExternalLink.spec.js +1 -1
  29. package/es/FlipCard/FlipCard.js +7 -7
  30. package/es/FlipCard/__tests__/FlipCard.spec.js +1 -1
  31. package/es/FormAction/FormAction.js +3 -3
  32. package/es/FormAction/__tests__/FormAction.spec.js +1 -1
  33. package/es/FreezeLayer/FreezeLayer.js +5 -5
  34. package/es/FreezeLayer/__tests__/FreezeLayer.spec.js +1 -1
  35. package/es/FreezeLayer/index.js +2 -2
  36. package/es/Hooks/Dragger/useDragger.js +5 -5
  37. package/es/Hooks/useFreezeLayer.js +1 -1
  38. package/es/IconButton/IconButton.js +3 -3
  39. package/es/IconButton/__tests__/IconButton.spec.js +1 -1
  40. package/es/Image/Image.js +9 -5
  41. package/es/Image/__tests__/Image.spec.js +1 -1
  42. package/es/Image/props/propTypes.js +3 -1
  43. package/es/ImportantNotes/ImportantNotes.js +3 -3
  44. package/es/ImportantNotes/__tests__/ImportantNotes.spec.js +1 -1
  45. package/es/Link/Link.js +4 -4
  46. package/es/Link/__tests__/Link.spec.js +1 -1
  47. package/es/Loader/Loader.js +1 -1
  48. package/es/Loader/__tests__/Loader.spec.js +1 -1
  49. package/es/Message/Message.js +4 -4
  50. package/es/Message/__tests__/Message.spec.js +1 -1
  51. package/es/Message/props/propTypes.js +1 -1
  52. package/es/MessageBanner/MessageBanner.js +4 -4
  53. package/es/MessageBanner/__tests__/MessageBanner.spec.js +1 -1
  54. package/es/NewStar/NewStar.js +3 -3
  55. package/es/NewStar/__tests__/NewStar.spec.js +1 -1
  56. package/es/PlusIcon/PlusIcon.js +4 -4
  57. package/es/PlusIcon/__tests__/PlusIcon.spec.js +1 -1
  58. package/es/Separator/Separator.js +3 -3
  59. package/es/Separator/__tests__/Separator.spec.js +1 -1
  60. package/es/TagWithIcon/TagWithIcon.js +3 -3
  61. package/es/TagWithIcon/__tests__/TagWithIcon.spec.js +1 -1
  62. package/es/ToastMessage/ToastMessage.js +4 -4
  63. package/es/ToastMessage/__tests__/ToastMessage.spec.js +1 -1
  64. package/es/Upload/Upload.js +4 -4
  65. package/es/Upload/__tests__/Upload.spec.js +1 -1
  66. package/es/actions/AutoClose.js +2 -2
  67. package/es/alert/AlertHeader/AlertHeader.js +5 -5
  68. package/es/alert/AlertHeader/__tests__/AlertHeader.spec.js +1 -1
  69. package/es/alert/AlertLookup/AlertLookup.js +7 -7
  70. package/es/alert/AlertLookup/__tests__/AlertLookup.spec.js +1 -1
  71. package/es/alert/index.js +2 -2
  72. package/es/avatar/AvatarClose/AvatarClose.js +3 -3
  73. package/es/avatar/AvatarClose/__tests__/AvatarClose.spec.js +1 -1
  74. package/es/avatar/AvatarCollision/AvatarCollision.js +3 -3
  75. package/es/avatar/AvatarCollision/__tests__/AvatarCollision.spec.js +1 -1
  76. package/es/avatar/AvatarIcon/AvatarIcon.js +3 -3
  77. package/es/avatar/AvatarIcon/__tests__/AvatarIcon.spec.js +1 -1
  78. package/es/avatar/AvatarStatus/AvatarStatus.js +3 -3
  79. package/es/avatar/AvatarStatus/__tests__/AvatarStatus.spec.js +1 -1
  80. package/es/avatar/AvatarThread/AvatarThread.js +3 -3
  81. package/es/avatar/AvatarThread/__tests__/AvatarThread.spec.js +1 -1
  82. package/es/avatar/AvatarUser/AvatarUser.js +4 -4
  83. package/es/avatar/AvatarUser/__tests__/AvatarUser.spec.js +1 -1
  84. package/es/avatar/AvatarWithTeam/AvatarWithTeam.js +3 -3
  85. package/es/avatar/AvatarWithTeam/__tests__/AvatarWithTeam.spec.js +1 -1
  86. package/es/avatar/index.js +7 -7
  87. package/es/deprecated/FreezeLayer/FreezeLayer.js +4 -4
  88. package/es/deprecated/SelectDropdown/SelectDropdown.js +1 -1
  89. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +4 -4
  90. package/es/dropdown/ToggleDropDown/__tests__/ToggleDropDown.spec.js +1 -1
  91. package/es/emptystate/CommonEmptyState/CommonEmptyState.js +4 -4
  92. package/es/emptystate/CommonEmptyState/__tests__/CommonEmptyState.spec.js +1 -1
  93. package/es/emptystate/EditionPage/EditionPage.js +3 -3
  94. package/es/emptystate/EditionPage/__tests__/EditionPage.spec.js +1 -1
  95. package/es/errorstate/Inconvenience/Inconvenience.js +5 -5
  96. package/es/errorstate/Inconvenience/__tests__/Inconvenience.spec.js +1 -1
  97. package/es/errorstate/LinkText/LinkText.js +4 -4
  98. package/es/errorstate/LinkText/__tests__/LinkText.spec.js +1 -1
  99. package/es/errorstate/NoRequestFound/NoRequestFound.js +5 -5
  100. package/es/errorstate/NoRequestFound/__tests__/NoRequestFound.spec.js +1 -1
  101. package/es/errorstate/PermissionPlay/PermissionPlay.js +5 -5
  102. package/es/errorstate/PermissionPlay/__tests__/PermissionPlay.spec.js +1 -1
  103. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +5 -5
  104. package/es/errorstate/RequestUrlNotFound/__tests__/RequestUrlNotFound.spec.js +1 -1
  105. package/es/errorstate/UnableToProcess/UnableToProcess.js +5 -5
  106. package/es/errorstate/UnableToProcess/__tests__/UnableToProcess.spec.js +1 -1
  107. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +5 -5
  108. package/es/errorstate/UnauthorizedLogin/__tests__/UnauthorizedLogin.spec.js +1 -1
  109. package/es/errorstate/WillBack/WillBack.js +4 -4
  110. package/es/errorstate/WillBack/__tests__/WillBack.spec.js +1 -1
  111. package/es/errorstate/index.js +8 -8
  112. package/es/form/fields/CheckBoxField/CheckBoxField.js +5 -5
  113. package/es/form/fields/CheckBoxField/__tests__/CheckBoxField.spec.js +1 -1
  114. package/es/form/fields/CheckBoxField/props/defaultProps.js +1 -1
  115. package/es/form/fields/CheckBoxField/props/propTypes.js +1 -1
  116. package/es/form/fields/CurrencyField/CurrencyField.js +5 -5
  117. package/es/form/fields/CurrencyField/__tests__/CurrencyField.spec.js +1 -1
  118. package/es/form/fields/CurrencyField/props/defaultProps.js +1 -1
  119. package/es/form/fields/CurrencyField/props/propTypes.js +1 -1
  120. package/es/form/fields/DateField/DateField.js +5 -5
  121. package/es/form/fields/DateField/__tests__/DateField.spec.js +1 -1
  122. package/es/form/fields/DateField/props/defaultProps.js +1 -1
  123. package/es/form/fields/DateField/props/propTypes.js +1 -1
  124. package/es/form/fields/FieldContainer/FieldContainer.js +3 -3
  125. package/es/form/fields/FieldContainer/__tests__/FieldContainer.spec.js +1 -1
  126. package/es/form/fields/FieldContainer/props/defaultProps.js +1 -1
  127. package/es/form/fields/MultiSelectField/MultiSelectField.js +5 -5
  128. package/es/form/fields/MultiSelectField/__tests__/MultiSelectField.spec.js +1 -1
  129. package/es/form/fields/MultiSelectField/props/defaultProps.js +1 -1
  130. package/es/form/fields/MultiSelectField/props/propTypes.js +1 -1
  131. package/es/form/fields/PhoneField/PhoneField.js +6 -6
  132. package/es/form/fields/PhoneField/__tests__/PhoneField.spec.js +1 -1
  133. package/es/form/fields/RadioField/RadioField.js +4 -4
  134. package/es/form/fields/RadioField/__tests__/RadioField.spec.js +1 -1
  135. package/es/form/fields/SelectField/SelectField.js +5 -5
  136. package/es/form/fields/SelectField/__tests__/SelectField.spec.js +1 -1
  137. package/es/form/fields/SelectField/props/defaultProps.js +1 -1
  138. package/es/form/fields/SelectField/props/propTypes.js +1 -1
  139. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +9 -7
  140. package/es/form/fields/TagsMultiSelect/__tests__/TagsMultiSelect.spec.js +1 -1
  141. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -7
  142. package/es/form/fields/TagsMultiSelectField/__tests__/TagsMultiSelectField.spec.js +1 -1
  143. package/es/form/fields/TagsMultiSelectField/props/defaultProps.js +1 -1
  144. package/es/form/fields/TagsMultiSelectField/props/propTypes.js +1 -1
  145. package/es/form/fields/TextBoxField/TextBoxField.js +5 -5
  146. package/es/form/fields/TextBoxField/__tests__/TextBoxField.spec.js +1 -1
  147. package/es/form/fields/TextBoxField/props/defaultProps.js +1 -1
  148. package/es/form/fields/TextBoxField/props/propTypes.js +1 -1
  149. package/es/form/fields/TextEditor/TextEditor.js +4 -4
  150. package/es/form/fields/TextEditor/__tests__/TextEditor.spec.js +1 -1
  151. package/es/form/fields/TextEditor/__tests__/__snapshots__/TextEditor.spec.js.snap +1 -1
  152. package/es/form/fields/TextEditor/props/propTypes.js +0 -1
  153. package/es/form/fields/TextEditorField/TextEditorField.js +6 -6
  154. package/es/form/fields/TextEditorField/__tests__/TextEditorField.spec.js +1 -1
  155. package/es/form/fields/TextEditorField/props/defaultProps.js +1 -1
  156. package/es/form/fields/TextEditorField/props/propTypes.js +1 -1
  157. package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +5 -5
  158. package/es/form/fields/TextEditorWrapper/__tests__/TextEditorWrapper.spec.js +1 -1
  159. package/es/form/fields/TextareaField/TextareaField.js +5 -5
  160. package/es/form/fields/TextareaField/__tests__/TextareaField.spec.js +1 -1
  161. package/es/form/fields/TextareaField/props/defaultProps.js +1 -1
  162. package/es/form/fields/TextareaField/props/propTypes.js +1 -1
  163. package/es/form/fields/ValidationMessage/ValidationMessage.js +3 -3
  164. package/es/form/fields/ValidationMessage/__tests__/ValidationMessage.spec.js +1 -1
  165. package/es/form/fields/index.js +16 -16
  166. package/es/form/layout/Field/Field.js +3 -3
  167. package/es/form/layout/Field/__tests__/Field.spec.js +1 -1
  168. package/es/form/layout/Section/Section.js +2 -2
  169. package/es/form/layout/Section/__tests__/Section.spec.js +1 -1
  170. package/es/form/layout/index.js +2 -2
  171. package/es/index.js +39 -39
  172. package/es/layout/SetupDetailLayout/SetupDetailLayout.js +3 -3
  173. package/es/layout/SetupDetailLayout/__tests__/SetupDetailLayout.spec.js +1 -1
  174. package/es/layout/SetupDetailLayout/index.js +4 -4
  175. package/es/layout/SubtabLayout/SubtabLayout.js +4 -4
  176. package/es/layout/SubtabLayout/__tests__/SubtabLayout.spec.js +1 -1
  177. package/es/layout/SubtabLayout/index.js +4 -4
  178. package/es/list/AvatarFlip/AvatarFlip.js +4 -4
  179. package/es/list/AvatarFlip/__tests__/AvatarFlip.spec.js +1 -1
  180. package/es/list/BluePrintStatus/BluePrintStatus.js +2 -2
  181. package/es/list/BluePrintStatus/__tests__/BluePrintStatus.spec.js +1 -1
  182. package/es/list/Comment/Comment.js +3 -3
  183. package/es/list/Comment/__tests__/Comment.spec.js +1 -1
  184. package/es/list/DepartmentDropDown/DepartmentDropDown.js +12 -7
  185. package/es/list/DepartmentDropDown/__tests__/DepartmentDropDown.spec.js +1 -1
  186. package/es/list/DepartmentDropDown/props/defaultProps.js +2 -1
  187. package/es/list/DepartmentDropDown/props/propTypes.js +2 -1
  188. package/es/list/Dot/Dot.js +3 -3
  189. package/es/list/Dot/__tests__/Dot.spec.js +1 -1
  190. package/es/list/DotNew/DotNew.js +3 -3
  191. package/es/list/DotNew/__tests__/DotNew.spec.js +1 -1
  192. package/es/list/GridStencils/GridStencils.js +2 -2
  193. package/es/list/GridStencils/__tests__/GridStencils.spec.js +1 -1
  194. package/es/list/Icons/AddNewIcon.js +2 -2
  195. package/es/list/Icons/CompleteIcon.js +2 -2
  196. package/es/list/Icons/DeleteIcon.js +2 -2
  197. package/es/list/Icons/EditIcon.js +2 -2
  198. package/es/list/Icons/FloatingIcons.js +3 -3
  199. package/es/list/Icons/ReadUnreadIcon.js +3 -3
  200. package/es/list/Icons/SmartIcon.js +2 -2
  201. package/es/list/Icons/__tests__/AddNewIcon.spec.js +1 -1
  202. package/es/list/Icons/__tests__/CompleteIcon.spec.js +1 -1
  203. package/es/list/Icons/__tests__/DeleteIcon.spec.js +1 -1
  204. package/es/list/Icons/__tests__/EditIcon.spec.js +1 -1
  205. package/es/list/Icons/__tests__/FloatingIcons.spec.js +1 -1
  206. package/es/list/Icons/__tests__/ReadUnreadIcon.spec.js +1 -1
  207. package/es/list/Icons/__tests__/SmartIcon.spec.js +1 -1
  208. package/es/list/Icons/index.js +7 -7
  209. package/es/list/ListLayout/ListLayout.js +3 -3
  210. package/es/list/ListLayout/__tests__/ListLayout.spec.js +1 -1
  211. package/es/list/ListStencils/ListStencils.js +3 -3
  212. package/es/list/ListStencils/__tests__/ListStencils.spec.js +1 -1
  213. package/es/list/SecondaryText/AccountName.js +4 -4
  214. package/es/list/SecondaryText/ContactName.js +5 -5
  215. package/es/list/SecondaryText/DepartmentText.js +2 -2
  216. package/es/list/SecondaryText/Email.js +4 -4
  217. package/es/list/SecondaryText/HappinessRating.js +2 -2
  218. package/es/list/SecondaryText/PhoneNumber.js +4 -4
  219. package/es/list/SecondaryText/PriorityText.js +3 -3
  220. package/es/list/SecondaryText/SecondaryText.js +3 -3
  221. package/es/list/SecondaryText/StatusText.js +3 -3
  222. package/es/list/SecondaryText/TicketId.js +4 -4
  223. package/es/list/SecondaryText/Website.js +4 -4
  224. package/es/list/SecondaryText/__tests__/AccountName.spec.js +1 -1
  225. package/es/list/SecondaryText/__tests__/ContactName.spec.js +1 -1
  226. package/es/list/SecondaryText/__tests__/DepartmentText.spec.js +1 -1
  227. package/es/list/SecondaryText/__tests__/Email.spec.js +1 -1
  228. package/es/list/SecondaryText/__tests__/HappinessRating.spec.js +1 -1
  229. package/es/list/SecondaryText/__tests__/PhoneNumber.spec.js +1 -1
  230. package/es/list/SecondaryText/__tests__/PriorityText.spec.js +1 -1
  231. package/es/list/SecondaryText/__tests__/SecondaryText.spec.js +1 -1
  232. package/es/list/SecondaryText/__tests__/StatusText.spec.js +1 -1
  233. package/es/list/SecondaryText/__tests__/TicketId.spec.js +1 -1
  234. package/es/list/SecondaryText/__tests__/Website.spec.js +1 -1
  235. package/es/list/SecondaryText/index.js +11 -11
  236. package/es/list/SecondryPanel/SecondryPanel.js +4 -4
  237. package/es/list/SecondryPanel/__tests__/SecondryPanel.spec.js +1 -1
  238. package/es/list/SentimentStatus/SentimentStatus.js +2 -2
  239. package/es/list/SentimentStatus/__tests__/SentimentStatus.spec.js +1 -1
  240. package/es/list/Subject/Subject.js +4 -4
  241. package/es/list/Subject/__tests__/Subject.spec.js +1 -1
  242. package/es/list/TagNew/TagNew.js +3 -3
  243. package/es/list/TagNew/__tests__/TagNew.spec.js +1 -1
  244. package/es/list/Thread/Thread.js +3 -3
  245. package/es/list/Thread/__tests__/Thread.spec.js +1 -1
  246. package/es/list/index.js +16 -16
  247. package/es/list/status/StatusDropdown/StatusDropdown.js +5 -5
  248. package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +1 -1
  249. package/es/list/status/StatusListItem/StatusListItem.js +3 -3
  250. package/es/list/status/StatusListItem/StatusListItem.module.css +35 -5
  251. package/es/list/status/StatusListItem/__tests__/StatusListItem.spec.js +1 -1
  252. package/es/list/status/index.js +2 -2
  253. package/es/lookup/EmptyPage/EmptyPage.js +3 -3
  254. package/es/lookup/EmptyPage/__tests__/EmptyPage.spec.js +1 -1
  255. package/es/lookup/Lookup/Lookup.js +4 -4
  256. package/es/lookup/Lookup/__tests__/Lookup.spec.js +1 -1
  257. package/es/lookup/Section/Section.js +2 -2
  258. package/es/lookup/Section/__tests__/Section.spec.js +1 -1
  259. package/es/lookup/header/Close/Close.js +3 -3
  260. package/es/lookup/header/Close/__tests__/Close.spec.js +1 -1
  261. package/es/lookup/header/ModuleHeader/ModuleHeader.js +8 -8
  262. package/es/lookup/header/ModuleHeader/__tests__/ModuleHeader.spec.js +1 -1
  263. package/es/lookup/header/Search/Search.js +4 -4
  264. package/es/lookup/header/Search/__tests__/Search.spec.js +1 -1
  265. package/es/lookup/header/TicketHeader/TicketHeader.js +10 -10
  266. package/es/lookup/header/TicketHeader/__tests__/TicketHeader.spec.js +1 -1
  267. package/es/lookup/header/Title/Title.js +3 -3
  268. package/es/lookup/header/Title/__tests__/Titles.spec.js +1 -1
  269. package/es/lookup/header/ViewDropDown/ViewDropDown.js +3 -3
  270. package/es/lookup/header/ViewDropDown/__test__/ViewDropDown.spec.js +1 -1
  271. package/es/lookup/header/index.js +5 -5
  272. package/es/lookup/index.js +4 -4
  273. package/es/setup/header/Button/Button.js +3 -3
  274. package/es/setup/header/Button/__tests__/Button.spec.js +1 -1
  275. package/es/setup/header/Link/Link.js +4 -4
  276. package/es/setup/header/Link/__tests__/Link.spec.js +1 -1
  277. package/es/setup/header/Search/Search.js +3 -3
  278. package/es/setup/header/Search/__tests__/Search.spec.js +1 -1
  279. package/es/setup/header/Views/Views.js +3 -3
  280. package/es/setup/header/Views/__tests__/Views.spec.js +1 -1
  281. package/es/setup/header/index.js +4 -4
  282. package/es/setup/helptips/Description/Description.js +2 -2
  283. package/es/setup/helptips/Description/__tests__/Description.spec.js +1 -1
  284. package/es/setup/helptips/Link/Link.js +3 -3
  285. package/es/setup/helptips/Link/__tests__/Link.spec.js +1 -1
  286. package/es/setup/helptips/ListGroup/ListGroup.js +2 -2
  287. package/es/setup/helptips/ListGroup/__tests__/ListGroup.spec.js +1 -1
  288. package/es/setup/helptips/Title/Title.js +2 -2
  289. package/es/setup/helptips/Title/__tests__/Title.spec.js +1 -1
  290. package/es/setup/helptips/index.js +4 -4
  291. package/es/setup/index.js +3 -3
  292. package/es/setup/table/Table/Table.js +2 -2
  293. package/es/setup/table/Table/__tests__/Table.spec.js +1 -1
  294. package/es/setup/table/TableBody/TableBody.js +2 -2
  295. package/es/setup/table/TableBody/__tests__/TableBody.spec.js +1 -1
  296. package/es/setup/table/TableData/TableData.js +3 -3
  297. package/es/setup/table/TableData/__tests__/TableData.spec.js +1 -1
  298. package/es/setup/table/TableHead/TableHead.js +3 -3
  299. package/es/setup/table/TableHead/__tests__/TableHead.spec.js +1 -1
  300. package/es/setup/table/TableRow/TableRow.js +3 -3
  301. package/es/setup/table/TableRow/__tests__/TableRow.spec.js +1 -1
  302. package/es/setup/table/Text/Text.js +4 -4
  303. package/es/setup/table/Text/__tests__/Text.spec.js +1 -1
  304. package/es/setup/table/index.js +5 -5
  305. package/es/svg/PlusIcon.js +2 -2
  306. package/es/svg/SnippetIcon.js +2 -2
  307. package/es/svg/TemplateIcon.js +2 -2
  308. package/es/svg/__tests__/PlusIcon.spec.js +1 -1
  309. package/es/svg/__tests__/SnippetIcon.spec.js +1 -1
  310. package/es/svg/__tests__/TemplateIcon.spec.js +1 -1
  311. package/es/svg/index.js +3 -3
  312. package/es/v1/ActionButton/ActionButton.js +3 -3
  313. package/es/v1/AlphabeticList/AlphabeticList.js +3 -3
  314. package/es/v1/Attachment/Attachment.js +4 -4
  315. package/es/v1/AttachmentViewer/AttachmentImage.js +48 -27
  316. package/es/v1/AttachmentViewer/AttachmentViewer.js +129 -50
  317. package/es/v1/AttachmentViewer/props/propTypes.js +7 -3
  318. package/es/v1/ChannelIcon/ChannelIcon.js +5 -5
  319. package/es/v1/Drawer/Drawer.js +6 -6
  320. package/es/v1/ExternalLink/ExternalLink.js +3 -3
  321. package/es/v1/FlipCard/FlipCard.js +7 -7
  322. package/es/v1/FormAction/FormAction.js +3 -3
  323. package/es/v1/FreezeLayer/FreezeLayer.js +5 -5
  324. package/es/v1/GlobalNotification/GlobalNotification.js +6 -6
  325. package/es/v1/IconButton/IconButton.js +3 -3
  326. package/es/v1/Image/Image.js +9 -5
  327. package/es/v1/Image/props/propTypes.js +3 -1
  328. package/es/v1/ImportantNotes/ImportantNotes.js +3 -3
  329. package/es/v1/Link/Link.js +4 -4
  330. package/es/v1/Loader/Loader.js +1 -1
  331. package/es/v1/Message/Message.js +4 -4
  332. package/es/v1/Message/props/propTypes.js +1 -1
  333. package/es/v1/MessageBanner/MessageBanner.js +4 -4
  334. package/es/v1/NewStar/NewStar.js +3 -3
  335. package/es/v1/PlusIcon/PlusIcon.js +4 -4
  336. package/es/v1/Separator/Separator.js +3 -3
  337. package/es/v1/TagWithIcon/TagWithIcon.js +3 -3
  338. package/es/v1/ToastMessage/ToastMessage.js +4 -4
  339. package/es/v1/Upload/Upload.js +4 -4
  340. package/es/v1/actions/AutoClose.js +2 -2
  341. package/es/v1/alert/AlertClose/AlertClose.js +2 -2
  342. package/es/v1/alert/AlertHeader/AlertHeader.js +7 -7
  343. package/es/v1/alert/AlertLookup/AlertLookup.js +7 -7
  344. package/es/v1/alert/alertIcons/AlarmAlertIcon.js +3 -3
  345. package/es/v1/alert/alertIcons/AlertIcons.js +9 -9
  346. package/es/v1/alert/alertIcons/DangerAlertIcon.js +3 -3
  347. package/es/v1/alert/alertIcons/ErrorAlertIcon.js +3 -3
  348. package/es/v1/alert/alertIcons/InfoAlertIcon.js +3 -3
  349. package/es/v1/alert/alertIcons/NotificationAlertIcon.js +3 -3
  350. package/es/v1/alert/alertIcons/SuccessAlertIcon.js +3 -3
  351. package/es/v1/alert/alertIcons/WarningAlertIcon.js +3 -3
  352. package/es/v1/alert/alertIcons/index.js +8 -8
  353. package/es/v1/alert/index.js +2 -2
  354. package/es/v1/avatar/AvatarClose/AvatarClose.js +3 -3
  355. package/es/v1/avatar/AvatarCollision/AvatarCollision.js +3 -3
  356. package/es/v1/avatar/AvatarIcon/AvatarIcon.js +3 -3
  357. package/es/v1/avatar/AvatarStatus/AvatarStatus.js +3 -3
  358. package/es/v1/avatar/AvatarThread/AvatarThread.js +3 -3
  359. package/es/v1/avatar/AvatarUser/AvatarUser.js +4 -4
  360. package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +3 -3
  361. package/es/v1/avatar/index.js +7 -7
  362. package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +4 -4
  363. package/es/v1/emptystate/CommonEmptyState/CommonEmptyState.js +4 -4
  364. package/es/v1/emptystate/EditionPage/EditionPage.js +3 -3
  365. package/es/v1/errorstate/Inconvenience/Inconvenience.js +4 -4
  366. package/es/v1/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +4 -4
  367. package/es/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +4 -4
  368. package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +4 -4
  369. package/es/v1/errorstate/UrlNotFound/UrlNotFound.js +4 -4
  370. package/es/v1/errorstate/WillBeRightBack/WillBeRightBack.js +4 -4
  371. package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +5 -5
  372. package/es/v1/form/fields/CheckBoxField/props/defaultProps.js +1 -1
  373. package/es/v1/form/fields/CheckBoxField/props/propTypes.js +1 -1
  374. package/es/v1/form/fields/CurrencyField/CurrencyField.js +5 -5
  375. package/es/v1/form/fields/CurrencyField/props/defaultProps.js +1 -1
  376. package/es/v1/form/fields/CurrencyField/props/propTypes.js +1 -1
  377. package/es/v1/form/fields/DateField/DateField.js +5 -5
  378. package/es/v1/form/fields/DateField/props/defaultProps.js +1 -1
  379. package/es/v1/form/fields/DateField/props/propTypes.js +1 -1
  380. package/es/v1/form/fields/FieldContainer/FieldContainer.js +3 -3
  381. package/es/v1/form/fields/FieldContainer/props/defaultProps.js +1 -1
  382. package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +5 -5
  383. package/es/v1/form/fields/MultiSelectField/props/defaultProps.js +1 -1
  384. package/es/v1/form/fields/MultiSelectField/props/propTypes.js +1 -1
  385. package/es/v1/form/fields/PhoneField/PhoneField.js +6 -6
  386. package/es/v1/form/fields/RadioField/RadioField.js +5 -5
  387. package/es/v1/form/fields/SelectField/SelectField.js +5 -5
  388. package/es/v1/form/fields/SelectField/props/defaultProps.js +1 -1
  389. package/es/v1/form/fields/SelectField/props/propTypes.js +1 -1
  390. package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -5
  391. package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +7 -7
  392. package/es/v1/form/fields/TagsMultiSelectField/props/defaultProps.js +1 -1
  393. package/es/v1/form/fields/TagsMultiSelectField/props/propTypes.js +1 -1
  394. package/es/v1/form/fields/TextBoxField/TextBoxField.js +5 -5
  395. package/es/v1/form/fields/TextBoxField/props/defaultProps.js +1 -1
  396. package/es/v1/form/fields/TextBoxField/props/propTypes.js +1 -1
  397. package/es/v1/form/fields/TextEditor/TextEditor.js +4 -4
  398. package/es/v1/form/fields/TextEditor/props/propTypes.js +0 -1
  399. package/es/v1/form/fields/TextEditorField/TextEditorField.js +6 -6
  400. package/es/v1/form/fields/TextEditorField/props/defaultProps.js +1 -1
  401. package/es/v1/form/fields/TextEditorField/props/propTypes.js +1 -1
  402. package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +5 -5
  403. package/es/v1/form/fields/TextareaField/TextareaField.js +5 -5
  404. package/es/v1/form/fields/TextareaField/props/defaultProps.js +1 -1
  405. package/es/v1/form/fields/TextareaField/props/propTypes.js +1 -1
  406. package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +3 -3
  407. package/es/v1/form/fields/index.js +16 -16
  408. package/es/v1/form/layout/Field/Field.js +3 -3
  409. package/es/v1/form/layout/Section/Section.js +2 -2
  410. package/es/v1/form/layout/index.js +2 -2
  411. package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +3 -3
  412. package/es/v1/layout/SetupDetailLayout/index.js +4 -4
  413. package/es/v1/layout/SubtabLayout/SubtabLayout.js +4 -4
  414. package/es/v1/layout/SubtabLayout/index.js +4 -4
  415. package/es/v1/list/AvatarFlip/AvatarFlip.js +4 -4
  416. package/es/v1/list/BluePrintStatus/BluePrintStatus.js +2 -2
  417. package/es/v1/list/Comment/Comment.js +3 -3
  418. package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +5 -5
  419. package/es/v1/list/Dot/Dot.js +3 -3
  420. package/es/v1/list/DotNew/DotNew.js +3 -3
  421. package/es/v1/list/GridStencils/GridStencils.js +2 -2
  422. package/es/v1/list/Icons/AddNewIcon.js +2 -2
  423. package/es/v1/list/Icons/CompleteIcon.js +2 -2
  424. package/es/v1/list/Icons/DeleteIcon.js +2 -2
  425. package/es/v1/list/Icons/EditIcon.js +2 -2
  426. package/es/v1/list/Icons/FloatingIcons.js +3 -3
  427. package/es/v1/list/Icons/ReadUnreadIcon.js +3 -3
  428. package/es/v1/list/Icons/SmartIcon.js +2 -2
  429. package/es/v1/list/Icons/index.js +7 -7
  430. package/es/v1/list/ListLayout/ListLayout.js +3 -3
  431. package/es/v1/list/ListStencils/ListStencils.js +3 -3
  432. package/es/v1/list/SecondaryText/AccountName.js +4 -4
  433. package/es/v1/list/SecondaryText/ContactName.js +5 -5
  434. package/es/v1/list/SecondaryText/DepartmentText.js +2 -2
  435. package/es/v1/list/SecondaryText/Email.js +4 -4
  436. package/es/v1/list/SecondaryText/HappinessRating.js +2 -2
  437. package/es/v1/list/SecondaryText/PhoneNumber.js +4 -4
  438. package/es/v1/list/SecondaryText/PriorityText.js +3 -3
  439. package/es/v1/list/SecondaryText/SecondaryText.js +3 -3
  440. package/es/v1/list/SecondaryText/StatusText.js +3 -3
  441. package/es/v1/list/SecondaryText/TicketId.js +4 -4
  442. package/es/v1/list/SecondaryText/Website.js +4 -4
  443. package/es/v1/list/SecondaryText/index.js +11 -11
  444. package/es/v1/list/SecondryPanel/SecondryPanel.js +4 -4
  445. package/es/v1/list/SentimentStatus/SentimentStatus.js +2 -2
  446. package/es/v1/list/Subject/Subject.js +4 -4
  447. package/es/v1/list/TagNew/TagNew.js +3 -3
  448. package/es/v1/list/Thread/Thread.js +3 -3
  449. package/es/v1/list/index.js +16 -16
  450. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +5 -5
  451. package/es/v1/list/status/StatusListItem/StatusListItem.js +3 -3
  452. package/es/v1/list/status/index.js +2 -2
  453. package/es/v1/lookup/EmptyPage/EmptyPage.js +3 -3
  454. package/es/v1/lookup/Lookup/Lookup.js +4 -4
  455. package/es/v1/lookup/Section/Section.js +2 -2
  456. package/es/v1/lookup/header/Close/Close.js +3 -3
  457. package/es/v1/lookup/header/ModuleHeader/ModuleHeader.js +8 -8
  458. package/es/v1/lookup/header/Search/Search.js +4 -4
  459. package/es/v1/lookup/header/TicketHeader/TicketHeader.js +10 -10
  460. package/es/v1/lookup/header/Title/Title.js +3 -3
  461. package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +3 -3
  462. package/es/v1/lookup/header/index.js +5 -5
  463. package/es/v1/notification/DesktopNotification/DesktopNotification.js +6 -6
  464. package/es/v1/notification/DesktopNotification/props/defaultProps.js +1 -1
  465. package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +5 -5
  466. package/es/v1/notification/DesktopNotificationHeader/props/defaultProps.js +1 -1
  467. package/es/v1/setup/header/Button/Button.js +3 -3
  468. package/es/v1/setup/header/Link/Link.js +4 -4
  469. package/es/v1/setup/header/Search/Search.js +3 -3
  470. package/es/v1/setup/header/Views/Views.js +3 -3
  471. package/es/v1/setup/header/index.js +4 -4
  472. package/es/v1/setup/helptips/Description/Description.js +2 -2
  473. package/es/v1/setup/helptips/Link/Link.js +3 -3
  474. package/es/v1/setup/helptips/ListGroup/ListGroup.js +2 -2
  475. package/es/v1/setup/helptips/Title/Title.js +2 -2
  476. package/es/v1/setup/helptips/index.js +4 -4
  477. package/es/v1/setup/index.js +3 -3
  478. package/es/v1/setup/table/Table/Table.js +2 -2
  479. package/es/v1/setup/table/TableBody/TableBody.js +2 -2
  480. package/es/v1/setup/table/TableData/TableData.js +3 -3
  481. package/es/v1/setup/table/TableHead/TableHead.js +3 -3
  482. package/es/v1/setup/table/TableRow/TableRow.js +3 -3
  483. package/es/v1/setup/table/Text/Text.js +4 -4
  484. package/es/v1/setup/table/index.js +5 -5
  485. package/es/v1/svg/PlusIcon.js +2 -2
  486. package/es/v1/svg/SnippetIcon.js +2 -2
  487. package/es/v1/svg/TemplateIcon.js +2 -2
  488. package/es/v1/svg/index.js +3 -3
  489. package/es/version2/AlertClose/AlertClose.js +2 -2
  490. package/es/version2/AlertClose/__tests__/AlertClose.spec.js +1 -1
  491. package/es/version2/GlobalNotification/GlobalNotification.js +6 -6
  492. package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +1 -1
  493. package/es/version2/alertIcons/AlarmAlertIcon.js +3 -3
  494. package/es/version2/alertIcons/AlertIcons.js +9 -9
  495. package/es/version2/alertIcons/DangerAlertIcon.js +3 -3
  496. package/es/version2/alertIcons/ErrorAlertIcon.js +3 -3
  497. package/es/version2/alertIcons/InfoAlertIcon.js +3 -3
  498. package/es/version2/alertIcons/NotificationAlertIcon.js +3 -3
  499. package/es/version2/alertIcons/SuccessAlertIcon.js +3 -3
  500. package/es/version2/alertIcons/WarningAlertIcon.js +3 -3
  501. package/es/version2/alertIcons/__tests__/AlarmAlertIcon.spec.js +1 -1
  502. package/es/version2/alertIcons/__tests__/AlertIcons.spec.js +1 -1
  503. package/es/version2/alertIcons/__tests__/DangerAlertIcon.spec.js +1 -1
  504. package/es/version2/alertIcons/__tests__/ErrorAlertIcon.spec.js +1 -1
  505. package/es/version2/alertIcons/__tests__/InfoAlertIcon.spec.js +1 -1
  506. package/es/version2/alertIcons/__tests__/NotificationAlertIcon.spec.js +1 -1
  507. package/es/version2/alertIcons/__tests__/SuccessAlertIcon.spec.js +1 -1
  508. package/es/version2/alertIcons/__tests__/WarningAlertIcon.spec.js +1 -1
  509. package/es/version2/alertIcons/index.js +8 -8
  510. package/es/version2/errorstate/Inconvenience/Inconvenience.js +4 -4
  511. package/es/version2/errorstate/Inconvenience/__tests__/Inconvenience.spec.js +1 -1
  512. package/es/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +4 -4
  513. package/es/version2/errorstate/OopsSomethingMiss/__tests__/OopsSomethingMiss.spec.js +1 -1
  514. package/es/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +4 -4
  515. package/es/version2/errorstate/UnableToProcessRequest/__tests__/UnableToProcessRequest.spec.js +1 -1
  516. package/es/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +4 -4
  517. package/es/version2/errorstate/UnauthorizedLogin/__tests__/UnauthorizedLogin.spec.js +1 -1
  518. package/es/version2/errorstate/UrlNotFound/UrlNotFound.js +4 -4
  519. package/es/version2/errorstate/UrlNotFound/__tests__/UrlNotFound.spec.js +1 -1
  520. package/es/version2/errorstate/WillBeRightBack/WillBeRightBack.js +4 -4
  521. package/es/version2/errorstate/WillBeRightBack/__tests__/WillBeRightBack.spec.js +1 -1
  522. package/es/version2/errorstate/index.js +6 -6
  523. package/es/version2/index.js +8 -8
  524. package/es/version2/lookup/AlertHeader/AlertHeader.js +7 -7
  525. package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +1 -1
  526. package/es/version2/lookup/AlertLookup/AlertLookup.js +7 -7
  527. package/es/version2/lookup/AlertLookup/__tests__/AlertLookup.spec.js +1 -1
  528. package/es/version2/lookup/index.js +2 -2
  529. package/es/version2/notification/DesktopNotification/DesktopNotification.js +6 -6
  530. package/es/version2/notification/DesktopNotification/__tests__/DesktopNotification.spec.js +1 -1
  531. package/es/version2/notification/DesktopNotification/props/defaultProps.js +1 -1
  532. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +5 -5
  533. package/es/version2/notification/DesktopNotificationHeader/__tests__/DesktopNotificationHeader.spec.js +1 -1
  534. package/es/version2/notification/DesktopNotificationHeader/props/defaultProps.js +1 -1
  535. package/es/version2/notification/index.js +3 -3
  536. package/lib/AttachmentViewer/AttachmentImage.js +74 -36
  537. package/lib/AttachmentViewer/AttachmentViewer.js +151 -70
  538. package/lib/AttachmentViewer/AttachmentViewer.module.css +15 -3
  539. package/lib/AttachmentViewer/__tests__/AttachmentImage.spec.js +64 -13
  540. package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentImage.spec.js.snap +9 -5
  541. package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +16 -117
  542. package/lib/AttachmentViewer/props/defaultProps.js +5 -1
  543. package/lib/AttachmentViewer/props/propTypes.js +7 -3
  544. package/lib/AttachmentViewer/utils.js +60 -1
  545. package/lib/Image/Image.js +6 -2
  546. package/lib/Image/props/propTypes.js +3 -1
  547. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -3
  548. package/lib/form/fields/TextEditor/__tests__/__snapshots__/TextEditor.spec.js.snap +1 -1
  549. package/lib/form/fields/TextEditor/props/propTypes.js +0 -1
  550. package/lib/list/DepartmentDropDown/DepartmentDropDown.js +8 -3
  551. package/lib/list/DepartmentDropDown/props/defaultProps.js +2 -1
  552. package/lib/list/DepartmentDropDown/props/propTypes.js +1 -1
  553. package/lib/list/status/StatusListItem/StatusListItem.module.css +35 -5
  554. package/lib/v1/AttachmentViewer/AttachmentImage.js +52 -24
  555. package/lib/v1/AttachmentViewer/AttachmentViewer.js +151 -70
  556. package/lib/v1/AttachmentViewer/props/propTypes.js +7 -3
  557. package/lib/v1/Image/Image.js +6 -2
  558. package/lib/v1/Image/props/propTypes.js +3 -1
  559. package/lib/v1/form/fields/TextEditor/props/propTypes.js +0 -1
  560. package/package.json +3 -3
  561. package/result.json +1 -1
  562. package/unittest/index.html +2 -38
@@ -9,10 +9,16 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
12
+ var _hooks = require("@zohodesk/hooks");
13
+
14
+ var _Layout = require("@zohodesk/components/es/Layout");
15
+
12
16
  var _defaultProps = require("./props/defaultProps");
13
17
 
14
18
  var _propTypes = require("./props/propTypes");
15
19
 
20
+ var _utils = require("../../AttachmentViewer/utils");
21
+
16
22
  var _Image = _interopRequireDefault(require("../Image/Image"));
17
23
 
18
24
  var _AttachmentViewerModule = _interopRequireDefault(require("../../AttachmentViewer/AttachmentViewer.module.css"));
@@ -36,51 +42,73 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
36
42
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
43
 
38
44
  var AttachmentImage = function AttachmentImage(props) {
39
- var isImage = props.isImage,
40
- onLoad = props.onLoad,
45
+ var onLoad = props.onLoad,
46
+ onError = props.onError,
41
47
  src = props.src,
42
48
  onClick = props.onClick,
43
49
  alt = props.alt,
44
50
  dataId = props.dataId,
45
51
  id = props.id,
46
- className = props.className,
47
- isCover = props.isCover;
48
- var imageEle = (0, _react.useRef)();
52
+ customClass = props.customClass,
53
+ isCover = props.isCover,
54
+ children = props.children;
55
+ var _customClass$customIm = customClass.customImageClass,
56
+ customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm,
57
+ _customClass$customCh = customClass.customChildrenClass,
58
+ customChildrenClass = _customClass$customCh === void 0 ? '' : _customClass$customCh;
49
59
 
50
60
  var _useState = (0, _react.useState)(true),
51
61
  _useState2 = _slicedToArray(_useState, 2),
52
62
  isLoading = _useState2[0],
53
63
  setLoading = _useState2[1];
54
64
 
55
- var imgLoad = function imgLoad() {
56
- setLoading(false);
57
- onLoad && onLoad();
58
- };
65
+ var _useState3 = (0, _react.useState)(false),
66
+ _useState4 = _slicedToArray(_useState3, 2),
67
+ isImageValid = _useState4[0],
68
+ setImageValidity = _useState4[1];
59
69
 
60
- (0, _react.useEffect)(function () {
61
- if (isImage) {
62
- var image = imageEle.current;
63
- image.addEventListener('load', imgLoad);
64
- } else {
70
+ function handleImageValidation() {
71
+ (0, _utils.checkImageValidity)(src).then(function (isValid) {
72
+ setImageValidity(isValid);
65
73
  setLoading(false);
66
- }
74
+ });
75
+ }
76
+
77
+ (0, _react.useEffect)(function () {
78
+ handleImageValidation();
67
79
  }, []);
80
+ (0, _hooks.useEffectCallOnlyAfterState)(function () {
81
+ setLoading(true);
82
+ handleImageValidation();
83
+ }, [src]);
84
+
85
+ function renderImage() {
86
+ return /*#__PURE__*/_react["default"].createElement(_Image["default"], {
87
+ htmlId: id,
88
+ dataId: isImageValid ? dataId : "".concat(dataId, "_alt"),
89
+ src: src,
90
+ onClick: onClick,
91
+ className: customImageClass,
92
+ alt: alt,
93
+ isCover: isCover,
94
+ onLoad: onLoad,
95
+ onError: onError
96
+ });
97
+ }
98
+
68
99
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLoading ? /*#__PURE__*/_react["default"].createElement("div", {
69
100
  className: "".concat(_AttachmentViewerModule["default"].spinLoad),
70
101
  "data-id": "".concat(dataId, "_loader"),
71
102
  "data-test-id": "".concat(dataId, "_loader")
72
103
  }, /*#__PURE__*/_react["default"].createElement("div", {
73
104
  className: _AttachmentViewerModule["default"].loader
74
- })) : null, /*#__PURE__*/_react["default"].createElement(_Image["default"], {
105
+ })) : isImageValid ? renderImage() : children ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
106
+ align: "both",
75
107
  htmlId: id,
76
- eleRef: imageEle,
77
- dataId: dataId,
78
- src: src,
79
- onClick: onClick,
80
- className: "".concat(isLoading ? _AttachmentViewerModule["default"].hide : '', " ").concat(className),
81
- alt: alt,
82
- isCover: isCover
83
- }));
108
+ dataId: "".concat(dataId, "_custom"),
109
+ className: customChildrenClass
110
+ }, children) : renderImage() //alt ui
111
+ );
84
112
  };
85
113
 
86
114
  AttachmentImage.propTypes = _propTypes.AttachmentImage_propTypes;
@@ -33,6 +33,10 @@ var _FreezeLayer = _interopRequireDefault(require("../FreezeLayer/FreezeLayer"))
33
33
 
34
34
  var _Attachment = require("../../AttachmentViewer/Attachment");
35
35
 
36
+ var _utils = require("../../AttachmentViewer/utils");
37
+
38
+ var _audio_thumbnail = _interopRequireDefault(require("../../../images/audio_thumbnail.png"));
39
+
36
40
  var _General = require("../../utils/General");
37
41
 
38
42
  var _AttachmentViewerModule = _interopRequireDefault(require("../../AttachmentViewer/AttachmentViewer.module.css"));
@@ -43,6 +47,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
43
47
 
44
48
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
45
49
 
50
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
51
+
46
52
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
47
53
 
48
54
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -95,7 +101,10 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
95
101
  index: _this.props.previewObj.selectedIndex,
96
102
  data: _this.props.previewObj ? _this.props.previewObj.previewData : [],
97
103
  dataList: []
98
- })
104
+ }),
105
+ canOpenInNewTab: false,
106
+ canZoom: false,
107
+ isPreviewAttachmentValid: false
99
108
  };
100
109
  _this.togglePViewList = _this.togglePViewList.bind(_assertThisInitialized(_this));
101
110
  _this.changeSelectedIndex = _this.changeSelectedIndex.bind(_assertThisInitialized(_this));
@@ -107,13 +116,20 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
107
116
  _this.getNextId = (0, _IdProvider.getUniqueId)(_assertThisInitialized(_this));
108
117
  _this.getUpdateDataList = _this.getUpdateDataList.bind(_assertThisInitialized(_this));
109
118
  _this.zoomMaintain = _this.zoomMaintain.bind(_assertThisInitialized(_this));
119
+ _this.handleMenuValidation = _this.handleMenuValidation.bind(_assertThisInitialized(_this));
110
120
  return _this;
111
121
  }
112
122
 
113
123
  _createClass(AttachmentViewer, [{
124
+ key: "componentDidMount",
125
+ value: function componentDidMount() {
126
+ this.handleMenuValidation();
127
+ }
128
+ }, {
114
129
  key: "componentDidUpdate",
115
- value: function componentDidUpdate(prevProps) {
130
+ value: function componentDidUpdate(prevProps, prevState) {
116
131
  var previewObj = this.props.previewObj;
132
+ var selectedIndex = this.state.selectedIndex;
117
133
  var indexChanged = previewObj.selectedIndex != prevProps.previewObj.selectedIndex;
118
134
 
119
135
  if (previewObj.previewData.length != prevProps.previewObj.previewData.length || indexChanged) {
@@ -134,18 +150,48 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
134
150
  });
135
151
  }
136
152
  }
153
+
154
+ if (prevState.selectedIndex != selectedIndex) {
155
+ this.handleMenuValidation();
156
+ }
157
+ }
158
+ }, {
159
+ key: "handleMenuValidation",
160
+ value: function handleMenuValidation() {
161
+ var _this2 = this;
162
+
163
+ var _this$state = this.state,
164
+ data = _this$state.data,
165
+ selectedIndex = _this$state.selectedIndex;
166
+ var selectedAttachment = data[selectedIndex] || {};
167
+ var selectedAttachmentViewUrl = selectedAttachment.viewUrl;
168
+ var selectedAttachmentDownloadUrl = selectedAttachment.downloadUrl;
169
+ var selectedAttachmentName = selectedAttachment.name;
170
+ (0, _utils.checkFileSourcesValidation)({
171
+ fileName: selectedAttachmentName,
172
+ viewURL: selectedAttachmentViewUrl
173
+ }).then(function (fileSourceValidation) {
174
+ var isViewURLValid = fileSourceValidation.isViewURLValid,
175
+ canZoom = fileSourceValidation.canZoom;
176
+
177
+ _this2.setState({
178
+ isPreviewAttachmentValid: isViewURLValid,
179
+ canZoom: canZoom,
180
+ canOpenInNewTab: isViewURLValid
181
+ });
182
+ });
137
183
  }
138
184
  }, {
139
185
  key: "togglePViewList",
140
186
  value: function togglePViewList() {
141
- var _this2 = this;
187
+ var _this3 = this;
142
188
 
143
189
  this.setState(function (prevState) {
144
190
  return {
145
191
  isPViewListOpen: !prevState.isPViewListOpen
146
192
  };
147
193
  }, function () {
148
- _this2.focusSelectedImg(_this2.state.selectedIndex);
194
+ _this3.focusSelectedImg(_this3.state.selectedIndex);
149
195
  });
150
196
  }
151
197
  }, {
@@ -153,13 +199,11 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
153
199
  value: function zoomOut(ele) {
154
200
  this.setState({
155
201
  isZoomed: false
156
- });
157
- var img = document.getElementById("img".concat(ele));
158
-
159
- if (img) {
160
- img.classList.remove(_AttachmentViewerModule["default"].zoomedImg);
161
- img.classList.add(_AttachmentViewerModule["default"].normalImg);
162
- }
202
+ }); // const img = document.getElementById(`img${ele}`);
203
+ // if (img) {
204
+ // img.classList.remove(style.zoomedImg);
205
+ // img.classList.add(style.normalImg);
206
+ // }
163
207
  }
164
208
  }, {
165
209
  key: "zoomIn",
@@ -191,12 +235,11 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
191
235
  top: 0,
192
236
  left: 0
193
237
  };
194
- }
238
+ } // if (img) {
239
+ // img.classList.remove(style.normalImg);
240
+ // img.classList.add(style.zoomedImg);
241
+ // }
195
242
 
196
- if (img) {
197
- img.classList.remove(_AttachmentViewerModule["default"].normalImg);
198
- img.classList.add(_AttachmentViewerModule["default"].zoomedImg);
199
- }
200
243
 
201
244
  if (moveToPosition) {
202
245
  imgContainer.scrollLeft = (event.pageX - imgContainerPosition.left - imgUnits.left) * imgRatio.width;
@@ -242,11 +285,11 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
242
285
  }, {
243
286
  key: "changeSelectedIndex",
244
287
  value: function changeSelectedIndex(index) {
245
- var _this3 = this;
288
+ var _this4 = this;
246
289
 
247
- var _this$state = this.state,
248
- data = _this$state.data,
249
- selectedIndex = _this$state.selectedIndex;
290
+ var _this$state2 = this.state,
291
+ data = _this$state2.data,
292
+ selectedIndex = _this$state2.selectedIndex;
250
293
  var maintainZoom = this.props.maintainZoom;
251
294
  maintainZoom ? this.zoomMaintain(index) : this.zoomOut(selectedIndex);
252
295
 
@@ -257,7 +300,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
257
300
  this.setState({
258
301
  selectedIndex: index
259
302
  }, function () {
260
- _this3.focusSelectedImg(index);
303
+ _this4.focusSelectedImg(index);
261
304
  });
262
305
  }
263
306
  }, {
@@ -292,12 +335,14 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
292
335
  }, {
293
336
  key: "imgPreviewView",
294
337
  value: function imgPreviewView() {
295
- var _this4 = this;
338
+ var _this5 = this;
296
339
 
297
- var _this$state2 = this.state,
298
- dataList = _this$state2.dataList,
299
- selectedIndex = _this$state2.selectedIndex,
300
- isZoomed = _this$state2.isZoomed;
340
+ var _this$state3 = this.state,
341
+ dataList = _this$state3.dataList,
342
+ selectedIndex = _this$state3.selectedIndex,
343
+ isZoomed = _this$state3.isZoomed,
344
+ canZoom = _this$state3.canZoom,
345
+ isPreviewAttachmentValid = _this$state3.isPreviewAttachmentValid;
301
346
  var _this$props = this.props,
302
347
  maintainZoom = _this$props.maintainZoom,
303
348
  dataId = _this$props.dataId;
@@ -330,7 +375,24 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
330
375
  return dataList.length && dataList.map(function () {
331
376
  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
332
377
  var i = arguments.length > 1 ? arguments[1] : undefined;
333
- var selectedImgUrl = data.viewUrl;
378
+ var viewUrl = data.viewUrl,
379
+ name = data.name,
380
+ children = data.children,
381
+ _data$dataId = data.dataId,
382
+ dataId = _data$dataId === void 0 ? 'attachViewer' : _data$dataId,
383
+ _data$customClass = data.customClass,
384
+ customClass = _data$customClass === void 0 ? {} : _data$customClass,
385
+ _data$customProps = data.customProps,
386
+ customProps = _data$customProps === void 0 ? {} : _data$customProps;
387
+ var _customProps$audioPro = customProps.audioProps,
388
+ audioProps = _customProps$audioPro === void 0 ? {} : _customProps$audioPro,
389
+ _customProps$imagePro = customProps.imageProps,
390
+ imageProps = _customProps$imagePro === void 0 ? {} : _customProps$imagePro;
391
+ var _customClass$customIm = customClass.customImageClass,
392
+ customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm,
393
+ _customClass$customCh = customClass.customChildrenClass,
394
+ customChildrenClass = _customClass$customCh === void 0 ? '' : _customClass$customCh;
395
+ var retainZoom = canZoom && selectedIndex == i && maintainZoom;
334
396
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
335
397
  className: _AttachmentViewerModule["default"].imgBox,
336
398
  id: "imgBox".concat(i),
@@ -341,39 +403,43 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
341
403
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
342
404
  className: _AttachmentViewerModule["default"].imgRef,
343
405
  id: "imgPreviewRef".concat(i)
344
- }, (0, _Attachment.isAudioFile)(data.name) ? selectedIndex == i ? /*#__PURE__*/_react["default"].createElement("video", {
406
+ }, (0, _Attachment.isAudioFile)(name) ? selectedIndex == i ? /*#__PURE__*/_react["default"].createElement("video", _extends({
345
407
  autoPlay: true,
346
408
  controls: true,
347
409
  className: _AttachmentViewerModule["default"].zoomIn,
348
410
  "data-id": "".concat(dataId, "_videoPreview"),
349
411
  "data-test-id": "".concat(dataId, "_videoPreview")
350
- }, /*#__PURE__*/_react["default"].createElement("source", {
351
- src: data.viewUrl,
352
- type: "audio/".concat((0, _Attachment.getExtensionFromFileName)(data.name))
353
- })) : null : /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], {
354
- className: "".concat(_AttachmentViewerModule["default"].img, " ").concat(selectedIndex == i && maintainZoom ? isZoomed ? _AttachmentViewerModule["default"].zoomedImg : _AttachmentViewerModule["default"].normalImg : ''),
355
- src: selectedImgUrl,
356
- onClick: isZoomed ? _this4.zoomOut.bind(_this4, i) : function (e) {
357
- _this4.zoomIn(e, i, true);
412
+ }, audioProps), /*#__PURE__*/_react["default"].createElement("source", {
413
+ src: viewUrl,
414
+ type: "audio/".concat((0, _Attachment.getExtensionFromFileName)(name))
415
+ })) : null : /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
416
+ customClass: {
417
+ customImageClass: "".concat(_AttachmentViewerModule["default"].img, " ").concat(_AttachmentViewerModule["default"].altText, "\n ").concat(canZoom || retainZoom ? isZoomed ? "".concat(_AttachmentViewerModule["default"].zoomedImg, " ").concat(_AttachmentViewerModule["default"].zoomOutCursor) : "".concat(_AttachmentViewerModule["default"].normalImg, " ").concat(_AttachmentViewerModule["default"].zoomInCursor) : '', " ").concat(customImageClass),
418
+ customChildrenClass: customChildrenClass
358
419
  },
359
- alt: "Preview",
360
- dataId: "attachViewer",
420
+ src: viewUrl,
421
+ onClick: isPreviewAttachmentValid ? isZoomed ? _this5.zoomOut.bind(_this5, i) : function (e) {
422
+ _this5.zoomIn(e, i, true);
423
+ } : undefined,
424
+ alt: name,
425
+ dataId: dataId,
361
426
  id: "img".concat(i),
362
- isImage: true,
363
427
  isCover: false
364
- })));
428
+ }, imageProps), children)));
365
429
  });
366
430
  }
367
431
  }, {
368
432
  key: "render",
369
433
  value: function render() {
370
- var _this5 = this;
371
-
372
- var _this$state3 = this.state,
373
- isPViewListOpen = _this$state3.isPViewListOpen,
374
- selectedIndex = _this$state3.selectedIndex,
375
- data = _this$state3.data,
376
- isZoomed = _this$state3.isZoomed;
434
+ var _this6 = this;
435
+
436
+ var _this$state4 = this.state,
437
+ isPViewListOpen = _this$state4.isPViewListOpen,
438
+ selectedIndex = _this$state4.selectedIndex,
439
+ data = _this$state4.data,
440
+ isZoomed = _this$state4.isZoomed,
441
+ canZoom = _this$state4.canZoom,
442
+ canOpenInNewTab = _this$state4.canOpenInNewTab;
377
443
  var _this$props2 = this.props,
378
444
  responsiveId = _this$props2.responsiveId,
379
445
  needDownload = _this$props2.needDownload,
@@ -431,9 +497,9 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
431
497
  align: uptoTablet ? 'bottom' : 'center',
432
498
  wrap: "wrap",
433
499
  isCover: false
434
- }, isZoomed ? /*#__PURE__*/_react["default"].createElement("div", {
500
+ }, canZoom ? isZoomed ? /*#__PURE__*/_react["default"].createElement("div", {
435
501
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
436
- onClick: _this5.zoomOut.bind(_this5, selectedIndex),
502
+ onClick: _this6.zoomOut.bind(_this6, selectedIndex),
437
503
  "data-id": "zoomOut",
438
504
  "data-test-id": "zoomOut",
439
505
  "data-title": i18nKeys.zoomOutText
@@ -448,7 +514,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
448
514
  })) : /*#__PURE__*/_react["default"].createElement("div", {
449
515
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
450
516
  onClick: function onClick(e) {
451
- return _this5.zoomIn(e, selectedIndex);
517
+ return _this6.zoomIn(e, selectedIndex);
452
518
  },
453
519
  "data-id": "zoomIn",
454
520
  "data-test-id": "zoomIn",
@@ -461,7 +527,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
461
527
  a11y: {
462
528
  ariaLabel: i18nKeys.zoomInText
463
529
  }
464
- })), /*#__PURE__*/_react["default"].createElement("div", {
530
+ })) : null, canOpenInNewTab ? /*#__PURE__*/_react["default"].createElement("div", {
465
531
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu
466
532
  }, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
467
533
  href: selectedImgUrl,
@@ -477,7 +543,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
477
543
  a11y: {
478
544
  ariaLabel: i18nKeys.newTabText
479
545
  }
480
- }))), needDownload ? /*#__PURE__*/_react["default"].createElement("div", {
546
+ }))) : null, needDownload ? /*#__PURE__*/_react["default"].createElement("div", {
481
547
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu
482
548
  }, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
483
549
  href: downloadUrl,
@@ -497,7 +563,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
497
563
  }
498
564
  }))) : null, /*#__PURE__*/_react["default"].createElement("div", {
499
565
  className: uptoTablet ? _AttachmentViewerModule["default"].mobileMenu : _AttachmentViewerModule["default"].menu,
500
- onClick: _this5.closeAttachmentViewer,
566
+ onClick: _this6.closeAttachmentViewer,
501
567
  "data-id": "closeAttach",
502
568
  "data-test-id": "closeAttach",
503
569
  "data-title": i18nKeys.closeText
@@ -518,7 +584,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
518
584
  alignBox: "row"
519
585
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
520
586
  className: "".concat(_AttachmentViewerModule["default"].arrowBox, " ").concat(uptoTablet ? _AttachmentViewerModule["default"].mbleArrowBox : _AttachmentViewerModule["default"].nrmlArrowBox, " ").concat(selectedIndex === 0 ? _AttachmentViewerModule["default"].hidden : ''),
521
- onClick: _this5.changeSelectedIndex.bind(_this5, selectedIndex - 1),
587
+ onClick: _this6.changeSelectedIndex.bind(_this6, selectedIndex - 1),
522
588
  "data-title": i18nKeys.previousText,
523
589
  "data-title-position": "left"
524
590
  }, /*#__PURE__*/_react["default"].createElement("button", {
@@ -534,12 +600,12 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
534
600
  tabindex: "0",
535
601
  "aria-describedby": ariaId,
536
602
  isShrink: false,
537
- eleRef: _this5.setImgBoxRef,
603
+ eleRef: _this6.setImgBoxRef,
538
604
  scroll: "both",
539
605
  flexible: true
540
- }, _this5.imgPreviewView()), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
606
+ }, _this6.imgPreviewView()), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
541
607
  className: "".concat(_AttachmentViewerModule["default"].arrowBox, " ").concat(uptoTablet ? _AttachmentViewerModule["default"].mbleArrowBox : _AttachmentViewerModule["default"].nrmlArrowBox, " ").concat(totalLen === selectedIndex + 1 ? _AttachmentViewerModule["default"].hidden : ''),
542
- onClick: _this5.changeSelectedIndex.bind(_this5, selectedIndex + 1),
608
+ onClick: _this6.changeSelectedIndex.bind(_this6, selectedIndex + 1),
543
609
  "data-title": i18nKeys.nextText,
544
610
  "data-title-position": "right"
545
611
  }, /*#__PURE__*/_react["default"].createElement("button", {
@@ -579,33 +645,48 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
579
645
  alignBox: "row",
580
646
  scroll: "horizontal",
581
647
  eleRef: function eleRef(el) {
582
- return _this5.imgListCont = el;
648
+ return _this6.imgListCont = el;
583
649
  },
584
650
  className: _AttachmentViewerModule["default"].listContainer
585
651
  }, data.map(function (item, index) {
586
652
  var name = item.name,
587
- viewUrl = item.viewUrl;
588
- var isAudio = (0, _Attachment.isAudioFile)(name);
653
+ viewUrl = item.viewUrl,
654
+ children = item.children,
655
+ _item$customClass = item.customClass,
656
+ customClass = _item$customClass === void 0 ? {} : _item$customClass,
657
+ _item$dataId = item.dataId,
658
+ dataId = _item$dataId === void 0 ? 'AttachmentImage' : _item$dataId,
659
+ _item$customProps = item.customProps,
660
+ customProps = _item$customProps === void 0 ? {} : _item$customProps;
661
+ var thumbnail = item.thumbnail;
662
+ var _customClass$customIm2 = customClass.customImageClass,
663
+ customImageClass = _customClass$customIm2 === void 0 ? '' : _customClass$customIm2,
664
+ _customClass$customCh2 = customClass.customChildrenClass,
665
+ customChildrenClass = _customClass$customCh2 === void 0 ? '' : _customClass$customCh2;
666
+ thumbnail = (0, _Attachment.isAudioFile)(name) ? thumbnail || _audio_thumbnail["default"] : thumbnail; //fallback thumbnail for audio
667
+
589
668
  return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
590
- className: "".concat(_AttachmentViewerModule["default"].imgItem, " ").concat(index === selectedIndex ? _AttachmentViewerModule["default"].selected : '', " ").concat(isAudio ? _AttachmentViewerModule["default"].isAudio : ''),
669
+ className: "".concat(_AttachmentViewerModule["default"].imgItem, " ").concat(index === selectedIndex ? _AttachmentViewerModule["default"].selected : ''),
591
670
  key: index,
592
- onClick: _this5.changeSelectedIndex.bind(_this5, index),
671
+ onClick: _this6.changeSelectedIndex.bind(_this6, index),
593
672
  eleRef: function eleRef(el) {
594
- return _this5["img_".concat(index)] = el;
673
+ return _this6["img_".concat(index)] = el;
595
674
  },
596
675
  dataId: "attachPreviewList",
597
676
  "data-title": name
598
- }, /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], {
599
- src: viewUrl,
677
+ }, /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], _extends({
678
+ src: thumbnail || viewUrl,
600
679
  size: "small",
601
680
  alt: name,
602
- className: _AttachmentViewerModule["default"].image,
603
- isImage: !isAudio,
604
- dataId: "AttachmentImage"
605
- }));
681
+ customClass: {
682
+ customImageClass: "".concat(_AttachmentViewerModule["default"].image, " ").concat(_AttachmentViewerModule["default"].altText, " ").concat(customImageClass),
683
+ customChildrenClass: "".concat(_AttachmentViewerModule["default"].crsrPointer, " ").concat(customChildrenClass)
684
+ },
685
+ dataId: dataId
686
+ }, customProps), children));
606
687
  }))))), totalLen !== 1 && /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
607
688
  dataId: "attachToggle",
608
- onClick: _this5.togglePViewList,
689
+ onClick: _this6.togglePViewList,
609
690
  iconName: "ZD-GN-hideTab",
610
691
  iconSize: "14",
611
692
  hoverType: "border",
@@ -11,14 +11,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
11
11
 
12
12
  var AttachmentImage_propTypes = {
13
13
  alt: _propTypes["default"].string,
14
- className: _propTypes["default"].string,
14
+ customClass: _propTypes["default"].shape({
15
+ customImageClass: _propTypes["default"].string,
16
+ customChildrenClass: _propTypes["default"].string
17
+ }),
15
18
  dataId: _propTypes["default"].string,
16
19
  id: _propTypes["default"].string,
17
20
  isCover: _propTypes["default"].bool,
18
- isImage: _propTypes["default"].bool,
19
21
  onClick: _propTypes["default"].func,
20
22
  onLoad: _propTypes["default"].func,
21
- src: _propTypes["default"].string
23
+ onError: _propTypes["default"].func,
24
+ src: _propTypes["default"].string,
25
+ children: _propTypes["default"].node
22
26
  };
23
27
  exports.AttachmentImage_propTypes = AttachmentImage_propTypes;
24
28
  var AttachmentViewer_propTypes = {
@@ -25,7 +25,9 @@ function Image(props) {
25
25
  dataId = props.dataId,
26
26
  htmlId = props.htmlId,
27
27
  eleRef = props.eleRef,
28
- original = props.original;
28
+ original = props.original,
29
+ onLoad = props.onLoad,
30
+ onError = props.onError;
29
31
  return /*#__PURE__*/_react["default"].createElement("img", {
30
32
  src: src,
31
33
  alt: alt,
@@ -36,7 +38,9 @@ function Image(props) {
36
38
  onClick: onClick,
37
39
  id: htmlId,
38
40
  ref: eleRef,
39
- "data-original": original
41
+ "data-original": original,
42
+ onLoad: onLoad,
43
+ onError: onError
40
44
  });
41
45
  }
42
46
 
@@ -19,6 +19,8 @@ var propTypes = {
19
19
  onClick: _propTypes["default"].func,
20
20
  original: _propTypes["default"].string,
21
21
  src: _propTypes["default"].string.isRequired,
22
- title: _propTypes["default"].string
22
+ title: _propTypes["default"].string,
23
+ onLoad: _propTypes["default"].func,
24
+ onError: _propTypes["default"].func
23
25
  };
24
26
  exports.propTypes = propTypes;
@@ -22,7 +22,6 @@ var propTypes = {
22
22
  fontSize: _propTypes["default"].string,
23
23
  getRef: _propTypes["default"].func,
24
24
  handleAlertMessage: _propTypes["default"].func,
25
- handleDropUpload: _propTypes["default"].func,
26
25
  i18nKeys: _propTypes["default"].shape({
27
26
  fileUploadError: _propTypes["default"].string,
28
27
  fileNotSupported: _propTypes["default"].string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.0.0-temp-197.6",
3
+ "version": "1.0.0-temp-187.1",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -37,7 +37,7 @@
37
37
  "sstest": "react-cli sstest",
38
38
  "common_package_build": "cd ../common && npm run build && cd ../dot",
39
39
  "docs": "npm run css:review && review:props && react-cli docs",
40
- "prepublishOnly": "node prePublish.js && npm run download",
40
+ "prepublishOnly": "node prePublish.js && npm run download && npm run css:review && npm run review:props",
41
41
  "postpublish": "node postPublish.js",
42
42
  "test-clean": "react-cli clean coverage",
43
43
  "download": "react-cli clean ./node_modules ./package-lock.json && npm install",
@@ -63,7 +63,7 @@
63
63
  "@zohodesk-private/node-plugins": "1.1.8",
64
64
  "@zohodesk-private/react-prop-validator": "1.2.3",
65
65
  "@zohodesk/a11y": "2.2.6",
66
- "@zohodesk/components": "1.2.44",
66
+ "@zohodesk/components": "1.0.0-temp-199.1",
67
67
  "@zohodesk/hooks": "2.0.5",
68
68
  "@zohodesk/icons": "1.0.60",
69
69
  "@zohodesk/svg": "1.1.19",