@sapia-ai/chatbot 2.31.0

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 (344) hide show
  1. package/CHANGELOG.md +865 -0
  2. package/README.md +366 -0
  3. package/RootApp.d.ts +2 -0
  4. package/apis/FIApis.d.ts +152 -0
  5. package/apis/hooks/useGetApplicationJobRequisition.d.ts +12 -0
  6. package/apis/hooks/useGetJobRequisition.d.ts +10 -0
  7. package/apis/types/apiRequest.d.ts +1 -0
  8. package/apis/types/apiResponse.d.ts +16 -0
  9. package/apis/types/branding.d.ts +17 -0
  10. package/apis/types/jobRequisition.d.ts +20 -0
  11. package/commitlint.config.js +1 -0
  12. package/components/AccessVerificationForm/__tests__/AccessVerificationForm.test.d.ts +1 -0
  13. package/components/AccessVerificationForm/index.d.ts +1 -0
  14. package/components/AccessVerificationForm/view.d.ts +11 -0
  15. package/components/AgcWarningModal/__tests__/AGCWarningModal.test.d.ts +1 -0
  16. package/components/AgcWarningModal/index.d.ts +1 -0
  17. package/components/AgcWarningModal/view.d.ts +7 -0
  18. package/components/AssessmentProgressBar/__tests__/AssessmentProgressBar.test.d.ts +1 -0
  19. package/components/AssessmentProgressBar/index.d.ts +7 -0
  20. package/components/AssessmentProgressBar/view.d.ts +2 -0
  21. package/components/AutoScrollText/__tests__/AutoScrollText.test.d.ts +1 -0
  22. package/components/AutoScrollText/__tests__/useAutoScrollText.test.d.ts +1 -0
  23. package/components/AutoScrollText/useAutoScrollText.d.ts +7 -0
  24. package/components/AutoScrollText/view.d.ts +4 -0
  25. package/components/ButtonGroup/index.d.ts +1 -0
  26. package/components/ButtonGroup/view.d.ts +10 -0
  27. package/components/CancelEditButton/index.d.ts +1 -0
  28. package/components/CancelEditButton/view.d.ts +7 -0
  29. package/components/ChatbotApp/index.d.ts +1 -0
  30. package/components/ChatbotApp/view.d.ts +10 -0
  31. package/components/Dropdown/index.d.ts +3 -0
  32. package/components/Dropdown/view.d.ts +10 -0
  33. package/components/EditButton/__tests__/EditButton.test.d.ts +1 -0
  34. package/components/EditButton/index.d.ts +3 -0
  35. package/components/EditButton/view.d.ts +10 -0
  36. package/components/FTQResponse/__tests__/FTQResponse.test.d.ts +1 -0
  37. package/components/FTQResponse/index.d.ts +3 -0
  38. package/components/FTQResponse/view.d.ts +11 -0
  39. package/components/FullScreenSpinner/__tests__/FullScreenSpinner.test.d.ts +1 -0
  40. package/components/FullScreenSpinner/index.d.ts +1 -0
  41. package/components/FullScreenSpinner/view.d.ts +2 -0
  42. package/components/Icons/Close/Close.d.ts +5 -0
  43. package/components/Icons/Close/index.d.ts +1 -0
  44. package/components/Icons/DislikeEmoji/DislikeEmoji.d.ts +5 -0
  45. package/components/Icons/DislikeEmoji/index.d.ts +1 -0
  46. package/components/Icons/Error/index.d.ts +1 -0
  47. package/components/Icons/Error/view.d.ts +6 -0
  48. package/components/Icons/LikeEmoji/LikeEmoji.d.ts +5 -0
  49. package/components/Icons/LikeEmoji/index.d.ts +1 -0
  50. package/components/Icons/Pause/Pause.d.ts +6 -0
  51. package/components/Icons/Pause/index.d.ts +1 -0
  52. package/components/Icons/Play/Play.d.ts +6 -0
  53. package/components/Icons/Play/index.d.ts +1 -0
  54. package/components/Icons/Question/Question.d.ts +6 -0
  55. package/components/Icons/Question/index.d.ts +1 -0
  56. package/components/Icons/ReRecord/ReRecord.d.ts +5 -0
  57. package/components/Icons/ReRecord/index.d.ts +1 -0
  58. package/components/Icons/Record/Record.d.ts +6 -0
  59. package/components/Icons/Record/index.d.ts +1 -0
  60. package/components/Icons/RecordingTip/RecordingTip.d.ts +6 -0
  61. package/components/Icons/RecordingTip/index.d.ts +1 -0
  62. package/components/Icons/Retry/Retry.d.ts +6 -0
  63. package/components/Icons/Retry/index.d.ts +1 -0
  64. package/components/Icons/Save/Save.d.ts +5 -0
  65. package/components/Icons/Save/index.d.ts +1 -0
  66. package/components/Icons/Stop/Stop.d.ts +6 -0
  67. package/components/Icons/Stop/index.d.ts +1 -0
  68. package/components/Icons/index.d.ts +13 -0
  69. package/components/IosChromeError/index.d.ts +7 -0
  70. package/components/IosChromeError/view.d.ts +3 -0
  71. package/components/Loading/index.d.ts +3 -0
  72. package/components/Loading/view.d.ts +9 -0
  73. package/components/NameEditor/NameEditor.d.ts +26 -0
  74. package/components/NameEditor/__tests__/NameEditor.FirstName.test.d.ts +1 -0
  75. package/components/NameEditor/__tests__/NameEditor.FullName.test.d.ts +1 -0
  76. package/components/NameEditor/__tests__/NameEditor.LastName.test.d.ts +1 -0
  77. package/components/NameEditor/__tests__/NameEditor.test.d.ts +1 -0
  78. package/components/NameEditor/__tests__/useHumanNameExtraction.FirstName.test.d.ts +1 -0
  79. package/components/NameEditor/__tests__/useHumanNameExtraction.FullName.test.d.ts +1 -0
  80. package/components/NameEditor/__tests__/useHumanNameExtraction.LastName.test.d.ts +1 -0
  81. package/components/NameEditor/__tests__/useHumanNameExtraction.test.d.ts +1 -0
  82. package/components/NameEditor/useHumanNameExtraction.d.ts +22 -0
  83. package/components/NameExtractionConfirmModal/__tests__/NameExtractionConfirmModal.test.d.ts +1 -0
  84. package/components/NameExtractionConfirmModal/index.d.ts +1 -0
  85. package/components/NameExtractionConfirmModal/view.d.ts +15 -0
  86. package/components/OptionList/index.d.ts +3 -0
  87. package/components/OptionList/view.d.ts +11 -0
  88. package/components/PHEditor/DesktopQuillEditor/index.d.ts +1 -0
  89. package/components/PHEditor/DesktopQuillEditor/view.d.ts +37 -0
  90. package/components/PHEditor/MobileEditor/ClickableBar.d.ts +7 -0
  91. package/components/PHEditor/MobileEditor/__tests__/ClickableBar.test.d.ts +1 -0
  92. package/components/PHEditor/MobileEditor/view.d.ts +28 -0
  93. package/components/PHEditor/PlainTextEditor/index.d.ts +3 -0
  94. package/components/PHEditor/PlainTextEditor/view.d.ts +26 -0
  95. package/components/PHEditor/TextDictationModal/index.d.ts +1 -0
  96. package/components/PHEditor/TextDictationModal/view.d.ts +6 -0
  97. package/components/PHEditor/TextDictationTip/index.d.ts +1 -0
  98. package/components/PHEditor/TextDictationTip/view.d.ts +4 -0
  99. package/components/PHEditor/WordCount/index.d.ts +1 -0
  100. package/components/PHEditor/WordCount/view.d.ts +12 -0
  101. package/components/PHEditor/__tests__/DesktopQuillEditor.test.d.ts +1 -0
  102. package/components/PHEditor/__tests__/PlainTextEditor.test.d.ts +1 -0
  103. package/components/PHEditor/__tests__/utils.test.d.ts +1 -0
  104. package/components/PHEditor/index.d.ts +2 -0
  105. package/components/PHEditor/types.d.ts +8 -0
  106. package/components/PHEditor/utils.d.ts +20 -0
  107. package/components/PHError/index.d.ts +7 -0
  108. package/components/PHError/view.d.ts +4 -0
  109. package/components/PHIconFont/index.d.ts +7 -0
  110. package/components/PHIconFont/view.d.ts +2 -0
  111. package/components/PHSelect/__tests__/PHSelect.test.d.ts +1 -0
  112. package/components/PHSelect/index.d.ts +1 -0
  113. package/components/PHSelect/view.d.ts +8 -0
  114. package/components/PHVideo/DesktopVideo/__tests__/utils/formatTime.test.d.ts +1 -0
  115. package/components/PHVideo/DesktopVideo/components/Video/index.d.ts +3 -0
  116. package/components/PHVideo/DesktopVideo/components/Video/view.d.ts +42 -0
  117. package/components/PHVideo/DesktopVideo/components/VideoPreviewControls/index.d.ts +3 -0
  118. package/components/PHVideo/DesktopVideo/components/VideoPreviewControls/view.d.ts +10 -0
  119. package/components/PHVideo/DesktopVideo/index.d.ts +3 -0
  120. package/components/PHVideo/DesktopVideo/utils.d.ts +1 -0
  121. package/components/PHVideo/DesktopVideo/view.d.ts +10 -0
  122. package/components/PHVideo/MobileVideo/index.d.ts +3 -0
  123. package/components/PHVideo/MobileVideo/view.d.ts +9 -0
  124. package/components/PhoneCodeSelect/__tests__/PhoneCodeSelect.test.d.ts +1 -0
  125. package/components/PhoneCodeSelect/index.d.ts +1 -0
  126. package/components/PhoneCodeSelect/sources.d.ts +8 -0
  127. package/components/PhoneCodeSelect/view.d.ts +6 -0
  128. package/components/PhoneEditor/__tests__/PhoneEditor.test.d.ts +1 -0
  129. package/components/PhoneEditor/index.d.ts +3 -0
  130. package/components/PhoneEditor/view.d.ts +16 -0
  131. package/components/PlacesAutoComplete/api.d.ts +17 -0
  132. package/components/PlacesAutoComplete/constants.d.ts +8 -0
  133. package/components/PlacesAutoComplete/hooks/usePlacesAutoComplete.d.ts +21 -0
  134. package/components/PlacesAutoComplete/index.d.ts +6 -0
  135. package/components/PlacesAutoComplete/types.d.ts +53 -0
  136. package/components/PlacesAutoComplete/view.d.ts +16 -0
  137. package/components/ReRecordVideoButton/index.d.ts +3 -0
  138. package/components/ReRecordVideoButton/view.d.ts +7 -0
  139. package/components/ReciteMeWrapper/ReciteMeWrapper.d.ts +16 -0
  140. package/components/ReciteMeWrapper/index.d.ts +1 -0
  141. package/components/SendAnswerFailedModal/index.d.ts +1 -0
  142. package/components/SendAnswerFailedModal/view.d.ts +6 -0
  143. package/components/SendCircleButton/__tests__/SendCircleButton.test.d.ts +1 -0
  144. package/components/SendCircleButton/index.d.ts +3 -0
  145. package/components/SendCircleButton/view.d.ts +11 -0
  146. package/components/Slider/__tests__/Slider.test.d.ts +1 -0
  147. package/components/Slider/index.d.ts +3 -0
  148. package/components/Slider/view.d.ts +9 -0
  149. package/components/TextBubble/__tests__/TextBubble.test.d.ts +1 -0
  150. package/components/TextBubble/index.d.ts +3 -0
  151. package/components/TextBubble/view.d.ts +23 -0
  152. package/components/Tooltip/index.d.ts +3 -0
  153. package/components/Tooltip/view.d.ts +6 -0
  154. package/components/UnsupportedBrowserGuard/index.d.ts +3 -0
  155. package/components/UnsupportedBrowserGuard/view.d.ts +5 -0
  156. package/components/UploadVideoFailedMessage/index.d.ts +9 -0
  157. package/components/UploadVideoFailedMessage/view.d.ts +4 -0
  158. package/components/UploadVideoProgressBar/index.d.ts +9 -0
  159. package/components/UploadVideoProgressBar/view.d.ts +4 -0
  160. package/components/VideoPlayer/index.d.ts +3 -0
  161. package/components/VideoPlayer/view.d.ts +7 -0
  162. package/components/VideoResponse/index.d.ts +3 -0
  163. package/components/VideoResponse/view.d.ts +5 -0
  164. package/components/WarningButton/index.d.ts +3 -0
  165. package/components/WarningButton/view.d.ts +4 -0
  166. package/components/WarningModal/index.d.ts +3 -0
  167. package/components/WarningModal/view.d.ts +10 -0
  168. package/components/hooks/useCharacterCountLimit.d.ts +3 -0
  169. package/components/hooks/useCheckScreenSize.d.ts +3 -0
  170. package/components/hooks/useSubmitShortcut.d.ts +1 -0
  171. package/components/hooks/useWordCountLimit.d.ts +4 -0
  172. package/config.d.ts +16 -0
  173. package/constants/browser.d.ts +7 -0
  174. package/constants/common.d.ts +48 -0
  175. package/constants/mockDataForDemo.d.ts +14 -0
  176. package/constants/theme.d.ts +10 -0
  177. package/contexts/AssessmentStateContext/AssessmentStateContext.d.ts +6 -0
  178. package/contexts/AssessmentStateContext/__tests__/AssessmentStateContext.test.d.ts +1 -0
  179. package/contexts/AssessmentStateContext/assessmentStateReducer/__tests__/action.test.d.ts +1 -0
  180. package/contexts/AssessmentStateContext/assessmentStateReducer/__tests__/assessmentStateReducer.test.d.ts +1 -0
  181. package/contexts/AssessmentStateContext/assessmentStateReducer/action.d.ts +3 -0
  182. package/contexts/AssessmentStateContext/assessmentStateReducer/assessmentStateReducer.d.ts +2 -0
  183. package/contexts/AssessmentStateContext/type.d.ts +22 -0
  184. package/contexts/ChatbotStateContext/ChatbotStateContext.d.ts +12 -0
  185. package/contexts/ChatbotStateContext/__tests__/ChatbotStateContext/ChatbotStateContext-render-error.test.d.ts +1 -0
  186. package/contexts/ChatbotStateContext/__tests__/ChatbotStateContext/ChatbotStateContext-render-normal.test.d.ts +1 -0
  187. package/contexts/ChatbotStateContext/__tests__/ChatbotStateContext/handleEditAnswer.test.d.ts +1 -0
  188. package/contexts/ChatbotStateContext/__tests__/ChatbotStateContext/handleExitEditAnswer.test.d.ts +1 -0
  189. package/contexts/ChatbotStateContext/__tests__/ChatbotStateContext/handleSelectOption.test.d.ts +1 -0
  190. package/contexts/ChatbotStateContext/__tests__/ChatbotStateContext/handleSubmitRating.test.d.ts +1 -0
  191. package/contexts/ChatbotStateContext/__tests__/ChatbotStateContext/handleUploadDataVideo.test.d.ts +1 -0
  192. package/contexts/ChatbotStateContext/__tests__/bubble-util/addCandidateResponseMessageBubble.test.d.ts +1 -0
  193. package/contexts/ChatbotStateContext/__tests__/bubble-util/checkShouldLoadNext.test.d.ts +1 -0
  194. package/contexts/ChatbotStateContext/__tests__/bubble-util/convertMessageBubbles.test.d.ts +1 -0
  195. package/contexts/ChatbotStateContext/__tests__/bubble-util/convertRawAgentResponseToMessageBubble.test.d.ts +1 -0
  196. package/contexts/ChatbotStateContext/__tests__/bubble-util/convertRawCandidateResponseToMessageBubble.test.d.ts +1 -0
  197. package/contexts/ChatbotStateContext/__tests__/bubble-util/convertRawResponseToMessageBubble.test.d.ts +1 -0
  198. package/contexts/ChatbotStateContext/__tests__/bubble-util/updateAnswerForCandidateMessageBubble.test.d.ts +1 -0
  199. package/contexts/ChatbotStateContext/__tests__/bubble-util/updateMessageBubbleStatus.test.d.ts +1 -0
  200. package/contexts/ChatbotStateContext/__tests__/bubble-util/updateMessageBubbleStatusInList.test.d.ts +1 -0
  201. package/contexts/ChatbotStateContext/__tests__/useOrder.test.d.ts +1 -0
  202. package/contexts/ChatbotStateContext/__tests__/useUploadVideo/getDisplayVideoUrl.test.d.ts +1 -0
  203. package/contexts/ChatbotStateContext/__tests__/useUploadVideo/getVideoRetryNum.test.d.ts +1 -0
  204. package/contexts/ChatbotStateContext/__tests__/useUploadVideo/uploadDataVideo.test.d.ts +1 -0
  205. package/contexts/ChatbotStateContext/bubble-util.d.ts +193 -0
  206. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/addAgentBubbleActionFn.test.d.ts +1 -0
  207. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/addCandidateResponseMessageBubbleActionFn.test.d.ts +1 -0
  208. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/addVideoUploadStatusBubbleActionFn.test.d.ts +1 -0
  209. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/agentNextResponseCompletedActionFn.test.d.ts +1 -0
  210. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/agentNextResponseStartingActionFn.test.d.ts +1 -0
  211. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/chatLogsLoadCompletedActionFn.test.d.ts +1 -0
  212. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/checkAgcCompletedActionFn.test.d.ts +1 -0
  213. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/convertRawBrandingTheme.test.d.ts +1 -0
  214. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/editAnswerRequestCompletedActionFn.test.d.ts +1 -0
  215. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/editModeEnterActionFn.test.d.ts +1 -0
  216. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/editModeExitActionFn.test.d.ts +1 -0
  217. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/removeFailedMessageBubbleActionFn.test.d.ts +1 -0
  218. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/renderCandidateBubbleManuallyActionFn.test.d.ts +1 -0
  219. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/replaceVideoUploadStatusBubbleActionFn.test.d.ts +1 -0
  220. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/updateCandidateMessageBubbleStatusActionFn.test.d.ts +1 -0
  221. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/updateRecordedVideoInfoActionFn.test.d.ts +1 -0
  222. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/action/updateRerecordVideoInfoActionFn.test.d.ts +1 -0
  223. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-ADD_AGENT_BUBBLE.test.d.ts +1 -0
  224. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-ADD_CANDIDATE_RESPONSE_BUBBLE.test.d.ts +1 -0
  225. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-ADD_VIDEO_UPLOAD_STATUS_BUBBLE.test.d.ts +1 -0
  226. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-AGENT_NEXT_RESPONSE_COMPLETED.test.d.ts +1 -0
  227. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-AGENT_NEXT_RESPONSE_STARTING.test.d.ts +1 -0
  228. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-CHATLOGS_LOAD_COMPLETED.test.d.ts +1 -0
  229. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-DETECT_AGC_COMPLETED.test.d.ts +1 -0
  230. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-EDIT_ANSWER_REQUEST_COMPLETED.test.d.ts +1 -0
  231. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-EDIT_MODE_ENTER.test.d.ts +1 -0
  232. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-EDIT_MODE_EXIT.test.d.ts +1 -0
  233. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-REMOVE_FAILED_MESSAGE_BUBBLE.test.d.ts +1 -0
  234. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-RENDER_CANDIDATE_BUBBLE_MANUALLY.test.d.ts +1 -0
  235. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-REPLACE_VIDEO_UPLOAD_STATUS_BUBBLE.test.d.ts +1 -0
  236. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-UPDATE_CANDIDATE_MESSAGE_BUBBLE_STATUS.test.d.ts +1 -0
  237. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-UPDATE_RECORDED_VIDEO_INFO.test.d.ts +1 -0
  238. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/chatbotStateReducer/chatbotStateReducer-UPDATE_RERECORD_VIDEO_INFO.test.d.ts +1 -0
  239. package/contexts/ChatbotStateContext/chatbotStateReducer/__tests__/util/phChatbotCbCallbackExecutor.test.d.ts +1 -0
  240. package/contexts/ChatbotStateContext/chatbotStateReducer/action.d.ts +23 -0
  241. package/contexts/ChatbotStateContext/chatbotStateReducer/chatbotStateReducer.d.ts +2 -0
  242. package/contexts/ChatbotStateContext/chatbotStateReducer/util.d.ts +13 -0
  243. package/contexts/ChatbotStateContext/type.d.ts +289 -0
  244. package/contexts/ChatbotStateContext/useDetectAgc/__tests__/useDetectAgc.test.d.ts +1 -0
  245. package/contexts/ChatbotStateContext/useDetectAgc/useDetectAgc.d.ts +17 -0
  246. package/contexts/ChatbotStateContext/useLoadNext/__tests__/helper/loadMessage.test.d.ts +1 -0
  247. package/contexts/ChatbotStateContext/useLoadNext/__tests__/helper/onloadNextSuccess.test.d.ts +1 -0
  248. package/contexts/ChatbotStateContext/useLoadNext/__tests__/useLoadNext.test.d.ts +1 -0
  249. package/contexts/ChatbotStateContext/useLoadNext/helper.d.ts +37 -0
  250. package/contexts/ChatbotStateContext/useLoadNext/useLoadNext.d.ts +31 -0
  251. package/contexts/ChatbotStateContext/useOrder.d.ts +31 -0
  252. package/contexts/ChatbotStateContext/useSubmitEditedAnswer/__tests__/useSubmitEditedAnswer.test.d.ts +1 -0
  253. package/contexts/ChatbotStateContext/useSubmitEditedAnswer/index.d.ts +1 -0
  254. package/contexts/ChatbotStateContext/useSubmitEditedAnswer/useSubmitEditedAnswer.d.ts +21 -0
  255. package/contexts/ChatbotStateContext/useUploadVideo.d.ts +29 -0
  256. package/features/AccessVerification/__tests__/AccessVerification.test.d.ts +1 -0
  257. package/features/AccessVerification/index.d.ts +1 -0
  258. package/features/AccessVerification/view.d.ts +10 -0
  259. package/features/AgentMessageBubble/index.d.ts +3 -0
  260. package/features/AgentMessageBubble/view.d.ts +5 -0
  261. package/features/Assessment/__tests__/Assessment.test.d.ts +1 -0
  262. package/features/Assessment/index.d.ts +3 -0
  263. package/features/Assessment/view.d.ts +2 -0
  264. package/features/AssessmentDialogFlow/index.d.ts +3 -0
  265. package/features/AssessmentDialogFlow/view.d.ts +7 -0
  266. package/features/AssessmentResponseFlow/index.d.ts +3 -0
  267. package/features/AssessmentResponseFlow/view.d.ts +5 -0
  268. package/features/CandidateMessageBubble/index.d.ts +3 -0
  269. package/features/CandidateMessageBubble/view.d.ts +8 -0
  270. package/features/Header/__tests__/Header.test.d.ts +1 -0
  271. package/features/Header/index.d.ts +3 -0
  272. package/features/Header/view.d.ts +2 -0
  273. package/features/Introduce/index.d.ts +3 -0
  274. package/features/Introduce/utils.d.ts +190 -0
  275. package/features/Introduce/view.d.ts +2 -0
  276. package/features/Layout/__tests__/Layout.test.d.ts +1 -0
  277. package/features/Layout/index.d.ts +3 -0
  278. package/features/Layout/view.d.ts +4 -0
  279. package/hooks/__tests__/useAccessManagement.test.d.ts +1 -0
  280. package/hooks/__tests__/useAccessVerification.test.d.ts +1 -0
  281. package/hooks/__tests__/useChatbotStatesContext.test.d.ts +1 -0
  282. package/hooks/__tests__/useExtractHumanName.test.d.ts +1 -0
  283. package/hooks/__tests__/useLocalStorage.test.d.ts +1 -0
  284. package/hooks/__tests__/useVerifyAccess.test.d.ts +1 -0
  285. package/hooks/useAccessManagement.d.ts +12 -0
  286. package/hooks/useAccessVerification.d.ts +13 -0
  287. package/hooks/useAssessmentStateContext.d.ts +2 -0
  288. package/hooks/useBeforeUnload.d.ts +2 -0
  289. package/hooks/useChatbotStatesContext.d.ts +2 -0
  290. package/hooks/useExtractHumanName.d.ts +15 -0
  291. package/hooks/useHandleEditorHeightChange.d.ts +7 -0
  292. package/hooks/useLocalStorage.d.ts +24 -0
  293. package/hooks/useQuery.d.ts +3 -0
  294. package/hooks/useVerifyAccess.d.ts +10 -0
  295. package/index.d.ts +1 -0
  296. package/package.json +172 -0
  297. package/pages/App/App.d.ts +11 -0
  298. package/pages/App/index.d.ts +2 -0
  299. package/pages/Chatbot/Chatbot.d.ts +3 -0
  300. package/pages/Chatbot/index.d.ts +2 -0
  301. package/pages/Home/Home.d.ts +3 -0
  302. package/pages/Home/index.d.ts +3 -0
  303. package/pages/LanguageSelectionPage/ApplicationLanguageSelectionPage.d.ts +6 -0
  304. package/pages/LanguageSelectionPage/GenericLanguageSelectionPage.d.ts +6 -0
  305. package/pages/LanguageSelectionPage/LanguageSelection.d.ts +13 -0
  306. package/pages/LanguageSelectionPage/__tests__/LanguageSelection.test.d.ts +1 -0
  307. package/pages/LanguageSelectionPage/index.d.ts +3 -0
  308. package/pages/LanguageSelectionPage/useLanguageSelection.d.ts +19 -0
  309. package/pages/OrderAssessment/OrderAssessment.d.ts +4 -0
  310. package/pages/OrderAssessment/index.d.ts +1 -0
  311. package/postcss.config.js +5 -0
  312. package/predictivehire.d.ts +45 -0
  313. package/predictivehire.js +71047 -0
  314. package/predictivehire.umd.js +382 -0
  315. package/serviceWorker.d.ts +7 -0
  316. package/static/favicon.ico +0 -0
  317. package/static/favicon.png +0 -0
  318. package/static/manifest.json +20 -0
  319. package/static/reciteme_button.png +0 -0
  320. package/static/robots.txt +3 -0
  321. package/tsconfig.build.json +5 -0
  322. package/types/Api.d.ts +25 -0
  323. package/types/AtsInformation.d.ts +52 -0
  324. package/types/ChatBot.d.ts +60 -0
  325. package/types/Next.d.ts +278 -0
  326. package/types/UrlParamKey.d.ts +6 -0
  327. package/utils/TestWrapper.d.ts +32 -0
  328. package/utils/__tests__/defaultLanguage.test.d.ts +1 -0
  329. package/utils/__tests__/getEnv.test.d.ts +1 -0
  330. package/utils/__tests__/messageBubble.test.d.ts +1 -0
  331. package/utils/__tests__/mockTranslationSource.d.ts +117 -0
  332. package/utils/__tests__/setTranslationSource.test.d.ts +1 -0
  333. package/utils/__tests__/translate.test.d.ts +1 -0
  334. package/utils/convertTheme.d.ts +39 -0
  335. package/utils/defaultLanguage.d.ts +6 -0
  336. package/utils/messageBubble.d.ts +11 -0
  337. package/utils/testUtils.d.ts +6 -0
  338. package/utils/translation/constants.d.ts +10 -0
  339. package/utils/translation/fallBackTranslation.d.ts +136 -0
  340. package/utils/translation/translation.d.ts +25 -0
  341. package/utils/utils.d.ts +16 -0
  342. package/vite.chatbot.config.js +90 -0
  343. package/vite.config.js +77 -0
  344. package/vitest.setup.d.ts +1 -0
@@ -0,0 +1,11 @@
1
+ import { BubbleStatus, MessageBubble, PiiQuestionType } from "@/types/Next";
2
+ export declare const checkIfMessageIsAnswered: (status?: BubbleStatus) => boolean;
3
+ export declare const checkIfMessageIsEditing: (status?: BubbleStatus) => boolean;
4
+ export declare const checkIfIsPhoneNumberQuestion: (piiQuestionType?: PiiQuestionType) => boolean;
5
+ export declare const checkIfIsEmailQuestion: (piiQuestionType?: PiiQuestionType) => boolean;
6
+ export declare const checkIfIsFullNameQuestion: (piiQuestionType?: PiiQuestionType) => boolean;
7
+ export declare const checkIfIsFirstNameQuestion: (piiQuestionType?: PiiQuestionType) => boolean;
8
+ export declare const checkIfIsLastNameQuestion: (piiQuestionType?: PiiQuestionType) => boolean;
9
+ export declare const checkIfIsLocationQuestion: (piiQuestionType?: PiiQuestionType) => boolean;
10
+ export declare const checkIfSmsConsentMessage: (message: MessageBubble) => boolean;
11
+ export declare const checkIfCustomerSatisfactionCommentFeedbackQuestion: (message: MessageBubble) => boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Get the customized css variable value from the html element
3
+ * @param element
4
+ * @param cssVariableName
5
+ */
6
+ export declare const getHtmlElementCssVariable: (element: HTMLElement, cssVariableName: string) => string;
@@ -0,0 +1,10 @@
1
+ export declare const SUPPORTED_LANGUAGE: readonly ["en-GB", "en-US", "fr", "es", "de", "fi", "da", "nl", "it", "sv", "nb", "pl"];
2
+ export declare const FALLBACK_LANGUAGE = "en-US";
3
+ export declare const FI_BUTTON_EDIT = "fi_button_edit";
4
+ export declare const FI_BUTTON_CONTINUE = "fi_button_continue";
5
+ export declare const FI_ERROR_AGC_TITLE = "fi_error_agcTitle";
6
+ export declare const FI_ERROR_AGC_FIRST_MESSAGE = "fi_error_agcFirstMessage";
7
+ export declare const FI_ERROR_AGC_SECOND_MESSAGE = "fi_error_agcSecondMessage";
8
+ export declare const FI_ERROR_GENERAL_ERROR_TITLE = "fi_error_generalErrorTitle";
9
+ export declare const FI_ERROR_EDIT_ANSWER_FAILED = "fi_error_editAnswerFailed";
10
+ export declare const FI_ERROR_SEND_ANSWER_FAILED = "fi_error_sendAnswerFailed";
@@ -0,0 +1,136 @@
1
+ /**
2
+ * We don't expect to use this file. In the worse case, we will use this file as the fallback language
3
+ * Using en-US as the fallback language
4
+ * This is copy latest from en-US.json in https://github.com/PredictiveHire/sapia-translation-config/tree/main/translation/fi
5
+ * This must be updated manually when translation is updated in the translation repo
6
+ */
7
+ export declare const fallbackTranslation: {
8
+ fi_label_typing: string;
9
+ fi_label_enterResponse: string;
10
+ fi_error_notEnoughWords: string;
11
+ fi_error_notEnoughtWordsMin: string;
12
+ fi_error_notEnoughWordsEdit: string;
13
+ fi_error_notEnoughWordsEditNow: string;
14
+ fi_button_edit: string;
15
+ fi_button_continue: string;
16
+ fi_check_dontShow: string;
17
+ fi_alt_shortResponse: string;
18
+ fi_alt_goodResponse: string;
19
+ fi_alt_maxWords: string;
20
+ fi_button_recordVideo: string;
21
+ fi_button_record: string;
22
+ fi_button_play: string;
23
+ fi_button_retry: string;
24
+ fi_button_save: string;
25
+ fi_button_pause: string;
26
+ fi_button_help: string;
27
+ fi_button_stop: string;
28
+ fi_error_unsuccessfulRecord: string;
29
+ fi_button_ok: string;
30
+ fi_label_uploading: string;
31
+ fi_label_dontClose: string;
32
+ fi_toolTip_retry: string;
33
+ fi_error_finalRetry: string;
34
+ fi_error_noChances: string;
35
+ fi_button_cancel: string;
36
+ fi_toolTip_noRetry: string;
37
+ fi_label_editing: string;
38
+ fi_label_errorTitle: string;
39
+ fi_label_errorMessageInstruction: string;
40
+ fi_label_errorMessageUnsupportedBrowser: string;
41
+ fi_placeholder_demoNameInput: string;
42
+ fi_placeholder_demoEmailInput: string;
43
+ fi_label_demoWelcome: string;
44
+ fi_label_demoSapiaDescription: string;
45
+ fi_label_demoTestDescription: string;
46
+ fi_button_demoCI: string;
47
+ fi_button_demoCoachingInsights: string;
48
+ fi_button_demoVi: string;
49
+ fi_placeholder_dropdown: string;
50
+ fi_error_piiEmail: string;
51
+ fi_error_piiFullName: string;
52
+ fi_error_piiFirstName: string;
53
+ fi_error_piiLastName: string;
54
+ fi_error_piiPhoneNumber: string;
55
+ fi_label_cancelEditMobile: string;
56
+ fi_label_cancelEditDesktop: string;
57
+ fi_error_iosChromeNotSupport: string;
58
+ fi_error_iosChromeCopyLink: string;
59
+ fi_error_iosChromeOpenEmail: string;
60
+ fi_error_thankCustomer: string;
61
+ fi_tooltip_copiedUrl: string;
62
+ fi_button_copyUrl: string;
63
+ fi_error_mulTabsWarning: string;
64
+ fi_label_refreshBrowser: string;
65
+ fi_label_contactSupport: string;
66
+ fi_label_noRetry: string;
67
+ fi_label_webcamNotReady: string;
68
+ fi_label_recordRetryInstruction: string;
69
+ fi_label_stopRecordBeforePlay: string;
70
+ fi_error_playVideo: string;
71
+ fi_label_stopRecordBeforeSubmit: string;
72
+ fi_error_submitVideo: string;
73
+ fi_label_stopRecordBeforeRetry: string;
74
+ fi_label_warningCloseRecordModalTitle: string;
75
+ fi_label_warningCloseRecordModalMessage: string;
76
+ fi_button_confirmCloseRecord: string;
77
+ fi_button_cancelCloseRecord: string;
78
+ fi_label_uploadFailed: string;
79
+ fi_label_checkInternetCon: string;
80
+ fi_button_tryAgain: string;
81
+ fi_label_noRecordRemaining: string;
82
+ fi_label_completedAssessment: string;
83
+ fi_label_saveRecordMessage: string;
84
+ fi_error_editAnswerFailed: string;
85
+ fi_error_sendAnswerFailed: string;
86
+ fi_label_ratingMessage: string;
87
+ fi_button_submitRating: string;
88
+ fi_label_warningModalTitle: string;
89
+ fi_button_close: string;
90
+ fi_label_multiTabsWarning: string;
91
+ fi_error_startedAssessment: string;
92
+ fi_error_roleClosed: string;
93
+ fi_error_reuseComplete: string;
94
+ fi_label_unsupportedBrowserTitle: string;
95
+ fi_error_cohortClosedTitle: string;
96
+ fi_error_cohortClosedMessage: string;
97
+ fi_error_videoPlayback: string;
98
+ fi_label_tabClose: string;
99
+ fi_error_notEnoughWordsMin: string;
100
+ fi_error_notEnoughWordsAim: string;
101
+ fi_label_words_one: string;
102
+ fi_label_words_other: string;
103
+ fi_label_missingCohortId: string;
104
+ fi_error_agcTitle: string;
105
+ fi_error_agcFirstMessage: string;
106
+ fi_error_agcSecondMessage: string;
107
+ fi_error_generalErrorTitle: string;
108
+ fi_label_enterOrPasteResponse: string;
109
+ fi_label_welcomeBack: string;
110
+ fi_label_modalDescription: string;
111
+ fi_input_email: string;
112
+ fi_button_confirm: string;
113
+ fi_error_emailDoesNotMatch: string;
114
+ fi_label_languageSelectionWarning: string;
115
+ fi_placeholder_selectLanguage: string;
116
+ fi_label_languageSelectionWelcome: string;
117
+ fi_button_startMyInterview: string;
118
+ fi_alt_fullName: string;
119
+ fi_button_ignore: string;
120
+ fi_button_correct: string;
121
+ fi_alt_firstName: string;
122
+ fi_alt_lastName: string;
123
+ fi_dictation_deviceSelector_iOS: string;
124
+ fi_dictation_deviceSelector_iPad: string;
125
+ fi_dictation_deviceSelector_android: string;
126
+ fi_dictation_deviceSelector_desktop: string;
127
+ fi_dictation_content_iOS: string;
128
+ fi_dictation_content_iPad: string;
129
+ fi_dictation_content_android: string;
130
+ fi_dictation_content_desktop: string;
131
+ fi_dictation_deviceLabel: string;
132
+ fi_dictation_title: string;
133
+ fi_dictation_tip: string;
134
+ fi_dictation_how: string;
135
+ fi_label_enterOrSkipFeedback: string;
136
+ };
@@ -0,0 +1,25 @@
1
+ import { TOptions } from "i18next";
2
+ import { SUPPORTED_LANGUAGE } from "./constants";
3
+ export declare type SupportedLanguage = typeof SUPPORTED_LANGUAGE[number];
4
+ declare type TranslationFile = {
5
+ [key: string]: string;
6
+ };
7
+ export declare class Translation {
8
+ private static instance;
9
+ private translationFile;
10
+ private translationFileCache;
11
+ private language;
12
+ private constructor();
13
+ static init(translationFile: {
14
+ [key: string]: string;
15
+ }, language: string): void;
16
+ static getInstance(): Translation;
17
+ setTranslationSource(translationFile: {
18
+ [key: string]: string;
19
+ }, language: string): void;
20
+ getLanguage(): string;
21
+ getTranslationFileByLanguage(language: string): TranslationFile;
22
+ private getPluralizationKey;
23
+ translate: (key: string, options?: TOptions) => string;
24
+ }
25
+ export {};
@@ -0,0 +1,16 @@
1
+ export declare const getEnv: (host: string) => string;
2
+ export declare enum RegionCode {
3
+ "AU" = "au",
4
+ "EU" = "eu",
5
+ "US" = "us"
6
+ }
7
+ export declare enum Region {
8
+ "AU" = "ap-southeast-2",
9
+ "EU" = "eu-west-1",
10
+ "US" = "us-east-1"
11
+ }
12
+ /**
13
+ * We might have region or region code in url, we will convert them to aws region (chatbot region)
14
+ */
15
+ export declare const convertToChatbotRegion: (regionString: string) => string;
16
+ export declare const fakeAsyncFunc: (timeout?: number, callback?: () => void) => Promise<unknown>;
@@ -0,0 +1,90 @@
1
+ import { getBabelOutputPlugin } from "@rollup/plugin-babel"
2
+ import path from "path"
3
+ import { defineConfig } from "vite"
4
+ import cssInjectedByJsPlugin from "vite-plugin-css-injected-by-js"
5
+
6
+ export default defineConfig({
7
+ // we build chatersertbot in single file, vite does not include css in js file we need to plugin to build js and css in 1 single js file
8
+ plugins: [cssInjectedByJsPlugin()],
9
+ build: {
10
+ target: "es5",
11
+ lib: {
12
+ entry: path.resolve(__dirname, "src/predictivehire.tsx"),
13
+ name: "PredictiveHire",
14
+ // We build and release 2 formats
15
+ // es is used for modern FE application tool such as React, Vue... which will use esm to import our lib e.g import {PHChatbot} from @predictivehire/chatbot
16
+ // umd is used for any browser in script tag
17
+ formats: ["es", "umd"],
18
+ fileName: format => {
19
+ if (format === "es") {
20
+ return "predictivehire.js"
21
+ } else {
22
+ return `predictivehire.${format}.js`
23
+ }
24
+ }
25
+ },
26
+ rollupOptions: {
27
+ external: ["react", "react-dom"],
28
+ output: {
29
+ exports: "named",
30
+ globals: {
31
+ react: "React",
32
+ "react-dom": "ReactDOM"
33
+ }
34
+ },
35
+ plugins: [
36
+ /**
37
+ * Running Babel on the generated code:
38
+ * https://github.com/rollup/plugins/blob/master/packages/babel/README.md#running-babel-on-the-generated-code
39
+ *
40
+ * Transforming ES6+ syntax to ES5 is not supported yet, there are two ways to do:
41
+ * https://github.com/evanw/esbuild/issues/1010#issuecomment-803865232
42
+ * We choose to run Babel on the output files after esbuild.
43
+ *
44
+ * @vitejs/plugin-legacy does not support library mode:
45
+ * https://github.com/vitejs/vite/issues/1639
46
+ */
47
+ getBabelOutputPlugin({
48
+ allowAllFormats: true,
49
+ presets: [
50
+ [
51
+ "@babel/preset-env",
52
+ {
53
+ useBuiltIns: false, // Default:false
54
+ // Exclude transforms that make all code slower
55
+ exclude: ["transform-typeof-symbol"],
56
+ // https://babeljs.io/docs/en/babel-preset-env#modules
57
+ modules: false
58
+ }
59
+ ]
60
+ ]
61
+ })
62
+ ]
63
+ },
64
+ outDir: path.resolve(__dirname, "dist-chatbot"),
65
+ minify: true
66
+ },
67
+ resolve: {
68
+ extensions: [".tsx", ".ts", ".js"],
69
+ alias: {
70
+ "@": path.resolve(__dirname, "src")
71
+ }
72
+ },
73
+ css: {
74
+ preprocessorOptions: {
75
+ less: {
76
+ modifyVars: {
77
+ "@font-size-base": "16px",
78
+ "@primary-color": "#232FFD"
79
+ },
80
+ javascriptEnabled: true
81
+ }
82
+ }
83
+ },
84
+ optimizeDeps: {
85
+ include: ["antd"]
86
+ },
87
+ server: {
88
+ open: true
89
+ }
90
+ })
package/vite.config.js ADDED
@@ -0,0 +1,77 @@
1
+ import react from "@vitejs/plugin-react"
2
+ import path from "path"
3
+ import { defineConfig } from "vite"
4
+ // eslint-disable-next-line import/default
5
+ import checker from "vite-plugin-checker"
6
+ // eslint-disable-next-line import/default
7
+ import eslint from "vite-plugin-eslint"
8
+ import { configDefaults } from "vitest/config"
9
+
10
+ export default defineConfig(({ mode }) => {
11
+ return {
12
+ build: {
13
+ outDir: "build"
14
+ },
15
+ preview: {
16
+ port: 8080
17
+ },
18
+ server: {
19
+ port: 3000,
20
+ open: true,
21
+ allowedHosts: ["fi.localhost.com"]
22
+ },
23
+ resolve: {
24
+ alias: {
25
+ "@": path.resolve(__dirname, "./src"),
26
+ // @root point to dist-chatbot to use build version of chatbot when build and deploy this fi-widget to fi-widget.qa.predictivehive.com domain
27
+ "@root": mode === "production" ? path.resolve(__dirname, "dist-chatbot") : path.resolve(__dirname, "./src")
28
+ }
29
+ },
30
+ optimizeDeps: {
31
+ esbuildOptions: {
32
+ // Node.js global to browser globalThis
33
+ define: {
34
+ global: "globalThis"
35
+ }
36
+ }
37
+ },
38
+ define: {
39
+ "process.env": {}
40
+ },
41
+ plugins: [
42
+ checker({
43
+ typescript: true
44
+ }),
45
+ react(),
46
+ eslint()
47
+ ],
48
+ // Config for vitest
49
+ test: {
50
+ globals: true,
51
+ css: {
52
+ modules: {
53
+ // Does not use css module changing css class name because we have some tests using class name in assertions
54
+ // TODO: research more about best practices testing css especially css module
55
+ classNameStrategy: "non-scoped"
56
+ }
57
+ },
58
+ environment: "jsdom",
59
+ setupFiles: ["./src/vitest.setup.js"],
60
+ coverage: {
61
+ provider: "istanbul",
62
+ exclude: [
63
+ ...configDefaults.coverage.exclude,
64
+ "./vitest.setup.ts",
65
+ "**/src/config.ts",
66
+ "**/src/components/Icons/**",
67
+ "**/src/constants/**",
68
+ "**/src/styles/**",
69
+ "**/src/types/**",
70
+ "**/src/**/index.ts"
71
+ ],
72
+ // you can include other reporters, but 'json-summary' is required, json is recommended
73
+ reporter: ["text", "json-summary", "json"]
74
+ }
75
+ }
76
+ }
77
+ })
@@ -0,0 +1 @@
1
+ export {};