@zohodesk/dot 1.7.19 → 1.7.20-exp.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/README.md +28 -0
  2. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +11 -1
  3. package/assets/Appearance/light/mode/Dot_LightMode.module.css +11 -1
  4. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +11 -1
  5. package/es/ActionButton/ActionButton.js +6 -6
  6. package/es/ActionButton/ActionButton.module.css +1 -1
  7. package/es/AlphabeticList/AlphabeticList.js +1 -1
  8. package/es/AlphabeticList/AlphabeticList.module.css +1 -1
  9. package/es/Attachment/Attachment.js +7 -4
  10. package/es/Attachment/__tests__/Attachment.spec.js +24 -0
  11. package/es/Attachment/__tests__/__snapshots__/Attachment.spec.js.snap +105 -0
  12. package/es/AttachmentViewer/AttachmentViewer.js +5 -5
  13. package/es/AttachmentViewer/AttachmentViewer.module.css +1 -1
  14. package/es/AudioPlayer/AudioPlayer.js +580 -0
  15. package/es/AudioPlayer/AudioPlayer.module.css +146 -0
  16. package/es/AudioPlayer/Timer/Timer.js +67 -0
  17. package/es/AudioPlayer/Timer/Timer.module.css +5 -0
  18. package/es/AudioPlayer/Timer/__tests__/Timer.spec.js +20 -0
  19. package/es/AudioPlayer/Timer/__tests__/__snapshots__/Timer.spec.js.snap +14 -0
  20. package/es/AudioPlayer/Timer/propTypes/defaultProps.js +4 -0
  21. package/es/AudioPlayer/Timer/propTypes/propTypes.js +11 -0
  22. package/es/AudioPlayer/__tests__/AudioPlayer.spec.js +192 -0
  23. package/es/AudioPlayer/__tests__/__snapshots__/AudioPlayer.spec.js.snap +1995 -0
  24. package/es/AudioPlayer/propTypes/defaultProps.js +14 -0
  25. package/es/AudioPlayer/propTypes/propTypes.js +33 -0
  26. package/es/AudioPlayer/utils/utils.js +24 -0
  27. package/es/ChannelIcon/ChannelIcon.js +1 -1
  28. package/es/DotProvider/hooks/useDotProvider.js +1 -0
  29. package/es/Drawer/Drawer.js +6 -6
  30. package/es/Drawer/Drawer.module.css +1 -1
  31. package/es/FlipCard/FlipCard.js +3 -3
  32. package/es/FormAction/FormAction.js +1 -1
  33. package/es/FreezeLayer/FreezeLayer.js +3 -3
  34. package/es/Hooks/Dragger/useDragger.js +52 -33
  35. package/es/IconButton/IconButton.js +3 -3
  36. package/es/ImportantNotes/ImportantNotes.js +1 -1
  37. package/es/Loader/Loader.js +1 -1
  38. package/es/MessageBanner/MessageBanner.js +1 -1
  39. package/es/NewStar/NewStar.js +1 -1
  40. package/es/Onboarding/Onboarding.js +3 -3
  41. package/es/Separator/Separator.js +1 -1
  42. package/es/ToastMessage/ToastMessage.js +4 -4
  43. package/es/Upload/Upload.js +1 -1
  44. package/es/VideoLookup/VideoLookup.js +1 -1
  45. package/es/alert/AlertHeader/AlertHeader.js +1 -1
  46. package/es/alert/AlertLookup/AlertLookup.js +1 -1
  47. package/es/avatar/AvatarClose/AvatarClose.js +1 -1
  48. package/es/avatar/AvatarCollision/AvatarCollision.js +1 -1
  49. package/es/avatar/AvatarIcon/AvatarIcon.js +2 -2
  50. package/es/avatar/AvatarStatus/AvatarStatus.js +1 -1
  51. package/es/avatar/AvatarThread/AvatarThread.js +1 -1
  52. package/es/avatar/AvatarUser/AvatarUser.js +1 -1
  53. package/es/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
  54. package/es/deprecated/FreezeLayer/FreezeLayer.js +3 -3
  55. package/es/deprecated/SelectDropdown/SelectDropdown.js +7 -7
  56. package/es/dot_layer.module.css +1 -0
  57. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +14 -14
  58. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
  59. package/es/emptystate/EditionPage/EditionPage.css +2 -2
  60. package/es/emptystate/EditionPage/EditionPage.js +1 -1
  61. package/es/errorstate/Inconvenience/Inconvenience.js +3 -3
  62. package/es/errorstate/NoRequestFound/NoRequestFound.js +3 -3
  63. package/es/errorstate/PermissionPlay/PermissionPlay.js +3 -3
  64. package/es/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
  65. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +3 -3
  66. package/es/errorstate/UnableToProcess/UnableToProcess.js +3 -3
  67. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -3
  68. package/es/errorstate/WillBack/WillBack.js +3 -3
  69. package/es/form/fields/CheckBoxField/CheckBoxField.js +3 -3
  70. package/es/form/fields/CurrencyField/CurrencyField.js +3 -3
  71. package/es/form/fields/DateField/DateField.js +3 -3
  72. package/es/form/fields/FieldContainer/FieldContainer.js +1 -1
  73. package/es/form/fields/Fields.module.css +4 -0
  74. package/es/form/fields/MultiSelectField/MultiSelectField.js +3 -3
  75. package/es/form/fields/PhoneField/PhoneField.js +3 -2
  76. package/es/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -1
  77. package/es/form/fields/RadioField/RadioField.js +2 -2
  78. package/es/form/fields/SelectField/SelectField.js +3 -3
  79. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +11 -11
  80. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +3 -3
  81. package/es/form/fields/TextBoxField/TextBoxField.js +3 -3
  82. package/es/form/fields/TextEditor/TextEditor.js +3 -2
  83. package/es/form/fields/TextEditor/TextEditor.module.css +2 -2
  84. package/es/form/fields/TextEditorField/TextEditorField.js +1 -1
  85. package/es/form/fields/TextEditorWrapper/TextEditorWrapper.js +2 -2
  86. package/es/form/fields/TextareaField/TextareaField.js +3 -3
  87. package/es/form/fields/ValidationMessage/ValidationMessage.js +2 -2
  88. package/es/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
  89. package/es/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
  90. package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
  91. package/es/layout/SubtabLayout/SubtabLayout.js +2 -2
  92. package/es/list/Comment/Comment.js +1 -1
  93. package/es/list/Icons/AddNewIcon.js +1 -1
  94. package/es/list/Icons/CompleteIcon.js +1 -1
  95. package/es/list/Icons/DeleteIcon.js +1 -1
  96. package/es/list/Icons/EditIcon.js +1 -1
  97. package/es/list/Icons/ReadUnreadIcon.js +1 -1
  98. package/es/list/Icons/SmartIcon.js +1 -1
  99. package/es/list/ListLayout/ListLayout.js +1 -1
  100. package/es/list/ListStencils/ListStencils.js +1 -1
  101. package/es/list/SecondaryText/AccountName.js +1 -1
  102. package/es/list/SecondaryText/ContactName.js +1 -1
  103. package/es/list/SecondaryText/SecondaryText.module.css +8 -8
  104. package/es/list/SecondryPanel/SecondryPanel.js +2 -2
  105. package/es/list/Subject/Subject.module.css +3 -3
  106. package/es/list/Thread/Thread.js +1 -1
  107. package/es/list/status/StatusDropdown/StatusDropdown.js +10 -10
  108. package/es/list/status/StatusListItem/StatusListItem.js +2 -2
  109. package/es/lookup/EmptyPage/EmptyPage.js +4 -4
  110. package/es/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
  111. package/es/lookup/Lookup/Lookup.js +1 -1
  112. package/es/lookup/Section/Section.js +1 -1
  113. package/es/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
  114. package/es/lookup/header/Search/Search.js +3 -3
  115. package/es/lookup/header/TicketHeader/TicketHeader.js +1 -1
  116. package/es/lookup/header/Title/LookupTitle.module.css +7 -3
  117. package/es/lookup/header/ViewDropDown/ViewDropDown.js +9 -9
  118. package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
  119. package/es/setup/header/Button/Button.js +1 -1
  120. package/es/setup/header/Link/Link.js +1 -1
  121. package/es/setup/header/Search/Search.js +1 -1
  122. package/es/setup/header/Search/Search.module.css +1 -1
  123. package/es/setup/table/Table/Table.js +1 -1
  124. package/es/setup/table/TableBody/TableBody.js +1 -1
  125. package/es/setup/table/TableData/TableData.js +1 -1
  126. package/es/setup/table/TableHead/TableHead.js +1 -1
  127. package/es/setup/table/TableRow/TableRow.js +1 -1
  128. package/es/svg/PlusIcon.js +1 -1
  129. package/es/svg/SnippetIcon.js +1 -1
  130. package/es/svg/TemplateIcon.js +1 -1
  131. package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +2 -2
  132. package/es/v1/emptystate/EditionPage/EditionPage.js +1 -1
  133. package/es/v1/errorstate/Inconvenience/Inconvenience.js +1 -1
  134. package/es/v1/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +1 -1
  135. package/es/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -1
  136. package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +1 -1
  137. package/es/v1/errorstate/UrlNotFound/UrlNotFound.js +1 -1
  138. package/es/v1/errorstate/WillBeRightBack/WillBeRightBack.js +1 -1
  139. package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -2
  140. package/es/v1/form/fields/TextEditor/TextEditor.js +2 -1
  141. package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
  142. package/es/v1/lookup/EmptyPage/EmptyPage.js +4 -4
  143. package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +1 -1
  144. package/es/v1/notification/DesktopNotification/DesktopNotification.js +1 -1
  145. package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +1 -1
  146. package/es/v1/svg/PlusIcon.js +1 -1
  147. package/es/v1/svg/SnippetIcon.js +1 -1
  148. package/es/v1/svg/TemplateIcon.js +1 -1
  149. package/es/version2/AlertClose/AlertClose.js +1 -1
  150. package/es/version2/GlobalNotification/GlobalNotification.js +1 -1
  151. package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -2
  152. package/es/version2/errorstate/Inconvenience/Inconvenience.js +3 -3
  153. package/es/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +3 -3
  154. package/es/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +3 -3
  155. package/es/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -3
  156. package/es/version2/errorstate/UrlNotFound/UrlNotFound.js +3 -3
  157. package/es/version2/errorstate/V2_ErrorStates.module.css +1 -1
  158. package/es/version2/errorstate/WillBeRightBack/WillBeRightBack.js +3 -3
  159. package/es/version2/lookup/AlertHeader/AlertHeader.js +1 -1
  160. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
  161. package/es/version2/lookup/AlertLookup/AlertLookup.js +3 -3
  162. package/es/version2/lookup/alertLookupCommonNew.module.css +1 -1
  163. package/es/version2/notification/DesktopNotification/DesktopNotification.js +4 -4
  164. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
  165. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +2 -2
  166. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +1 -0
  167. package/lib/ActionButton/ActionButton.js +6 -6
  168. package/lib/ActionButton/ActionButton.module.css +1 -1
  169. package/lib/AlphabeticList/AlphabeticList.js +1 -1
  170. package/lib/AlphabeticList/AlphabeticList.module.css +1 -1
  171. package/lib/Attachment/Attachment.js +7 -4
  172. package/lib/Attachment/__tests__/Attachment.spec.js +24 -0
  173. package/lib/Attachment/__tests__/__snapshots__/Attachment.spec.js.snap +105 -0
  174. package/lib/AttachmentViewer/AttachmentViewer.js +5 -5
  175. package/lib/AttachmentViewer/AttachmentViewer.module.css +1 -1
  176. package/lib/AudioPlayer/AudioPlayer.js +662 -0
  177. package/lib/AudioPlayer/AudioPlayer.module.css +146 -0
  178. package/lib/AudioPlayer/Timer/Timer.js +117 -0
  179. package/lib/AudioPlayer/Timer/Timer.module.css +5 -0
  180. package/lib/AudioPlayer/Timer/__tests__/Timer.spec.js +26 -0
  181. package/lib/AudioPlayer/Timer/__tests__/__snapshots__/Timer.spec.js.snap +14 -0
  182. package/lib/AudioPlayer/Timer/propTypes/defaultProps.js +11 -0
  183. package/lib/AudioPlayer/Timer/propTypes/propTypes.js +22 -0
  184. package/lib/AudioPlayer/__tests__/AudioPlayer.spec.js +210 -0
  185. package/lib/AudioPlayer/__tests__/__snapshots__/AudioPlayer.spec.js.snap +1995 -0
  186. package/lib/AudioPlayer/propTypes/defaultProps.js +24 -0
  187. package/lib/AudioPlayer/propTypes/propTypes.js +44 -0
  188. package/lib/AudioPlayer/utils/utils.js +33 -0
  189. package/lib/ChannelIcon/ChannelIcon.js +1 -1
  190. package/lib/DotProvider/hooks/useDotProvider.js +2 -0
  191. package/lib/Drawer/Drawer.js +6 -6
  192. package/lib/Drawer/Drawer.module.css +1 -1
  193. package/lib/FlipCard/FlipCard.js +3 -3
  194. package/lib/FormAction/FormAction.js +1 -1
  195. package/lib/FreezeLayer/FreezeLayer.js +3 -3
  196. package/lib/Hooks/Dragger/useDragger.js +51 -28
  197. package/lib/IconButton/IconButton.js +3 -3
  198. package/lib/ImportantNotes/ImportantNotes.js +1 -1
  199. package/lib/Loader/Loader.js +1 -1
  200. package/lib/MessageBanner/MessageBanner.js +1 -1
  201. package/lib/NewStar/NewStar.js +1 -1
  202. package/lib/Onboarding/Onboarding.js +3 -3
  203. package/lib/Separator/Separator.js +1 -1
  204. package/lib/ToastMessage/ToastMessage.js +4 -4
  205. package/lib/Upload/Upload.js +1 -1
  206. package/lib/VideoLookup/VideoLookup.js +1 -1
  207. package/lib/alert/AlertHeader/AlertHeader.js +1 -1
  208. package/lib/alert/AlertLookup/AlertLookup.js +1 -1
  209. package/lib/avatar/AvatarClose/AvatarClose.js +1 -1
  210. package/lib/avatar/AvatarCollision/AvatarCollision.js +1 -1
  211. package/lib/avatar/AvatarIcon/AvatarIcon.js +2 -2
  212. package/lib/avatar/AvatarStatus/AvatarStatus.js +1 -1
  213. package/lib/avatar/AvatarThread/AvatarThread.js +1 -1
  214. package/lib/avatar/AvatarUser/AvatarUser.js +1 -1
  215. package/lib/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
  216. package/lib/deprecated/FreezeLayer/FreezeLayer.js +3 -3
  217. package/lib/deprecated/SelectDropdown/SelectDropdown.js +7 -7
  218. package/lib/dot_layer.module.css +1 -0
  219. package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +14 -14
  220. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
  221. package/lib/emptystate/EditionPage/EditionPage.css +2 -2
  222. package/lib/emptystate/EditionPage/EditionPage.js +1 -1
  223. package/lib/errorstate/Inconvenience/Inconvenience.js +3 -3
  224. package/lib/errorstate/NoRequestFound/NoRequestFound.js +3 -3
  225. package/lib/errorstate/PermissionPlay/PermissionPlay.js +3 -3
  226. package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
  227. package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +3 -3
  228. package/lib/errorstate/UnableToProcess/UnableToProcess.js +3 -3
  229. package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -3
  230. package/lib/errorstate/WillBack/WillBack.js +3 -3
  231. package/lib/form/fields/CheckBoxField/CheckBoxField.js +3 -3
  232. package/lib/form/fields/CurrencyField/CurrencyField.js +3 -3
  233. package/lib/form/fields/DateField/DateField.js +3 -3
  234. package/lib/form/fields/FieldContainer/FieldContainer.js +1 -1
  235. package/lib/form/fields/Fields.module.css +4 -0
  236. package/lib/form/fields/MultiSelectField/MultiSelectField.js +3 -3
  237. package/lib/form/fields/PhoneField/PhoneField.js +3 -2
  238. package/lib/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -1
  239. package/lib/form/fields/RadioField/RadioField.js +2 -2
  240. package/lib/form/fields/SelectField/SelectField.js +3 -3
  241. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +11 -11
  242. package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +3 -3
  243. package/lib/form/fields/TextBoxField/TextBoxField.js +3 -3
  244. package/lib/form/fields/TextEditor/TextEditor.js +2 -2
  245. package/lib/form/fields/TextEditor/TextEditor.module.css +2 -2
  246. package/lib/form/fields/TextEditorField/TextEditorField.js +1 -1
  247. package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.js +2 -2
  248. package/lib/form/fields/TextareaField/TextareaField.js +3 -3
  249. package/lib/form/fields/ValidationMessage/ValidationMessage.js +2 -2
  250. package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
  251. package/lib/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
  252. package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
  253. package/lib/layout/SubtabLayout/SubtabLayout.js +2 -2
  254. package/lib/list/Comment/Comment.js +1 -1
  255. package/lib/list/Icons/AddNewIcon.js +1 -1
  256. package/lib/list/Icons/CompleteIcon.js +1 -1
  257. package/lib/list/Icons/DeleteIcon.js +1 -1
  258. package/lib/list/Icons/EditIcon.js +1 -1
  259. package/lib/list/Icons/ReadUnreadIcon.js +1 -1
  260. package/lib/list/Icons/SmartIcon.js +1 -1
  261. package/lib/list/ListLayout/ListLayout.js +1 -1
  262. package/lib/list/ListStencils/ListStencils.js +1 -1
  263. package/lib/list/SecondaryText/AccountName.js +1 -1
  264. package/lib/list/SecondaryText/ContactName.js +1 -1
  265. package/lib/list/SecondaryText/SecondaryText.module.css +8 -8
  266. package/lib/list/SecondryPanel/SecondryPanel.js +2 -2
  267. package/lib/list/Subject/Subject.module.css +3 -3
  268. package/lib/list/Thread/Thread.js +1 -1
  269. package/lib/list/status/StatusDropdown/StatusDropdown.js +10 -10
  270. package/lib/list/status/StatusListItem/StatusListItem.js +2 -2
  271. package/lib/lookup/EmptyPage/EmptyPage.js +4 -4
  272. package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
  273. package/lib/lookup/Lookup/Lookup.js +1 -1
  274. package/lib/lookup/Section/Section.js +1 -1
  275. package/lib/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
  276. package/lib/lookup/header/Search/Search.js +3 -3
  277. package/lib/lookup/header/TicketHeader/TicketHeader.js +1 -1
  278. package/lib/lookup/header/Title/LookupTitle.module.css +7 -3
  279. package/lib/lookup/header/ViewDropDown/ViewDropDown.js +9 -9
  280. package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
  281. package/lib/setup/header/Button/Button.js +1 -1
  282. package/lib/setup/header/Link/Link.js +1 -1
  283. package/lib/setup/header/Search/Search.js +1 -1
  284. package/lib/setup/header/Search/Search.module.css +1 -1
  285. package/lib/setup/table/Table/Table.js +1 -1
  286. package/lib/setup/table/TableBody/TableBody.js +1 -1
  287. package/lib/setup/table/TableData/TableData.js +1 -1
  288. package/lib/setup/table/TableHead/TableHead.js +1 -1
  289. package/lib/setup/table/TableRow/TableRow.js +1 -1
  290. package/lib/svg/PlusIcon.js +1 -1
  291. package/lib/svg/SnippetIcon.js +1 -1
  292. package/lib/svg/TemplateIcon.js +1 -1
  293. package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +2 -2
  294. package/lib/v1/emptystate/EditionPage/EditionPage.js +1 -1
  295. package/lib/v1/errorstate/Inconvenience/Inconvenience.js +1 -1
  296. package/lib/v1/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +1 -1
  297. package/lib/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -1
  298. package/lib/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +1 -1
  299. package/lib/v1/errorstate/UrlNotFound/UrlNotFound.js +1 -1
  300. package/lib/v1/errorstate/WillBeRightBack/WillBeRightBack.js +1 -1
  301. package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +2 -2
  302. package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
  303. package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
  304. package/lib/v1/lookup/EmptyPage/EmptyPage.js +4 -4
  305. package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +1 -1
  306. package/lib/v1/notification/DesktopNotification/DesktopNotification.js +1 -1
  307. package/lib/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +1 -1
  308. package/lib/v1/svg/PlusIcon.js +1 -1
  309. package/lib/v1/svg/SnippetIcon.js +1 -1
  310. package/lib/v1/svg/TemplateIcon.js +1 -1
  311. package/lib/version2/AlertClose/AlertClose.js +1 -1
  312. package/lib/version2/GlobalNotification/GlobalNotification.js +1 -1
  313. package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -2
  314. package/lib/version2/errorstate/Inconvenience/Inconvenience.js +3 -3
  315. package/lib/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +3 -3
  316. package/lib/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +3 -3
  317. package/lib/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +3 -3
  318. package/lib/version2/errorstate/UrlNotFound/UrlNotFound.js +3 -3
  319. package/lib/version2/errorstate/V2_ErrorStates.module.css +1 -1
  320. package/lib/version2/errorstate/WillBeRightBack/WillBeRightBack.js +3 -3
  321. package/lib/version2/lookup/AlertHeader/AlertHeader.js +1 -1
  322. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
  323. package/lib/version2/lookup/AlertLookup/AlertLookup.js +3 -3
  324. package/lib/version2/lookup/alertLookupCommonNew.module.css +1 -1
  325. package/lib/version2/notification/DesktopNotification/DesktopNotification.js +4 -4
  326. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
  327. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +2 -2
  328. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +1 -0
  329. package/package.json +23 -14
  330. package/.cli/MissedPropType_Keys.html +0 -101
  331. package/.cli/PropLessFiles.html +0 -101
  332. package/.cli/PropUnificationExcludeFilesArray.js +0 -345
  333. package/.cli/PropValidationExcludeFilesArray.js +0 -8
  334. package/.cli/ThemeValidationExcludeFiles.js +0 -1
  335. package/.cli/UnValidatedFiles.html +0 -101
  336. package/.cli/propValidation_report.html +0 -182
  337. package/.cli/stringContains.js +0 -1
  338. package/css_error.log +0 -1
  339. package/images/audio_thumbnail.png +0 -0
  340. package/install.md +0 -12
  341. package/postPublish.js +0 -8
  342. package/prePublish.js +0 -70
  343. package/propValidationArg.json +0 -12
  344. package/react-cli.config.js +0 -24
  345. package/result.json +0 -1
  346. package/unittest/index.html +0 -37
@@ -0,0 +1,67 @@
1
+ import React from 'react';
2
+ import { Timer_propTypes } from "./propTypes/propTypes";
3
+ import { Timer_defaultProps } from "./propTypes/defaultProps";
4
+ import { Container } from '@zohodesk/components/lib/Layout';
5
+ import { addLeadingZeros } from "../utils/utils";
6
+ import style from "./Timer.module.css";
7
+ export default class Timer extends React.Component {
8
+ constructor(props) {
9
+ super(props);
10
+ this.constructTimer = this.constructTimer.bind(this);
11
+ }
12
+
13
+ constructTimer() {
14
+ let {
15
+ hour,
16
+ minute,
17
+ second,
18
+ amPm,
19
+ separator,
20
+ timerFormat,
21
+ needCharacter
22
+ } = this.props;
23
+ const timeSeparator = separator == 'space' ? ' ' : ':';
24
+ let timerValue = '';
25
+ const format = timerFormat.toLowerCase().split(':');
26
+ hour = addLeadingZeros(hour);
27
+ minute = addLeadingZeros(minute);
28
+ second = addLeadingZeros(second);
29
+
30
+ if (needCharacter) {
31
+ hour = `${hour}h`;
32
+ minute = `${minute}m`;
33
+ second = `${second}s`;
34
+ }
35
+
36
+ format.map(type => {
37
+ if (type == 'hh') {
38
+ timerValue += hour;
39
+ } else if (type == 'mm') {
40
+ timerValue += minute;
41
+ } else if (type == 'ss') {
42
+ timerValue += second;
43
+ }
44
+
45
+ timerValue += timeSeparator;
46
+ });
47
+ timerValue = timerValue.slice(0, -1);
48
+ amPm && (timerValue = `${timerValue} ${amPm}`);
49
+ return timerValue;
50
+ }
51
+
52
+ render() {
53
+ const {
54
+ dataId
55
+ } = this.props;
56
+ const timerValue = this.constructTimer();
57
+ return /*#__PURE__*/React.createElement(Container, {
58
+ dataId: dataId,
59
+ alignBox: "row",
60
+ className: style.container,
61
+ flexible: true
62
+ }, timerValue);
63
+ }
64
+
65
+ }
66
+ Timer.defaultProps = Timer_defaultProps;
67
+ Timer.propTypes = Timer_propTypes;
@@ -0,0 +1,5 @@
1
+ .container {
2
+ font-size: var(--zd_font_size11) ;
3
+ color: var(--zdt_timer_default_text);
4
+ text-align: center;
5
+ }
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import Timer from "../Timer";
4
+ const defaultProps = {
5
+ dataId: 'CBTimer'
6
+ };
7
+ describe('Timer test Cases', () => {
8
+ // const {props,renderedDOM} = setup(Timer,Object.assign({},defaultProps))
9
+ // it('Should render Component',()=>{
10
+ // const component = TestUtils.scryRenderedComponentsWithTestid(renderedDOM,'CBTimer');
11
+ // expect(component.length).toBe(1);
12
+ // })
13
+ test('rendering the defult props', () => {
14
+ const {
15
+ asFragment
16
+ } = render( /*#__PURE__*/React.createElement(Timer, { ...defaultProps
17
+ }));
18
+ expect(asFragment()).toMatchSnapshot();
19
+ });
20
+ });
@@ -0,0 +1,14 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`Timer test Cases rendering the defult props 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ class="container flex cover rowdir"
7
+ data-id="CBTimer"
8
+ data-selector-id="container"
9
+ data-test-id="CBTimer"
10
+ >
11
+ undefined:undefined
12
+ </div>
13
+ </DocumentFragment>
14
+ `;
@@ -0,0 +1,4 @@
1
+ export const Timer_defaultProps = {
2
+ separator: 'colon',
3
+ timerFormat: 'mm:ss'
4
+ };
@@ -0,0 +1,11 @@
1
+ import PropTypes from 'prop-types';
2
+ export const Timer_propTypes = {
3
+ dataId: PropTypes.string,
4
+ amPm: PropTypes.string,
5
+ hour: PropTypes.string,
6
+ minute: PropTypes.string,
7
+ needCharacter: PropTypes.bool,
8
+ second: PropTypes.string,
9
+ separator: PropTypes.oneOf(['space', 'colon']),
10
+ timerFormat: PropTypes.string
11
+ };
@@ -0,0 +1,192 @@
1
+ import React from 'react';
2
+ import { render, fireEvent, screen } from '@testing-library/react';
3
+ import AudioPlayer from "../AudioPlayer";
4
+ const DEFAULT_PROPS = {
5
+ minute: '02',
6
+ second: '03',
7
+ durationInSec: '203',
8
+ src: 'https://ypvnxx00-a.akamaihd.net/downloads/ringtones/files/mp3/yuvanringtone-44640.mp3'
9
+ };
10
+ describe('AudioPlayer - Snapshot', () => {
11
+ test('Render with default props', () => {
12
+ const {
13
+ asFragment
14
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS
15
+ }));
16
+ expect(asFragment()).toMatchSnapshot();
17
+ });
18
+ test('Render with customId and testId', () => {
19
+ const {
20
+ asFragment
21
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
22
+ customId: "audio-player-customId",
23
+ testId: "audio-player-testId"
24
+ }));
25
+ expect(asFragment()).toMatchSnapshot();
26
+ });
27
+ test('Render with tag attributes', () => {
28
+ const {
29
+ asFragment
30
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
31
+ tagAttributes: {
32
+ 'data-custom-attr': 'true'
33
+ }
34
+ }));
35
+ expect(asFragment()).toMatchSnapshot();
36
+ });
37
+ test('Render with a11y attributes', () => {
38
+ const {
39
+ asFragment
40
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
41
+ a11yAttributes: {
42
+ role: 'region'
43
+ }
44
+ }));
45
+ expect(asFragment()).toMatchSnapshot();
46
+ });
47
+ test('Render with customClass', () => {
48
+ const {
49
+ asFragment
50
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
51
+ customClass: "my-audio-player"
52
+ }));
53
+ expect(asFragment()).toMatchSnapshot();
54
+ });
55
+ test('Render with i18nKeys', () => {
56
+ const {
57
+ asFragment
58
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
59
+ i18nKeys: {
60
+ play: 'Play',
61
+ pause: 'Pause'
62
+ }
63
+ }));
64
+ expect(asFragment()).toMatchSnapshot();
65
+ });
66
+ test('Render with needClose=false', () => {
67
+ const {
68
+ asFragment
69
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
70
+ needClose: false
71
+ }));
72
+ expect(asFragment()).toMatchSnapshot();
73
+ });
74
+ test('Render with needDownload=false', () => {
75
+ const {
76
+ asFragment
77
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
78
+ needDownload: false
79
+ }));
80
+ expect(asFragment()).toMatchSnapshot();
81
+ });
82
+ test('Render with needMuteIcon=true', () => {
83
+ const {
84
+ asFragment
85
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
86
+ needMuteIcon: true
87
+ }));
88
+ expect(asFragment()).toMatchSnapshot();
89
+ });
90
+ test('Render with isPlay=true', () => {
91
+ const {
92
+ asFragment
93
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
94
+ isPlay: true
95
+ }));
96
+ expect(asFragment()).toMatchSnapshot();
97
+ });
98
+ test('Render with timerFormat=ss:mm', () => {
99
+ const {
100
+ asFragment
101
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
102
+ timerFormat: "ss:mm"
103
+ }));
104
+ expect(asFragment()).toMatchSnapshot();
105
+ });
106
+ test('Render with forwardStepInSec=10', () => {
107
+ const {
108
+ asFragment
109
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
110
+ forwardStepInSec: 10
111
+ }));
112
+ expect(asFragment()).toMatchSnapshot();
113
+ });
114
+ test('Render with backwardStepInSec=10', () => {
115
+ const {
116
+ asFragment
117
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
118
+ backwardStepInSec: 10
119
+ }));
120
+ expect(asFragment()).toMatchSnapshot();
121
+ });
122
+ test('Render with range=50', () => {
123
+ const {
124
+ asFragment
125
+ } = render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
126
+ range: 50
127
+ }));
128
+ expect(asFragment()).toMatchSnapshot();
129
+ });
130
+ });
131
+ describe('AudioPlayer - Unit', () => {
132
+ test('Should call togglePlayer on close button click', () => {
133
+ const togglePlayer = jest.fn();
134
+ render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
135
+ togglePlayer: togglePlayer
136
+ }));
137
+ const closeBtn = screen.queryByTestId('audioPlayerClose');
138
+
139
+ if (closeBtn) {
140
+ fireEvent.click(closeBtn);
141
+ expect(togglePlayer).toHaveBeenCalled();
142
+ }
143
+ });
144
+ test('Should call downloadFile on download button click', () => {
145
+ const downloadFile = jest.fn();
146
+ render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
147
+ downloadFile: downloadFile
148
+ }));
149
+ const downloadBtn = screen.queryByTestId('audioDownload');
150
+
151
+ if (downloadBtn) {
152
+ fireEvent.click(downloadBtn);
153
+ expect(downloadFile).toHaveBeenCalled();
154
+ }
155
+ });
156
+ test('Should toggle play/pause on play button click', () => {
157
+ const togglePlayer = jest.fn();
158
+ render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
159
+ togglePlayer: togglePlayer
160
+ }));
161
+ const playBtn = screen.queryByTestId('audioPlayPause');
162
+
163
+ if (playBtn) {
164
+ fireEvent.click(playBtn);
165
+ expect(togglePlayer).toHaveBeenCalled();
166
+ }
167
+ });
168
+ test('Should mute/unmute on mute button click', () => {
169
+ render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
170
+ needMuteIcon: true
171
+ }));
172
+ const muteBtn = screen.queryByTestId('audioMute');
173
+
174
+ if (muteBtn) {
175
+ fireEvent.click(muteBtn); // Add assertion if mute state is exposed via prop or DOM
176
+ }
177
+ });
178
+ test('Should change range on slider input', () => {
179
+ render( /*#__PURE__*/React.createElement(AudioPlayer, { ...DEFAULT_PROPS,
180
+ range: 0
181
+ }));
182
+ const rangeInput = screen.queryByTestId('audioRange');
183
+
184
+ if (rangeInput) {
185
+ fireEvent.change(rangeInput, {
186
+ target: {
187
+ value: 50
188
+ }
189
+ }); // Add assertion if range change is exposed via prop or DOM
190
+ }
191
+ });
192
+ });